/* Minimal, fresh catalog stylesheet — single-file replacement
   - Keeps selectors used by `catalogo.js` (product-card, product-image, price-bubble, promo-ribbon, cart-drawer, etc.)
   - Uses brand colors, accessible spacing, responsive grid
*/
:root{
  --accent: #f26b38;
  --accent-2: #ffb84d;
  --accent-3: #6dd3c8;
  --bg: #fbfaf9;
  --deep: #061a2b;
  --muted: rgba(10,34,64,0.6);
  --card-radius: 12px;
  --gap: 18px;
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family: Inter, Poppins, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  -webkit-font-smoothing:antialiased;
  background: linear-gradient(180deg,var(--bg),#f6f6f6);
  color:var(--deep);
}

.controls{
  max-width:1180px;margin:18px auto;padding:10px 14px;display:flex;gap:12px;align-items:center;
}
/* Page header */
.page-header{max-width:1180px;margin:22px auto 6px;padding:10px 14px;display:flex;align-items:center;justify-content:space-between}
.page-header .header-inner{display:flex;align-items:center;gap:14px}
.page-header h1{font-size:20px;margin:0;color:var(--deep);font-weight:800}
.back-home{padding:8px 12px;border-radius:10px;border:1px solid rgba(10,34,64,0.06);background:linear-gradient(180deg,#ffffff,#fbfdff);color:var(--deep);font-weight:700;text-decoration:none}
.back-home:hover{transform:translateY(-2px);box-shadow:0 12px 30px rgba(2,6,23,0.04)}
.search{flex:1;display:flex;gap:10px;align-items:center}
.search input{width:100%;padding:10px;border-radius:10px;border:1px solid rgba(6,26,43,0.06);background:#fff}
.filters{display:flex;gap:8px}
.filters button{background:transparent;border:1px solid rgba(6,26,43,0.06);padding:8px 12px;border-radius:999px;cursor:pointer}
.filters button.active{background:linear-gradient(90deg,var(--accent),var(--accent-2));color:#fff;border-color:transparent}

 #catalogGrid{max-width:1180px;margin:12px auto;padding:0 12px 40px;display:grid;grid-template-columns:repeat(4,1fr);gap:var(--gap)}

/* promotions row: separate container above the products grid */
.promotions-row{max-width:1180px;margin:12px auto;padding:0 12px 12px;display:flex;gap:12px;align-items:flex-start;overflow-x:auto}
.promotions-row .promotion-card{flex:0 0 320px;min-width:240px}
.promotions-row::-webkit-scrollbar{height:8px}
.promotions-row::-webkit-scrollbar-thumb{background:rgba(10,34,64,0.08);border-radius:8px}

.product-card{background:linear-gradient(180deg,#ffffff,#fffaf6);border-radius:12px;padding:10px;border:1px solid rgba(6,26,43,0.06);display:flex;flex-direction:column;gap:8px;position:relative;transition:box-shadow .18s ease}
/* remove whole-card lift effect; keep a subtle shadow on hover only (no transform) */
.product-card:hover{box-shadow:0 14px 36px rgba(6,26,43,0.06)}
.product-card.lifted{ /* neutralized to avoid unexpected transforms */ }

.product-image{height:200px;border-radius:10px;display:flex;align-items:center;justify-content:center;background:linear-gradient(180deg,#fafafa,#fff);overflow:hidden;padding:0}
.product-image img{width:100%;height:100%;object-fit:cover;display:block;border-radius:8px;box-shadow:0 12px 30px rgba(2,6,23,0.06);transition:filter .28s ease}
.product-card:hover .product-image img{filter:brightness(1.02);transform:none}

.product-info{padding:6px 4px;display:flex;flex-direction:column;gap:8px}
.product-info h3{font-size:15px;margin:0;font-weight:700}
.product-info p{font-size:13px;color:var(--muted);margin:0;min-height:36px}

.price{font-weight:800;color:var(--accent);font-size:16px}
.price-old{margin-left:8px;color:rgba(6,26,43,0.28);text-decoration:line-through}

.card-actions{display:flex;gap:8px;align-items:center;justify-content:space-between}
.btn-add{padding:8px 14px;border-radius:10px;border:0;background:linear-gradient(90deg,#10b981,#059669);color:#fff;font-weight:800;cursor:pointer;box-shadow:0 10px 28px rgba(6,95,70,0.12);transition:transform .14s ease,box-shadow .14s ease,filter .14s ease}
.btn-add:hover{transform:translateY(-3px);box-shadow:0 16px 44px rgba(6,95,70,0.16);filter:brightness(0.98)}

/* make Add button visually distinct when small/ghost contexts exist */
.btn.btn-add.btn-ghost{background:transparent;color:var(--accent);border:1px solid rgba(242,107,56,0.12);box-shadow:none}
.btn{padding:8px 12px;border-radius:8px;border:1px solid rgba(6,26,43,0.06);background:#fff;cursor:pointer}
.btn-primary{background:linear-gradient(90deg,var(--accent),var(--accent-2));color:#fff;border:0}
.btn-ghost{background:transparent;border:1px solid rgba(6,26,43,0.06)}

.price-badge{position:absolute;right:12px;top:12px;padding:8px 10px;border-radius:10px;color:#fff;font-weight:800;background:linear-gradient(90deg,var(--accent),var(--accent-2));box-shadow:0 12px 36px rgba(242,107,56,0.12);z-index:1200}
.promo-ribbon{position:absolute;left:12px;top:12px;padding:6px 8px;border-radius:999px;background:#ef4444;color:#fff;font-weight:800;font-size:12px}

/* cart UI */
.cart-fab{position:fixed;right:20px;bottom:20px;width:56px;height:56px;border-radius:999px;background:linear-gradient(90deg,var(--accent),var(--accent-2));display:flex;align-items:center;justify-content:center;color:#fff;box-shadow:0 16px 50px rgba(6,26,43,0.12);z-index:999}
.cart-count{position:absolute;top:-8px;right:-8px;background:#ff3b30;color:#fff;border-radius:999px;min-width:20px;height:20px;display:inline-flex;align-items:center;justify-content:center;padding:0 6px;font-weight:800}

.cart-drawer{position:fixed;right:20px;bottom:96px;width:360px;max-width:92vw;background:#fff;border-radius:12px;padding:12px;box-shadow:0 30px 90px rgba(6,26,43,0.12);transform:translateY(12px);opacity:0;pointer-events:none;transition:all .22s;z-index:1000}
.cart-drawer.open{opacity:1;pointer-events:auto;transform:none}
.cart-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:8px}
.cart-items{max-height:40vh;overflow:auto;display:flex;flex-direction:column;gap:8px}
.cart-item{display:flex;gap:12px;align-items:center;padding:10px;border-radius:10px;background:linear-gradient(180deg,#ffffff,#fffaf6);border:1px solid rgba(6,26,43,0.06);box-shadow:0 8px 24px rgba(6,26,43,0.06)}
.ci-image img{width:64px;height:64px;object-fit:contain;border-radius:10px}
.ci-info{flex:1}
.ci-name{font-weight:700;margin-bottom:6px}
.ci-price{font-weight:800;color:var(--accent)}
.cart-sub{display:flex;justify-content:space-between;align-items:center;font-weight:800;margin-top:8px;padding-top:8px;border-top:1px dashed rgba(6,26,43,0.04)}

/* subtotal animation */
.cart-sub .amount{display:inline-block;transition:transform .28s ease,opacity .18s ease}
.cart-sub .amount.pulse{transform:scale(1.08);opacity:0.9}

/* search improvements */
.search{flex:1;display:flex;gap:10px;align-items:center}
.search{position:relative}
.search input{width:100%;padding:12px 14px 12px 44px;border-radius:14px;border:1px solid rgba(6,26,43,0.08);background:#fff url("data:image/svg+xml;utf8,<svg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20stroke='%23626a6f'%20stroke-width='2'%20fill='none'%20stroke-linecap='round'%20stroke-linejoin='round'><circle%20cx='11'%20cy='11'%20r='7'/><line%20x1='21'%20y1='21'%20x2='16.65'%20y2='16.65'/></svg>") no-repeat 12px center/18px 18px;box-shadow:0 8px 26px rgba(10,34,64,0.06);font-size:15px;font-family:inherit;color:var(--deep);transition:box-shadow .18s ease, border-color .12s ease, transform .12s ease}
.search input::placeholder{color:rgba(6,26,43,0.38);font-weight:500}
.search input:focus{outline:0;border-color:var(--accent);box-shadow:0 18px 40px rgba(242,107,56,0.08);transform:translateY(-2px)}

/* quantity selector price display */
.qb-top{width:100%}
.qb-img{width:100%;height:140px;object-fit:contain;border-radius:8px;background:linear-gradient(180deg,#fafafa,#fff);margin-bottom:8px}
.qb-price{color:var(--muted);font-size:13px}
.qb-total{font-weight:800;color:var(--accent);font-size:16px;margin-top:6px}
.qb-total.pulse{transform:scale(1.06);transition:transform .18s ease}

.message{padding:14px;border-radius:10px;background:linear-gradient(180deg,#fff,#fffaf6);color:var(--muted);text-align:center}

/* small utilities and responsive */
@media (max-width:1024px){#catalogGrid{grid-template-columns:repeat(2,1fr)}}
@media (max-width:700px){#catalogGrid{grid-template-columns:1fr;padding:0 12px}.controls{flex-direction:column;align-items:stretch}.product-image{height:140px}}
@media (max-width:700px){
  .promotions-row{padding-left:12px;padding-right:12px;gap:10px}
  .promotions-row .promotion-card{flex:0 0 260px;min-width:220px}
}

@media (prefers-reduced-motion: reduce){*{transition:none!important;animation:none!important}}

/* keep classes used by JS */
.new-badge{background:linear-gradient(90deg,#34d399,#10b981);color:#fff;padding:4px 8px;border-radius:999px;font-weight:800;font-size:12px}
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root{
  /* Catalog-specific styles (light overrides to match main site aesthetics) */
  :root{--catalog-gap:20px}
  .small-hero{padding:46px 0;background:linear-gradient(135deg, rgba(255,200,90,0.15) 0%, rgba(242,107,56,0.03) 26%);border-bottom-left-radius:22px;border-bottom-right-radius:22px;position:relative;overflow:hidden}
  .small-hero::after{content:'';position:absolute;left:-8%;top:-14%;width:420px;height:420px;border-radius:50%;background:linear-gradient(180deg,var(--accent-3), rgba(255,255,255,0.14));opacity:0.06;filter:blur(20px)}
  .small-hero .hero-cta{display:flex;gap:12px;align-items:center}
  .small-hero .hero-art{position:relative}
  .small-hero .hero-art::after{content:'';position:absolute;right:-36px;bottom:-20px;width:140px;height:140px;border-radius:24px;background:linear-gradient(90deg, rgba(109,211,200,0.6), rgba(242,107,56,0.6));opacity:0.09;filter:blur(10px);transform:rotate(22deg);}
  .catalog-controls{display:flex;gap:18px;align-items:center;justify-content:space-between;margin-bottom:18px;padding:12px;border-radius:14px;background:linear-gradient(180deg,#fff,#fffef6);box-shadow:0 10px 40px rgba(10,34,64,0.04)}
  .filters{display:flex;gap:12px;align-items:center}
  .filter-btn{background:var(--surface);border-radius:999px;padding:8px 14px;border:1px solid rgba(10,34,64,0.08);cursor:pointer;font-weight:700;color:var(--deep);transition:all .12s ease}
  .filter-btn:hover{background:linear-gradient(90deg, rgba(242,107,56,0.06), rgba(255,200,90,0.02));transform:translateY(-2px)}
  .filter-btn.active{background:linear-gradient(90deg,var(--accent),var(--accent-2));color:#fff;box-shadow:0 14px 40px rgba(242,107,56,0.08)}
  .filter-btn:focus{outline:3px solid rgba(242,107,56,0.08);outline-offset:3px}
  .search{display:flex;align-items:center;gap:8px;flex:1}
  .search input{padding:12px 16px;border-radius:12px;border:1px solid rgba(10,34,64,0.08);min-width:220px;background:linear-gradient(180deg,#fff,#fffef8);flex:1}
  .search svg{opacity:0.5;color:rgba(10,34,64,0.6)}
  .search input:focus{outline:3px solid rgba(242,107,56,0.12);outline-offset:3px}

  /* Catalog hero overrides */
  .small-hero .hero-text h1{font-size:56px;line-height:1.03;margin-bottom:6px}
  .small-hero .subtitulo{font-size:18px;color:rgba(10,34,64,0.78);max-width:60ch;margin-top:8px}

  .catalog-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:var(--catalog-gap);align-items:start}
  .product-card{background:linear-gradient(180deg,#ffffff,#fffdf9);border-radius:18px;padding:18px;border:1px solid rgba(10,34,64,0.06);box-shadow:0 24px 80px rgba(10,34,64,0.10);display:flex;flex-direction:column;gap:14px;transition:transform .25s cubic-bezier(.2,.9,.3,1),box-shadow .25s cubic-bezier(.2,.9,.3,1);position:relative}
  /* Promotion style */
  .promotion-card{background:linear-gradient(90deg, rgba(242,107,56,0.04), rgba(109,211,200,0.02));min-height:260px;padding:16px;cursor:pointer}
  .promotion-card .product-title{color:var(--accent-2)}
  .promotion-card .price-bubble{background:linear-gradient(90deg,#ef4444,var(--accent-2));font-weight:800;right:14px;top:12px;padding:8px 10px;font-size:0.94rem}
  .promotion-card .product-thumb{height:120px}
  .promotion-thumbs{display:flex;gap:6px;flex-wrap:wrap}
  .promotion-card .price-display{margin-top:10px}
  .promotion-card .product-info{padding-top:8px;display:flex;flex-direction:column}
  .promotion-card .product-actions{align-items:flex-end}
  .promotion-card .price-display{font-size:15px; font-weight:800; color:var(--accent);}
  .promo-count{background:rgba(10,34,64,0.03);padding:4px 8px;border-radius:999px;font-size:12px;color:#4b5563;font-weight:700}
  .cart-item.promo-summary{background:linear-gradient(180deg,#fffefb,#fff6f2);display:flex;flex-direction:column;gap:12px;padding:14px;border-radius:12px;margin-bottom:18px}
  /* promotion thumbnails and compare price styles */
  .promotion-thumbs img, .promo-thumb{width:32px;height:32px;object-fit:cover;border-radius:6px;border:1px solid rgba(10,34,64,0.04);}
  .promo-thumb-wrap img{width:32px;height:32px;object-fit:cover;border-radius:6px;border:1px solid rgba(10,34,64,0.04);}
  .promo-thumb-more{width:32px;height:32px;border-radius:6px;border:1px solid rgba(10,34,64,0.04);display:flex;align-items:center;justify-content:center;background:rgba(10,34,64,0.04);color:var(--deep);font-weight:700}
  .promotion-card .product-sub{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;max-width:100%}
  .promotion-card .product-info{gap:10px}
  .price-compare{display:flex;align-items:center;gap:8px;font-weight:800}
  .price-compare .old{color:#8b8b8b;text-decoration:line-through;font-weight:700}
  .price-compare .new{color:var(--accent)}
  .modal-price{margin-top:8px;font-weight:800}
  .product-card::before{content:'';position:absolute;right:-24px;top:-24px;width:120px;height:120px;border-radius:50%;background:linear-gradient(90deg, rgba(242,107,56,0.12), rgba(109,211,200,0.08));filter:blur(40px);opacity:0.6;pointer-events:none}
  .product-card::after{content:'';position:absolute;left:0;top:0;height:100%;width:6px;border-top-left-radius:12px;border-bottom-left-radius:12px;background:linear-gradient(180deg,var(--accent),var(--accent-2));opacity:0.95;pointer-events:none}
  .product-card:focus-within{outline:3px solid rgba(10,34,64,0.04);outline-offset:2px}
  .product-thumb{display:block;height:220px;width:100%;border-radius:14px;background:linear-gradient(180deg,#fff,#f4f6f9);align-self:center;padding:12px;object-fit:contain;border:1px solid rgba(10,34,64,0.04);transition:box-shadow .25s ease}

  .product-card:hover .product-thumb{transform:none;box-shadow:0 28px 74px rgba(10,34,64,0.12)}
  .product-info{display:flex;flex-direction:column;gap:6px}
  .product-title{font-size:19px;font-weight:900;color:var(--deep);letter-spacing:-0.35px}
  .product-meta{font-size:13px;color:var(--text-muted)}
  .product-sub{font-size:13px;color:var(--text-muted);margin-top:2px}
  .product-meta{color:rgba(10,34,64,0.85);font-size:13px}
  .product-actions{display:flex;gap:10px;margin-top:auto;justify-content:space-between;align-items:center}
  .product-actions .btn.small{padding:6px 8px;font-size:13px}
  .promo-badge{background:linear-gradient(90deg,#ef4444,var(--accent-2));color:#fff;padding:4px 8px;border-radius:8px;font-weight:700}
  .cart-item.promo-summary .promo-badge{white-space:nowrap}
  .promo-thumb-more{display:flex;align-items:center;justify-content:center;font-size:12px;color:#fff;background:linear-gradient(90deg,#ef4444,var(--accent-2));border-radius:6px;padding:6px}
  .product-actions .btn{padding:8px 12px;border-radius:8px}
  .product-actions .btn-primary{background:var(--accent);color:#fff;border:none}
  .product-actions .btn-primary:hover{filter:brightness(.96);transform:translateY(-1px)}
  .product-actions .btn-outline{border:2px solid rgba(10,34,64,0.12);color:var(--deep)}
  .product-actions .btn-outline:hover{background:rgba(10,34,64,0.04)}
  .price{font-weight:900;color:var(--accent);font-size:1.05rem}
  .product-card .price-bubble{position:absolute;right:18px;top:18px;background:linear-gradient(90deg,var(--accent),var(--accent-2));color:#ffffff;padding:12px 14px;border-radius:12px;font-weight:900;font-size:1.03rem;box-shadow:0 26px 64px rgba(242,107,56,0.16);letter-spacing:0.6px;transform-origin:center;transform:translateY(-6px) scale(.98);opacity:0;transition:opacity .25s ease, transform .25s cubic-bezier(.2,.9,.3,1);z-index:999}
  
  /* Force-disable transforms on product images/thumbs to avoid covering price bubble */
  .product-image img, .product-thumb, .product-thumb img { transform: none !important }
  .product-card:hover .product-image img, .product-card:hover .product-thumb { transform: none !important }
.lightbox-inner img{ max-width:100%; max-height:100%; border-radius:12px; box-shadow: 0 30px 60px rgba(2,6,23,0.4); }
.lightbox-meta{ color: var(--muted); font-weight:600; text-align:left; max-width:380px; color:rgba(10,34,64,0.85); }
.lightbox-close{ position:fixed; top:20px; right:20px; background:rgba(255,255,255,0.9); color:#07143a; border:0; padding:8px 10px; border-radius:8px; cursor:pointer; box-shadow: 0 8px 20px rgba(2,6,23,0.06); }

/* small screens: hide duplicated price in info to avoid clutter */
@media (max-width:560px){ .product-info .price{ display:none; } .price-badge{ display:block; } }

/* reduce letter-spacing on smaller viewports to better match production font-hinting */
@media (max-width:900px){ .hero-text h1{ letter-spacing: -0.2px; } }

.product-info{ padding:18px; display:flex; flex-direction:column; gap:8px; }
.product-info h3{ font-size:15px; font-weight:700; letter-spacing: -0.2px; display:flex; align-items:center; gap:8px; }
.product-info p{ font-size:13px; color:var(--muted); min-height:36px; }
.price{ font-weight:900; margin-top:auto; color:var(--deep); font-size:15px; }
.new-badge{ background:linear-gradient(90deg,#34d399,#10b981); color:white; padding:4px 8px; font-size:11px; border-radius:999px; font-weight:800; box-shadow: 0 8px 20px rgba(16,185,129,0.08); }

/* entrance animation */
.product-card.reveal{ opacity:0; transform: translateY(18px); animation: fadeInUp .6s forwards cubic-bezier(.2,.9,.2,1); }
.product-card.reveal[data-i]{ animation-delay: calc(var(--i,0) * 80ms); }
@keyframes fadeInUp{ to{ opacity:1; transform:none; } }

/* skeleton */
.skeleton{ pointer-events:none; user-select:none; }
.skeleton .product-image{ background: linear-gradient(90deg,#f1f5f9 25%, #eef3ff 50%, #f1f5f9 75%); background-size:200% 100%; animation: shimmer 1.2s linear infinite; }
.skeleton .product-info h3, .skeleton .product-info p, .skeleton .price{ background: linear-gradient(90deg,#f3f6fa,#f8fbff); border-radius:6px; color:transparent; }
.skeleton .product-info h3{ height:16px; width:70%; margin-bottom:8px; }
.skeleton .product-info p{ height:36px; width:100%; }
.skeleton .price{ height:18px; width:36%; margin-top:10px; }
@keyframes shimmer{ 0%{ background-position:200% 0 }100%{ background-position:-200% 0 } }

/* messages */
.message{ text-align:center; padding:28px; color:var(--muted); background:linear-gradient(180deg, rgba(255,255,255,0.6), rgba(255,255,255,0.4)); border-radius:12px; box-shadow: 0 8px 20px rgba(2,6,23,0.04); }
.message.warning{ color:#92400e; }
.message.error{ color:#7f1d1d; }

/* cart: floating button + drawer */
.cart-fab{ position:fixed; right:20px; bottom:24px; width:56px; height:56px; border-radius:999px; background:linear-gradient(90deg,var(--accent),var(--accent-2)); color:#fff; display:flex; align-items:center; justify-content:center; box-shadow: var(--shadow-lg); border:none; cursor:pointer; z-index:1000; transition:transform .22s cubic-bezier(.2,.9,.2,1), box-shadow .22s; }
.cart-fab:active{ transform:translateY(2px) scale(.995); }
.cart-count{ position:absolute; top:6px; right:6px; background:#ff3b30; color:#fff; min-width:20px; height:20px; display:inline-flex; align-items:center; justify-content:center; border-radius:999px; font-size:12px; padding:0 6px; box-shadow:0 10px 28px rgba(10,34,64,0.18); font-weight:800; }

/* Auto-refresh status badge */
.auto-refresh{display:flex;flex-direction:row;align-items:center;gap:10px;font-size:13px}
.auto-controls{display:flex;align-items:center;gap:10px}
.auto-status{padding:6px 10px;border-radius:999px;background:#ecfdf5;color:#065f46;font-weight:700;border:1px solid rgba(6,26,43,0.04);box-shadow:0 8px 24px rgba(6,26,43,0.04);min-width:92px;text-align:center}
.auto-status.off{background:#fff1f2;color:#7f1d1d;border-color:rgba(127,29,29,0.06)}
.auto-status .dot{display:inline-block;width:8px;height:8px;border-radius:999px;margin-right:8px;vertical-align:middle}
.auto-status.on .dot{background:linear-gradient(90deg,#10b981,#34d399)}
.auto-status.off .dot{background:linear-gradient(90deg,#f97316,#ef4444)}

/* Aesthetic switch matching brand colors */
.switch{display:inline-block;position:relative;width:48px;height:28px;z-index:2}
.switch input{opacity:0;width:0;height:0;position:absolute}
.switch .slider{position:absolute;cursor:pointer;inset:0;display:block;border-radius:999px;background:linear-gradient(180deg,#e6f0fa,#d7eafc);border:1px solid rgba(6,26,43,0.12);box-shadow:inset 0 2px 6px rgba(6,26,43,0.04), 0 6px 18px rgba(2,6,23,0.04);transition:background .22s ease, box-shadow .22s ease, transform .12s ease;display:flex;align-items:center}
.switch .slider::before{content:'';position:absolute;left:4px;top:4px;width:20px;height:20px;border-radius:50%;background:#fff;box-shadow:0 10px 26px rgba(2,6,23,0.12);transition:transform .22s cubic-bezier(.2,.9,.3,1),background .22s}
.switch input:not(:checked) + .slider{opacity:1;background:linear-gradient(180deg,#e6f0fa,#d7eafc);border-color:rgba(6,26,43,0.12)}
.switch input:checked + .slider{background:linear-gradient(90deg,var(--accent),var(--accent-2));box-shadow:0 12px 34px rgba(242,107,56,0.12)}
.switch input:checked + .slider::before{transform:translateX(20px);background:#fff}
.switch .slider:focus{outline:2px solid rgba(242,107,56,0.12);outline-offset:3px}
/* smaller variant for tight spaces */
.switch.small{width:42px;height:24px}
.switch.small .slider::before{width:18px;height:18px;left:3px;top:3px}
/* responsive: use small switch on narrow viewports */
@media (max-width:700px){ .switch{width:42px;height:24px} .switch .slider::before{width:18px;height:18px} .switch input:checked + .slider::before{transform:translateX(18px)} }


.cart-drawer{ position:fixed; right:18px; bottom:96px; width:380px; max-width:calc(100% - 40px); background:linear-gradient(180deg, rgba(255,255,255,0.96), rgba(255,255,255,0.92)); border-radius:16px; box-shadow: 0 30px 80px rgba(2,6,23,0.18); transform: translateY(12px) scale(.99); opacity:0; pointer-events:none; transition:opacity .22s ease, transform .28s cubic-bezier(.2,.9,.2,1); z-index:1100; }
.cart-drawer[aria-hidden="false"], .cart-drawer.open{ transform:none; opacity:1; pointer-events:auto; }
.cart-inner{ display:flex; flex-direction:column; gap:12px; padding:14px; }
.cart-head{ display:flex; align-items:center; justify-content:space-between; gap:12px; }
.cart-head h3{ margin:0; font-size:15px; }
.cart-close{ background:transparent; border:0; font-size:18px; cursor:pointer; color:var(--muted); }
.cart-items{ display:flex; flex-direction:column; gap:12px; min-height:60px; max-height:48vh; overflow:auto; padding-right:6px; }
.cart-item{ display:flex; gap:12px; align-items:center; background:linear-gradient(180deg,#fff,#fbfdff); padding:8px; border-radius:12px; box-shadow: 0 6px 20px rgba(2,6,23,0.04); }
.cart-item .ci-image{ width:64px; height:56px; display:flex; align-items:center; justify-content:center; background:#f1f5f9; border-radius:8px; overflow:hidden; }
.cart-item img{ max-width:100%; max-height:100%; object-fit:contain; display:block; }
.cart-item .ci-info{ flex:1; display:flex; flex-direction:column; gap:6px; }
.cart-item .ci-info .ci-name{ font-weight:700; font-size:14px; }
.cart-item .ci-controls{ display:flex; gap:8px; align-items:center; }
.qty{ display:inline-flex; align-items:center; gap:8px; background:linear-gradient(180deg,#f7f9ff,#ffffff); padding:6px 8px; border-radius:999px; border:1px solid rgba(11,34,64,0.04); }
.qty button{ width:28px; height:28px; border-radius:6px; border:0; background:transparent; cursor:pointer; font-weight:700; color:var(--accent); }
.qty .val{ min-width:22px; text-align:center; font-weight:700; }
.cart-sub{ display:flex; justify-content:space-between; align-items:center; font-weight:700; }
.cart-actions{ display:flex; gap:8px; margin-top:8px; }
.btn{ background:linear-gradient(180deg,#ffffff,#fbfdff); color:var(--deep); border:0; padding:10px 14px; border-radius:12px; cursor:pointer; box-shadow: var(--shadow-sm); transition: transform .18s cubic-bezier(.2,.9,.2,1), box-shadow .18s ease; }
.btn:hover{ transform: translateY(-3px); box-shadow: var(--shadow-md); }

.btn-primary{ background: linear-gradient(90deg,var(--accent),var(--accent-2)); color: #fff; box-shadow: var(--shadow-md); padding:12px 18px; border-radius:12px; font-weight:800; }
.btn-primary:active{ transform: translateY(1px) scale(.995); }
.btn-primary:focus{ outline:4px solid rgba(242,107,56,0.12); outline-offset:6px; }

.btn-ghost{ background:transparent; border:1px solid rgba(11,34,64,0.06); color:var(--muted); padding:8px 12px; border-radius:10px; cursor:pointer; }

.btn.is-loading .btn-spinner{ display:inline-block; animation:spin 1s linear infinite; }
.cart-empty{ text-align:center; color:var(--muted); padding:28px 8px; }

/* small screens: full width drawer */
@media (max-width:640px){ .cart-drawer{ left:12px; right:12px; bottom:20px; width:auto; max-width:calc(100% - 24px); } }

/* reduced motion */
@media (prefers-reduced-motion: reduce){
  .product-card, .product-image img, .filters button, .cart-drawer, .cart-fab{ transition: none !important; animation: none !important; transform: none !important; }
  .skeleton{ animation: none !important; }
}

/* --- Promotion card aesthetic overrides (make promos visually distinct) --- */
.promotion-card{
  display:flex;
  gap:14px;
  align-items:center;
  padding:16px;
  border-radius:16px;
  background:linear-gradient(90deg, rgba(255,248,240,1), rgba(255,243,236,0.9));
  border:1px solid rgba(242,107,56,0.10);
  box-shadow:0 28px 80px rgba(242,107,56,0.06);
  position:relative;
  overflow:hidden;
}
.promotion-card .product-thumb{flex:0 0 120px;height:120px;border-radius:12px;overflow:hidden;border:1px solid rgba(10,34,64,0.04);background:#fff;display:flex;align-items:center;justify-content:center}
.promotion-card .product-thumb img{width:100%;height:100%;object-fit:cover}
.promotion-card .product-info{padding:6px 8px;flex:1}
.promotion-card .product-title{font-size:18px;font-weight:900;color:var(--deep);margin:0 0 6px}
.promotion-card .product-sub{color:var(--muted);font-size:13px;margin-bottom:10px}
.promotion-card .price-display{display:inline-block;padding:8px 12px;border-radius:999px;background:linear-gradient(90deg,var(--accent),var(--accent-2));color:#fff;font-weight:900;box-shadow:0 12px 30px rgba(242,107,56,0.12);position:absolute;right:14px;top:14px;z-index:1300}
.promotion-card .promo-bubble{position:absolute;left:14px;bottom:14px;background:rgba(255,255,255,0.95);padding:6px 10px;border-radius:10px;font-weight:800;color:var(--deep);box-shadow:0 8px 22px rgba(2,6,23,0.06)}
.promotion-card:hover{transform:translateY(-6px);box-shadow:0 36px 120px rgba(242,107,56,0.10)}

@media (max-width:900px){
  .promotion-card{flex-direction:row}
  .promotion-card .product-thumb{flex:0 0 96px;height:96px}
}
/* Mobile-specific visibility fixes */
@media (max-width:740px){
  /* Ensure reveal animations don't keep cards invisible on narrow viewports */
  .product-card.reveal{ opacity:1 !important; transform:none !important; animation:none !important; }

  /* Remove decorative pseudo-elements that may overlap images */
  .product-card::before, .product-card::after{ display:none !important; }

  /* Bring images to front and force visibility */
  .product-image, .product-image img, .promotion-card img, .product-thumb img{ position:relative !important; z-index:999 !important; opacity:1 !important; visibility:visible !important; transform:none !important; }

  /* Ensure the promotions row and grid don't create new stacking contexts hiding images */
  #catalogGrid, .promotions-row{ z-index:0; }
}

/* Mobile: clean, readable card style that preserves brand aesthetics but removes
   decorative overlays that could hide images. This is applied as a last-resort
   mobile skin to ensure products are visible while keeping the original look. */
@media (max-width:740px){
  #catalogGrid{ display:block; padding:12px; max-width:640px; margin:8px auto; }
  .promotions-row{ padding:6px 12px; display:flex; gap:10px; overflow-x:auto; }
  .product-card{ display:block; width:100%; background:#fff; border-radius:14px; padding:10px; margin-bottom:14px; box-shadow:none; border:1px solid rgba(6,26,43,0.04); overflow:visible; }
  .product-card .product-image{ height:160px; border-radius:12px; overflow:hidden; display:block; background:#fff; }
  .product-card .product-image img{ width:100%; height:100%; object-fit:cover; display:block; border-radius:8px; opacity:1 !important; visibility:visible !important; }
  .product-info{ padding:10px 6px 12px; }
  .product-info h3{ font-size:15px; margin-bottom:6px; color:var(--deep); }
  .product-info p{ font-size:13px; color:var(--muted); margin-bottom:8px; }
  .card-actions{ display:flex; justify-content:space-between; align-items:center; gap:8px; }
  .btn-add{ flex:0 0 auto; padding:10px 14px; border-radius:10px; font-weight:800 }
  .price-badge, .product-card .price-bubble, .promotion-card .price-display{ position:absolute; right:14px; top:12px; z-index:1250; }
  .product-card::before, .product-card::after{ display:none !important; }
  .promotion-card{ min-width:220px; flex:0 0 auto; border-radius:12px; padding:12px; box-shadow:none; border:1px solid rgba(6,26,43,0.04); background:linear-gradient(180deg,#fff,#fffef8); }
}

/* Extra aggressive mobile visibility fixes (debug & fix) */
@media (max-width:740px){
  .product-card{ background: rgba(255,255,255,0.06) !important; box-shadow:none !important; border:1px solid rgba(10,34,64,0.04) !important; }
  .product-image{ background:transparent !important; min-height:80px !important; }
  .product-image img, .promotion-card img, .product-thumb img{ mix-blend-mode:normal !important; filter:none !important; opacity:1 !important; visibility:visible !important; display:block !important; height:auto !important; max-height:220px !important; }
  .promotion-card .price-display, .product-card .price-bubble{ z-index: 1500 !important; }
  /* ensure no overlay sits above images */
  *::before, *::after{ pointer-events:none !important; }
}


/* Emergency visibility fixes for small screens where images were hidden */
#catalogGrid, .promotions-row { position: relative; z-index: 0; }
.product-image, .product-image img, .promotion-card img, .product-thumb img { opacity: 1 !important; visibility: visible !important; transform: none !important; display: block !important; }
.product-image { z-index: 10; }
.product-card::before, .product-card::after { z-index: 0 !important; pointer-events: none !important; }

/* toast container (used by catalogo.js) */
#__toast_container, #__toast_container * { box-sizing: border-box; }
#__toast_container{ position:fixed; right:20px; bottom:20px; z-index:3000; display:flex; flex-direction:column; gap:8px }
.toast { background: linear-gradient(90deg,var(--accent),var(--accent-2)); color:#fff; padding:10px 14px; border-radius:10px; box-shadow:0 12px 36px rgba(2,6,23,0.18); font-weight:800 }

/* Auth modal: polished, centered, and responsive */
.modal{display:none;position:fixed;inset:0;align-items:center;justify-content:center;padding:28px;background:rgba(2,6,23,0.45);backdrop-filter:blur(6px);z-index:2000}
.modal.open{display:flex}
.modal .modal-content{width:100%;max-width:820px;background:linear-gradient(180deg,#ffffff,#fffaf6);border-radius:14px;padding:20px;box-shadow:0 30px 90px rgba(2,6,23,0.16);display:flex;gap:18px;align-items:stretch}
.modal .modal-close{position:absolute;right:24px;top:20px;border:0;background:transparent;font-size:20px;cursor:pointer;color:var(--muted)}
.modal .auth-tabs{display:flex;flex-direction:row;gap:10px;align-items:center;min-width:0;padding-right:0;margin-bottom:10px;background:linear-gradient(180deg, rgba(255,255,255,0.6), rgba(255,255,255,0.4));padding:8px;border-radius:12px}
.modal .auth-tabs .tab{padding:10px 18px;border-radius:12px;background:transparent;border:0;text-align:center;font-weight:800;cursor:pointer;color:var(--deep);box-shadow:none}
.modal .auth-tabs .tab.active{background:linear-gradient(90deg,var(--accent),var(--accent-2));color:#fff;box-shadow:0 10px 28px rgba(242,107,56,0.12)}
.modal .auth-tabs .tab.active{background:linear-gradient(90deg,var(--accent),var(--accent-2));color:#fff}
.modal .auth-panel{flex:1;padding:6px 6px 6px 10px;display:flex;flex-direction:column;gap:10px}
.modal .auth-panel label{display:flex;flex-direction:column;gap:6px;font-weight:600;color:var(--deep)}
.modal .auth-panel{display:flex;flex-direction:column;gap:12px}
.modal .auth-panel input{padding:12px 14px;border:1px solid rgba(6,26,43,0.06);border-bottom:3px solid rgba(6,26,43,0.08);background:linear-gradient(180deg,#ffffff,#fffaf6);font-size:15px;border-radius:10px;transition:box-shadow .18s ease,border-color .12s ease,transform .12s ease}
.modal .auth-panel input::placeholder{color:rgba(6,26,43,0.44);font-weight:600}
.modal .auth-panel input:focus{outline:none;border-bottom-color:var(--accent);box-shadow:0 12px 34px rgba(242,107,56,0.10);transform:translateY(-2px)}

.modal .auth-panel input{display:block;width:100%}
.modal .auth-actions{display:flex;gap:8px;justify-content:center;margin-top:6px}

/* Header auth button (improved) */
#authButton{padding:10px 16px;border-radius:999px;background:linear-gradient(90deg,var(--accent),var(--accent-2));color:#fff;border:none;font-weight:800;box-shadow:0 10px 30px rgba(242,107,56,0.12);transition:transform .12s ease,box-shadow .12s ease}
#authButton:hover{transform:translateY(-3px);box-shadow:0 18px 44px rgba(242,107,56,0.16)}
#authButton.logged{background:linear-gradient(90deg,#37b18c,#10b981);border-color:transparent}
.modal .auth-panel .auth-actions{margin-top:8px}
.modal .auth-actions{display:flex;gap:8px;justify-content:flex-end}
.modal .form-error{color:#7f1d1d;font-weight:700;min-height:20px}
.modal .brand-hero{display:flex;flex-direction:column;gap:10px;align-items:center;justify-content:center;padding:10px}
.modal .brand-hero img{max-width:120px}
.modal .brand-hero p{color:var(--muted);max-width:220px;text-align:center;font-size:14px}

@media (max-width:860px){
  .modal .modal-content{flex-direction:column;padding:16px}
  .modal .auth-tabs{flex-direction:row;border-right:0;border-bottom:1px solid rgba(6,26,43,0.04);padding-bottom:8px;margin-bottom:6px;min-width:0}
  .modal .auth-tabs .tab{flex:1;text-align:center}
}

/* lock body scroll when modal open */
body.modal-open{overflow:hidden}



