/*
 * CSS ARCHITECTURE
 * Layer order is explicit for tokens, foundations and isolated theme components.
 * WooCommerce/plugin integration and context styles remain unlayered where their
 * verified precedence must stay identical to the production frontend.
 */
@layer rp.tokens, rp.base, rp.components, rp.commerce, rp.pages, rp.optimizations;

@layer rp.tokens {
  :root {
    color-scheme: light;
    --bg: #fff;
    --surface: #fff;
    --surface-2: #f7f7f7;
    --text: #050505;
    --muted: #737373;
    --line: #dedede;
    --line-strong: rgba(0, 0, 0, 0.24);
    --button-bg: #000;
    --button-text: #fff;
    --inverse: #fff;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 18px;
    --radius-pill: 999px;
    --shadow: 0 18px 60px rgba(0, 0, 0, 0.1);
    --font:
      Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
      "Segoe UI", sans-serif;
    --mobile-header: 58px;
    --bottom-nav: 66px;
    --desktop-header: 84px;
    --container: 1280px;
    --desktop-shop-cols: 4;
    --mobile-shop-cols: 2;
  }
}

@layer rp.base {
  * {
    box-sizing: border-box;
  }
  html {
    scroll-behavior: auto;
  }

  body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    text-rendering: geometricPrecision;
  }
  button,
  input,
  select,
  textarea {
    font: inherit;
    color: inherit;
  }
  button {
    border: 0;
    background: none;
    cursor: pointer;
  }
  a {
    color: inherit;
    text-decoration: none;
  }
  img {
    max-width: 100%;
    height: auto;
    display: block;
  }

  .screen-reader-text,
  .sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
  }
  .screen-reader-text:focus,
  .skip-link:focus {
    position: fixed;
    top: 12px;
    left: 12px;
    width: auto;
    height: auto;
    margin: 0;
    clip: auto;
    overflow: visible;
    white-space: normal;
    z-index: 10000;
    padding: 10px 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius-pill);
    background: var(--surface);
    box-shadow: var(--shadow);
  }
}

@layer rp.components {
  .app {
    min-height: 100vh;
    background:
      radial-gradient(circle at 14% 0%, rgba(0, 0, 0, 0.035), transparent 28%),
      linear-gradient(#fff, #fff);
  }

  /* Enterprise global layout primitives. */

  main.site-main {
    max-width: var(--container);
    margin: 0 auto;
    padding: 32px 28px 80px;
  }

  .section-head {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    align-items: end;
    margin: 44px 0 22px;
  }
  .section-head h1,
  .section-head h2 {
    font-size: clamp(42px, 7vw, 82px);
    line-height: 0.9;
    letter-spacing: -0.06em;
    margin: 0;
  }
  .section-head h2 {
    font-size: clamp(28px, 4vw, 54px);
    letter-spacing: -0.05em;
  }
  .section-head p {
    max-width: 420px;
    color: var(--muted);
    line-height: 1.6;
    margin: 0;
  }

  .panel {
    border: 1px solid var(--line);
    border-radius: 24px;
    background: #fff;
    padding: 22px;
  }
  .panel h1,
  .panel h2 {
    margin-bottom: 18px;
    font-size: clamp(28px, 4vw, 48px);
    line-height: 0.95;
    letter-spacing: -0.05em;
  }
  .muted {
    color: var(--muted);
    line-height: 1.65;
  }
}

/* UNLAYERED COMPATIBILITY / OVERRIDE ZONE: WooCommerce and product loops. */
/* Enterprise component: global buttons and WooCommerce CTA visual lock. */
/* Restores the original site-wide button contract outside page-specific files. */

body.rp-theme .btn,
body.rp-theme a.button,
body.rp-theme button.button,
body.rp-theme input.button,
body.rp-theme .single_add_to_cart_button,
body.rp-theme #place_order,
body.rp-theme .added_to_cart {
  min-height: 46px;
  padding: 0 22px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--button-bg);
  background: var(--button-bg);
  color: var(--button-text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  line-height: 1;
  text-align: center;
  text-decoration: none;
}

body.rp-theme .btn.secondary,
body.rp-theme a.button.secondary,
body.rp-theme button.button.secondary {
  background: #fff;
  color: #000;
  border-color: var(--line);
}
body.rp-theme .quick-add:hover,
body.rp-theme .product-card .quick-add:hover,
body.rp-theme button.quick-add:hover,
body.rp-theme a.quick-add:hover,
body.rp-theme .btn:hover,
body.rp-theme a.button:hover,
body.rp-theme button.button:hover,
body.rp-theme input.button:hover,
body.rp-theme .single_add_to_cart_button:hover,
body.rp-theme #place_order:hover,
body.rp-theme .added_to_cart:hover {
  text-decoration: none;
}
body.rp-theme .button.disabled,
body.rp-theme .button:disabled,
body.rp-theme button.button:disabled,
body.rp-theme input.button:disabled {
  opacity: 0.48;
  cursor: not-allowed;
}

body.rp-theme .drawer .product-card .quick-add,
body.rp-theme #drawer .product-card .quick-add,
body.rp-theme .drawer button.quick-add,
body.rp-theme #drawer button.quick-add {
  background: #000;
  color: #fff;
  border-color: #000;
}

body.rp-theme.single-product form.cart button.single_add_to_cart_button,
body.rp-theme.single-product form.cart .single_add_to_cart_button,
body.rp-theme.single-product .summary .single_add_to_cart_button {
  min-height: 46px;
  border-radius: var(--radius-pill);
  border-color: #000;
  background: #000;
  color: #fff;
}

body.rp-theme .woocommerce a.button.alt,
body.rp-theme .woocommerce button.button.alt,
body.rp-theme .woocommerce input.button.alt,
body.rp-theme .wc-forward,
body.rp-theme .checkout-button,
body.rp-theme .woocommerce-cart .button,
body.rp-theme .woocommerce-checkout .button,
body.rp-theme .wc-block-components-button,
body.rp-theme .wp-element-button,
body.rp-theme form.cart button[type="submit"],
body.rp-theme form.cart input[type="submit"],
body.rp-theme .drawer .button,
body.rp-theme #drawer .button,
body.rp-theme .drawer .add_to_cart_button,
body.rp-theme #drawer .add_to_cart_button,
body.rp-theme .drawer .single_add_to_cart_button,
body.rp-theme #drawer .single_add_to_cart_button,
body.rp-theme .drawer [data-cart-add],
body.rp-theme #drawer [data-cart-add] {
  min-height: 46px;
  padding: 0 22px;
  border-radius: var(--radius-pill);
  border: 1px solid #000;
  background: #000;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  line-height: 1;
  text-align: center;
  text-decoration: none;
}

/* Enterprise component: product card and product-loop locks. */

.rp-theme .product-grid,
.rp-theme .woocommerce ul.products,
.rp-theme main.site-main .products {
  display: grid;
  grid-template-columns: repeat(var(--desktop-shop-cols), minmax(0, 1fr));
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.rp-theme .product-card,
.rp-theme.woocommerce ul.products li.product.product-card,
.rp-theme .woocommerce ul.products li.product.product-card {
  width: auto;
  float: none;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fff;
  overflow: hidden;
  transition:
    transform 0.16s ease,
    border-color 0.16s ease;
  position: relative;
}
.product-card:hover {
  transform: translateY(-3px);
  border-color: var(--line-strong);
}
body.rp-theme .site-main .product-grid,
body.rp-theme.woocommerce .site-main ul.products,
body.rp-theme .site-main .woocommerce ul.products {
  display: grid;
}
body.rp-theme.woocommerce .site-main ul.products li.product.product-card,
body.rp-theme .site-main .woocommerce ul.products li.product.product-card {
  float: none;
  width: auto;
  margin: 0;
}
/* Desktop-mobile separation and Woo button lock. */
body.rp-theme .site-main section:not(.shop-page-shell) > .product-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
body.rp-theme.rp-shop-context .site-main .shop-main ul.products,
body.rp-theme.rp-shop-context .site-main .shop-main .products {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
body.rp-theme .site-main .product-card {
  align-self: start;
}

.product-img {
  aspect-ratio: 1;
  background:
    radial-gradient(circle at 55% 40%, rgba(0, 0, 0, 0.1), transparent 26%),
    linear-gradient(145deg, #fafafa, #ededed);
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
}
.product-img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 16px;
}
.product-shape {
  width: 46%;
  aspect-ratio: 1;
  border-radius: 34% 66% 42% 58%;
  background: #111;
  opacity: 0.88;
}
.product-shape.light {
  background: #ddd;
  border: 1px solid #cfcfcf;
}
.product-shape.tall {
  width: 34%;
  aspect-ratio: 0.7/1.25;
  border-radius: 999px 999px 24px 24px;
}

.like-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(12px);
  display: grid;
  place-items: center;
  z-index: 2;
}
.rp-theme .like-btn.active,
.rp-theme .wishlist-single.active {
  background: #000;
  color: #fff;
  border-color: #000;
}
.quick-add {
  width: 100%;
  margin-top: 12px;
  min-height: 38px;
  border: 1px solid #000;
  border-radius: var(--radius-pill);
  background: #000;
  color: #fff;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  justify-content: center;
}
body.rp-theme .site-main .quick-add,
body.rp-theme .site-main button.quick-add,
body.rp-theme .site-main a.quick-add {
  background: #000;
  color: #fff;
  border-color: #000;
}
body.rp-theme .site-main .like-btn.active,
body.rp-theme .site-main .wishlist-single.active {
  background: #000;
  color: #fff;
  border-color: #000;
}
body.rp-theme.single-product .site-main .single_add_to_cart_button,
body.rp-theme.single-product .site-main button.single_add_to_cart_button,
body.rp-theme.single-product .site-main .summary .single_add_to_cart_button,
body.rp-theme.single-product .site-main form.cart .single_add_to_cart_button {
  background: #000;
  color: #fff;
  border-color: #000;
}

/* WooCommerce add-to-cart button visual lock outside custom card markup. */
body.rp-theme .site-main .woocommerce a.button.add_to_cart_button,
body.rp-theme .site-main .woocommerce a.button.product_type_simple,
body.rp-theme .site-main .woocommerce a.button.product_type_variable,
body.rp-theme .site-main .woocommerce a.button.product_type_grouped,
body.rp-theme .site-main .woocommerce a.button.product_type_external,
body.rp-theme .site-main .woocommerce button.button.single_add_to_cart_button,
body.rp-theme .site-main .woocommerce a.added_to_cart,
body.rp-theme .site-main .product-card .quick-add,
body.rp-theme .site-main .product-card a.quick-add,
body.rp-theme .site-main .product-card button.quick-add {
  min-height: 38px;
  border: 1px solid #000;
  border-radius: var(--radius-pill);
  background: #000;
  color: #fff;
  padding: 0 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  line-height: 1;
}
body.rp-theme .site-main .woocommerce a.button.add_to_cart_button:hover,
body.rp-theme .site-main .woocommerce a.button.product_type_simple:hover,
body.rp-theme .site-main .woocommerce a.button.product_type_variable:hover,
body.rp-theme .site-main .woocommerce a.button.product_type_grouped:hover,
body.rp-theme .site-main .woocommerce a.button.product_type_external:hover,
body.rp-theme
  .site-main
  .woocommerce
  button.button.single_add_to_cart_button:hover,
body.rp-theme .site-main .woocommerce a.added_to_cart:hover,
body.rp-theme .site-main .product-card .quick-add:hover {
  background: #000;
  color: #fff;
  border-color: #000;
  text-decoration: none;
}

.product-info {
  padding: 14px;
}
.product-name {
  min-height: 34px;
  margin-bottom: 8px;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.35;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.product-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  color: var(--muted);
  font-size: 13px;
}
.product-price {
  color: #000;
  font-weight: 900;
}
.product-meta-clean {
  justify-content: flex-start;
  min-height: 22px;
}
.product-meta-clean .product-price {
  font-size: 13px;
}

@layer rp.components {
  /* Enterprise component: drawer shell. */
  .drawer-overlay {
    position: fixed;
    inset: 0;
    z-index: 180;
    background: rgba(0, 0, 0, 0.28);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.18s ease;
  }
  .drawer-overlay.open {
    opacity: 1;
    pointer-events: auto;
  }
  .drawer {
    position: fixed;
    top: 0;
    right: 0;
    z-index: 200;
    width: min(430px, 100vw);
    height: 100vh;
    background: #fff;
    border-left: 1px solid var(--line);
    transform: translateX(100%);
    transition: transform 0.22s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
  }
  .drawer.open {
    transform: translateX(0);
  }
  .drawer-head {
    min-height: 74px;
    padding: 0 20px;
    border-bottom: 1px solid var(--line);
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  .drawer-head h2 {
    margin: 0;
    font-size: 18px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
  }
  .drawer-body {
    padding: 20px;
    overflow: auto;
    flex: 1;
  }
  .mobile-only {
    display: none;
  }

  body.rp-theme.drawer-open {
    overscroll-behavior: contain;
  }

  /* Enterprise component: full-screen search overlay. */
  .search-full {
    position: fixed;
    inset: 0;
    z-index: 220;
    background: rgba(255, 255, 255, 0.97);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.16s ease;
    padding: max(24px, env(safe-area-inset-top)) 24px 24px;
  }
  .search-full.open {
    opacity: 1;
    pointer-events: auto;
  }
  .search-box {
    max-width: 900px;
    margin: 8vh auto 0;
  }
  .search-box form {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 10px;
    margin-bottom: 24px;
  }
  .search-box input {
    height: 60px;
    border: 1px solid #000;
    border-radius: var(--radius-pill);
    padding: 0 24px;
    font-size: 18px;
    outline: none;
  }
  .search-full .search-results {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
  }
  .search-full .search-results .product-card .quick-add {
    display: none;
  }
  body.search-results,
  body.search-no-results {
    display: block;
    grid-template-columns: none;
    gap: 0;
  }
  body.rp-theme.search-results .app,
  body.rp-theme.search-no-results .app {
    width: 100%;
    min-width: 0;
  }

  /* Enterprise component: toast notification. */
  .toast {
    position: fixed;
    left: 50%;
    bottom: 24px;
    transform: translate(-50%, 20px);
    z-index: 400;
    min-width: 220px;
    max-width: min(420px, calc(100vw - 32px));
    padding: 13px 18px;
    border-radius: var(--radius-pill);
    background: #000;
    color: #fff;
    font-size: 13px;
    text-align: center;
    opacity: 0;
    pointer-events: none;
    transition:
      opacity 0.18s ease,
      transform 0.18s ease;
  }
  .toast.show {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

@layer rp.commerce {
  /* Enterprise component: cart drawer content. */
  .cart-drawer-lines {
    display: grid;
    gap: 12px;
  }
  .cart-line {
    display: grid;
    grid-template-columns: 74px 1fr auto;
    gap: 14px;
    align-items: center;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.04);
  }
  .cart-line:first-child {
    border-top: 1px solid var(--line);
  }
  .cart-img {
    aspect-ratio: 1;
    border-radius: 16px;
    background: linear-gradient(145deg, #f8f8f8, #ededed);
    overflow: hidden;
    display: block;
  }
  .cart-img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 8px;
  }
  .cart-line h3 {
    margin: 0 0 6px;
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }
  .cart-line strong {
    justify-self: end;
    white-space: nowrap;
  }
  .cart-remove {
    margin-top: 6px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.1em;
    text-transform: uppercase;
  }
  .summary-row {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    padding: 12px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    color: var(--muted);
  }
  .summary-row.total {
    color: #000;
    font-size: 18px;
    font-weight: 900;
    border-bottom: 0;
  }
  .wishlist-actions {
    display: flex;
    justify-content: flex-end;
    margin: -8px 0 18px;
  }
  @media (max-width: 767px) {
    .cart-line {
      grid-template-columns: 68px 1fr auto;
      gap: 12px;
    }
  }

  /* Enterprise component: ratings and stars. */
  .rp-rating {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1;
  }
  .rp-rating.compact {
    font-size: 11px;
  }
  .rp-rating.large {
    font-size: 14px;
  }
  .rp-stars {
    position: relative;
    display: inline-block;
    font-size: 15px;
    letter-spacing: 0.06em;
    line-height: 1;
  }
  .rp-rating.large .rp-stars {
    font-size: 19px;
  }
  .rp-stars-empty {
    color: rgba(0, 0, 0, 0.18);
  }
  .rp-stars-fill {
    position: absolute;
    left: 0;
    top: 0;
    overflow: hidden;
    white-space: nowrap;
    color: #000;
  }
  .rp-rating-text {
    font-weight: 900;
    letter-spacing: 0.06em;
    text-transform: uppercase;
  }
  .rp-card-rating {
    width: 100%;
    margin-top: 10px;
    min-height: 18px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    text-align: left;
  }
  .rp-card-rating .rp-stars {
    font-size: 13px;
  }
  .product-card .rp-rating-text:empty,
  .search-full .search-results .rp-rating-text:empty,
  .rp-wishlist-grid .rp-rating-text:empty {
    display: none;
  }
  .product-card .rp-rating-text {
    display: none;
  }
  .rp-single-rating {
    width: 100%;
    margin: 0 0 18px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    background: #fff;
    text-align: left;
  }
  .rp-single-rating > span:last-child {
    color: var(--muted);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.1em;
    text-transform: uppercase;
  }
  body.rp-theme {
    --star-gold: #d6a21e;
    --star-muted: #d6a21e;
  }
  body.rp-theme .rp-stars,
  body.rp-theme .rp-stars span,
  body.rp-theme .rp-card-rating,
  body.rp-theme .rp-card-rating *,
  body.rp-theme .rp-single-rating,
  body.rp-theme .rp-single-rating *,
  body.rp-theme .comment-form-rating .stars,
  body.rp-theme .comment-form-rating .stars *,
  body.rp-theme .woocommerce .star-rating,
  body.rp-theme .woocommerce .star-rating *,
  body.rp-theme .star-rating,
  body.rp-theme .star-rating *,
  body.rp-theme [class*="star"] {
    color: #d6a21e;
  }
  body.rp-theme .woocommerce .star-rating::before,
  body.rp-theme .woocommerce .star-rating span::before,
  body.rp-theme .star-rating::before,
  body.rp-theme .star-rating span::before {
    color: #d6a21e;
  }
  @media (max-width: 767px) {
    .rp-single-rating {
      display: grid;
    }
  }

  /* Enterprise component: reviews drawer, summary and form. */
  .rp-reviews-drawer {
    display: grid;
    gap: 22px;
  }
  .rp-review-summary {
    display: grid;
    grid-template-columns: 140px minmax(0, 1fr);
    gap: 20px;
    align-items: start;
    padding-bottom: 18px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  }
  .rp-review-average {
    display: block;
    font-size: 44px;
    line-height: 0.9;
    letter-spacing: -0.05em;
    margin-bottom: 10px;
  }
  .rp-rating-bars {
    display: grid;
    gap: 8px;
  }
  .rp-rating-bar {
    display: grid;
    grid-template-columns: 34px 1fr 28px;
    gap: 10px;
    align-items: center;
    color: var(--muted);
    font-size: 12px;
    font-weight: 900;
  }
  .rp-rating-bar i {
    height: 7px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.08);
    overflow: hidden;
  }
  .rp-rating-bar b {
    display: block;
    height: 100%;
    border-radius: 999px;
    background: #000;
  }
  .rp-rating-bar em {
    font-style: normal;
    text-align: right;
  }
  .rp-reviews-list {
    display: grid;
    gap: 12px;
  }
  .rp-review-card {
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 16px;
    background: #fff;
  }
  .rp-review-card header {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
  }
  .rp-review-card header strong {
    font-size: 13px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }
  .rp-review-card header span {
    color: var(--muted);
    font-size: 12px;
  }
  .rp-review-content {
    color: var(--muted);
    line-height: 1.65;
    font-size: 14px;
    margin-top: 10px;
  }
  .rp-review-content p:last-child {
    margin-bottom: 0;
  }
  .rp-review-verified {
    margin: 10px 0 0;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
  }
  .rp-review-form {
    display: grid;
    gap: 12px;
    padding-top: 18px;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
  }
  .rp-review-form h3 {
    margin: 0;
    font-size: 15px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
  }
  .rp-review-form label {
    display: grid;
    gap: 7px;
  }
  .rp-review-form label span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.1em;
    text-transform: uppercase;
  }
  .rp-review-form input,
  .rp-review-form select,
  .rp-review-form textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #fff;
    padding: 12px 14px;
  }
  .rp-review-form textarea {
    resize: vertical;
  }
  .rp-theme .rp-hp {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    opacity: 0;
  }
  @media (max-width: 767px) {
    .rp-review-summary {
      grid-template-columns: 1fr;
    }
  }
}

@layer rp.components {
  /* Enterprise component: footer. */

  .site-footer {
    max-width: var(--container);
    margin: 24px auto calc(var(--bottom-nav) + 24px);
    padding: 0 28px;
  }
  .site-footer-inner {
    border: 1px solid var(--line);
    border-radius: 28px;
    background: #fff;
    padding: 28px;
    display: grid;
    grid-template-columns: minmax(260px, 1.25fr) repeat(3, minmax(0, 1fr));
    gap: 28px;
  }
  .site-footer-brand p {
    color: var(--muted);
    line-height: 1.65;
    margin: 16px 0;
  }
  .site-footer-col {
    display: grid;
    align-content: start;
    gap: 10px;
  }
  .site-footer-col h3 {
    margin: 0 0 8px;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.16em;
    text-transform: uppercase;
  }
  .site-footer-col a {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.35;
  }
  .site-footer-col a:hover {
    color: var(--text);
  }
  .site-footer-bottom {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    color: var(--muted);
    font-size: 11px;
    padding: 14px 8px 0;
  }
  .site-footer-bottom p {
    margin: 0;
  }
  @media (max-width: 900px) {
    .site-footer-inner {
      grid-template-columns: 1fr 1fr;
    }
  }
  @media (max-width: 767px) {
    .home-contact-visual {
      display: block;
      padding: 18px;
    }
    .home-contact-image img {
      height: 220px;
    }
    .home-contact-card {
      margin-top: 12px;
      box-shadow: none;
    }
    .site-footer {
      padding: 0 12px;
      margin-bottom: calc(var(--bottom-nav) + 18px);
    }
    .site-footer-inner {
      grid-template-columns: 1fr;
      border-radius: 22px;
      padding: 22px;
    }
    .site-footer-bottom {
      display: grid;
    }
  }

  .footer-cookie-button {
    width: max-content;
    min-height: 28px;
    padding: 0 11px;
    border: 1px solid var(--line);
    border-radius: var(--radius-pill);
    background: #fff;
    color: var(--muted);
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.1em;
    text-transform: uppercase;
  }
  .footer-cookie-button:hover {
    color: var(--text);
    border-color: var(--line-strong);
  }

  .home-social-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
  }
  .home-social-links a,
  .footer-social-links a {
    min-height: 34px;
    padding: 0 13px;
    border: 1px solid var(--line);
    border-radius: var(--radius-pill);
    display: inline-flex;
    align-items: center;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
  }

  /* Footer social links must remain vertical, as in the original frontend. */
  .footer-social-links {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    flex-wrap: nowrap;
    gap: 8px;
    margin-top: 16px;
  }
  .footer-social-links a {
    width: fit-content;
    flex: 0 0 auto;
  }
  @media (max-width: 767px) {
    .footer-social-links {
      display: flex;
      flex-direction: column;
      align-items: flex-start;
      justify-content: flex-start;
      flex-wrap: nowrap;
      gap: 8px;
    }
    .footer-social-links a {
      width: fit-content;
    }
  }
}

@layer rp.pages {
  /* Enterprise component: magazine drawer and web stories cards. */

  .rp-mag-native {
    display: grid;
    gap: 14px;
  }
  .rp-mag-head h3 {
    margin: 0;
    font-size: 24px;
    line-height: 1;
    letter-spacing: -0.04em;
  }
  .rp-mag-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
  .rp-mag-tabs a {
    min-height: 40px;
    border: 1px solid var(--line);
    border-radius: var(--radius-pill);
    display: grid;
    place-items: center;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-align: center;
  }
  .rp-mag-tabs a.active {
    background: #000;
    color: #fff;
    border-color: #000;
  }
  .rp-mag-review-box {
    border: 1px solid var(--line);
    border-radius: 20px;
    padding: 16px;
    background: #fff;
  }
  .rp-mag-review-box h4 {
    margin: 0 0 8px;
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 0.14em;
    text-transform: uppercase;
  }
  .rp-review-dash {
    margin: 0 0 6px;
    font-size: 28px;
    line-height: 1;
  }
  .rp-review-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 12px;
  }
  .rp-review-actions a {
    min-height: 38px;
    border: 1px solid #000;
    border-radius: var(--radius-pill);
    display: grid;
    place-items: center;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
  }
  .rp-review-actions a:first-child {
    background: #000;
    color: #fff;
  }

  /* Google Web Stories in Magazine. */
  .rp-web-stories-box {
    border: 1px solid var(--line);
    border-radius: 20px;
    padding: 16px;
    background: #fff;
    display: grid;
    gap: 12px;
  }
  .rp-web-stories-box h4 {
    margin: 0 0 6px;
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 0.14em;
    text-transform: uppercase;
  }
  .rp-web-stories-list {
    display: grid;
    gap: 9px;
  }
  .rp-web-story-row {
    display: grid;
    grid-template-columns: 54px 1fr;
    gap: 10px;
    align-items: center;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 16px;
    padding: 8px;
    background: #fff;
  }
  .rp-web-story-thumb {
    width: 54px;
    height: 72px;
    border-radius: 12px;
    overflow: hidden;
    display: grid;
    place-items: center;
    background: linear-gradient(145deg, #f8f8f8, #e8e8e8);
  }
  .rp-web-story-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
  .rp-web-story-thumb i {
    font-style: normal;
    font-size: 22px;
    font-weight: 900;
  }
  .rp-web-story-row b {
    font-size: 12px;
    line-height: 1.15;
    letter-spacing: 0.04em;
    text-transform: uppercase;
  }
  .rp-web-story-row em {
    grid-column: 2;
    color: var(--muted);
    font-style: normal;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }
  .rp-web-stories-link {
    min-height: 38px;
    border: 1px solid #000;
    border-radius: var(--radius-pill);
    display: grid;
    place-items: center;
    background: #000;
    color: #fff;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
  }

  /* Magazine drawer only. */
  body.rp-theme .rp-mag-only {
    display: grid;
    gap: 16px;
  }
  body.rp-theme .rp-mag-only .rp-mag-card {
    border: 1px solid var(--line);
    border-radius: 22px;
    padding: 18px;
    background: #fff;
    display: grid;
    gap: 14px;
  }
  body.rp-theme .rp-mag-only .rp-mag-card-head h4 {
    margin: 0 0 8px;
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 0.16em;
    text-transform: uppercase;
  }
  body.rp-theme .rp-mag-only .rp-mobile-mag-list {
    display: grid;
    gap: 10px;
  }
  body.rp-theme .rp-mag-only .rp-mobile-mag-row {
    display: grid;
    grid-template-columns: 76px 1fr;
    gap: 12px;
    align-items: center;
    padding: 8px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 16px;
    background: #fff;
  }
  body.rp-theme .rp-mag-only .rp-mobile-mag-row span {
    width: 76px;
    height: 76px;
    border-radius: 12px;
    overflow: hidden;
    background: #f4f4f4;
    display: grid;
    place-items: center;
  }
  body.rp-theme .rp-mag-only .rp-mobile-mag-row img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
  body.rp-theme .rp-mag-only .rp-mobile-mag-row b {
    display: block;
    font-size: 13px;
    line-height: 1.15;
    letter-spacing: 0.02em;
  }
  body.rp-theme .rp-mag-only .rp-mobile-mag-row em {
    grid-column: 2;
    margin-top: -6px;
    color: var(--muted);
    font-style: normal;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }
  body.rp-theme .rp-mag-only .rp-mag-card-cta {
    min-height: 48px;
    border: 1px solid #000;
    border-radius: var(--radius-pill);
    display: grid;
    place-items: center;
    background: #000;
    color: #fff;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.16em;
    text-transform: uppercase;
  }
}

@layer rp.components {
  /* Enterprise component: icons. */
  .rp-icon {
    display: inline-grid;
    place-items: center;
    line-height: 1;
    font-style: normal;
    font-weight: 900;
  }
  .icon-button .rp-icon,
  .mobile-icon .rp-icon,
  .desktop-search-pill .rp-icon {
    font-size: var(--header-icon-size, 18px);
  }
  .bottom-nav .rp-icon {
    width: 24px;
    height: 24px;
    font-size: var(--mobile-nav-icon-size, 19px);
    line-height: 1;
  }
  .bottom-nav .bottom-nav-label {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 18px;
    line-height: 1.05;
  }
  .wishlist-single .rp-single-wishlist-icon {
    display: inline-flex;
    margin-right: 8px;
  }
  .like-btn .rp-icon {
    font-size: 16px;
  }
}

@layer rp.optimizations {
  @supports (content-visibility: auto) {
    body.rp-theme
      :where(
        .site-footer,
        .rp-reviews-section,
        .review-section,
        .web-stories-section,
        .magazine-grid,
        .related.products,
        .upsells.products
      ) {
      content-visibility: auto;
      contain-intrinsic-size: auto 640px;
    }
  }
}

@layer rp.components {
  .rp-icon svg,
  .rp-rating-star svg {
    display: block;
    width: 100%;
    height: 100%;
  }

  .rp-icon,
  .rp-rating-star {
    flex: none;
  }
}

/* Quality pass: dialog locking, drawer navigation and reduced motion. */
body.rp-theme.drawer-open,
body.rp-theme.search-open {
  overflow: hidden;
  overscroll-behavior: none;
  touch-action: none;
}
body.rp-theme .drawer-menu {
  display: grid;
  gap: 8px;
}
body.rp-theme .drawer-menu-link {
  width: 100%;
  min-height: 50px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--text);
  font-size: 13px;
  font-weight: 850;
  letter-spacing: 0.05em;
  text-align: left;
}
body.rp-theme .drawer-menu-link:hover,
body.rp-theme .drawer-menu-link:focus-visible {
  border-color: var(--line-strong);
  background: var(--surface-2);
}

@media (prefers-reduced-motion: reduce) {
  body.rp-theme *,
  body.rp-theme *::before,
  body.rp-theme *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Native search surface. */
body.rp-theme .rp-native-search {
  display: grid;
  gap: 24px;
}
body.rp-theme .rp-native-search .section-head {
  margin: 0;
}
body.rp-theme .rp-native-search .section-head h1 {
  margin: 0;
  font-size: clamp(38px, 6vw, 72px);
  line-height: 0.94;
  letter-spacing: -0.055em;
}
body.rp-theme .rp-native-search-results {
  display: grid;
  gap: 16px;
}
body.rp-theme .rp-native-search-card h2 {
  margin: 0 0 10px;
}
