/* Shared, framework-free UI primitives. Load after the page stylesheet. */
:root { --ui-focus: #2459cc; --ui-danger: #b42318; --ui-success: #17643b; --ui-ink: #10213f; --ui-muted: #526178; --ui-line: #c9d4e4; --ui-surface: #fff; --ui-radius: .5rem; }
.ui-button { box-sizing: border-box; display: inline-flex; justify-content: center; align-items: center; gap: .5rem; min-height: 48px; padding: .65rem 1rem; border: 1px solid transparent; border-radius: var(--ui-radius); background: var(--ui-focus); color: #fff; font: inherit; font-weight: 700; line-height: 1.5; cursor: pointer; overflow-wrap: anywhere; }
.ui-button--secondary { background: var(--ui-surface); color: var(--ui-ink); border-color: var(--ui-line); }
.ui-button--danger { background: var(--ui-danger); }
.ui-button:hover:not(:disabled) { filter: brightness(.94); }
.ui-button:disabled { opacity: .6; cursor: not-allowed; }
.ui-button:focus-visible, .ui-field :focus-visible, .ui-async-region:focus-visible { outline: 3px solid var(--ui-focus); outline-offset: 3px; }
.ui-field { display: grid; gap: .5rem; min-width: 0; margin-block: 1rem; color: var(--ui-ink); font-weight: 600; }
.ui-field :is(input, select, textarea) { box-sizing: border-box; width: 100%; min-width: 0; min-height: 48px; border: 1px solid var(--ui-line); border-radius: var(--ui-radius); padding: .65rem; background: var(--ui-surface); color: var(--ui-ink); font: inherit; font-weight: 400; }
.ui-field textarea { min-height: 7rem; resize: vertical; }
.ui-field small { font-size: .875rem; font-weight: 400; overflow-wrap: anywhere; }
.ui-field :disabled { background: #f1f5f9; cursor: not-allowed; }
.feedback { min-height: 1.5em; color: var(--ui-success); overflow-wrap: anywhere; }
.feedback[data-tone="error"] { color: var(--ui-danger); }
.ui-async-region > .feedback { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
[hidden] { display: none !important; }
.ui-loading { min-height: 12rem; display: grid; place-content: center; justify-items: center; gap: .75rem; color: #475569; font-weight: 700; }
.ui-spinner { width: 2rem; height: 2rem; border: 3px solid #dbeafe; border-top-color: var(--ui-focus); border-radius: 50%; animation: ui-spin .75s linear infinite; }
.ui-empty-state { min-height: 12rem; display: grid; place-content: center; justify-items: center; gap: .5rem; padding: 2rem; text-align: center; border: 1px dashed #cbd5e1; border-radius: 1rem; color: #475569; }
.ui-empty-state h2 { margin: 0; color: #0f172a; font-size: 1.125rem; }
.ui-empty-state p { max-width: 34rem; margin: 0; }
.field-error { display: block; min-height: 1.25rem; color: var(--ui-danger); }
input[aria-invalid="true"], textarea[aria-invalid="true"], select[aria-invalid="true"] { border-color: var(--ui-danger) !important; }
@keyframes ui-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .ui-spinner { animation: none; } }


/* ==========================================================
   Hero slideshow (transparent product cutouts on the blue hero)
   Markup: .hero > .hero-stage > img.hero-slide x5
   ========================================================== */

/* Desktop: copy on the left, products on the right */
.hero{ min-height:clamp(320px,34vw,430px); }

.hero-stage{
  position:absolute; top:0; bottom:0; right:3%;
  width:min(44%,520px);
  z-index:0; pointer-events:none;
}
/* soft glow behind the products so they pop off the blue */
.hero-stage::before{
  content:""; position:absolute; inset:8% 0 8% 0;
  background:radial-gradient(closest-side,rgba(255,255,255,.28),rgba(255,255,255,0));
}
.hero-slide{
  position:absolute; inset:0; width:100%; height:100%;
  padding:18px;
  object-fit:contain; object-position:center;
  opacity:0;
  filter:drop-shadow(0 22px 28px rgba(0,25,90,.4));
  animation:heroSlide 25s infinite backwards;
}
.hero-slide:nth-child(1){ animation-delay:0s; }
.hero-slide:nth-child(2){ animation-delay:5s; }
.hero-slide:nth-child(3){ animation-delay:10s; }
.hero-slide:nth-child(4){ animation-delay:15s; }
.hero-slide:nth-child(5){ animation-delay:20s; }

/* 25s loop, 5s per image, 1s cross-fade, gentle float */
@keyframes heroSlide{
  0%   { opacity:0; transform:translateY(18px); }
  5%   { opacity:1; transform:translateY(0); }
  20%  { opacity:1; transform:translateY(-6px); }
  25%  { opacity:0; transform:translateY(-14px); }
  100% { opacity:0; transform:translateY(-14px); }
}

/* Tablet + phone: text on top, products underneath */
@media (max-width:900px){
  .hero{ min-height:0; padding-bottom:clamp(250px,62vw,340px); }
  .hero-stage{
    top:auto; left:0; right:0; bottom:0; width:auto;
    height:clamp(230px,58vw,320px);
  }
  .hero-slide{ padding:10px 24px 16px; }
}

@media (max-width:700px){
  .hero h1{ max-width:none; }
  .hero p:not(.eyebrow){ max-width:none; }
}

/* Reduced motion: show one static image (the products shot) */
@media (prefers-reduced-motion:reduce){
  .hero-slide{ animation:none; }
  .hero-slide:nth-child(5){ opacity:1; }
}


/* ==========================================================
   Category tiles: real photo + label
   Markup from app.js: button.category > span.category-photo > img, span.category-name
   ========================================================== */
.category-list{ gap:14px; }

.category{
  display:flex; flex-direction:column; align-items:stretch; gap:0;
  min-height:0; padding:0; overflow:hidden;
  background:#fff; border:1px solid var(--line); border-radius:14px;
  color:var(--navy); text-align:left; font:inherit;
  transition:border-color .18s, box-shadow .18s, transform .18s;
}
.category-photo{
  display:block; width:100%; aspect-ratio:1/1; overflow:hidden; background:#eef2f8;
}
.category-photo img{
  display:block; width:100%; height:100%; object-fit:cover;
  transition:transform .35s ease;
}
.category-name{
  display:block; padding:12px 14px 13px;
  font-size:14px; font-weight:700; letter-spacing:-.01em; line-height:1.3; color:inherit;
}
.category:hover{
  border-color:var(--blue); transform:translateY(-2px);
  box-shadow:0 10px 24px rgba(37,99,235,.12); color:var(--blue);
}
.category:hover .category-photo img{ transform:scale(1.05); }

@media (min-width:701px) and (max-width:1000px){
  .category-list{ grid-template-columns:repeat(3,1fr); }
}

@media (max-width:700px){
  .category-list{ gap:10px; }
  .category{ flex:none; width:132px; min-width:132px; min-height:0; border-radius:12px; }
  .category-name{ padding:10px 12px 11px; font-size:13px; }
}

@media (prefers-reduced-motion:reduce){
  .category, .category-photo img{ transition:none; }
  .category:hover{ transform:none; }
  .category:hover .category-photo img{ transform:none; }
}


/* ==========================================================
   Storefront extras: quantity, wishlist, filters, footer, WhatsApp
   ========================================================== */

/* Quantity (product page + cart) */
.quantity b{ min-width:24px; text-align:center; }
.quantity button:disabled, .qty-stepper button:disabled{ opacity:.4; cursor:not-allowed; }
.qty-stepper{ display:inline-flex; align-items:center; border:1px solid var(--line); border-radius:10px; background:#fff; overflow:hidden; }
.qty-stepper button{ width:36px; height:36px; border:0; background:transparent; font-size:18px; line-height:1; cursor:pointer; color:var(--navy); }
.qty-stepper button:not(:disabled):hover{ background:#eff6ff; }
.qty-stepper b{ min-width:34px; text-align:center; font-size:14px; }
.cart-line{ display:flex; justify-content:space-between; align-items:center; gap:12px; margin-top:10px; }
.cart-item .cart-line .price{ margin:0; }
.unit-price{ display:block; margin-top:6px; font-size:11px; color:#64748b; }
.stock.low{ color:#b45309; margin-left:8px; }

/* Wishlist */
.wish-btn{
  position:absolute; top:9px; right:9px; z-index:1;
  width:34px; height:34px; display:grid; place-items:center; padding:0;
  border:0; border-radius:50%; background:rgba(255,255,255,.94); color:#475569; cursor:pointer;
  transition:color .18s, transform .18s;
}
.wish-btn svg{ width:18px; height:18px; }
.wish-btn:hover{ color:#e11d48; transform:scale(1.08); }
.wish-btn[aria-pressed="true"]{ color:#e11d48; }
.wish-btn[aria-pressed="true"] svg, .button.ghost[aria-pressed="true"] svg, .wish-button.has-items svg{ fill:currentColor; }
.wish-button{ margin-left:auto; }
.wish-button + .cart-button{ margin-left:0; }
.wish-count{
  display:none; position:absolute; top:1px; right:0; background:var(--blue); color:#fff;
  font-size:10px; font-weight:800; min-width:17px; height:17px; border-radius:9px; place-items:center;
}
.wish-count:not(:empty){ display:grid; }
.button.ghost{ background:#fff; color:var(--navy); border:1px solid var(--line); }
.button.ghost:hover{ background:#f8fafc; }
.button.ghost[aria-pressed="true"]{ color:#e11d48; border-color:#fecdd3; background:#fff1f2; }
.button.ghost svg{ width:18px; height:18px; }
.detail-actions{ display:grid; gap:10px; }
.recent-detail{ margin-top:48px; }
.recent-detail h2{ font-size:20px; letter-spacing:-.03em; margin:0; }

/* Sort + price tools */
.catalog-tools{ display:flex; flex-wrap:wrap; align-items:flex-end; gap:14px 20px; margin-top:18px; }
.tool{ display:grid; gap:6px; font-size:12px; font-weight:700; color:#475569; }
.tool select, .price-inputs input{
  height:40px; border:1px solid #cbd5e1; border-radius:9px; background:#fff;
  font:500 13px inherit; color:var(--navy); padding:0 12px;
}
.price-inputs{ display:flex; align-items:center; gap:8px; }
.price-inputs input{ width:96px; }
.tool select:focus, .price-inputs input:focus{ outline:0; border-color:var(--blue); box-shadow:0 0 0 3px #dbeafe; }
.catalog-tools .text-button{ height:40px; padding:0 4px; }

/* Trust pages */
.info-body{ max-width:760px; margin:24px 0 40px; background:#fff; border:1px solid var(--line); border-radius:16px; padding:28px; }
.info-body h2{ font-size:17px; letter-spacing:-.02em; margin:26px 0 8px; }
.info-body h2:first-child{ margin-top:0; }
.info-body p, .info-body li{ font-size:14px; line-height:1.7; color:#334155; }
.info-body ul{ padding-left:20px; margin:8px 0; }
.wa-button{ background:#25d366; color:#06311a; text-decoration:none; }
.wa-button:hover{ background:#1fbd5a; }

/* Footer */
.site-footer{ margin-top:64px; background:var(--navy); color:#cbd5e1; padding:44px 0 26px; }
.footer-grid{ display:grid; grid-template-columns:1.5fr 1fr 1fr 1.3fr; gap:32px; }
.footer-brand strong{ display:block; font-size:20px; color:#fff; letter-spacing:-.03em; }
.footer-brand strong span{ color:#60a5fa; }
.footer-brand p, .site-footer p{ font-size:13px; line-height:1.6; margin:10px 0 0; max-width:300px; }
.site-footer h2{ font-size:12px; letter-spacing:.1em; text-transform:uppercase; color:#fff; margin:0 0 12px; }
.site-footer nav{ display:flex; flex-direction:column; align-items:flex-start; }
.site-footer nav button{ background:none; border:0; padding:5px 0; font:inherit; font-size:13px; color:#cbd5e1; cursor:pointer; text-align:left; }
.site-footer nav button:hover, .footer-wa:hover{ color:#fff; text-decoration:underline; }
.footer-wa{ display:inline-block; margin-top:14px; font-size:13px; font-weight:700; color:#86efac; text-decoration:none; }
.footer-base{ margin-top:32px; padding-top:18px; border-top:1px solid #334155; font-size:12px; color:#94a3b8; }

/* Floating WhatsApp button */
.wa-float{
  position:fixed; right:20px; bottom:24px; z-index:6; height:52px; padding:0 18px 0 14px;
  display:flex; align-items:center; gap:8px; border-radius:99px; background:#25d366; color:#fff;
  font:700 13px 'Plus Jakarta Sans',sans-serif; text-decoration:none;
  box-shadow:0 8px 22px rgba(0,0,0,.25); transition:transform .18s, box-shadow .18s;
}
.wa-float svg{ width:28px; height:28px; fill:#fff; stroke:none; flex:none; }
.wa-float:hover{ transform:translateY(-2px); box-shadow:0 12px 26px rgba(0,0,0,.3); }

@media (max-width:900px){
  .footer-grid{ grid-template-columns:1fr 1fr; }
}
@media (max-width:700px){
  .footer-grid{ grid-template-columns:1fr; gap:24px; }
  .info-body{ padding:20px; }
  .wa-float{ right:14px; bottom:84px; width:52px; padding:0; justify-content:center; }
  .wa-float span{ display:none; }
  .catalog-tools{ gap:12px; }
  .price-inputs input{ width:84px; }
  .cart-line{ flex-wrap:wrap; }
}
@media (prefers-reduced-motion:reduce){
  .wa-float, .wish-btn{ transition:none; }
}