/* ============================================================
   Farmacia Online — Design system (mockup)
   ============================================================ */

:root{
  --bg:#F6F8FA;
  --surface:#FFFFFF;
  --line:#E2E8EE;
  --ink:#0E2A3D;
  --ink-soft:#5B6B78;
  --muted:#8796A1;
  --primary:#0B5FA8;
  --primary-dark:#083D6E;
  --primary-soft:#E8F1FA;
  --accent:#13A89A;
  --accent-soft:#E1F5F2;
  --warn:#C9602C;
  --warn-soft:#FBEBE0;
  --success:#1C8A5E;
  --radius-lg:20px;
  --radius:16px;
  --radius-sm:10px;
  --shadow:0 1px 2px rgba(14,42,61,.06), 0 8px 24px rgba(14,42,61,.06);
  --shadow-lg:0 8px 16px rgba(14,42,61,.08), 0 24px 48px rgba(14,42,61,.12);
}

*{box-sizing:border-box;}
html{scroll-behavior:smooth;}
html,body{max-width:100%; overflow-x:hidden;}
body{
  margin:0;
  font-family:"Inter",system-ui,-apple-system,sans-serif;
  color:var(--ink);
  background:var(--bg);
  -webkit-font-smoothing:antialiased;
}
h1,h2,h3,h4{font-family:"Plus Jakarta Sans",system-ui,sans-serif; margin:0;}
a{color:var(--primary); text-decoration:none;}
a:hover{color:var(--primary-dark); text-decoration:none;}
img{max-width:100%; display:block;}
button{font-family:inherit; cursor:pointer;}
input,select,textarea{font-family:inherit;}

.container{width:100%; max-width:none; padding:0 40px;}
@media (max-width:720px){ .container{padding:0 18px;} }

/* ---------- utility bar ---------- */
.topbar{background:var(--primary-dark); color:#fff; font-size:13px;}
.topbar .container{display:flex; justify-content:space-between; align-items:center; gap:12px; padding-top:8px; padding-bottom:8px; flex-wrap:wrap;}
.topbar a{color:#fff; opacity:.92;}
.topbar .group{display:flex; align-items:center; gap:18px; flex-wrap:wrap;}
.topbar-item{display:inline-flex; align-items:center; gap:6px;}
button.topbar-item{background:none; border:none; padding:0; font:inherit; color:inherit; cursor:pointer;}
.topbar-brand{display:none; align-items:center; gap:6px; color:#fff; font-family:"Plus Jakarta Sans",sans-serif; font-weight:800; font-size:13px; opacity:1;}
.topbar-brand:hover{color:#fff;}
.topbar-icon{display:none;}
.topbar-item .short{display:none;}

/* ---------- header ---------- */
.site-header{background:var(--surface); border-bottom:1px solid var(--line); position:sticky; top:0; z-index:40;}
.header-row{display:flex; align-items:center; gap:28px; padding-top:16px; padding-bottom:16px; flex-wrap:wrap;}
.brand{display:flex; align-items:center; gap:10px; color:var(--ink);}
.brand-mark{width:40px; height:40px; border-radius:12px; background:var(--primary); display:flex; align-items:center; justify-content:center; flex:none;}
.brand-text{display:flex; flex-direction:column; line-height:1.15;}
.brand-text strong{font-family:"Plus Jakarta Sans",sans-serif; font-weight:800; font-size:20px;}
.brand-text span{font-size:12px; color:var(--ink-soft);}

.search{flex:999 1 360px; min-width:220px; display:flex; align-items:center; background:var(--bg); border:1px solid var(--line); border-radius:999px; padding:4px 4px 4px 18px;}
.search input{flex:1; border:none; outline:none; background:transparent; padding:10px 12px; font-size:14px; color:var(--ink);}
.search button{border:none; background:var(--primary); color:#fff; border-radius:999px; padding:10px 20px; font-weight:600; font-size:14px;}

.header-actions{display:flex; align-items:center; gap:22px;}
.icon-link{display:flex; flex-direction:column; align-items:center; gap:2px; color:var(--ink-soft); font-size:12px; position:relative;}
.icon-link.active{color:var(--primary); font-weight:700;}
.icon-link svg{stroke:var(--ink-soft);}
.icon-link.active svg{stroke:var(--primary);}
.icon-link i{font-size:20px; color:var(--ink-soft);}
.icon-link.active i{color:var(--primary);}
.badge-count{position:absolute; top:-6px; right:-10px; background:var(--accent); color:#fff; font-size:10px; font-weight:700; border-radius:999px; width:16px; height:16px; display:flex; align-items:center; justify-content:center;}

.category-nav{border-top:1px solid var(--line);}
.category-nav .container{display:flex; gap:28px; overflow-x:auto; padding-top:10px; padding-bottom:10px;}
.category-nav a{color:var(--ink); font-weight:600; font-size:14px; white-space:nowrap;}
.category-nav a.current{color:var(--primary); font-weight:700;}
.category-nav a.offers{color:var(--accent); font-weight:700;}

/* ---------- mobile category drawer ---------- */
.drawer-overlay{position:fixed; inset:0; background:rgba(14,42,61,.45); display:none; z-index:90;}
.drawer-overlay.is-open{display:block;}
.drawer-panel{position:fixed; top:0; left:0; bottom:0; width:82%; max-width:320px; background:var(--surface); z-index:91; transform:translateX(-100%); transition:transform .25s ease; display:flex; flex-direction:column;}
.drawer-panel.is-open{transform:translateX(0); box-shadow:var(--shadow-lg);}
.drawer-head{display:flex; align-items:center; justify-content:space-between; padding:18px 20px; border-bottom:1px solid var(--line); flex:none;}
.drawer-head strong{font-family:"Plus Jakarta Sans",sans-serif; font-size:16px;}
.drawer-list{padding:10px; overflow-y:auto;}
.drawer-list a{display:flex; align-items:center; gap:14px; padding:13px 12px; border-radius:12px; color:var(--ink); font-weight:600; font-size:14px;}
.drawer-list a svg, .drawer-list a i{flex:none; color:var(--ink);}
.drawer-list a.offers{color:var(--accent);}
.drawer-list a.offers i{color:var(--accent);}
.drawer-list a.danger{color:var(--warn);}
.drawer-list a.danger i{color:var(--warn);}
.drawer-list hr{border:none; border-top:1px solid var(--line); margin:8px 4px;}

/* ---------- hero carousel ---------- */
.hero{padding:40px 0;}
.hero-grid{display:flex; gap:40px; flex-wrap:wrap; align-items:center;}
.hero-copy{flex:0 1 420px; min-width:280px; max-width:460px; display:flex; flex-direction:column; gap:18px;}
.pill{display:inline-flex; align-items:center; gap:8px; background:var(--accent-soft); color:var(--accent); font-weight:700; font-size:13px; padding:6px 14px; border-radius:999px; width:fit-content;}
.hero-copy h1{font-size:40px; line-height:1.12; color:var(--ink);}
.hero-copy p{font-size:16px; color:var(--ink-soft); margin:0; max-width:46ch;}
.btn-row{display:flex; gap:14px; flex-wrap:wrap; margin-top:4px;}

.btn{display:inline-flex; align-items:center; justify-content:center; gap:8px; font-weight:700; font-size:14px; padding:12px 24px; border-radius:12px; border:none; cursor:pointer;}
.btn-primary{background:var(--primary); color:#fff;}
.btn-primary:hover{background:var(--primary-dark); color:#fff;}
.btn-outline{background:var(--surface); color:var(--ink); border:1px solid var(--line);}
.btn-ghost{background:transparent; color:var(--primary); font-weight:700;}
.btn-sm{padding:9px 16px; font-size:13px; border-radius:10px;}
.btn-block{width:100%;}
.btn:disabled{opacity:.5; cursor:not-allowed;}

.carousel{position:relative; flex:1 1 420px; min-width:280px;}
.carousel-track{position:relative; width:100%; min-height:320px; border-radius:24px; overflow:hidden; background:var(--primary-soft);}
.carousel-slide{position:absolute; inset:0; display:none; align-items:center; justify-content:center; flex-direction:column; gap:10px; text-align:center; padding:24px;}
.carousel-slide.is-active{display:flex;}
.carousel-slide-media{padding:0;}
.carousel-slide-media img{width:100%; height:100%; object-fit:cover;}
.carousel-slide .slide-label{font-size:12px; font-weight:700; text-transform:uppercase; letter-spacing:.04em; color:var(--primary);}
.carousel-slide .slide-title{font-family:"Plus Jakarta Sans",sans-serif; font-size:20px; color:var(--ink);}
.carousel-nav{position:absolute; top:50%; transform:translateY(-50%); width:38px; height:38px; border-radius:999px; background:#fff; border:1px solid var(--line); display:flex; align-items:center; justify-content:center; box-shadow:var(--shadow);}
.carousel-nav.prev{left:14px;}
.carousel-nav.next{right:14px;}
.carousel-dots{display:flex; justify-content:center; gap:8px; margin-top:14px;}
.carousel-dots button{width:8px; height:8px; border-radius:999px; border:none; background:var(--line); padding:0;}
.carousel-dots button.is-active{background:var(--primary); width:22px;}
.carousel-caption{font-size:12px; color:var(--muted); text-align:center; margin-top:8px;}

/* ---------- sidebar promo carousel (account pages) ---------- */
.side-promo h3{font-size:14px; font-weight:700; margin-bottom:12px;}
.side-promo .carousel{min-width:0;}
.side-promo .carousel-track{min-height:260px; border-radius:var(--radius-sm);}
.side-promo .carousel-slide{padding:22px 20px 18px; gap:10px;}
.side-promo .carousel-media{width:64px; height:64px; border-radius:999px; background:#fff; display:flex; align-items:center; justify-content:center; box-shadow:var(--shadow);}
.side-promo .carousel-slide .card-title{font-size:13px; font-weight:600; color:var(--ink); line-height:1.3;}
.side-promo .carousel-slide .price{font-size:15px;}
.side-promo .carousel-nav{width:30px; height:30px;}
.side-promo .carousel-nav svg{width:13px; height:13px;}
.side-promo .carousel-nav.prev{left:8px;}
.side-promo .carousel-nav.next{right:8px;}
.side-promo .carousel-dots{margin-top:10px;}

/* ---------- trust strip ---------- */
.trust-strip{background:var(--surface); border-top:1px solid var(--line); border-bottom:1px solid var(--line);}
.trust-grid{display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:24px; padding-top:26px; padding-bottom:26px;}
.trust-item{display:flex; align-items:center; justify-content:center; gap:12px; font-size:14px; font-weight:600;}
@media (max-width:900px){ .trust-grid{grid-template-columns:repeat(2,minmax(0,1fr));} }

/* ---------- section heading ---------- */
.section{padding-top:44px; padding-bottom:8px;}
.section-head{display:flex; align-items:baseline; justify-content:space-between; margin-bottom:20px; gap:12px; flex-wrap:wrap;}
.section-head h2{font-size:24px;}
.section-head a{font-weight:700; font-size:14px;}

/* ---------- category tiles ---------- */
.tiles{display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:16px;}
@media (max-width:900px){ .tiles{grid-template-columns:repeat(3,minmax(0,1fr));} }
@media (max-width:560px){ .tiles{grid-template-columns:repeat(2,minmax(0,1fr));} }
.tile{background:var(--surface); border:1px solid var(--line); border-radius:var(--radius); padding:22px 16px; display:flex; flex-direction:column; align-items:center; gap:10px; color:var(--ink); text-align:center;}
.tile span{font-size:13px; font-weight:600;}

/* ---------- product card ---------- */
.product-grid{display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:20px;}
@media (max-width:1000px){ .product-grid, .product-grid.cols-3{grid-template-columns:repeat(2,minmax(0,1fr));} }
@media (max-width:560px){ .product-grid{grid-template-columns:1fr;} }
.product-grid.cols-3{grid-template-columns:repeat(3,minmax(0,1fr));}
@media (max-width:700px){ .product-grid.cols-3{grid-template-columns:1fr;} }

.card{background:var(--surface); border:1px solid var(--line); border-radius:var(--radius); overflow:hidden; display:flex; flex-direction:column; color:var(--ink); box-shadow:var(--shadow); position:relative;}
.card-media{aspect-ratio:1/1; background:var(--accent-soft); display:flex; align-items:center; justify-content:center; overflow:hidden;}
.card-media.alt{background:var(--primary-soft);}
.card-media img{width:100%; height:100%; object-fit:contain;}
.card-body{padding:16px; display:flex; flex-direction:column; gap:8px;}
.card-title{font-size:14px; font-weight:600; line-height:1.3;}
.price-row{display:flex; align-items:baseline; gap:8px; flex-wrap:wrap;}
.price{font-weight:800; font-size:16px; color:var(--primary); white-space:nowrap;}
.price.price-strike{color:var(--warn); text-decoration:line-through; font-size:13px;}
/* wholesale / package price, inline to the right of the main price: "x10 US$ 19.04" in the accent color */
.price.price-extra{color:var(--accent); font-size:13px;}
.price-extra-qty{margin-left:8px;}
/* catalog card's discount/promo tag reads as a ribbon across the photo's corner, same as the cart thumbnail */
.card .badge-discount{top:18px; left:-36px; width:140px; padding:4px 0; font-size:12px; text-align:center; border-radius:0; transform:rotate(-45deg);}
/* bigger ribbon for the product detail page's main photo; pointer-events off so it never blocks the zoom lens */
.badge-discount.badge-ribbon-lg{top:26px; left:-46px; width:190px; padding:6px 0; font-size:15px; text-align:center; border-radius:0; transform:rotate(-45deg); pointer-events:none;}
.stock-ok{font-size:12px; color:var(--success); font-weight:600;}
.stock-low{font-size:12px; color:var(--warn); font-weight:600;}
.badge-discount{position:absolute; top:10px; left:10px; background:var(--warn); color:#fff; font-size:12px; font-weight:700; padding:4px 10px; border-radius:999px; z-index:1;}
.fav-btn{position:absolute; top:10px; right:10px; width:30px; height:30px; border-radius:999px; background:#fff; border:none; display:flex; align-items:center; justify-content:center; z-index:1;}

/* ---------- wholesale banner ---------- */
.banner-cta{background:var(--primary-dark); border-radius:24px; padding:36px 40px; display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:20px;}
.banner-cta .eyebrow{color:#CFE6FA; font-weight:700; font-size:13px; letter-spacing:.04em; text-transform:uppercase;}
.banner-cta h3{color:#fff; font-size:22px; max-width:50ch;}
.banner-cta-sub{color:#CFE6FA; font-size:14px; line-height:1.5; max-width:46ch; margin:6px 0 0;}

/* ---------- footer ---------- */
.site-footer{background:var(--primary-dark); color:#CFE6FA; margin-top:56px;}
.footer-grid{display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:32px; padding-top:48px; padding-bottom:24px;}
@media (max-width:900px){ .footer-grid{grid-template-columns:repeat(2,minmax(0,1fr));} }
.footer-col{display:flex; flex-direction:column; gap:10px; font-size:13px;}
.footer-col strong{color:#fff; font-size:15px;}
.footer-col a{color:#CFE6FA; overflow-wrap:anywhere;}
.footer-bottom{border-top:1px solid rgba(255,255,255,.12); padding:18px 0; display:flex; justify-content:space-between; font-size:12px; flex-wrap:wrap; gap:8px;}
.footer-bottom .container{display:flex; justify-content:space-between; width:100%; flex-wrap:wrap; gap:8px;}

.whatsapp-float{position:fixed; right:24px; bottom:24px; width:56px; height:56px; border-radius:999px; background:var(--accent); display:flex; align-items:center; justify-content:center; box-shadow:0 8px 20px rgba(14,42,61,.25); z-index:30; font-size:26px; color:#fff;}

/* ---------- breadcrumb ---------- */
.breadcrumb{display:flex; align-items:center; gap:8px; font-size:13px; color:var(--ink-soft); margin:20px 0; background:transparent; padding:0; border-radius:0; list-style:none;}
.breadcrumb .current{color:var(--ink); font-weight:600;}

/* ---------- layout helpers ---------- */
.page-wrap{width:100%; padding:0 40px 56px;}
.page-wrap.pt-sm{padding-top:28px;}
.page-wrap.pt-md{padding-top:32px;}
.page-wrap.pt-lg{padding-top:56px;}
@media (max-width:720px){ .page-wrap{padding:0 18px 48px;} }
@media (max-width:900px){
  .page-wrap.pt-sm{padding-top:8px;}
  .page-wrap.pt-md{padding-top:10px;}
  .page-wrap.pt-lg{padding-top:14px;}
  .breadcrumb{margin:8px 0 12px;}
}
.split{display:grid; grid-template-columns:1fr 4fr; gap:28px; align-items:flex-start;}
.split > .side{min-width:0;}
.split > .main{min-width:0;}
@media (max-width:900px){ .split{grid-template-columns:1fr !important;} }
/* checkout_cart.js hides .side (order summary) while the cart is empty — let .main take the full row instead of leaving an empty column */
.split:has(> .side.hidden){grid-template-columns:1fr !important;}

/* ---------- warning banner (real stock-out notices; mockup's .modal-note recipe, warn palette instead of primary) ---------- */
.alert-warning{display:flex; gap:10px; background:var(--warn-soft); color:#7A3814; border-radius:var(--radius-sm); padding:12px 14px; font-size:13px; margin-bottom:18px;}
.alert-warning i{flex:none; margin-top:2px;}

/* ---------- product detail image thumbnails (product_detail.js swaps .product-image's src on click) ---------- */
.product-image-thumb{width:72px; height:72px; border-radius:var(--radius-sm); overflow:hidden; cursor:pointer; border:1px solid var(--line); flex:none;}
.product-image-thumb.active{border-color:var(--primary); border-width:2px;}
.product-image-thumb img{width:100%; height:100%; object-fit:cover;}

/* ---------- pagination (home_page/pagination.html, filled by product_list.js) ---------- */
.pagination{display:flex; justify-content:center; align-items:center; flex-wrap:wrap; gap:8px; margin-top:24px;}

/* ---------- filter cards ---------- */
.filter-card{background:var(--surface); border:1px solid var(--line); border-radius:var(--radius); padding:18px; margin-bottom:16px;}
.filter-card h3{font-size:14px; font-weight:700; margin-bottom:12px;}

/* shipping_cart's "Enviar a" / "Método de envío" facts, one filter-card with an icon per fact instead of two separate boxes */
.delivery-fact{display:flex; gap:12px; align-items:flex-start;}
.delivery-fact + .delivery-fact{margin-top:16px; padding-top:16px; border-top:1px solid var(--line);}
.delivery-fact-icon{flex:none; width:36px; height:36px; border-radius:999px; background:var(--primary-soft); color:var(--primary); display:flex; align-items:center; justify-content:center; font-size:14px;}
.delivery-fact-body{min-width:0;}
.delivery-fact-body h3{margin-bottom:6px;}
/* only labels wrapping their own checkbox/radio (e.g. discount filter chips, "predeterminada" toggles) —
   a plain <label for="id_x"> field label sits outside .field's input, so it never matches :has(input) */
.filter-card label:has(input){display:flex; align-items:center; gap:8px; font-size:13px; color:var(--ink-soft); margin-bottom:10px;}
.filter-card label:has(input):last-child{margin-bottom:0;}

/* ---------- scrollable filter list (list.html's #category_filter/#discount_filter/#brand_filter): fixed height so a long list scrolls instead of stretching the sidebar card ---------- */
.filter-scroll{max-height:220px; overflow-y:auto; padding-right:6px; margin-right:-6px; scrollbar-width:thin; scrollbar-color:var(--primary) var(--bg);}
.filter-scroll::-webkit-scrollbar{width:8px;}
.filter-scroll::-webkit-scrollbar-thumb{background:var(--primary); border-radius:4px;}
.filter-scroll::-webkit-scrollbar-thumb:hover{background:var(--primary-dark);}
.filter-scroll::-webkit-scrollbar-track{background:var(--bg); border-radius:4px;}
.category-chip-list{display:flex; flex-wrap:wrap; align-content:flex-start; gap:8px;}
.category-chip-list a.is-selected{background:var(--primary); border-color:var(--primary); color:#fff;}

/* ---------- currency-prefixed number input (price filter) ---------- */
.input-prefix{position:relative; display:flex; align-items:center;}
.input-prefix-symbol{position:absolute; left:14px; font-size:13px; font-weight:700; color:var(--ink-soft); pointer-events:none;}
.field .input-prefix input{padding-left:42px; text-align:center;}
.input-prefix input::-webkit-outer-spin-button, .input-prefix input::-webkit-inner-spin-button{-webkit-appearance:none; margin:0;}
.input-prefix input[type="number"]{-moz-appearance:textfield;}

/* ---------- icon-inside-input on the right (date range filter) ---------- */
/* ---------- joined date-range control (input + trigger as one piece, like the backoffice's input-group) ---------- */
.date-range-group{display:flex; align-items:stretch;}
.date-range-group input{border-top-right-radius:0; border-bottom-right-radius:0; border-right:none;}
.date-range-group .date-range-icon{flex:none; width:44px; display:flex; align-items:center; justify-content:center; background:var(--primary); color:#fff; border:1px solid var(--primary); border-top-right-radius:var(--radius-sm); border-bottom-right-radius:var(--radius-sm); font-size:14px;}

/* ---------- account nav (sidebar on account pages) ---------- */
.account-nav{display:flex; flex-direction:column; gap:2px;}
.account-nav a{display:block; padding:10px 12px; border-radius:10px; font-weight:600; font-size:14px; color:var(--ink-soft);}
.account-nav a:hover{background:var(--bg);}
.account-nav a.active{font-weight:700; background:var(--primary-soft); color:var(--primary);}
.account-nav a.danger{color:var(--warn);}
.account-nav hr{border:none; border-top:1px solid var(--line); margin:6px 4px;}

/* on phones, the sidebar menu becomes a trigger button that opens the drawer */
.account-menu-trigger, .filter-menu-trigger{display:none;}
@media (max-width:720px){
  .account-side, .filters-side{display:none;}
  .account-menu-trigger, .filter-menu-trigger{display:flex; align-items:center; justify-content:space-between; width:100%; background:var(--surface); border:1px solid var(--line); border-radius:var(--radius); padding:13px 16px; font-weight:700; font-size:14px; color:var(--ink); margin-bottom:16px;}
}

.drawer-list a.active{background:var(--primary-soft);}

/* ---------- stat grid (account statement summary cards) ---------- */
.stat-grid{display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:16px; margin-bottom:24px;}
@media (max-width:720px){ .stat-grid{grid-template-columns:1fr; gap:10px;} }

.info-grid{display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px 24px;}
.info-grid span{overflow-wrap:break-word; min-width:0;}
@media (max-width:480px){ .info-grid{grid-template-columns:1fr;} }

/* ---------- stepper ---------- */
.stepper{display:flex; align-items:flex-start; margin-bottom:32px;}
.step{display:flex; flex-direction:column; align-items:center; gap:8px; flex:1; position:relative; text-align:center; font-size:13px; font-weight:600; color:var(--muted); cursor:pointer;}
.step .dot{width:48px; height:48px; border-radius:999px; background:var(--surface); border:2px solid var(--line); color:var(--muted); display:flex; align-items:center; justify-content:center; position:relative; z-index:2; transition:background .2s ease, border-color .2s ease, color .2s ease;}
.step .dot svg{width:20px; height:20px; stroke:currentColor;}
.step::before, .step::after{content:""; position:absolute; top:23px; height:2px; width:50%; background:var(--line); z-index:1;}
.step::before{left:0;}
.step::after{right:0;}
.step:first-child::before, .step:last-child::after{display:none;}
.step.done .dot, .step.active .dot{background:var(--primary); border-color:var(--primary); color:#fff;}
.step.done::before, .step.done::after{background:var(--primary);}
.step.active::before{background:var(--primary);}
.step.done, .step.active{color:var(--primary);}
@media (max-width:480px){
  .step{font-size:11px; gap:6px;}
  .step .dot{width:38px; height:38px;}
  .step .dot svg{width:16px; height:16px;}
  .step::before, .step::after{top:18px;}
}

/* ---------- forms ---------- */
.field{display:flex; flex-direction:column; gap:6px; margin-bottom:16px;}
.field label{font-size:13px; font-weight:600; color:var(--ink);}
.field input, .field select{height:44px;}
.field input, .field select, .field textarea{border:1px solid var(--line); border-radius:var(--radius-sm); padding:11px 14px; font-size:14px; color:var(--ink); background:var(--surface);}
.field input:focus, .field select:focus, .field textarea:focus, input:focus, select:focus, textarea:focus{outline:none; border-color:var(--primary); box-shadow:0 0 0 3px var(--primary-soft);}
/* a .field input sharing a .flex row with a button (show/hide password, date-range search, etc.)
   otherwise keeps its UA-default ~20ch width instead of filling the row, clipping its placeholder */
.field .flex input{flex:1; min-width:0;}
.btn:focus{outline:none; box-shadow:0 0 0 3px var(--primary-soft);}
.field-row{display:flex; gap:14px; flex-wrap:wrap;}
.field-row .field{flex:1 1 180px;}

.option-card{display:flex; align-items:flex-start; gap:12px; border:1px solid var(--line); border-radius:var(--radius); padding:16px; cursor:pointer;}
.option-card.selected{border-color:var(--primary); background:var(--primary-soft);}
.option-card input{margin-top:3px;}
.option-card .opt-title{font-weight:700; font-size:14px; color:var(--ink);}
.option-card .opt-sub{font-size:13px; color:var(--ink-soft);}

/* ---------- summary card ---------- */
.summary-card{background:var(--surface); border:1px solid var(--line); border-radius:var(--radius); padding:24px; display:flex; flex-direction:column; gap:14px; position:sticky; top:96px;}
@media (max-width:900px){ .summary-card{position:static;} }
.summary-row{display:flex; justify-content:space-between; font-size:14px; color:var(--ink-soft);}
/* shipping_cart's #content-value-cart wraps its summary-rows in one extra div (hidden/shown as a
   block by shipping_cart.js) — without this it's a single flex child of .summary-card and its
   own rows lose the 14px gap .summary-card gives its direct children */
#content-value-cart{display:flex; flex-direction:column; gap:14px;}
.summary-row strong{color:var(--ink);}
.summary-total{border-top:1px solid var(--line); padding-top:14px; display:flex; justify-content:space-between; font-size:16px; align-items:center;}
.summary-total .amount{font-weight:800; color:var(--primary); font-size:20px;}
.secure-note{display:flex; align-items:center; gap:8px; font-size:12px; color:var(--ink-soft); justify-content:center;}

/* ---------- cart items ---------- */
.cart-item{background:var(--surface); border:1px solid var(--line); border-radius:var(--radius); padding:18px; display:flex; gap:16px; align-items:center; flex-wrap:wrap; margin-bottom:14px;}
.cart-item .thumb{position:relative; overflow:hidden; width:72px; height:72px; border-radius:var(--radius-sm); background:var(--accent-soft); display:flex; align-items:center; justify-content:center; flex:none;}
/* cart thumbnail's discount tag reads as a ribbon across the corner instead of a pill sitting on the photo */
.cart-item .thumb .badge-discount{top:8px; left:-30px; width:110px; padding:2px 0; font-size:10px; text-align:center; border-radius:0; transform:rotate(-45deg);}
.cart-item .thumb.alt{background:var(--primary-soft);}
.cart-item .info{flex:1 1 180px; min-width:160px; display:flex; flex-direction:column; gap:4px;}
.cart-item .info .name{font-size:14px; font-weight:600;}
.cart-item .info .meta{font-size:12px; color:var(--ink-soft);}
.cart-item .line-total{font-weight:800; font-size:15px; color:var(--ink); flex:none; min-width:70px; text-align:right;}
.remove-btn{border:none; background:transparent; color:var(--muted); flex:none; transition:color .15s ease;}
.remove-btn:hover{color:var(--warn);}
.btn-change-presentation{border:1px solid transparent; background:var(--primary-soft); color:var(--primary); width:36px; height:36px; border-radius:10px; display:flex; align-items:center; justify-content:center; flex:none; font-size:14px; transition:background-color .15s ease;}
.btn-change-presentation:hover{background:var(--primary); color:#fff;}
.iva-tag{display:inline-block; width:fit-content; background:var(--primary-soft); color:var(--primary); font-size:11px; font-weight:700; padding:2px 8px; border-radius:999px;}
.discount-tag{display:inline-block; width:fit-content; background:var(--warn-soft); color:var(--warn); font-size:11px; font-weight:700; padding:2px 8px; border-radius:999px;}
.discount-tag del{color:var(--warn);}
.wholesale-tag{display:inline-block; width:fit-content; background:var(--accent-soft); color:var(--accent); font-size:11px; font-weight:700; padding:2px 8px; border-radius:999px;}

.stepper-qty{display:flex; align-items:center; border:1px solid var(--line); border-radius:10px; overflow:hidden; flex:none;}
.stepper-qty button{border:none; background:var(--surface); width:34px; height:36px; font-size:15px;}
.stepper-qty input{width:64px; text-align:center; border:none; border-left:1px solid var(--line); border-right:1px solid var(--line); font-size:13px;}

/* ---------- modal ---------- */
/* ".modal"/".modal-body" are scoped under .modal-overlay (the mockup's own modal convention,
   never used by the real app — every real modal uses Bootstrap's own .modal.fade plugin
   instead) because those two bare selectors collide with Bootstrap's identically-named
   classes, leaking max-width/max-height/radius/shadow onto every real #myModalCart/
   #myModalShoppingDetail/etc. and clipping modal-lg dialogs to ~460px. The other mockup-only
   class names below (modal-head/-close/-note/-product/-foot) don't collide with Bootstrap and
   stay unscoped — .modal-close in particular is also reused, outside any modal, as the close
   button on every mobile drawer (navbar_mobile.html/menu_profile.html/menu_filter.html). */
.modal-overlay{position:fixed; inset:0; background:rgba(14,42,61,.45); display:none; align-items:center; justify-content:center; z-index:100; padding:20px;}
.modal-overlay.is-open{display:flex;}
.modal-overlay .modal{background:var(--surface); border-radius:var(--radius-lg); max-width:460px; width:100%; max-height:90vh; overflow-y:auto; box-shadow:var(--shadow-lg);}
.modal-head{display:flex; align-items:center; justify-content:space-between; padding:20px 22px; border-bottom:1px solid var(--line);}
.modal-head h3{font-size:17px;}
.modal-close{border:none; background:transparent; color:var(--ink-soft); width:32px; height:32px; display:flex; align-items:center; justify-content:center; border-radius:999px;}
.modal-close:hover{background:var(--bg);}
.modal-overlay .modal-body{padding:22px;}
.modal-note{display:flex; gap:10px; background:var(--primary-soft); color:var(--primary-dark); border-radius:var(--radius-sm); padding:12px 14px; font-size:13px; margin-bottom:18px;}
.modal-product{display:flex; gap:14px; align-items:center; margin-bottom:18px;}
.modal-product .thumb{width:60px; height:60px; border-radius:var(--radius-sm); background:var(--accent-soft); display:flex; align-items:center; justify-content:center; flex:none;}
.modal-product .name{font-weight:700; font-size:14px;}
.modal-overlay .modal-foot{padding:18px 22px; border-top:1px solid var(--line); display:flex; flex-direction:column; gap:12px;}

/* ---------- status badges ---------- */
.status{display:inline-flex; align-items:center; gap:6px; font-size:12px; font-weight:700; padding:5px 12px; border-radius:999px;}
.status.delivered{background:var(--accent-soft); color:var(--accent);}
.status.transit{background:var(--primary-soft); color:var(--primary);}
.status.processing{background:#FFF1DE; color:#B46A1A;}
.status.cancelled{background:#FBEAEA; color:#B3362C;}

/* ---------- order table / list ---------- */
.order-row{background:var(--surface); border:1px solid var(--line); border-left:4px solid var(--line); border-radius:var(--radius); padding:18px 20px; display:flex; align-items:center; gap:20px; flex-wrap:wrap; margin-bottom:14px; transition:box-shadow .15s ease, transform .15s ease;}
.order-row:hover{box-shadow:var(--shadow); transform:translateY(-2px);}
.order-row[data-status="processing"]{border-left-color:#B46A1A;}
.order-row[data-status="delivered"]{border-left-color:var(--accent);}
.order-row[data-status="cancelled"]{border-left-color:#B3362C;}
/* width/padding reset: Bootstrap's own grid defines a bare .col{width:100%; padding:0 15px} that
   otherwise collides with this name and stretches each column to full width, stacking the row */
.order-row .col{display:flex; flex-direction:column; gap:3px; flex:0 0 auto; width:auto; padding:0;}
.order-row .label{font-size:11px; text-transform:uppercase; letter-spacing:.04em; color:var(--muted); font-weight:700; white-space:nowrap;}
.order-row .value{font-size:14px; font-weight:600; color:var(--ink); white-space:nowrap;}

/* ---------- timeline ---------- */
.timeline{display:flex; justify-content:space-between; position:relative; margin:28px 0 8px;}
.timeline::before{content:""; position:absolute; top:13px; left:0; right:0; height:2px; background:var(--line);}
.timeline-step{position:relative; display:flex; flex-direction:column; align-items:center; gap:8px; flex:1; text-align:center;}
.timeline-step .dot{width:26px; height:26px; border-radius:999px; background:var(--line); border:3px solid var(--bg); display:flex; align-items:center; justify-content:center; z-index:1;}
.timeline-step.done .dot{background:var(--accent);}
.timeline-step .label{font-size:12px; font-weight:600; color:var(--ink-soft); max-width:14ch;}
.timeline-step.done .label{color:var(--ink);}

/* ---------- misc ---------- */
.table-scroll{width:100%; overflow-x:auto; -webkit-overflow-scrolling:touch;}
.table-like{width:100%; min-width:460px; border-collapse:collapse; font-size:14px;}
.table-like th{text-align:left; font-size:12px; text-transform:uppercase; letter-spacing:.04em; color:var(--muted); padding:0 0 10px; border-bottom:1px solid var(--line);}
.table-like td{padding:14px 0; border-bottom:1px solid var(--line);}
.table-like tr:last-child td{border-bottom:none;}
.table-like .product-cell{display:flex; align-items:center; gap:10px; text-align:left;}
.table-like .product-cell img{flex:none; width:48px; height:48px; object-fit:cover; border-radius:var(--radius-sm); background:var(--bg);}
.product-thumb{position:relative; overflow:hidden; display:block; flex:none; width:48px; height:48px; border-radius:var(--radius-sm);}
.product-thumb .badge-discount{top:5px; left:-22px; width:80px; padding:1px 0; font-size:9px; text-align:center; border-radius:0; transform:rotate(-45deg);}
.table-like .muted-note{color:var(--ink-soft); font-weight:400;}
.table-like .qty-chip{display:inline-block; background:var(--bg); color:var(--ink); font-weight:700; font-size:13px; padding:3px 10px; border-radius:999px;}
.table-like td strong{color:var(--ink); font-size:14px;}

/* on phones, each row becomes its own card instead of a sideways-scrolling table */
@media (max-width:720px){
  .table-scroll{overflow-x:visible;}
  .table-like{min-width:0;}
  .table-like thead{display:none;}
  .table-like, .table-like tbody, .table-like tr, .table-like td{display:block; width:100%;}
  .table-like tr{border:1px solid var(--line); border-radius:var(--radius-sm); padding:4px 14px; margin-bottom:10px;}
  .table-like tr:last-child{margin-bottom:0;}
  .table-like td{display:flex; align-items:center; justify-content:space-between; gap:14px; padding:9px 0; text-align:right !important;}
  .table-like td::before{content:attr(data-label); font-size:11px; text-transform:uppercase; letter-spacing:.04em; color:var(--muted); font-weight:700; text-align:left;}
  /* #tblShoppingDetail (shopping_review modal) is a DataTable: its stylesheet adds 10px side padding
     to every td, which pushed the cells (and their divider lines) past the card's edge */
  .table-like td{box-sizing:border-box; padding-left:0 !important; padding-right:0 !important;}
  .table-like .product-cell{min-width:0; overflow-wrap:anywhere;}
}

/* same card treatment for the DataTables-driven account-statement / shopping-history tables
   (account_statement.js / shopping_history.js set each td's data-label via createdCell) —
   kept separate from .table-like since DataTables owns these tables' DOM */
@media (max-width:720px){
  .table-scroll:has(.mobile-card-table){overflow-x:visible;}
  .mobile-card-table{min-width:0;}
  .mobile-card-table thead{display:none;}
  .mobile-card-table, .mobile-card-table tbody, .mobile-card-table tr, .mobile-card-table td{display:block; width:100%;}
  .mobile-card-table tr{border:1px solid var(--line); border-radius:var(--radius-sm); padding:4px 14px; margin-bottom:10px;}
  .mobile-card-table tr:last-child{margin-bottom:0;}
  .mobile-card-table td{display:flex; align-items:center; justify-content:space-between; gap:14px; padding:9px 0; text-align:right !important; border:none !important;}
  .mobile-card-table td::before{content:attr(data-label); font-size:11px; text-transform:uppercase; letter-spacing:.04em; color:var(--muted); font-weight:700; text-align:left;}
  /* rowGroup section headers (account_statement.js) stay as a plain left-aligned label, not a flex row */
  .mobile-card-table tr.dtrg-group td{display:block; text-align:left !important; font-weight:700; background:var(--bg); padding:10px 0;}
  .mobile-card-table tr.dtrg-group td::before{content:none;}
  /* DataTables' "Ningún dato disponible" row has no data-label: show it as a centered message,
     not as a label/value flex row (which pushed the text to the right) */
  .mobile-card-table td.dataTables_empty{display:block; text-align:center !important; color:var(--ink-soft);}
  .mobile-card-table td.dataTables_empty::before{content:none;}
}

.empty-state{text-align:center; padding:64px 20px; color:var(--ink-soft);}
.empty-state svg{margin-bottom:16px;}
/* as the lone child of a grid (product_list.js's "Sin resultados"), it only got column 1's width */
.product-grid .empty-state{grid-column:1/-1;}

.muted{color:var(--ink-soft);}
.center{text-align:center;}
.mt-8{margin-top:8px;}
.mt-16{margin-top:16px;}
.mt-24{margin-top:24px;}
.mt-32{margin-top:32px;}
.mb-0{margin-bottom:0;}
.flex{display:flex;}
.gap-8{gap:8px;}
.gap-12{gap:12px;}
.hidden{display:none !important;}

/* ---------- reusable drag & drop image upload (design.js's [data-image-upload]) ---------- */
.image-upload{display:flex; align-items:center; gap:16px; flex-wrap:wrap;}
.image-upload-preview{width:72px; height:72px; border-radius:999px; object-fit:cover; flex:none; border:1px solid var(--line);}
.image-upload-dropzone{display:flex; align-items:center; gap:10px; flex:1 1 220px; min-width:200px; padding:14px 16px; border:1.5px dashed var(--line); border-radius:var(--radius); cursor:pointer; color:var(--ink-soft); font-size:13px; text-align:left; background:var(--bg); transition:border-color .15s ease, background .15s ease;}
.image-upload-dropzone i{font-size:20px; color:var(--primary); flex:none;}
.image-upload-dropzone strong{color:var(--primary); font-weight:700;}
.image-upload-dropzone:hover, .image-upload-dropzone.is-dragover{border-color:var(--primary); background:var(--primary-soft);}
/* avatar-style variant of the same [data-image-upload] component: a centered circular photo
   with an edit badge on its corner, instead of a dashed row — profile_page/update_profile_page.html */
.avatar-upload{display:flex; flex-direction:column; align-items:center; margin-bottom:20px;}
.avatar-upload-frame{position:relative; width:100px; height:100px; border-radius:999px; transition:box-shadow .15s ease;}
.avatar-upload-img{width:100px; height:100px; border-radius:999px; object-fit:cover; display:block; border:1px solid var(--line);}
.avatar-upload-badge{position:absolute; right:-2px; bottom:-2px; width:32px; height:32px; border-radius:999px; background:var(--primary); color:#fff; display:flex; align-items:center; justify-content:center; font-size:13px; border:3px solid var(--surface); cursor:pointer; transition:background .15s ease;}
.avatar-upload-badge:hover{background:var(--primary-dark);}
.avatar-upload-frame.is-dragover{box-shadow:0 0 0 4px var(--primary-soft);}
/* left-aligned variant (instead of centered) */
.avatar-upload-left{align-items:flex-start;}
.avatar-upload-left p{text-align:left;}
/* "cover photo" variant: a soft gradient banner sits right above the filter-card (outside
   it, flush against its top edge — .cover-attached flattens that edge so they read as one
   shape), and the (bigger) avatar — still INSIDE the card, as .avatar-upload-mounted's first
   child — gets pulled up with a negative margin to straddle the card's top border, half over
   the banner and half over the card, Facebook-profile-style. profile_page/update_profile_page.html */
.avatar-upload-cover-banner{width:100%; height:64px; border-radius:var(--radius) var(--radius) 0 0; background:linear-gradient(135deg, var(--primary-soft), var(--accent-soft));}
.filter-card.cover-attached{border-top-left-radius:0; border-top-right-radius:0; margin-top:0;}
.avatar-upload-mounted{margin:-66px 0 8px;}
.avatar-upload-mounted .avatar-upload-frame{width:120px; height:120px; margin-left:16px; position:relative; z-index:1;}
.avatar-upload-mounted .avatar-upload-img{width:120px; height:120px; border:4px solid var(--surface);}
.avatar-upload-mounted .avatar-upload-badge{width:36px; height:36px; font-size:15px; right:0; bottom:2px;}
.avatar-upload-mounted p{margin-left:16px;}
/* profile_page/update_profile_page.html: two independent vertical stacks of fields side by
   side — the photo is just the first item of the left one — instead of left/right pairs
   sharing one row. Stacks back to one column on phones, same breakpoint as everywhere else. */
.profile-columns{display:flex; gap:28px; align-items:flex-start;}
.profile-col{flex:1 1 0; min-width:0;}
/* the avatar sits above BOTH stacks, but only the left one visually needs that headroom to
   clear the photo — the right stack has nothing above it in its own column, so that same
   shared gap reads as dead space before "Provincia". Pull it up to start near the card's own
   top padding instead (not above it / not overlapping the cover banner). Desktop only: on the
   stacked mobile layout this would just collide with the left stack's last field. */
@media (min-width:721px){
  .profile-columns .profile-col:last-child{margin-top:-80px;}
}
@media (max-width:720px){
  /* stretch: in a column flexbox each stack would otherwise shrink to its content width,
     leaving name/document/phone inputs at half the card's width */
  .profile-columns{flex-direction:column; gap:0; align-items:stretch;}
}

/* ---------- mobile header (pages with a search bar) ---------- */
.search button .btn-icon{display:none;}
.topbar-categories{display:none;}
@media (max-width:720px){
  /* the topbar above already shows the brand (and links home), so the header's own logo is redundant on phones */
  .header-row{gap:10px; row-gap:10px; justify-content:flex-end;}
  .header-row > .brand{display:none;}
  .header-row .header-actions{flex:none; gap:16px;}
  .header-row .search{flex:1 1 auto; min-width:0;}
  .header-row .cart-link{flex:none;}

  /* search bar pages: the header-actions wrapper (favorites only, now that cart moved next to search) is skipped entirely */
  .search ~ .header-actions{display:none;}

  /* categories live in the topbar now, on every page */
  .topbar-categories{display:inline-flex;}

  /* favorites shortcut isn't essential on phones, drop it like the rest of the icons we trimmed */
  .favorites-link{display:none;}

  /* "Compra segura" badge (checkout header) is just decorative text with nothing to do on phones */
  .secure-badge{display:none;}

  /* one magnifying glass only: drop the decorative one, button becomes icon-only */
  .search-icon{display:none;}
  .search{padding-left:14px;}
  .search button{width:38px; height:38px; padding:0; flex:none; display:flex; align-items:center; justify-content:center;}
  .search button .full{display:none;}
  .search button .btn-icon{display:flex;}
}

/* ---------- mobile layout improvements (home) ---------- */
@media (max-width:720px){

  /* the category bar becomes a slide-in drawer opened from the header icon */
  .category-nav{display:none;}

  /* hero: drop the marketing copy, keep only a compact promo carousel */
  .hero{padding:18px 0;}
  .hero-copy{display:none;}
  .carousel-track{min-height:180px;}
  .carousel-caption{display:none;}

  /* trust strip: one scrollable row of compact chips instead of a 2x2 grid */
  .trust-grid{display:flex; grid-template-columns:none; overflow-x:auto; gap:10px; padding-top:14px; padding-bottom:14px; -webkit-overflow-scrolling:touch;}
  .trust-item{flex:none; gap:8px; font-size:12px; white-space:nowrap; background:var(--bg); border:1px solid var(--line); border-radius:999px; padding:8px 14px;}
  .trust-item svg{width:18px; height:18px;}

  /* "Compra por categoría" is redundant with the drawer, so it's hidden */
  .category-tiles-section{display:none;}

  /* featured product sections: swipeable rail instead of a long vertical stack */
  .product-grid.product-rail{display:flex; grid-template-columns:none; overflow-x:auto; gap:14px; padding-bottom:6px; scroll-snap-type:x mandatory; -webkit-overflow-scrolling:touch;}
  .product-grid.product-rail .card{flex:0 0 68%; scroll-snap-align:start;}

  /* wholesale banner: lighter footprint on phones instead of hiding it */
  .banner-cta{padding:22px 20px; border-radius:18px; flex-direction:column; align-items:flex-start; gap:10px;}
  .banner-cta h3{font-size:17px; line-height:1.3;}
  .banner-cta-sub{font-size:13px;}
  .banner-cta .btn{width:100%; justify-content:center; margin-top:4px;}

  /* footer: center the legal line and the payment line on phones */
  .footer-bottom .container{flex-direction:column; align-items:center; text-align:center; gap:6px;}

  /* utility bar: brand on the left (instead of the non-interactive shipping note), account icons on the right */
  .topbar .container{flex-wrap:nowrap; justify-content:space-between; gap:8px; padding-top:8px; padding-bottom:8px;}
  .topbar .shipping-item{display:none;}
  .topbar-brand{display:flex; flex:none;}
  .topbar-brand .brand-label{display:none;}
  .topbar .group{gap:6px; flex-wrap:nowrap;}
  .topbar .group:last-child{flex-shrink:0;}
  .topbar-item{width:32px; height:32px; border-radius:999px; background:rgba(255,255,255,.14); justify-content:center; flex:none; transition:background .15s ease, transform .15s ease;}
  .topbar-item:active{background:rgba(255,255,255,.28); transform:scale(.94);}
  button.topbar-item{background:rgba(255,255,255,.14);}
  button.topbar-item:active{background:rgba(255,255,255,.28);}
  .topbar-icon{display:inline-flex; font-size:14px;}
  .topbar-item .full, .topbar-item .short{display:none;}
}

@media (max-width:380px){
  .topbar .group{gap:4px;}
  .topbar-item{width:29px; height:29px;}
  .topbar-icon{font-size:13px;}
}

@media (min-width:431px) and (max-width:720px){
  /* wide enough phones (large/"Pro Max"-size and up) have room for the brand text next to every topbar icon, worst case (5 icons when the user can switch roles) included */
  .topbar-brand .brand-label{display:inline;}
}

/* ---------- DataTables chrome reskin ---------- */
/* Account pages (address book, account statement) keep the real DataTables plugin
   (serverSide pagination/sorting, no mockup equivalent exists) — these rules only
   restyle its own generated markup with design tokens, they don't touch its JS/behavior. */
.dataTables_wrapper{font-family:inherit;}
.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter,
.dataTables_wrapper .dataTables_info{font-size:13px; color:var(--ink-soft);}
.dataTables_wrapper .dataTables_length select,
.dataTables_wrapper .dataTables_filter input{border:1px solid var(--line); border-radius:var(--radius-sm); padding:6px 10px; font-size:13px; color:var(--ink); background:var(--surface);}
.dataTables_wrapper .dt-buttons{display:flex; gap:8px; margin-top:16px; margin-bottom:16px; flex-wrap:wrap;}
.dataTables_wrapper .dt-buttons .btn{flex:none; background:var(--surface); color:var(--ink); border:1px solid var(--line); border-radius:var(--radius-sm); padding:9px 16px; font-size:13px; font-weight:600;}
.dataTables_wrapper .dt-buttons .btn:hover{background:var(--bg);}
table.dataTable{border-collapse:separate !important; border-spacing:0;}
table.dataTable thead th{background:transparent; color:var(--muted); font-size:11px; text-transform:uppercase; letter-spacing:.04em; font-weight:700; border-bottom:1px solid var(--line) !important; padding:0 0 10px !important;}
table.dataTable tbody td{border-top:1px solid var(--line); padding:14px 10px; font-size:14px; color:var(--ink);}
table.dataTable tbody tr:hover{background:var(--bg);}
.dataTables_wrapper .dataTables_paginate{margin-top:16px;}
.dataTables_wrapper .dataTables_paginate .paginate_button{border:1px solid var(--line) !important; border-radius:var(--radius-sm) !important; background:var(--surface) !important; color:var(--ink) !important; padding:7px 13px !important; margin-left:6px !important; font-size:13px !important;}
.dataTables_wrapper .dataTables_paginate .paginate_button.current{background:var(--primary) !important; border-color:var(--primary) !important; color:#fff !important;}
.dataTables_wrapper .dataTables_paginate .paginate_button.disabled{opacity:.5;}
.dataTables_wrapper .dataTables_processing{background:var(--surface); border:1px solid var(--line); border-radius:var(--radius-sm); color:var(--ink-soft); font-size:13px; box-shadow:var(--shadow);}

/* ---------- partner-logo marquee (footer_brand.html) ---------- */
.brand-marquee{overflow:hidden; -webkit-mask-image:linear-gradient(90deg,transparent,#000 6%,#000 94%,transparent); mask-image:linear-gradient(90deg,transparent,#000 6%,#000 94%,transparent);}
.brand-marquee-track{display:flex; align-items:center; gap:56px; width:max-content; animation:brand-marquee-scroll 26s linear infinite;}
.brand-marquee:hover .brand-marquee-track{animation-play-state:paused;}
.brand-marquee-track img{height:56px; width:auto; flex:none; opacity:.85;}
@keyframes brand-marquee-scroll{from{transform:translateX(0);} to{transform:translateX(-50%);}}

/* ---------- product image magnifier (product_detail/detail.html) ---------- */
.container-zoom{cursor:zoom-in;}
.zoom-lens{position:absolute; display:none; border:2px solid var(--primary); background:rgba(255,255,255,.25); pointer-events:none;}
.zoom-lens.is-active{display:block;}
.zoom-pane{display:none; position:absolute; top:0; left:calc(100% + 14px); width:min(340px, 42%); aspect-ratio:1/1; border-radius:var(--radius); border:1px solid var(--line); background-repeat:no-repeat; background-color:var(--accent-soft); box-shadow:0 10px 30px rgba(0,0,0,.18); z-index:40; pointer-events:none;}
.zoom-pane.is-active{display:block;}
@media (max-width:900px){
    .zoom-pane{display:none !important;}
}

/* ---------- related products carousel inside the narrow info column (product_detail/detail.html) ---------- */
.related-rail-aside .section-head{margin-bottom:12px;}
.related-rail-aside .section-head h2{font-size:16px; font-weight:800; margin:0;}
.related-rail-wrap{display:flex; align-items:center; gap:8px;}
.related-rail-aside .product-grid.product-rail{flex:1; min-width:0; display:flex; grid-template-columns:none; gap:12px; overflow-x:auto; overflow-y:hidden; scroll-snap-type:x mandatory; scroll-behavior:smooth; -webkit-overflow-scrolling:touch; scrollbar-width:none;}
.related-rail-aside .product-grid.product-rail::-webkit-scrollbar{display:none;}
.related-rail-aside .product-grid.product-rail .card{flex:0 0 calc((100% - 24px)/3); scroll-snap-align:start;}
.related-rail-aside .card .muted, .related-rail-aside .card .price-extra{display:none;}.related-rail-aside .card-body{padding:10px 12px; gap:5px;}
.related-rail-aside .card-title{font-size:13px;}
.related-rail-aside .price{font-size:15px;}
.related-rail-aside .price-row:has(.price-strike){gap:3px;}
.related-rail-aside .price-row:has(.price-strike) .price{font-size:10.5px;}
.related-rail-aside .card .btn.btn-sm{width:100%; padding:8px 10px; font-size:12.5px;}
.rail-nav{flex:none; width:28px; height:28px; border-radius:50%; border:1px solid var(--line); background:var(--surface); display:flex; align-items:center; justify-content:center; box-shadow:0 1px 4px rgba(0,0,0,.1); cursor:pointer; color:var(--ink); font-size:12px;}
@media (max-width:900px){
  /* on phones the page already has "Productos recomendados" further down; this narrow-column rail is redundant and cramped once .split collapses to one column */
  .related-rail-aside{display:none;}
}
.rail-nav:hover{background:var(--primary); color:#fff; border-color:var(--primary);}

/* ---------- "Productos recomendados" full-width rail (product_detail/detail.html): one full card per view on phones, instead of the sitewide 68%-wide rail card that leaves the next one half-cut ---------- */
@media (max-width:720px){
  #product_recommendation.product-grid.product-rail .card{flex:0 0 100%;}
}

/* ---------- share icons (product_detail/detail.html) ---------- */
.share-row{gap:10px;}
.share-link{flex:none; width:36px; height:36px; border-radius:50%; border:1px solid var(--line); background:var(--surface); display:flex; align-items:center; justify-content:center; color:var(--ink-soft); font-size:16px; transition:transform .15s ease, background-color .15s ease, border-color .15s ease, color .15s ease;}
.share-link:hover, .share-link:focus-visible{color:#fff; transform:translateY(-2px) scale(1.06);}
.share-link.share-facebook:hover, .share-link.share-facebook:focus-visible{background:#1877F2; border-color:#1877F2;}
.share-link.share-instagram:hover, .share-link.share-instagram:focus-visible{background:radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285AEB 90%); border-color:#d6249f;}
.share-link.share-email:hover, .share-link.share-email:focus-visible{background:var(--primary); border-color:var(--primary);}

/* ---------- like button feedback (product_detail/detail.html) ---------- */
.shake-lr{animation:shake-lr .7s cubic-bezier(.455,.03,.515,.955) both;}
@keyframes shake-lr{0%,100%{transform:rotate(0deg); transform-origin:50% 50%;} 10%{transform:rotate(8deg);} 20%,40%,60%{transform:rotate(-10deg);} 30%,50%,70%{transform:rotate(10deg);} 80%{transform:rotate(-8deg);} 90%{transform:rotate(8deg);}}
.jello-horizontal{animation:jello-horizontal .9s both;}
@keyframes jello-horizontal{0%,100%{transform:scale3d(1,1,1);} 30%{transform:scale3d(1.25,.75,1);} 40%{transform:scale3d(.75,1.25,1);} 50%{transform:scale3d(1.15,.85,1);} 65%{transform:scale3d(.95,1.05,1);} 75%{transform:scale3d(1.05,.95,1);}}

/* ---------- purchase row action buttons (product_detail/detail.html) ---------- */
.btn-icon-square{width:42px; padding:12px; flex:none;}
.btn-like.is-active{background:var(--primary); border-color:var(--primary); color:#fff;}
.btn-whatsapp{background:#25D366; color:#fff; border:1px solid #25D366;}
.btn-whatsapp:hover{background:#1DA851; border-color:#1DA851; color:#fff;}

/* ---------- quantity stepper (bootstrap-touchspin on #cant, scoped to .qty-field so admin TouchSpin forms are untouched) ---------- */
.qty-field .input-group.bootstrap-touchspin{display:flex; flex-wrap:nowrap; align-items:stretch; border:1px solid var(--line); border-radius:var(--radius-sm); overflow:hidden; background:var(--surface);}
.qty-field .input-group.bootstrap-touchspin:focus-within{border-color:var(--primary); box-shadow:0 0 0 3px var(--primary-soft);}
.qty-field .input-group.bootstrap-touchspin input{border:none; box-shadow:none; border-radius:0; flex:1 1 auto; min-width:0; padding:11px 4px; font-size:14px; color:var(--ink); background:transparent;}
.qty-field .input-group.bootstrap-touchspin input:focus{outline:none; box-shadow:none;}
.qty-field .btn-touchSpin-color{flex:none; width:36px; padding:0; margin:0; border:none; border-radius:0; background:var(--bg); color:var(--ink-soft); font-size:16px; font-weight:700; line-height:1;}
.qty-field .btn-touchSpin-color:hover{background:var(--primary-soft); color:var(--primary);}
.qty-field .input-group-btn{display:flex;}

/* ---------- bootstrap-daterangepicker reskin (sale/shopping_review.html, sale/shopping_history.html date filters) ----------
   daterangepicker.css/select2*.css load via each page's {% block head %}, AFTER design.css (base.html loads design.css
   in the shared <head>, before block head) — same load-order clash DataTables has above, so !important is needed here too. */
.daterangepicker{font-family:inherit !important; border:1px solid var(--line) !important; border-radius:var(--radius-sm) !important; box-shadow:var(--shadow-lg) !important;}
.daterangepicker:before{border-bottom-color:var(--line) !important;}
.daterangepicker:after{border-bottom-color:var(--surface) !important;}
.daterangepicker .calendar-table{border:none !important; background:var(--surface) !important;}
.daterangepicker td, .daterangepicker th{font-size:13px !important;}
.daterangepicker td.available:hover, .daterangepicker th.available:hover{background:var(--primary-soft) !important; color:var(--primary) !important;}
.daterangepicker td.in-range{background:var(--primary-soft) !important; color:var(--primary-dark) !important;}
.daterangepicker td.active, .daterangepicker td.active:hover{background:var(--primary) !important; color:#fff !important;}
.daterangepicker td.off, .daterangepicker td.off.in-range{background:var(--bg) !important; color:var(--muted) !important;}
.daterangepicker .drp-buttons{border-top:1px solid var(--line) !important;}
.daterangepicker .drp-selected{font-size:13px !important; color:var(--ink-soft) !important;}
.daterangepicker .drp-buttons .btn{font-size:13px !important; font-weight:700 !important; padding:8px 16px !important; border-radius:var(--radius-sm) !important; border:1px solid var(--line) !important;}
.daterangepicker .drp-buttons .applyBtn{background:var(--primary) !important; border-color:var(--primary) !important; color:#fff !important;}
.daterangepicker .drp-buttons .applyBtn:hover{background:var(--primary-dark) !important; border-color:var(--primary-dark) !important;}
.daterangepicker .drp-buttons .cancelBtn{background:var(--surface) !important; color:var(--ink) !important;}
.daterangepicker select.monthselect, .daterangepicker select.yearselect, .daterangepicker select.hourselect, .daterangepicker select.minuteselect{border:1px solid var(--line) !important; border-radius:6px !important; padding:3px 6px !important; font-size:13px !important;}
.daterangepicker .ranges li{font-size:13px !important; color:var(--ink) !important;}
.daterangepicker .ranges li.active, .daterangepicker .ranges li:hover{background:var(--primary) !important; color:#fff !important;}

/* ---------- select2 reskin (status/line/category filters, same clashing-with-bootstrap issue the daterangepicker had) ---------- */
.select2-container--bootstrap4 .select2-selection,
.select2-container--default .select2-selection{border:1px solid var(--line) !important; border-radius:var(--radius-sm) !important; min-height:44px !important; background:var(--surface) !important;}
.select2-container--bootstrap4 .select2-selection--single,
.select2-container--default .select2-selection--single{display:flex !important; align-items:center !important; padding:0 14px !important;}
.select2-container--bootstrap4 .select2-selection--single .select2-selection__rendered,
.select2-container--default .select2-selection--single .select2-selection__rendered{padding:0 !important; font-size:14px !important; color:var(--ink) !important; line-height:normal !important;}
.select2-container--bootstrap4 .select2-selection--single .select2-selection__arrow,
.select2-container--default .select2-selection--single .select2-selection__arrow{height:42px !important; right:10px !important;}
.select2-container--bootstrap4.select2-container--focus .select2-selection,
.select2-container--default.select2-container--focus .select2-selection,
.select2-container--bootstrap4.select2-container--open .select2-selection,
.select2-container--default.select2-container--open .select2-selection{border-color:var(--primary) !important; box-shadow:0 0 0 3px var(--primary-soft) !important;}
.select2-dropdown{border:1px solid var(--line) !important; border-radius:var(--radius-sm) !important; box-shadow:var(--shadow-lg) !important; overflow:hidden !important;}
.select2-search--dropdown{padding:10px !important;}
.select2-search--dropdown .select2-search__field{border:1px solid var(--line) !important; border-radius:6px !important; padding:8px 10px !important; font-size:14px !important;}
.select2-results__option{font-size:14px !important; padding:9px 14px !important;}
.select2-container--default .select2-results__option--highlighted[aria-selected],
.select2-container--bootstrap4 .select2-results__option--highlighted[aria-selected]{background:var(--primary) !important; color:#fff !important;}
.select2-container--default .select2-results__option[aria-selected=true],
.select2-container--bootstrap4 .select2-results__option[aria-selected=true]{background:var(--primary-soft) !important; color:var(--primary-dark) !important;}

/* ---------- real app modals (Bootstrap .modal.fade; distinct from the mockup-only .modal-overlay convention above) ---------- */
.modal-content{border:1px solid var(--line); border-radius:var(--radius-lg); box-shadow:var(--shadow-lg); overflow:hidden;}
.modal-header{background:var(--surface); border-bottom:1px solid var(--line); padding:18px 22px;}
.modal-header .modal-title{font-size:17px; font-weight:700; color:var(--ink); display:flex; align-items:center; gap:10px;}
.modal-header .modal-title i{color:var(--primary);}
.modal-header .close{margin:0; padding:0; width:32px; height:32px; display:flex; align-items:center; justify-content:center; border-radius:999px; color:var(--ink-soft); opacity:1; text-shadow:none; border:none; background:transparent; font-size:22px; line-height:1; font-weight:400;}
.modal-header .close:hover{background:var(--bg); color:var(--ink);}
.modal-body{padding:22px;}
.modal-footer{border-top:1px solid var(--line); padding:16px 22px;}

/* ---------- order detail modal (sale/shopping_review.html #myModalShoppingDetail): colored header + summary card ---------- */
#myModalShoppingDetail .modal-header{background:var(--primary); border-bottom:none; padding:20px 22px;}
#myModalShoppingDetail .modal-title{color:#fff;}
#myModalShoppingDetail .modal-title i{color:#fff;}
#myModalShoppingDetail .close{color:rgba(255,255,255,.8);}
#myModalShoppingDetail .close:hover{background:rgba(255,255,255,.18); color:#fff;}
#myModalShoppingDetail .summary-card{background:var(--surface); border:1px solid var(--line); border-radius:var(--radius-sm); padding:16px 18px 0; display:flex; flex-direction:column; gap:10px; overflow:hidden;}
#myModalShoppingDetail .summary-row{font-size:14px; color:var(--ink-soft); padding-bottom:10px; border-bottom:1px dashed var(--line);}
#myModalShoppingDetail .summary-row:last-of-type{border-bottom:none; padding-bottom:16px;}
#myModalShoppingDetail .summary-row strong{color:var(--ink); font-weight:700;}
#myModalShoppingDetail .summary-total{background:var(--primary); color:#fff; margin:0 -18px; padding:16px 18px; border-top:none;}
#myModalShoppingDetail .summary-total span{color:#fff;}
#myModalShoppingDetail .summary-total .amount{color:#fff;}

/* ---------- filter-card search action (sale/shopping_review.html #filter_sale) ---------- */
.filter-card .field-row .field.mb-0 .btn{min-height:44px; width:100%;}
.filter-card .field-row .field-search-btn{flex:0 0 150px; margin-bottom:16px !important;}

/* ---------- order table (sale/shopping_review.html #data): kill Bootstrap's full grid borders
   from .table-bordered, keep only the clean horizontal dividers from the sitewide DataTables reskin above ---------- */
#data.table-bordered{border:none;}
#data.table-bordered td, #data.table-bordered th{border-left:none; border-right:none;}
.orders-table-card{box-shadow:var(--shadow); border-color:var(--line);}
#data thead th{background:var(--bg); color:var(--ink); font-size:12px !important; padding:13px 10px !important; border-bottom:2px solid var(--primary) !important;}
#data thead th:first-child{border-top-left-radius:var(--radius-sm);}
#data thead th:last-child{border-top-right-radius:var(--radius-sm);}
#data tbody td{vertical-align:middle; padding:15px 10px !important;}
#data tbody tr:nth-child(even){background:var(--bg);}
#data tbody tr:hover{background:var(--primary-soft) !important;}
#data .order-id{display:inline-flex; align-items:center; gap:7px; color:var(--ink-soft);}
#data .order-id i{font-size:12px;}
#data .order-id strong{color:var(--ink);}
#data td:nth-child(4) strong{color:var(--ink); font-size:14px;}
#data .status{white-space:nowrap;}
#data .btn-action{padding:8px 10px; border:1px solid transparent;}
#data .btn-view{background:var(--primary-soft); color:var(--primary);}
#data .btn-view:hover{background:var(--primary); color:#fff;}
#data .btn-pdf{background:var(--warn-soft); color:var(--warn);}
#data .btn-pdf:hover{background:var(--warn); color:#fff;}
#data .btn-delete{background:#FBEAEA; color:#B3362C;}
#data .btn-delete:hover{background:#B3362C; color:#fff;}
#data .muted-note{display:inline-flex; align-items:center; gap:6px; color:var(--ink); font-size:13px; white-space:nowrap;}
#data .muted-note i{font-size:12px; color:var(--ink-soft);}
#data tr.dtrg-group td{background:var(--primary-soft) !important; color:var(--primary); font-weight:700; font-size:12px; text-transform:uppercase; letter-spacing:.03em; padding:10px 14px !important; border-bottom:1px solid var(--line);}
.form-control-checkbox{width:18px; height:18px; accent-color:var(--primary); cursor:pointer;}
/* toggle switch for "predeterminada" fields (address_book_page/create.html) — a plain checkbox
   got lost next to its label, a switch reads clearly as on/off */
.switch-row{display:flex; align-items:center; gap:10px; font-size:13px; color:var(--ink-soft); margin-bottom:12px; cursor:pointer;}
.switch-row:last-child{margin-bottom:0;}
/* both switches live inside the Ciudad .field itself, right under its select —
   one left-aligned, one right-aligned within that column's own width */
.switch-pair{display:flex; justify-content:space-between; align-items:center; margin-top:16px;}
.switch-pair .switch-row{margin-bottom:0;}
/* address form: min-width:0 lets the Ciudad column shrink like its siblings instead of being
   widened by the two switches; on phones the switches stack, each with the toggle first */
.form-grid .field{min-width:0;}
@media (max-width:720px){
  .switch-pair{flex-direction:column; align-items:flex-start; gap:12px;}
  .switch-pair .switch-row:last-child{flex-direction:row-reverse; justify-content:flex-end !important;}
}
.switch{position:relative; display:inline-block; flex:none; width:40px; height:22px;}
.switch input{position:absolute; inset:0; width:100%; height:100%; margin:0; opacity:0; cursor:pointer;}
.switch-slider{position:absolute; inset:0; background:var(--line); border-radius:999px; transition:background .15s ease;}
.switch-slider::before{content:''; position:absolute; left:2px; top:2px; width:18px; height:18px; background:#fff; border-radius:50%; box-shadow:0 1px 2px rgba(0,0,0,.25); transition:transform .15s ease;}
.switch input:checked + .switch-slider{background:var(--primary);}
.switch input:checked + .switch-slider::before{transform:translateX(18px);}
.switch input:focus-visible + .switch-slider{box-shadow:0 0 0 3px var(--primary-soft);}
/* FormValidation.js's Bootstrap icon plugin assumes Bootstrap's default label height (~32px);
   our .field label is smaller, so the validation ✓/✗ sits too low without this override.
   Scoped to .form-grid (address_book_page/create.html) only — .field is reused sitewide
   (login, register, profile…) with different shapes, e.g. the login password field has a
   show/hide button next to the input that a blanket override would collide with. */
.form-grid .field .fv-plugins-icon{top:20px !important; right:6px !important;}
/* address_book_page/list.html: DataTables Responsive puts its "+" toggle (absolute, ~14px wide)
   inside the first cell; the sitewide 10px td padding left it sitting on top of the ID */
#data.dtr-inline.collapsed > tbody > tr > td.dtr-control{padding-left:30px !important; text-align:left !important;}
/* this page's pagination uses the bootstrap4 DataTables integration (.page-item/.page-link carry the
   real visuals) — the sitewide reskin above still targets the base .paginate_button class on the <li>
   itself, wrapping each button in an extra gray box around Bootstrap's own one; undo that here only. */
#data_wrapper .dataTables_paginate .paginate_button,
#tblShoppingDetail_wrapper .dataTables_paginate .paginate_button{background:transparent !important; border:none !important; padding:0 !important; margin-left:0 !important; border-radius:0 !important;}
.status-dot{display:inline-flex; align-items:center; gap:7px; font-size:13px; font-weight:600; color:var(--ink); white-space:nowrap;}
.status-dot i{font-size:12px; flex:none;}
.status-dot i.delivered{color:var(--accent);}
.status-dot i.processing{color:#B46A1A;}
.status-dot i.cancelled{color:#B3362C;}
/* filled-look inputs inside filter cards, so they read as distinct from the white card behind them */
.filter-card .field input, .filter-card .field select{background:var(--bg);}
.filter-card .field input:focus, .filter-card .field select:focus{background:var(--surface);}
.filter-card .select2-container--bootstrap4 .select2-selection,
.filter-card .select2-container--default .select2-selection{background:var(--bg) !important;}
.filter-card .select2-container--bootstrap4 .select2-selection--single,
.filter-card .select2-container--default .select2-selection--single{height:44px !important;}
.filter-card .select2-container--bootstrap4 .select2-selection--single .select2-selection__arrow,
.filter-card .select2-container--default .select2-selection--single .select2-selection__arrow{height:20px !important; top:0 !important; bottom:0 !important; margin:auto 0 !important;}
.filter-card .select2-container--bootstrap4.select2-container--open .select2-selection,
.filter-card .select2-container--default.select2-container--open .select2-selection,
.filter-card .select2-container--bootstrap4.select2-container--focus .select2-selection,
.filter-card .select2-container--default.select2-container--focus .select2-selection{background:var(--surface) !important;}
.filter-card .field-row .field{flex-grow:0;}
/* data-entry forms (address_book_page/create.html) use .filter-card just for the card look,
   not as a compact search bar — they need real 2-column fields, not the filter bar's fixed widths */
.filter-card .field-row.form-grid .field{flex-grow:1; flex-basis:0;}
.filter-card .field-row.form-grid{gap:24px;}
.filter-card .field-dates{flex:0 1 260px;}
.filter-card .field-wide{flex:0 1 240px;}
.filter-card .field-dates #date_range{min-width:210px; padding-left:10px; padding-right:10px; font-size:13px;}
@media (max-width:720px){
  .filter-card .field-row{gap:12px;}
  .filter-card .field-row .field{flex:1 1 100%;}
  /* .form-grid's desktop rule (.filter-card .field-row.form-grid .field{flex-basis:0}) outranks
     the line above on specificity alone, media query or not — repeat it here, matched in
     specificity and later in source order, so address_book_page/create.html still stacks on phones */
  .filter-card .field-row.form-grid .field{flex-basis:100%;}
}
