/* 212 XP — interface: cutout product stage, iOS-style icons, touch */

:root { --line: #ffffff17; --glass: #111a2fcc; --spring: cubic-bezier(.2, 0, 0, 1); }
html { -webkit-text-size-adjust: 100%; }
body { -webkit-tap-highlight-color: transparent; }
a, button, label, select, input { touch-action: manipulation; }
.ic { width: 22px; height: 22px; flex: none; display: block; overflow: visible; }

/* ---------- iOS-style tiles ---------- */
.ios-tile {
  display: grid !important; place-items: center; flex: 0 0 38px; width: 38px; height: 38px; border-radius: 10.5px;
  color: #fff; background: linear-gradient(180deg, var(--a), var(--b));
  box-shadow: inset 0 1px #ffffff59, 0 4px 10px #0006;
}
.tone-green { --a: #5fe08a; --b: #1faf4f; }
.tone-blue { --a: #4fb2ff; --b: #0a6cf0; }
.tone-orange { --a: #ffbb4d; --b: #f5820b; }
.tone-indigo { --a: #8e8bff; --b: #5450d6; }
.tone-pink { --a: #ff7fa5; --b: #ee2d63; }

/* ---------- Header ---------- */
.top { position: sticky; z-index: 10; top: 0; padding-top: env(safe-area-inset-top); }
.top::before {
  content: ""; position: absolute; z-index: -1; inset: 0; background: #080d19eb;
  border-image: conic-gradient(#080d19eb 0 0) fill 0 / 0 / 0 100vw;
}
html { scroll-padding-top: 84px; }
/* Keeps the screen-reader counts inside the scrollable shelf. */
.category-shelf, .category-card { position: relative; }
.cart-button .ic { width: 20px; height: 20px; }
.cart-button b { font-weight: 700; }

/* ---------- Cards: the product floats on a lit stage ---------- */
.catalog-panel, .product, .store-guide, .about, .reviews, .product-detail { border-color: var(--line); }
.product { border-radius: 22px; background: linear-gradient(180deg, #1a2540, #111a2e); overflow: hidden; transition: transform .28s var(--spring), border-color .2s, box-shadow .2s; }
.product .product-image, .product[data-product-category] .product-image, .detail-gallery > .product-image {
  margin: 0; border-radius: 0; overflow: hidden;
  background: radial-gradient(ellipse 62% 56% at 50% 48%, #a9bde8 0, #6f87bd 36%, #33456f 72%, #1d2a49 100%);
}
.product .product-image { aspect-ratio: 1; padding: 11%; }
.detail-gallery > .product-image { border-radius: 18px; padding: 9%; }
.product-image::before { bottom: 9%; width: 62%; height: 9%; background: radial-gradient(ellipse, #050a1a8c, transparent 70%); }
.product .product-image img, .detail-gallery > .product-image img {
  mix-blend-mode: normal; filter: drop-shadow(0 12px 14px #050a1a73); transition: transform .4s var(--spring);
}
.product .product-image.is-photo, .product[data-product-category] .product-image.is-photo, .detail-gallery > .product-image.is-photo { background: #fff; padding: 7%; }
.product .product-image.is-photo img, .detail-gallery > .product-image.is-photo img { filter: none; border-radius: 10px; }
.is-photo::before { display: none; }
.image-fallback { color: #e3ebff; }
.is-photo .image-fallback { color: #324366; }
.product-body { padding: 15px 16px 16px; }
.product h3 { margin-block: 5px 7px; line-height: 1.25; }
.product-title-link { text-decoration: none; }
.product p { -webkit-line-clamp: 2; font-size: .88rem; }
.product-buy { padding: 0; border: 0; background: none; }
.product-buy button { min-height: 46px; border-radius: 14px; }
.stock, .stock.is-low { padding: 0; border: 0; background: none; font-size: .82rem; font-weight: 600; }
.detail-price-row .stock { padding: 5px 10px; border-radius: 99px; background: #ffffff12; }
.brand { letter-spacing: .06em; }
@media (hover: hover) {
  .product:hover { transform: translateY(-5px); }
  .product:hover .product-image img { transform: scale(1.06) translateY(-3px); }
}
:is(.primary, .cart-button, .category-card, .whatsapp-button, .quantity button, .close, .tabbar a, .tabbar button, .detail-thumb):active:not(:disabled) { transform: scale(.95); }
:is(.primary, .cart-button, .category-card, .quantity button, .close) { transition: transform .22s var(--spring), background .2s, border-color .2s; }

/* ---------- Hero ---------- */
.hero { border-color: var(--line); border-radius: 28px; }
.hero-stage::before { border-radius: 50%; transform: none; box-shadow: none; inset: 0 8%; background: radial-gradient(ellipse, #a4bdf5b8, #5878c25c 45%, transparent 70%); }
.hero-image { padding: 0; background: none; border-radius: 0; filter: drop-shadow(0 24px 22px #040a1eb3); }
.hero-image.is-photo { padding: 14px; border-radius: 22px; background: #fff; }
.hero-product figcaption a { border-color: var(--line); border-radius: 16px; background: var(--glass); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); }

/* ---------- Categories ---------- */
.category-card { min-height: 48px; padding-inline: 14px; border-radius: 16px; border-color: var(--line); }
.category-card[aria-pressed="true"] { background: var(--action-fill); border-color: transparent; box-shadow: 0 6px 18px #3cc9ff3d; }
.category-card[aria-pressed="true"] :is(.category-name, .category-icon) { color: var(--action-ink); }
.shop-search input, .shop-sort, .shop-sort select { border-radius: 14px; }
.shop-search input { font-size: 16px; min-height: 48px; border-color: var(--line); background-position: left center, 22px 25px; }
.shop-sort { border-color: var(--line); min-height: 48px; }

/* ---------- Product page ---------- */
.detail-thumb, .cart-thumbnail { background: radial-gradient(#a0b4e0, #3a4d7c); border-color: var(--line); border-radius: 14px; }
.detail-thumb img, .cart-thumbnail img { mix-blend-mode: normal; }
.detail-thumb.is-photo, .cart-thumbnail.is-photo { background: #fff; }
.cart-thumbnail { width: 62px; height: 62px; }
.detail-buy { border-color: var(--line); border-radius: 22px; }
.detail-quantity { border-color: var(--line); border-radius: 16px; }
.detail-actions .detail-add, .whatsapp-button { border-radius: 16px; min-height: 54px; }
.detail-perks li { align-items: center; border-color: var(--line); padding-block: 12px; }
.detail-sold { display: inline-flex; align-items: center; gap: 6px; border-radius: 99px; }
.detail-sold .ic { width: 16px; height: 16px; }
.rating-input label { font-size: 2.3rem; padding: 2px 3px; }
.cod-badge { align-items: center; border-radius: 16px; }
.cart-toast > .ic { width: 26px; height: 26px; padding: 5px; border-radius: 50%; background: #34c759; color: #fff; }
.cart-toast { z-index: 30; top: calc(12px + env(safe-area-inset-top)); border-color: var(--line); border-radius: 22px; background: var(--glass); -webkit-backdrop-filter: blur(22px); backdrop-filter: blur(22px); }
.cart-toast > span { flex: 1; min-width: 0; }
.cart-toast button { min-height: 44px; border-radius: 14px; }
.drawer-top .close { display: grid; place-items: center; padding: 0; border-radius: 50%; }
:is(.checkout-fields, .contact-form, .review-form) :is(input, textarea, select) { font-size: 16px !important; border-radius: 13px !important; }
:is(.checkout-fields, .contact-form) input { min-height: 48px !important; }

/* ---------- Mobile ---------- */
.tabbar { display: none; }
@media (max-width: 800px) {
  body:has(.tabbar) { padding-bottom: calc(84px + env(safe-area-inset-bottom)); }
  .top-links { display: none; }
  .top, .info-page ~ .top { grid-template-columns: 1fr auto; min-height: 62px; padding-block: env(safe-area-inset-top) 0; }
  body:not(:has(.tabbar)) .top-links { display: flex; }
  .tabbar {
    position: fixed; z-index: 18; left: 12px; right: 12px; bottom: calc(10px + env(safe-area-inset-bottom)); display: grid;
    grid-template-columns: repeat(4, 1fr); gap: 0; padding: 5px; border: 1px solid var(--line); border-radius: 26px; background: var(--glass);
    -webkit-backdrop-filter: blur(24px) saturate(1.7); backdrop-filter: blur(24px) saturate(1.7); box-shadow: 0 14px 36px #000a;
  }
  .tabbar :is(a, button) {
    position: relative; display: grid; justify-items: center; align-content: center; gap: 3px; min-height: 54px; padding: 0; border: 0;
    border-radius: 21px; background: none; color: #d3def5; font: inherit; font-size: .7rem; font-weight: 600; transition: transform .22s var(--spring);
  }
  .tabbar :is(a, button):active { background: #ffffff14; }
  .tabbar .ic { width: 24px; height: 24px; }
  .tabbar b { position: absolute; top: 3px; left: calc(50% + 5px); min-width: 19px; padding-inline: 5px; border-radius: 99px; background: #ff3b30; color: #fff; font-size: .7rem; line-height: 19px; text-align: center; }
  .sticky-buy { bottom: calc(10px + env(safe-area-inset-bottom)); border-color: var(--line); border-radius: 24px; background: var(--glass); }
  .whatsapp-float, body:has(#sticky-buy:not([hidden])) .whatsapp-float { bottom: calc(92px + env(safe-area-inset-bottom)); width: 54px; height: 54px; }

  .category-shelf { flex-wrap: nowrap; overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none; margin-inline: -19px; padding: 4px 19px; overscroll-behavior-x: contain; }
  .category-shelf::-webkit-scrollbar { display: none; }
  .category-card { flex: none; scroll-snap-align: start; scroll-margin-left: 19px; }
  .hero { grid-template-columns: minmax(0, 1fr); }
  .hero-product { padding: 0 16px 84px; }
  .hero-stage { min-height: 210px; }
  .hero-image { width: 82%; height: 210px; }
  .store-guide { grid-template-columns: repeat(2, minmax(0, 1fr)); border-radius: 20px; }
  .store-guide-item { padding: 14px 12px; align-items: flex-start; flex-direction: column; }
  .product-body { padding: 12px; }
  .product p { display: none; }
  .product h3 { font-size: 1rem; }
  .product-meta .product-category { display: none; }
  #catalog:has(> .product:only-child) { grid-template-columns: minmax(0, 1fr); }

  /* Cart as an iOS sheet */
  #cart { inset: auto 0 0; width: 100%; height: auto; min-height: 55dvh; max-height: 92dvh; border: 0; border-radius: 28px 28px 0 0; }
  
  #cart .drawer { min-height: 55dvh; }
  #cart .drawer-top { padding-top: 22px; }
  #cart .drawer-top::before { content: ""; position: absolute; top: 8px; left: 50%; width: 38px; height: 5px; margin-left: -19px; border-radius: 9px; background: #ffffff4d; }
}
@keyframes sheet-in { from { translate: 0 100%; } to { translate: 0 0; } }
@media (max-width: 580px) { .category-shelf { margin-inline: -14px; padding-inline: 14px; } }
@media (max-width: 405px) { body:has(.tabbar) .top { padding-block: env(safe-area-inset-top) 0; } }
@media (prefers-reduced-motion: reduce) { .product:hover, .product:hover .product-image img { transform: none; } }
@media (prefers-reduced-transparency: reduce) { :root { --glass: #111a2f; } }

/* ---------- Brand marks ---------- */
.brand { display: inline-flex; align-items: center; gap: 6px; }
.brand .ic { width: 18px; height: 18px; }
.brand-strip { display: flex; gap: 8px; margin-top: 16px; padding-block: 4px; overflow-x: auto; scrollbar-width: none; position: relative; }
.brand-strip::-webkit-scrollbar { display: none; }
.brand-chip {
  display: inline-flex; align-items: center; flex: none; gap: 9px; min-height: 52px; padding: 8px 16px; border: 1px solid var(--line);
  border-radius: 16px; background: #121a31; color: #e4ecff; font-weight: 600; font-size: .9rem; transition: transform .22s var(--spring), background .2s;
}
.brand-chip .ic { width: 26px; height: 26px; }
.brand-chip:active { transform: scale(.95); }
@media (hover: hover) { .brand-chip:hover { background: #1f2d50; } }
.whatsapp-float .ic { width: 30px; height: 30px; }
.whatsapp-button::before { -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M17.472 14.382c-.297-.149-1.758-.867-2.03-.967-.273-.099-.471-.148-.67.15-.197.297-.767.966-.94 1.164-.173.199-.347.223-.644.075-.297-.15-1.255-.463-2.39-1.475-.883-.788-1.48-1.761-1.653-2.059-.173-.297-.018-.458.13-.606.134-.133.298-.347.446-.52.149-.174.198-.298.298-.497.099-.198.05-.371-.025-.52-.075-.149-.669-1.612-.916-2.207-.242-.579-.487-.5-.669-.51-.173-.008-.371-.01-.57-.01-.198 0-.52.074-.792.372-.272.297-1.04 1.016-1.04 2.479 0 1.462 1.065 2.875 1.213 3.074.149.198 2.096 3.2 5.077 4.487.709.306 1.262.489 1.694.625.712.227 1.36.195 1.871.118.571-.085 1.758-.719 2.006-1.413.248-.694.248-1.289.173-1.413-.074-.124-.272-.198-.57-.347m-5.421 7.403h-.004a9.87 9.87 0 01-5.031-1.378l-.361-.214-3.741.982.998-3.648-.235-.374a9.86 9.86 0 01-1.51-5.26c.001-5.45 4.436-9.884 9.888-9.884 2.64 0 5.122 1.03 6.988 2.898a9.825 9.825 0 012.893 6.994c-.003 5.45-4.437 9.884-9.885 9.884m8.413-18.297A11.815 11.815 0 0012.05 0C5.495 0 .16 5.335.157 11.892c0 2.096.547 4.142 1.588 5.945L.057 24l6.305-1.654a11.882 11.882 0 005.683 1.448h.005c6.554 0 11.89-5.335 11.893-11.893a11.821 11.821 0 00-3.48-8.413Z'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M17.472 14.382c-.297-.149-1.758-.867-2.03-.967-.273-.099-.471-.148-.67.15-.197.297-.767.966-.94 1.164-.173.199-.347.223-.644.075-.297-.15-1.255-.463-2.39-1.475-.883-.788-1.48-1.761-1.653-2.059-.173-.297-.018-.458.13-.606.134-.133.298-.347.446-.52.149-.174.198-.298.298-.497.099-.198.05-.371-.025-.52-.075-.149-.669-1.612-.916-2.207-.242-.579-.487-.5-.669-.51-.173-.008-.371-.01-.57-.01-.198 0-.52.074-.792.372-.272.297-1.04 1.016-1.04 2.479 0 1.462 1.065 2.875 1.213 3.074.149.198 2.096 3.2 5.077 4.487.709.306 1.262.489 1.694.625.712.227 1.36.195 1.871.118.571-.085 1.758-.719 2.006-1.413.248-.694.248-1.289.173-1.413-.074-.124-.272-.198-.57-.347m-5.421 7.403h-.004a9.87 9.87 0 01-5.031-1.378l-.361-.214-3.741.982.998-3.648-.235-.374a9.86 9.86 0 01-1.51-5.26c.001-5.45 4.436-9.884 9.888-9.884 2.64 0 5.122 1.03 6.988 2.898a9.825 9.825 0 012.893 6.994c-.003 5.45-4.437 9.884-9.885 9.884m8.413-18.297A11.815 11.815 0 0012.05 0C5.495 0 .16 5.335.157 11.892c0 2.096.547 4.142 1.588 5.945L.057 24l6.305-1.654a11.882 11.882 0 005.683 1.448h.005c6.554 0 11.89-5.335 11.893-11.893a11.821 11.821 0 00-3.48-8.413Z'/%3E%3C/svg%3E") center / contain no-repeat; }
.instagram-link { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; }

/* ---------- Digital banner ---------- */
.digital-banner { position: relative; display: flex; align-items: center; gap: 14px; margin-top: 16px; padding: 16px 20px; border: 1px solid var(--line); border-radius: 24px; background: linear-gradient(115deg, #1d2a5c, #14203d 60%, #3a1f52); overflow: hidden; transition: transform .28s var(--spring); }
.digital-banner img { width: 120px; height: auto; border-radius: 11px; box-shadow: 0 8px 18px #0008; }
.digital-banner img + img { margin-left: -70px; }
.digital-banner > span { display: grid; gap: 4px; min-width: 0; }
.digital-banner strong { font: 800 1.9rem/1 var(--display); text-transform: uppercase; }
.digital-banner span span { color: #cfdaf0; font-size: .9rem; line-height: 1.4; }
.digital-banner:active { transform: scale(.98); }
@media (max-width: 800px) { .digital-banner { padding: 14px; } .digital-banner img { width: 84px; } .digital-banner img + img { margin-left: -66px; } .digital-banner strong { font-size: 1.5rem; } .digital-banner span span { font-size: .8rem; } }

/* ---------- Smoothness ---------- */
html { scrollbar-gutter: stable; }
.product, .digital-card { contain: layout style; }
.hero-image { will-change: translate; }
/* Transforms only: hovering never repaints the card. */
.product { transition: transform .28s var(--spring), border-color .2s; }
dialog { overscroll-behavior: contain; }
@media (max-width: 800px), (hover: none) {
  /* Live blur and per-image shadows are what makes scrolling heavy on phones. */
  .tabbar, .sticky-buy, .cart-toast, .hero-product figcaption a { -webkit-backdrop-filter: none; backdrop-filter: none; background: #111a2ffa; }
  #cart::backdrop, .digital-dialog::backdrop { -webkit-backdrop-filter: none; backdrop-filter: none; background: #020612d9; }
  body:has(#groups) .tabbar { background: #1c1c1efa; }
  .product .product-image img { filter: none; }
  .hero-image { animation: none; will-change: auto; }
  .stock.is-low::before { animation: none; }
}

/* ---------- Motion: one curve, short, transforms and opacity only ---------- */
:root { --ease: cubic-bezier(.32, .72, 0, 1); --fast: .14s; --sheet: .26s; }
html { scroll-behavior: auto; }
:is(.primary, .cart-button, .category-card, .brand-chip, .digital-banner, .digital-filter, .digital-card, .whatsapp-button, .whatsapp-float, .quantity button, .close, .tabbar a, .tabbar button, .detail-thumb, .product) { transition: transform var(--fast) var(--ease), background-color var(--fast), border-color var(--fast), color var(--fast); }
:is(.primary, .cart-button, .category-card, .brand-chip, .digital-filter, .whatsapp-button, .quantity button, .close, .tabbar a, .tabbar button, .detail-thumb):active:not(:disabled) { transform: scale(.97); transition-duration: .05s; }
.whatsapp-button:hover { transform: none; }
.product .product-image img, .detail-gallery > .product-image img { transition: transform .2s var(--ease); }
.hero-image { will-change: auto; }
.category-shelf { scroll-snap-type: none; }

:is(#cart, .digital-dialog) { transition: translate var(--sheet) var(--ease), overlay var(--sheet) allow-discrete, display var(--sheet) allow-discrete; }
:is(#cart, .digital-dialog)::backdrop { opacity: 0; transition: opacity var(--sheet) var(--ease), overlay var(--sheet) allow-discrete, display var(--sheet) allow-discrete; -webkit-backdrop-filter: none; backdrop-filter: none; background: #020612d1; }
:is(#cart, .digital-dialog)[open]::backdrop { opacity: 1; }
:is(#cart, .digital-dialog):not([open]) { pointer-events: none; }
#cart { translate: 100% 0; }
.digital-dialog { translate: 0 24px; opacity: 0; transition-property: translate, opacity, overlay, display; transition-duration: .2s; }
#cart[open] { translate: 0 0; }
.digital-dialog[open] { translate: 0 0; opacity: 1; }
@starting-style {
  #cart[open] { translate: 100% 0; }
  .digital-dialog[open] { translate: 0 24px; opacity: 0; }
  :is(#cart, .digital-dialog)[open]::backdrop { opacity: 0; }
}
.drawer-top, .digital-dialog-top { touch-action: none; }
.cart-toast { animation-duration: .18s; }
.cart-toast.is-leaving { transition-duration: .16s; }
@keyframes bar-in { from { opacity: 0; translate: 0 14px; } }
@media (max-width: 800px) {
  #cart { translate: 0 100%; }
  .digital-dialog { translate: 0 100%; opacity: 1; transition-duration: var(--sheet); }
  @starting-style {
    #cart[open] { translate: 0 100%; }
    .digital-dialog[open] { translate: 0 100%; opacity: 1; }
  }
  .sticky-buy { bottom: calc(84px + env(safe-area-inset-bottom)); animation: bar-in .18s var(--ease); }
  body:has(#sticky-buy) .whatsapp-float { transition: translate .18s var(--ease); }
  body:has(#sticky-buy:not([hidden])) .whatsapp-float { bottom: calc(92px + env(safe-area-inset-bottom)); translate: 0 -74px; }
  body:has(#sticky-buy:not([hidden])) { padding-bottom: calc(164px + env(safe-area-inset-bottom)); }
}
@media (hover: none) { .product:hover, .product:hover .product-image img, .digital-card:hover { transform: none; } }
@media (prefers-reduced-motion: reduce) { :is(#cart, .digital-dialog), :is(#cart, .digital-dialog)::backdrop { transition: none !important; } }
