/*
 * A-MEDICAL COSMETICS — scoped mobile-first presentation layer.
 * Loaded after the existing shared and homepage styles.
 */

:root {
  --am-ink: #18212f;
  --am-muted: #667085;
  --am-line: #e8e2dc;
  --am-paper: #fff;
  --am-soft: #faf8f5;
  --am-warm: #a56a2b;
  --am-warm-dark: #7d4d1d;
  --am-success: #067647;
  --am-radius-sm: 12px;
  --am-radius: 18px;
  --am-shadow: 0 12px 34px rgba(24, 33, 47, 0.08);
}

html {
  scroll-behavior: smooth;
}

body {
  color: var(--am-ink);
  background: #fff;
}

img {
  max-width: 100%;
}

.container {
  width: min(100% - 28px, 1180px);
}

.section {
  padding-block: clamp(2.25rem, 7vw, 4.5rem);
}

.section-head {
  margin-bottom: clamp(1.25rem, 4vw, 2rem);
}

.section-head h2 {
  line-height: 1.35;
  text-wrap: balance;
}

/* Brand lock-up: transparent mark plus two lines with identical width. */
.logo {
  gap: 0.48rem;
  direction: ltr;
  flex-direction: row;
  unicode-bidi: isolate;
}

.logo-mark--image {
  width: 2.7rem;
  height: 2.7rem;
  overflow: visible;
  background: transparent !important;
  border-radius: 0;
}

.logo-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 0;
  background: transparent;
}

.logo-text {
  width: 7.65rem;
  min-width: 7.65rem;
  direction: ltr;
  line-height: 1;
  unicode-bidi: isolate;
}

.logo-name--brand {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  color: #1a2432;
  font-size: 0.94rem;
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1.12;
  text-align: center;
  transform: none;
}

.logo-name--brand > span {
  display: block;
}

.logo-tag--distributed {
  display: flex !important;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  margin-top: 0.16rem;
  overflow: visible !important;
  color: #697386;
  font-size: 0.58rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0;
  white-space: nowrap;
  direction: ltr;
  unicode-bidi: isolate;
}

.logo-tag--distributed > span {
  display: block;
}

.top-header {
  background: rgba(255, 255, 255, 0.98);
  border-bottom-color: rgba(24, 33, 47, 0.08);
}

.side-cart-backdrop {
  z-index: 1290 !important;
}

.side-cart {
  z-index: 1300 !important;
}

.header-drawer-backdrop {
  z-index: 1310;
}

.header-drawer {
  z-index: 1320;
}

#header.is-drawer-open {
  z-index: 10010;
  transform: none !important;
}

/* Product imagery always respects the supplied 1200×1650 portrait artwork. */
.product-img,
.pd-main-img-wrap {
  aspect-ratio: 8 / 11;
  background: #f8f7f5;
}

.product-img img,
.pd-gallery-slide img,
.pd-main-slide img,
.pd-thumb img,
.cart-item__img img,
.side-cart__thumb img {
  object-fit: contain;
  background: #f8f7f5;
}

.pd-main-img-wrap {
  max-height: none;
  overflow: hidden;
  border: 1px solid #eee9e4;
  border-radius: var(--am-radius);
}

.pd-gallery-expand {
  position: absolute;
  z-index: 8;
  inset-inline-start: 0.75rem;
  top: 0.75rem;
  display: grid;
  width: 2.65rem;
  height: 2.65rem;
  place-items: center;
  padding: 0;
  color: var(--am-ink);
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(24, 33, 47, 0.12);
  border-radius: 999px;
  box-shadow: 0 5px 18px rgba(24, 33, 47, 0.12);
  cursor: pointer;
  backdrop-filter: blur(8px);
}

.pd-thumbs {
  flex-wrap: nowrap;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  padding: 0.1rem 0.05rem 0.35rem;
  scrollbar-width: none;
  scroll-snap-type: x proximity;
}

.pd-thumbs::-webkit-scrollbar {
  display: none;
}

.pd-thumb {
  width: 3.85rem;
  height: 5.3rem;
  border-radius: 10px;
  scroll-snap-align: start;
}

.pd-thumb.is-active {
  border-color: var(--am-warm);
  box-shadow: 0 0 0 2px rgba(165, 106, 43, 0.14);
}

.pd-info h1 {
  color: var(--am-ink);
  font-weight: 900;
  line-height: 1.4;
  text-wrap: balance;
}

.pd-lead {
  color: var(--am-muted);
  line-height: 1.85;
}

.pd-price-block .price {
  color: var(--am-ink);
  font-size: clamp(1.3rem, 5vw, 1.65rem);
}

.pd-stock-status--low {
  color: #975a16;
  background: #fff8e7;
  border-color: #f6d88d;
}

.pd-restock-contact {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  margin: -0.15rem 0 0.65rem;
  padding: 0.6rem 0.9rem;
  color: var(--am-success);
  background: #ecfdf3;
  border: 1px solid #abefc6;
  border-radius: 12px;
  font-size: 0.82rem;
  font-weight: 800;
}

.sales-product-benefits,
.sales-product-accordion,
.sales-trust-row {
  max-width: 100%;
}

.sales-product-benefits {
  background: #fffaf5;
  border-color: #ead8c4;
  border-radius: var(--am-radius);
}

.sales-product-details {
  margin: 0;
  border-top: 1px solid var(--am-line);
  border-bottom: 0;
}

.sales-product-details:last-child {
  border-bottom: 1px solid var(--am-line);
}

.sales-product-details summary {
  min-height: 54px;
  display: flex;
  align-items: center;
}

.sales-product-details__content {
  color: var(--am-muted);
  font-size: 0.92rem;
  line-height: 1.85;
}

.sales-product-details__content p {
  margin-top: 0;
}

.sales-product-details__content ul {
  display: grid;
  gap: 0.55rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.sales-product-details__content li {
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: 0.5rem;
}

.sales-product-details__content li > span {
  color: var(--am-success);
}

.sales-product-faq h3 {
  margin: 0.75rem 0 0.2rem;
  color: var(--am-ink);
  font-size: 0.9rem;
}

.sales-routine-upsell {
  grid-template-columns: 8rem minmax(0, 1fr) auto;
  gap: 1.1rem;
  border-radius: 22px;
}

.sales-routine-upsell__image {
  display: block;
  aspect-ratio: 8 / 11;
  overflow: hidden;
  background: #f8f7f5;
  border-radius: 14px;
}

.sales-routine-upsell__image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.sales-routine-upsell__copy {
  min-width: 0;
}

.sales-routine-upsell__price {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.65rem;
  align-items: baseline;
  margin-top: 0.65rem;
}

.sales-routine-upsell__price strong {
  color: var(--am-ink);
  font-size: 1.08rem;
}

.sales-routine-upsell__price del {
  color: #98a2b3;
}

.sales-routine-upsell__price span {
  color: var(--am-success);
  font-size: 0.78rem;
  font-weight: 800;
}

.sales-routine-upsell__actions {
  display: grid;
  gap: 0.55rem;
  justify-items: stretch;
}

.sales-routine-link {
  color: var(--am-warm-dark);
  font-size: 0.82rem;
  font-weight: 800;
  text-align: center;
}

/* Reviews inspired by a clean social-proof card system. */
.pd-reviews-summary {
  display: grid;
  grid-template-columns: minmax(180px, 0.65fr) minmax(260px, 1fr);
  gap: 1.4rem;
  align-items: center;
  margin: 0 0 1.25rem;
  padding: 1.25rem;
  background: linear-gradient(135deg, #fffaf5, #fff);
  border: 1px solid #eadfd4;
  border-radius: 22px;
  box-shadow: var(--am-shadow);
}

.pd-reviews-summary__score {
  display: grid;
  justify-items: center;
  gap: 0.35rem;
  text-align: center;
}

.pd-reviews-summary__score > strong {
  color: var(--am-ink);
  font-size: clamp(2.5rem, 8vw, 3.6rem);
  font-weight: 900;
  line-height: 1;
}

.pd-reviews-summary__stars {
  color: #f59e0b;
  font-size: 1.15rem;
  letter-spacing: 0.07em;
}

.pd-reviews-summary__score small {
  color: var(--am-muted);
  font-size: 0.8rem;
}

.pd-review-distribution {
  display: grid;
  gap: 0.38rem;
}

.pd-review-distribution__row {
  display: grid;
  grid-template-columns: 3rem minmax(80px, 1fr) 2rem;
  gap: 0.55rem;
  align-items: center;
  width: 100%;
  padding: 0.2rem 0.35rem;
  color: var(--am-muted);
  background: transparent;
  border: 0;
  border-radius: 8px;
  font: inherit;
  font-size: 0.76rem;
  cursor: pointer;
}

.pd-review-distribution__row.is-active {
  color: var(--am-ink);
  background: rgba(165, 106, 43, 0.08);
  font-weight: 800;
}

.pd-review-distribution__label span {
  color: #f59e0b;
}

.pd-review-distribution__track {
  height: 7px;
  overflow: hidden;
  background: #ece8e3;
  border-radius: 999px;
}

.pd-review-distribution__track i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #f4ba57, #e89722);
  border-radius: inherit;
}

.pd-reviews-toolbar {
  display: flex;
  gap: 0.7rem;
  align-items: center;
  justify-content: space-between;
  margin: -0.2rem 0 1rem;
}

.pd-reviews-toolbar__all,
.pd-reviews-sort select {
  min-height: 40px;
  color: var(--am-ink);
  background: #fff;
  border: 1px solid #ded8d2;
  border-radius: 999px;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 700;
}

.pd-reviews-toolbar__all {
  padding: 0.45rem 0.8rem;
}

.pd-reviews-toolbar__all.is-active {
  color: #fff;
  background: var(--am-ink);
  border-color: var(--am-ink);
}

.pd-reviews-sort {
  display: flex;
  gap: 0.4rem;
  align-items: center;
  color: var(--am-muted);
  font-size: 0.75rem;
}

.pd-reviews-sort select {
  padding-inline: 0.75rem 1.8rem;
}

.pd-reviews-list {
  gap: 0.85rem;
}

.pd-review-item {
  padding: 1rem;
  background: #fff;
  border: 1px solid #ece7e2;
  border-radius: 15px;
  box-shadow: 0 7px 22px rgba(24, 33, 47, 0.05);
}

.pd-review-item:last-child {
  padding-bottom: 1rem;
  border-bottom: 1px solid #ece7e2;
}

.pd-review-item__head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 0.35rem 0.65rem;
  align-items: center;
}

.pd-review-item__avatar {
  display: grid;
  width: 2.35rem;
  height: 2.35rem;
  place-items: center;
  color: var(--am-warm-dark);
  background: #f5eadf;
  border-radius: 50%;
  font-size: 0.85rem;
  font-weight: 900;
}

.pd-review-item__identity {
  display: grid;
  min-width: 0;
  gap: 0.12rem;
}

.pd-review-item__stars {
  color: #f59e0b;
}

.pd-review-item__date {
  grid-column: 3;
  grid-row: 1;
}

.pd-review-item__badge {
  width: fit-content;
}

.pd-review-item__badge--verified {
  color: var(--am-success);
  background: #ecfdf3;
}

.pd-review-item__comment {
  margin-top: 0.7rem;
  line-height: 1.75;
}

.pd-review-item__comment.is-collapsible:not(.is-expanded) {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
}

.pd-review-item__more {
  margin-top: 0.35rem;
  padding: 0;
  color: var(--am-warm-dark);
  background: transparent;
  border: 0;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 800;
  cursor: pointer;
}

.pd-review-form-card,
.pd-reviews-list-wrap {
  border-color: #ece7e2;
  border-radius: 20px;
  box-shadow: var(--am-shadow);
}

.pd-review-field input,
.pd-review-field textarea {
  min-height: 46px;
  border-radius: 11px;
}

.pd-review-submit {
  min-height: 46px;
}

.pd-product-banners__list {
  display: grid;
  gap: 1rem;
}

.pd-product-banner {
  display: block;
  overflow: hidden;
  background: #fff;
  border: 1px solid #ece7e2;
  border-radius: 22px;
  box-shadow: var(--am-shadow);
}

.pd-product-banner picture,
.pd-product-banner img {
  display: block;
  width: 100%;
}

.pd-product-banner img {
  height: auto;
  object-fit: cover;
}

/* Full-screen image viewer with pinch/pan support. */
body.pd-lightbox-open {
  overflow: hidden;
}

.pd-gallery-lightbox {
  position: fixed;
  z-index: 2200;
  inset: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 0.5rem;
  padding: max(0.75rem, env(safe-area-inset-top))
    max(0.65rem, env(safe-area-inset-right))
    max(0.75rem, env(safe-area-inset-bottom))
    max(0.65rem, env(safe-area-inset-left));
  color: #fff;
  background: rgba(12, 16, 23, 0.96);
  opacity: 0;
  transition: opacity 180ms ease;
}

.pd-gallery-lightbox[hidden] {
  display: none !important;
}

.pd-gallery-lightbox.is-open {
  opacity: 1;
}

.pd-gallery-lightbox__top {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 44px;
}

.pd-gallery-lightbox__counter {
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.82rem;
  font-weight: 800;
}

.pd-gallery-lightbox__close,
.pd-gallery-lightbox__nav {
  display: grid;
  place-items: center;
  padding: 0;
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  cursor: pointer;
}

.pd-gallery-lightbox__close {
  width: 44px;
  height: 44px;
  font-size: 1.7rem;
}

.pd-gallery-lightbox__nav {
  align-self: center;
  width: 42px;
  height: 42px;
  font-size: 2rem;
}

.pd-gallery-lightbox__stage {
  position: relative;
  grid-column: 2;
  grid-row: 2;
  display: grid;
  min-width: 0;
  min-height: 0;
  place-items: center;
  overflow: hidden;
  touch-action: none;
  user-select: none;
}

.pd-gallery-lightbox__stage img {
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 100%;
  object-fit: contain;
  transform-origin: center;
  transition: transform 120ms ease-out;
  will-change: transform;
}

.pd-gallery-lightbox__stage.is-zoomed img {
  transition: none;
}

.pd-gallery-lightbox__hint {
  grid-column: 1 / -1;
  margin: 0;
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.74rem;
  text-align: center;
}

/* Cart, suggestions and checkout. */
.sales-cart-upsell {
  overflow: hidden;
}

.sales-cart-upsell > img {
  aspect-ratio: 8 / 11;
  object-fit: contain;
}

.sales-cart-upsell--compact {
  margin: 0.85rem 0 0;
}

.sales-shipping-progress {
  border-radius: 14px;
}

.checkout-form,
.checkout-summary,
.cart-summary,
.cart-item {
  border-color: #e8e2dc;
  border-radius: var(--am-radius);
  box-shadow: 0 9px 28px rgba(24, 33, 47, 0.055);
}

.checkout-field input,
.checkout-field select,
.checkout-field textarea {
  min-height: 48px;
  border-color: #dcd6d0;
  border-radius: 12px;
}

/* Global pharmacy / retailer strip before the footer on every page. */
.footer-find-us-global {
  padding: clamp(2.4rem, 7vw, 4rem) max(14px, calc((100% - 1180px) / 2));
  overflow: hidden;
  background: #fff;
  border-top: 1px solid #eee8e2;
}

.footer-find-us-global__head {
  max-width: 38rem;
  margin: 0 auto 1.4rem;
  text-align: center;
}

.footer-find-us-global__eyebrow {
  color: var(--am-warm-dark);
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.16em;
}

.footer-find-us-global__head h2 {
  margin: 0.35rem 0;
  color: var(--am-ink);
  font-size: clamp(1.45rem, 5vw, 2rem);
}

.footer-find-us-global__head p {
  margin: 0;
  color: var(--am-muted);
  line-height: 1.7;
}

.find-us-pharmacy-logo {
  background: #fff;
  border: 1px solid #eee7e0;
  border-radius: 14px;
  box-shadow: 0 7px 24px rgba(24, 33, 47, 0.055);
}

a.find-us-pharmacy-logo {
  cursor: pointer;
  pointer-events: auto;
}

/* Product cards remain vertical, clear and consistent. */
.product-card {
  border-color: #ebe6e1;
  border-radius: var(--am-radius);
}

.product-card .btn-fav {
  top: 0.65rem;
  bottom: auto;
}

.product-name {
  color: var(--am-ink);
  font-weight: 800;
}

.price {
  color: var(--am-ink);
}

.btn-cart,
.btn-primary,
.cart-checkout-btn,
.product-detail-page .pd-actions .btn-buy-now {
  border-radius: 12px;
}

.sales-problem-card {
  border-radius: var(--am-radius);
}

.sales-problem-finder__grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

:where(button, a, input, select, textarea):focus-visible {
  outline: 3px solid rgba(165, 106, 43, 0.28);
  outline-offset: 2px;
}

@media (min-width: 900px) {
  .pd-layout {
    grid-template-columns: minmax(380px, 0.9fr) minmax(0, 1fr);
    gap: clamp(2.25rem, 5vw, 4.8rem);
  }

  .pd-gallery {
    position: sticky;
    top: 92px;
  }
}

@media (max-width: 820px) {
  .sales-routine-upsell {
    grid-template-columns: 6.5rem minmax(0, 1fr);
  }

  .sales-routine-upsell__actions {
    grid-column: 1 / -1;
  }
}

@media (max-width: 767px) {
  html {
    overflow-x: clip;
  }

  body {
    overflow-x: clip;
  }

  .container,
  .page-home .container {
    width: 100%;
    max-width: 100%;
    padding-inline: max(14px, env(safe-area-inset-left))
      max(14px, env(safe-area-inset-right));
  }

  .section,
  .page-home .section {
    padding-block: 2.55rem;
  }

  .sales-problem-finder__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
  }

  .sales-problem-card {
    min-height: 116px;
    padding: 0.85rem;
  }

  .sales-problem-card strong {
    font-size: 0.87rem;
  }

  .sales-problem-card > span:not(.sales-problem-card__icon) {
    font-size: 0.72rem;
    line-height: 1.5;
  }

  .sales-problem-card__icon {
    width: 27px;
    height: 27px;
    inset-block-start: 0.65rem;
    inset-inline-end: 0.65rem;
  }

  .top-header,
  .page-home .top-header {
    z-index: 100;
    background: rgba(255, 255, 255, 0.985);
  }

  .header-mobile-bar {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) 44px;
    gap: 6px;
    min-height: 62px;
    padding-block: 5px;
  }

  .header-mobile-bar > .logo,
  .page-home .header-mobile-bar > .logo {
    width: fit-content;
    max-width: 100%;
    margin-inline: auto;
    justify-self: center;
  }

  .header-menu-toggle,
  .header-bar-cart,
  .page-home .header-menu-toggle,
  .page-home .header-bar-cart {
    width: 44px;
    min-width: 44px;
    height: 44px;
  }

  .header-mobile-tools,
  .page-home .header-mobile-tools {
    width: 44px;
    max-width: 44px;
  }

  .header-mobile-bar .logo-mark {
    width: 2.15rem;
    height: 2.15rem;
  }

  .header-mobile-bar .logo-text,
  .page-home .header-mobile-bar .logo-text {
    width: 6.55rem;
    min-width: 6.55rem;
    overflow: visible;
  }

  .header-mobile-bar .logo-name,
  .page-home .header-mobile-bar .logo-name {
    overflow: visible;
    font-size: 0.78rem;
    line-height: 1.08;
    text-overflow: clip;
  }

  .header-mobile-bar .logo-tag.logo-tag--distributed,
  .page-home .header-mobile-bar .logo-tag.logo-tag--distributed {
    display: flex !important;
    margin-top: 0.14rem;
    overflow: visible !important;
    font-size: 0.49rem;
    line-height: 1;
    text-overflow: clip;
  }

  .sub-nav {
    display: none;
  }

  .header-drawer__sub .sub-nav {
    display: block !important;
    width: 100%;
  }

  .header-drawer__sub .sub-nav-inner {
    width: 100%;
    max-width: none;
  }

  .header-drawer__sub .sub-nav-inner > a {
    width: 100%;
    min-width: 0;
  }

  .side-cart__panel {
    width: min(100%, 24rem);
  }

  .side-cart__head {
    min-height: 58px;
    padding-top: max(0.7rem, env(safe-area-inset-top));
  }

  .pd-layout {
    gap: 1.15rem;
  }

  .product-detail-page,
  .product-detail-page #main,
  .product-detail-page .section,
  .product-detail-page .container,
  .product-detail-page .pd-layout,
  .product-detail-page .pd-gallery,
  .product-detail-page .pd-info,
  .product-detail-page .pd-main-img-wrap,
  .product-detail-page .pd-main-img-viewport,
  .product-detail-page .pd-thumbs {
    min-width: 0;
    max-width: 100%;
  }

  .product-detail-page .section,
  .product-detail-page .container {
    width: 100%;
  }

  .product-detail-page .section:first-of-type {
    padding-top: 0.85rem;
  }

  .pd-main-img-wrap {
    width: 100%;
    margin-inline: auto;
    border-radius: 16px;
  }

  .pd-gallery-slide,
  .pd-main-slide {
    display: grid;
    width: 100%;
    height: 100%;
    min-width: 100%;
    place-items: center;
  }

  .pd-gallery-slide img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
  }

  .pd-info h1 {
    margin-bottom: 0.55rem;
    font-size: clamp(1.3rem, 6vw, 1.65rem);
  }

  .pd-cat {
    font-size: 0.77rem;
  }

  .pd-meta-row {
    margin-bottom: 0.75rem;
  }

  .pd-price-block {
    margin-bottom: 0.75rem;
  }

  .sales-product-benefits {
    margin-block: 0.8rem;
    padding: 0.95rem;
  }

  .sales-trust-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.38rem;
  }

  .sales-trust-row > span {
    display: grid;
    min-height: 66px;
    justify-items: center;
    padding: 0.5rem 0.3rem;
    font-size: 0.67rem;
    line-height: 1.45;
    text-align: center;
  }

  .product-detail-page .pd-info {
    padding-bottom: calc(94px + env(safe-area-inset-bottom));
  }

  .product-detail-page .pd-actions {
    z-index: 1150;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 0.45rem;
    padding: 0.62rem max(0.65rem, env(safe-area-inset-right))
      calc(0.62rem + env(safe-area-inset-bottom))
      max(0.65rem, env(safe-area-inset-left));
  }

  .product-detail-page .pd-actions .pd-btn-add-cart,
  .product-detail-page .pd-actions .btn-buy-now {
    min-height: 50px;
    padding-inline: 0.45rem;
    font-size: 0.8rem;
    white-space: nowrap;
  }

  .sales-routine-upsell {
    grid-template-columns: 5.6rem minmax(0, 1fr);
    gap: 0.85rem;
    padding: 0.9rem;
    border-radius: 17px;
  }

  .sales-routine-upsell h2 {
    font-size: 0.92rem;
  }

  .sales-routine-upsell p {
    display: none;
  }

  .sales-routine-upsell__actions {
    grid-template-columns: 1fr auto;
    align-items: center;
  }

  .sales-routine-upsell__actions .btn {
    min-height: 46px;
    font-size: 0.8rem;
  }

  #pd-related {
    display: grid;
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: minmax(10.5rem, 72vw);
    gap: 0.85rem;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    padding: 0.15rem 0.05rem 0.8rem;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
  }

  #pd-related::-webkit-scrollbar {
    display: none;
  }

  #pd-related > .product-card {
    scroll-snap-align: start;
  }

  .pd-reviews-summary {
    grid-template-columns: 0.65fr 1fr;
    gap: 0.85rem;
    padding: 0.9rem;
    border-radius: 17px;
  }

  .pd-reviews-summary__score > strong {
    font-size: 2.55rem;
  }

  .pd-review-distribution__row {
    grid-template-columns: 2.5rem minmax(55px, 1fr) 1.4rem;
    gap: 0.35rem;
    padding-inline: 0.15rem;
  }

  .pd-reviews-grid {
    gap: 1rem;
  }

  .pd-review-form-card,
  .pd-reviews-list-wrap {
    padding: 1rem;
    border-radius: 17px;
  }

  .pd-reviews-list {
    display: flex;
    width: 100%;
    min-width: 0;
    flex-direction: column;
    gap: 0.75rem;
    overflow: visible;
    padding: 0.1rem 0 0.25rem;
  }

  .pd-reviews-list::-webkit-scrollbar {
    display: none;
  }

  .pd-review-item {
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }

  .pd-review-item__head {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .pd-review-item__date {
    grid-column: 2;
    grid-row: auto;
    margin-inline-start: 0;
  }

  .pd-review-item__badge {
    grid-column: 2;
  }

  .products-grid,
  .page-home #bestsellers .products-grid {
    width: 100%;
    min-width: 0;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px;
  }

  #products-page,
  #products-page #main,
  #products-page .shop-page,
  #products-page > .container,
  #products-page .shop-toolbar,
  #products-page .shop-tabs-wrap,
  #products-page .shop-tabs,
  #products-page .products-grid {
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }

  #products-page .shop-toolbar {
    overflow: visible;
  }

  #products-page .shop-field,
  #products-page .shop-field select,
  #products-page .shop-count {
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }

  .product-card {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    border-radius: 14px;
  }

  .product-card .product-link,
  .product-card .product-img {
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }

  .product-card .product-img {
    aspect-ratio: 8 / 11;
    overflow: hidden;
    background: #fff;
  }

  .product-card .product-img img {
    width: 100%;
    height: 100%;
    max-width: 100%;
    object-fit: contain;
    object-position: center;
    background: #fff;
    transform: none !important;
  }

  .product-card .badge {
    top: 0.48rem;
    inset-inline-start: 0.48rem;
    inset-inline-end: auto;
    max-width: calc(100% - 3.25rem);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .product-card .discount-pill {
    bottom: 0.48rem;
    inset-inline-start: 0.48rem;
    inset-inline-end: auto;
    padding: 0.25rem 0.5rem;
    color: #fff;
    background: rgba(26, 45, 69, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.82);
    border-radius: 999px;
    box-shadow: 0 4px 12px rgba(26, 45, 69, 0.18);
  }

  .product-name {
    display: -webkit-box;
    min-height: 3.7rem;
    padding: 0.7rem 0.65rem 0;
    overflow: hidden;
    font-size: 0.78rem;
    line-height: 1.5;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
  }

  .product-meta {
    padding-inline: 0.65rem;
  }

  .price-row {
    flex-wrap: wrap;
    gap: 0.2rem 0.5rem;
    margin: 0.45rem 0.6rem 0.15rem;
    padding: 0.55rem 0.6rem;
    background: linear-gradient(135deg, #f8fafc, #fff);
    border: 1px solid rgba(26, 45, 69, 0.09);
    border-radius: 10px;
  }

  .price {
    color: #15283f;
    font-size: 0.98rem;
    font-weight: 900;
    white-space: nowrap;
  }

  .price-old {
    color: #98a2b3;
    font-size: 0.72rem;
    text-decoration-color: #b42318;
    text-decoration-thickness: 1.5px;
    white-space: nowrap;
  }

  .product-card .btn-cart {
    width: calc(100% - 1.3rem);
    min-height: 42px;
    margin: 0.45rem 0.65rem 0.7rem;
    padding: 0.45rem 0.25rem;
    font-size: 0.72rem;
  }

  .product-card__options {
    width: calc(100% - 1.3rem);
    margin: 0 0.65rem 0.65rem;
  }

  .product-card .btn-fav {
    top: 0.45rem;
    bottom: auto;
    inset-inline-start: auto;
    inset-inline-end: 0.45rem;
    z-index: 6;
    width: 2rem;
    height: 2rem;
  }

  .cart-page-layout {
    gap: 1rem;
  }

  .cart-item {
    grid-template-columns: 4.5rem minmax(0, 1fr);
    gap: 0.65rem;
    align-items: start;
    padding: 0.65rem;
  }

  .cart-item__img {
    aspect-ratio: 8 / 11;
  }

  .cart-item__line-total {
    grid-column: 2;
    justify-self: start;
  }

  .cart-item__controls {
    flex-wrap: wrap;
  }

  .sales-cart-upsell {
    grid-template-columns: 4rem minmax(0, 1fr) auto;
    gap: 0.6rem;
    padding: 0.65rem;
    background: #fbfcfd;
    border-color: rgba(26, 45, 69, 0.1);
    border-radius: 12px;
    box-shadow: none;
  }

  .sales-cart-upsell > img {
    width: 4rem;
    height: auto;
  }

  .sales-cart-upsell .btn-cart {
    grid-column: auto;
    width: auto;
    min-height: 38px;
    margin: 0;
    padding: 0.45rem 0.65rem;
    color: #1a2d45;
    background: #fff;
    border-color: rgba(26, 45, 69, 0.28);
    font-size: 0.74rem;
  }

  .checkout-layout {
    gap: 0.85rem;
  }

  .checkout-form,
  .checkout-summary {
    padding: 0.85rem;
    border-radius: 15px;
  }

  .checkout-grid {
    gap: 0.7rem;
  }

  .sales-checkout-steps {
    margin-inline: 0.25rem;
  }

  .footer-find-us-global {
    padding-inline: 14px;
  }

  .find-us-pharmacy-marquee {
    min-height: 5.3rem;
    overflow-x: auto;
    overflow-y: hidden;
    mask-image: none;
    overscroll-behavior-inline: contain;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
  }

  .find-us-pharmacy-marquee::-webkit-scrollbar {
    display: none;
  }

  .find-us-pharmacy-track,
  html[dir="rtl"] .find-us-pharmacy-track {
    width: max-content;
    animation: none;
    transform: none;
    will-change: auto;
  }

  .find-us-pharmacy-set {
    gap: 0.7rem;
    padding-inline: 0.1rem;
  }

  .find-us-pharmacy-set[aria-hidden="true"] {
    display: none;
  }

  .find-us-pharmacy-logo {
    min-width: 8.75rem;
    max-width: 8.75rem;
    height: 5rem;
    padding: 0.45rem;
    scroll-snap-align: start;
  }

  .site-footer {
    padding-top: 2.1rem;
  }

  .footer-grid {
    gap: 1.25rem 1rem;
  }

  .footer-brand .logo-text {
    width: 7.65rem;
    min-width: 7.65rem;
  }

  .footer-bottom-inner > .footer-find-us-global {
    display: none;
  }

  .pd-gallery-lightbox {
    grid-template-columns: 38px minmax(0, 1fr) 38px;
  }

  .pd-gallery-lightbox__nav {
    width: 36px;
    height: 36px;
  }
}

@media (max-width: 360px) {
  .container,
  .page-home .container {
    padding-inline: 11px;
  }

  .header-mobile-bar {
    grid-template-columns: 42px minmax(0, 1fr) 42px;
    gap: 3px;
  }

  .header-mobile-bar .logo-mark {
    width: 1.92rem;
    height: 1.92rem;
  }

  .header-mobile-bar .logo-text,
  .page-home .header-mobile-bar .logo-text {
    width: 5.95rem;
    min-width: 5.95rem;
  }

  .header-mobile-bar .logo-name,
  .page-home .header-mobile-bar .logo-name {
    font-size: 0.7rem;
  }

  .header-mobile-bar .logo-tag.logo-tag--distributed,
  .page-home .header-mobile-bar .logo-tag.logo-tag--distributed {
    display: flex !important;
    font-size: 0.44rem;
  }

  .sales-trust-row > span {
    min-height: 70px;
    font-size: 0.62rem;
  }

  .pd-reviews-summary {
    grid-template-columns: 1fr;
  }

  .pd-reviews-summary__score {
    grid-template-columns: auto auto;
    justify-content: center;
    align-items: center;
  }

  .pd-reviews-summary__score small {
    grid-column: 1 / -1;
  }

  .pd-reviews-list {
    width: 100%;
  }

  .sales-routine-upsell__actions {
    grid-template-columns: 1fr;
  }

  .sales-routine-link {
    min-height: 36px;
    display: grid;
    place-items: center;
  }
}

@media (max-width: 320px) {
  .product-detail-page .pd-actions .pd-btn-add-cart,
  .product-detail-page .pd-actions .btn-buy-now {
    font-size: 0.74rem;
  }

  .product-name {
    padding-inline: 0.55rem;
    font-size: 0.74rem;
  }

  .price-row {
    padding-inline: 0.55rem;
  }

  .product-card .btn-cart {
    width: calc(100% - 1.1rem);
    margin-inline: 0.55rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .pd-gallery-lightbox,
  .pd-gallery-lightbox__stage img {
    transition: none;
  }
}

/* Final scoped overrides for the full logo and linked product choices. */
.logo--brand-image {
  gap: 0;
  direction: ltr;
  unicode-bidi: isolate;
}

.logo-full-image {
  display: block;
  width: clamp(9.75rem, 15vw, 11.25rem);
  max-width: 100%;
  height: auto;
  aspect-ratio: 866 / 268;
  object-fit: contain;
  background: transparent;
}

.logo--footer .logo-full-image {
  width: 11.9rem;
}

.product-card .badge {
  inset-inline-start: 0.55rem;
  inset-inline-end: auto;
  z-index: 4;
  max-width: calc(100% - 3.55rem);
}

.product-card .btn-fav:not(.btn-fav--detail) {
  top: 0.55rem;
  bottom: auto;
  inset-inline-start: auto;
  inset-inline-end: 0.55rem;
  z-index: 6;
}

.product-detail-page .pd-main-img-viewport {
  cursor: pointer;
}

.product-detail-page .pd-gallery-slide img,
.product-detail-page .pd-main-slide img,
.product-detail-page .pd-thumb img {
  object-fit: contain;
  object-position: center;
  background: #fff;
  transform: none !important;
}

@media (max-width: 767px) {
  .header-mobile-bar .logo--brand-image,
  .page-home .header-mobile-bar .logo--brand-image {
    width: auto;
    max-width: min(8.1rem, 100%);
    min-width: 0;
  }

  .header-mobile-bar .logo-full-image,
  .page-home .header-mobile-bar .logo-full-image {
    width: 8.1rem;
    max-width: 100%;
  }

  .product-detail-page .pd-fav--detail {
    width: 100%;
    min-height: 44px;
  }

  .pd-choice-selector,
  .pd-content-card {
    max-width: 100%;
  }
}

@media (max-width: 360px) {
  .header-mobile-bar .logo--brand-image,
  .page-home .header-mobile-bar .logo--brand-image {
    max-width: 7.2rem;
  }

  .header-mobile-bar .logo-full-image,
  .page-home .header-mobile-bar .logo-full-image {
    width: 7.2rem;
  }
}
