@media (max-width: 640px) {
  html[dir="rtl"] body.beauty-lens-arabic .beauty-lens-storefront-bar {
    grid-template-areas: "quick brand menu" !important;
  }

  html[dir="rtl"] body.beauty-lens-arabic .beauty-lens-nav-open .beauty-lens-main-links > a,
  html[dir="rtl"] body.beauty-lens-arabic .beauty-lens-nav-open .beauty-lens-main-links .beauty-lens-mega-trigger > a {
    text-align: right !important;
  }

  html[dir="rtl"] body.beauty-lens-arabic .beauty-lens-nav-open .beauty-lens-main-links > a.is-active::after,
  html[dir="rtl"] body.beauty-lens-arabic .beauty-lens-nav-open .beauty-lens-main-links .beauty-lens-mega-trigger > a.is-active::after {
    left: auto !important;
    right: 22px !important;
  }

  html,
  body {
    max-width: 100% !important;
    overflow-x: hidden !important;
  }

  body.beauty-lens-site .beauty-lens-benefit-bar {
    background: #ef3f7a !important;
    border-bottom: 0 !important;
    color: #fff !important;
  }

  body.beauty-lens-site .beauty-lens-benefit-inner {
    justify-content: center !important;
    min-height: 36px !important;
    overflow: hidden !important;
    padding: 0 14px !important;
    width: 100% !important;
  }

  body.beauty-lens-site .beauty-lens-benefit-inner nav,
  body.beauty-lens-site .beauty-lens-benefit-inner span:not(:first-child) {
    display: none !important;
  }

  body.beauty-lens-site .beauty-lens-benefit-inner span:first-child {
    color: #fff !important;
    display: block !important;
    font-size: 13px !important;
    font-weight: 900 !important;
    letter-spacing: 0.02em !important;
    overflow: hidden !important;
    text-align: center !important;
    text-overflow: ellipsis !important;
    text-transform: uppercase !important;
    white-space: nowrap !important;
  }

  body.beauty-lens-site .beauty-lens-storefront-bar {
    align-items: center !important;
    column-gap: 8px !important;
    display: grid !important;
    grid-template-areas: "menu brand quick search" !important;
    grid-template-columns: 42px minmax(0, 1fr) 44px 42px !important;
    grid-template-rows: 72px !important;
    min-height: 72px !important;
    padding: 0 18px !important;
    width: 100% !important;
  }

  body.beauty-lens-site .beauty-lens-mobile-menu-toggle {
    align-items: center !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    color: #211c21 !important;
    display: inline-flex !important;
    font-size: 0 !important;
    grid-area: menu !important;
    height: 42px !important;
    justify-content: center !important;
    padding: 0 !important;
    width: 42px !important;
  }

  body.beauty-lens-site .beauty-lens-mobile-menu-toggle::before {
    content: "\2630" !important;
    font-size: 28px !important;
    font-weight: 400 !important;
    line-height: 1 !important;
  }

  body.beauty-lens-site .beauty-lens-wordmark {
    grid-area: brand !important;
    justify-content: center !important;
    min-width: 0 !important;
    width: 100% !important;
  }

  body.beauty-lens-site .beauty-lens-wordmark img {
    height: auto !important;
    max-height: 42px !important;
    max-width: min(180px, 100%) !important;
    object-fit: contain !important;
    width: 100% !important;
  }

  body.beauty-lens-site .beauty-lens-quick-links {
    display: flex !important;
    gap: 0 !important;
    grid-area: quick !important;
    justify-content: center !important;
    min-width: 0 !important;
    width: 44px !important;
  }

  body.beauty-lens-site .beauty-lens-quick-links a:not(.beauty-lens-cart-link),
  body.beauty-lens-site .beauty-lens-quick-links small,
  body.beauty-lens-site .beauty-lens-cart-link small {
    display: none !important;
  }

  body.beauty-lens-site .beauty-lens-quick-links .beauty-lens-cart-link {
    align-items: center !important;
    display: inline-flex !important;
    height: 42px !important;
    justify-content: center !important;
    min-width: 42px !important;
    width: 42px !important;
  }

  body.beauty-lens-site .beauty-lens-quick-links b {
    font-size: 26px !important;
    line-height: 1 !important;
  }

  body.beauty-lens-site .beauty-lens-search {
    align-items: center !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    display: flex !important;
    grid-area: search !important;
    height: 42px !important;
    justify-content: center !important;
    margin: 0 !important;
    max-width: 42px !important;
    min-width: 0 !important;
    padding: 0 !important;
    width: 42px !important;
  }

  body.beauty-lens-site .beauty-lens-search input[type="search"] {
    height: 1px !important;
    opacity: 0 !important;
    pointer-events: none !important;
    position: absolute !important;
    width: 1px !important;
  }

  body.beauty-lens-site .beauty-lens-search button {
    align-items: center !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    color: #211c21 !important;
    display: inline-flex !important;
    font-size: 30px !important;
    height: 42px !important;
    justify-content: center !important;
    min-width: 42px !important;
    padding: 0 !important;
    width: 42px !important;
  }

  body.beauty-lens-search-open .beauty-lens-search {
    background: #fff !important;
    border: 1px solid #ef3f7a !important;
    border-radius: 8px !important;
    box-shadow: 0 16px 40px rgb(35 26 30 / 0.18) !important;
    display: flex !important;
    height: 52px !important;
    left: 14px !important;
    max-width: none !important;
    padding: 0 4px 0 12px !important;
    position: fixed !important;
    right: 14px !important;
    top: 44px !important;
    width: auto !important;
    z-index: 140 !important;
  }

  body.beauty-lens-search-open .beauty-lens-search input[type="search"] {
    color: #211c21 !important;
    flex: 1 1 auto !important;
    font-size: 16px !important;
    height: 48px !important;
    opacity: 1 !important;
    padding: 0 8px !important;
    pointer-events: auto !important;
    position: static !important;
    width: auto !important;
  }

  body.beauty-lens-search-open .beauty-lens-search button {
    background: #ef3f7a !important;
    border-radius: 6px !important;
    color: #fff !important;
    flex: 0 0 42px !important;
  }

  body.beauty-lens-shop-page .woocommerce-ordering {
    float: none !important;
    margin: 0 0 18px !important;
    width: 100% !important;
  }

  body.beauty-lens-shop-page .woocommerce-ordering select.orderby {
    appearance: auto !important;
    background: #fff !important;
    border: 1px solid #e5d9de !important;
    border-radius: 8px !important;
    color: #211c21 !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    height: 46px !important;
    padding: 0 12px !important;
    width: 100% !important;
  }

  body.beauty-lens-site .beauty-lens-main-links {
    display: none !important;
    left: 14px !important;
    right: 14px !important;
    top: 112px !important;
    width: auto !important;
  }

  body.beauty-lens-nav-open .beauty-lens-main-links {
    background: #fff !important;
    border: 1px solid #eadfd8 !important;
    border-radius: 10px !important;
    box-shadow: 0 24px 70px rgb(22 22 22 / 0.12) !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 0 !important;
    max-height: calc(100vh - 132px) !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    padding: 0 !important;
    position: fixed !important;
    z-index: 120 !important;
  }

  body.beauty-lens-nav-open .beauty-lens-main-links > a,
  body.beauty-lens-nav-open .beauty-lens-main-links .beauty-lens-mega-trigger > a {
    align-items: center !important;
    border-bottom: 1px solid #f0e8e2 !important;
    color: #211c21 !important;
    display: flex !important;
    font-size: 17px !important;
    font-weight: 900 !important;
    height: 56px !important;
    justify-content: flex-start !important;
    line-height: 1.2 !important;
    min-height: 56px !important;
    padding: 0 22px !important;
    position: relative !important;
    text-align: left !important;
    width: 100% !important;
  }

  body.beauty-lens-nav-open .beauty-lens-main-links > a.is-active,
  body.beauty-lens-nav-open .beauty-lens-main-links .beauty-lens-mega-trigger > a.is-active {
    color: #ef3f7a !important;
  }

  body.beauty-lens-nav-open .beauty-lens-main-links > a.is-active::after,
  body.beauty-lens-nav-open .beauty-lens-main-links .beauty-lens-mega-trigger > a.is-active::after {
    background: #ef3f7a !important;
    bottom: 0 !important;
    content: "" !important;
    height: 3px !important;
    left: 22px !important;
    position: absolute !important;
    transform: none !important;
    width: 54px !important;
  }

  body.beauty-lens-nav-open .beauty-lens-mega-trigger {
    display: block !important;
    width: 100% !important;
  }

  body.beauty-lens-nav-open .beauty-lens-mega-menu {
    display: none !important;
  }

  .woocommerce ul.products,
  .beauty-lens-site ul.products,
  .beauty-lens-shop-page ul.products,
  .beauty-lens-site.home .beauty-lens-hot-sale ul.products,
  .beauty-lens-new-products ul.products {
    display: grid !important;
    gap: 18px 12px !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .woocommerce ul.products li.product,
  .beauty-lens-site ul.products li.product {
    margin: 0 !important;
    min-width: 0 !important;
    width: auto !important;
  }

  .woocommerce ul.products li.product .woocommerce-loop-product__title,
  .beauty-lens-site ul.products li.product .woocommerce-loop-product__title {
    display: -webkit-box !important;
    font-size: 15px !important;
    line-height: 1.28 !important;
    min-height: 38px !important;
    overflow: hidden !important;
    -webkit-box-orient: vertical !important;
    -webkit-line-clamp: 2 !important;
  }
}

/* Ranking products must never depend on viewport animation to become visible. */
body.beauty-lens-editorial-page .beauty-lens-ranking-page ul.products li.product {
  filter: none !important;
  opacity: 1 !important;
  transform: none !important;
}

/* Keep the Best Sellers page product-first on phones. */
@media (max-width: 640px) {
  body.beauty-lens-editorial-page .beauty-lens-ranking-page {
    padding: 16px !important;
  }

  body.beauty-lens-editorial-page .beauty-lens-ranking-hero {
    display: block !important;
    padding: 18px !important;
  }

  body.beauty-lens-editorial-page .beauty-lens-ranking-hero h1 {
    font-size: 32px !important;
    line-height: 1.08 !important;
  }

  body.beauty-lens-editorial-page .beauty-lens-ranking-hero img {
    height: 180px !important;
    margin-top: 16px !important;
  }

  body.beauty-lens-editorial-page .beauty-lens-top-three {
    gap: 12px !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    margin-top: 20px !important;
  }

  body.beauty-lens-editorial-page .beauty-lens-top-three article {
    min-width: 0 !important;
    padding: 12px !important;
  }

  body.beauty-lens-editorial-page .beauty-lens-top-three .rank-one {
    grid-column: 1 / -1 !important;
  }

  body.beauty-lens-editorial-page .beauty-lens-ranked-list,
  body.beauty-lens-editorial-page .beauty-lens-ranking-groups > div {
    margin-top: 20px !important;
    padding: 16px !important;
  }

  body.beauty-lens-editorial-page .beauty-lens-ranking-groups {
    display: grid !important;
    gap: 20px !important;
    margin-top: 20px !important;
  }

  body.beauty-lens-editorial-page .beauty-lens-ranking-page ul.products {
    column-gap: 12px !important;
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    margin: 0 !important;
    row-gap: 18px !important;
    width: 100% !important;
  }

  body.beauty-lens-editorial-page .beauty-lens-top-three ul.products {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  body.beauty-lens-editorial-page .beauty-lens-ranking-page ul.products li.product {
    filter: none !important;
    margin: 0 !important;
    min-width: 0 !important;
    opacity: 1 !important;
    transform: none !important;
    width: auto !important;
  }

  body.beauty-lens-editorial-page .beauty-lens-ranking-page ul.products li.product img {
    aspect-ratio: 1 / 1.02 !important;
    border-radius: 8px !important;
    object-fit: cover !important;
    width: 100% !important;
  }

  body.beauty-lens-editorial-page .beauty-lens-ranking-page ul.products li.product .woocommerce-loop-product__title {
    font-size: 13px !important;
    line-height: 1.3 !important;
    margin-top: 9px !important;
    min-height: 34px !important;
  }

  body.beauty-lens-editorial-page .beauty-lens-ranking-page ul.products li.product .price {
    font-size: 15px !important;
    line-height: 1.2 !important;
  }
}

/* WooCommerce clear-fix pseudo elements become empty grid cells on mobile. */
@media (max-width: 640px) {
  .woocommerce ul.products::before,
  .woocommerce ul.products::after,
  .beauty-lens-site ul.products::before,
  .beauty-lens-site ul.products::after {
    content: none !important;
    display: none !important;
  }

  /* Product discovery pages must never wait for off-screen reveal animation. */
  body.beauty-lens-new-arrivals-page ul.products li.product {
    filter: none !important;
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}

/* Mobile home commerce refresh: product-led discovery without changing WooCommerce data. */
@media (max-width: 640px) {
  body.home .inside-article .entry-content {
    overflow: clip;
  }

  body.home .beauty-lens-section {
    padding: 28px 16px !important;
  }

  body.home .beauty-lens-section h2,
  body.home .beauty-lens-finder h2 {
    color: #17191b;
    font-size: 22px !important;
    font-weight: 800 !important;
    line-height: 1.15 !important;
    margin: 0 0 14px !important;
  }

  body.home .beauty-lens-home-top-picks {
    padding-top: 22px !important;
  }

  body.home .beauty-lens-hot-sale .woocommerce ul.products,
  body.home .beauty-lens-hot-sale ul.products {
    gap: 26px 12px !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    margin-top: 0 !important;
  }

  body.home .beauty-lens-hot-sale ul.products li.product {
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    min-width: 0 !important;
    overflow: visible !important;
    padding: 0 !important;
    position: relative !important;
  }

  body.home .beauty-lens-hot-sale ul.products li.product img {
    aspect-ratio: 1 / 1.04 !important;
    background: #f3f5f2 !important;
    border-radius: 8px !important;
    margin: 0 !important;
    object-fit: cover !important;
  }

  body.home .beauty-lens-hot-sale ul.products li.product .woocommerce-loop-product__title,
  body.home .beauty-lens-hot-sale ul.products li.product .price {
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  body.home .beauty-lens-hot-sale ul.products li.product .woocommerce-loop-product__title {
    color: #17191b !important;
    font-size: 14px !important;
    font-weight: 760 !important;
    line-height: 1.32 !important;
    margin-top: 10px !important;
    min-height: 37px !important;
  }

  body.home .beauty-lens-hot-sale ul.products li.product .price {
    color: #ef3f7a !important;
    font-size: 17px !important;
    font-weight: 850 !important;
    margin-top: 6px !important;
  }

  body.home .beauty-lens-hot-sale ul.products li.product .price del {
    color: #7d8280 !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    margin-left: 4px !important;
  }

  body.home .beauty-lens-hot-sale ul.products li.product .price ins {
    text-decoration: none !important;
  }

  body.home .beauty-lens-hot-sale ul.products li.product .button {
    align-items: center !important;
    background: #fff !important;
    border: 1px solid #d7ded8 !important;
    border-radius: 50% !important;
    box-shadow: 0 5px 14px rgb(22 31 26 / 0.12) !important;
    color: transparent !important;
    display: inline-flex !important;
    font-size: 0 !important;
    height: 36px !important;
    justify-content: center !important;
    margin: 0 !important;
    padding: 0 !important;
    position: absolute !important;
    right: 8px !important;
    top: 8px !important;
    width: 36px !important;
    z-index: 2 !important;
  }

  body.home .beauty-lens-new-home ul.products li.product {
    filter: none !important;
    opacity: 1 !important;
    transform: none !important;
  }

  body.home .beauty-lens-hot-sale ul.products li.product .button::before {
    color: #167a39 !important;
    content: "+" !important;
    font-size: 24px !important;
    font-weight: 500 !important;
    line-height: 1 !important;
  }

  body.home .beauty-lens-home-color-grid {
    display: grid !important;
    gap: 8px !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }

  body.home .beauty-lens-home-color-grid a {
    align-items: center !important;
    background: #fff !important;
    border: 1px solid #e5e9e4 !important;
    border-radius: 8px !important;
    box-shadow: none !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 6px !important;
    justify-content: center !important;
    min-height: 86px !important;
    padding: 9px 6px !important;
    text-align: center !important;
  }

  body.home .beauty-lens-home-color-grid a span {
    border: 2px solid #fff !important;
    box-shadow: 0 1px 5px rgb(20 30 24 / 0.18) !important;
    height: 31px !important;
    width: 31px !important;
  }

  body.home .beauty-lens-home-color-grid a strong {
    color: #17191b !important;
    font-size: 12px !important;
    line-height: 1.1 !important;
  }

  body.home .beauty-lens-home-color-grid a em {
    display: none !important;
  }

  body.home .beauty-lens-finder {
    background: #f3f6f2 !important;
    border: 1px solid #e2e9e2 !important;
    border-radius: 8px !important;
    margin: 4px 16px 20px !important;
    padding: 20px !important;
  }

  body.home .beauty-lens-finder p {
    color: #5d675f !important;
    font-size: 13px !important;
    line-height: 1.45 !important;
    margin: 0 0 14px !important;
  }

  body.home .beauty-lens-finder nav {
    display: grid !important;
    gap: 8px !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }

  body.home .beauty-lens-finder nav a {
    background: #fff !important;
    border: 1px solid #cfe0d2 !important;
    border-radius: 999px !important;
    color: #167a39 !important;
    font-size: 12px !important;
    font-weight: 750 !important;
    min-height: 36px !important;
    padding: 9px 4px !important;
    text-align: center !important;
  }

  body.home .beauty-lens-mood-grid.wp-block-columns,
  body.home .beauty-lens-inspiration-grid.wp-block-columns {
    display: grid !important;
    gap: 10px !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    margin-top: 0 !important;
  }

  body.home .beauty-lens-mood-grid > .wp-block-column,
  body.home .beauty-lens-inspiration-grid > .wp-block-column {
    flex-basis: auto !important;
    margin: 0 !important;
    min-width: 0 !important;
  }

  body.home .beauty-lens-mood-card,
  body.home .beauty-lens-inspiration-card {
    border-radius: 8px !important;
    min-height: 136px !important;
  }

  body.home .beauty-lens-mood-card img,
  body.home .beauty-lens-inspiration-card img {
    aspect-ratio: 1 / 1 !important;
  }

  body.home .beauty-lens-mood-copy {
    bottom: 9px !important;
    left: 10px !important;
    right: 10px !important;
  }

  body.home .beauty-lens-mood-copy h3,
  body.home .beauty-lens-inspiration-card strong {
    font-size: 13px !important;
    line-height: 1.1 !important;
  }

  body.home .beauty-lens-mood-copy p,
  body.home .beauty-lens-inspiration-card em {
    font-size: 10px !important;
    line-height: 1.2 !important;
  }

  body.home .beauty-lens-home-shell {
    background: #f6f8f5 !important;
    margin: 0 !important;
    padding: 18px 16px !important;
  }

  body.home .beauty-lens-service-row,
  body.home .beauty-lens-bottom-trust .wp-block-columns {
    display: grid !important;
    gap: 8px !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  body.home .beauty-lens-service-row > .wp-block-column,
  body.home .beauty-lens-bottom-trust .wp-block-column {
    background: #fff !important;
    border: 1px solid #e2e9e2 !important;
    border-radius: 8px !important;
    margin: 0 !important;
    min-width: 0 !important;
    padding: 12px !important;
  }

  body.home .beauty-lens-service-row p,
  body.home .beauty-lens-bottom-trust p {
    color: #5d675f !important;
    font-size: 11px !important;
    line-height: 1.35 !important;
    margin: 0 !important;
  }

  body.home .beauty-lens-service-row strong,
  body.home .beauty-lens-bottom-trust strong {
    color: #17191b !important;
    font-size: 12px !important;
  }

  body.home .beauty-lens-service-row span {
    display: none !important;
  }

  body.home .beauty-lens-hot-sale ul.products li.product a:focus-visible,
  body.home .beauty-lens-finder nav a:focus-visible,
  body.home .beauty-lens-home-color-grid a:focus-visible {
    outline: 3px solid #ef3f7a !important;
    outline-offset: 3px !important;
  }

  body.home .beauty-lens-hot-sale ul.products li.product .button:active {
    transform: scale(0.94) !important;
  }
}
