*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}
html{font-size:16px;scroll-behavior:smooth}
body{font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica Neue,Arial,sans-serif;background:#ebebeb;color:#333;min-height:100vh;display:flex;flex-direction:column}
a{color:#3483fa;text-decoration:none}
a:hover{color:#2968c8}
img{max-width:100%;height:auto}

/* ── Header (ML yellow) ── */
.topbar{position:sticky;top:0;z-index:1000;background:#ffe600;padding:8px 16px;display:flex;align-items:center;gap:16px;box-shadow:0 1px 2px rgba(0,0,0,0.1)}
.logo{flex-shrink:0;font-size:22px;font-weight:700;color:#333;text-decoration:none;line-height:1}
.logo:hover{text-decoration:none;color:#333}
.logo-icon{display:inline-block;margin-right:2px}
.search-bar{flex:1;display:flex;max-width:600px;margin:0 auto}
.search-bar input{width:100%;padding:9px 14px;border:2px solid transparent;border-radius:4px 0 0 4px;font-size:14px;outline:none;background:#fff;transition:border-color .2s}
.search-bar input:focus{border-color:#3483fa}
.search-bar button{padding:9px 16px;background:#fff;border:none;border-radius:0 4px 4px 0;cursor:pointer;font-size:14px;color:#666;border-left:1px solid #e5e5e5;transition:background .2s}
.search-bar button:hover{background:#f5f5f5}
.topbar nav{flex-shrink:0;display:flex;align-items:center;gap:12px}
.topbar nav a{font-size:13px;color:#333;white-space:nowrap;padding:6px 8px;border-radius:4px;transition:background .2s}
.topbar nav a:hover{background:rgba(0,0,0,0.05);text-decoration:none}
.cart-link{position:relative;font-size:20px;padding:4px 8px!important}
.cart-badge{position:absolute;top:-2px;right:-2px;background:#3483fa;color:#fff;font-size:10px;font-weight:700;width:16px;height:16px;border-radius:50%;display:flex;align-items:center;justify-content:center}

/* ── Secondary nav (categories) ── */
.cat-bar{background:#fff;border-bottom:1px solid #e5e5e5;padding:0 16px;display:flex;gap:16px;overflow-x:auto;font-size:13px;color:#666}
.cat-bar a{padding:10px 0;color:#666;white-space:nowrap;border-bottom:2px solid transparent;transition:all .2s}
.cat-bar a:hover{color:#3483fa;border-bottom-color:#3483fa;text-decoration:none}
.cat-bar a:first-child{font-weight:600;color:#333}

/* ── Flashes ── */
.flash-box{max-width:1200px;margin:12px auto 0;padding:0 16px}
.flash{padding:10px 16px;border-radius:6px;font-size:14px;margin-bottom:8px}
.flash-success{background:#d1fae5;color:#065f46;border:1px solid #a7f3d0}
.flash-error{background:#fee2e2;color:#991b1b;border:1px solid #fecaca}

/* ── Main ── */
.main-content{flex:1;max-width:1200px;width:100%;margin:0 auto;padding:16px}

/* ── Page title ── */
.page-title{font-size:22px;font-weight:400;margin-bottom:16px;color:#333}

/* ── Product grid (ML-style cards) ── */
.product-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(210px,1fr));gap:16px}
.product-card{background:#fff;border-radius:6px;overflow:hidden;box-shadow:0 1px 2px rgba(0,0,0,0.08);transition:box-shadow .25s,transform .25s;text-decoration:none;color:inherit;position:relative;display:flex;flex-direction:column}
.product-card:hover{box-shadow:0 4px 12px rgba(0,0,0,0.12);transform:translateY(-2px);text-decoration:none}
.product-card img{width:100%;height:210px;object-fit:contain;background:#fff;padding:8px}
.no-img{height:210px;background:#f5f5f5;display:flex;align-items:center;justify-content:center;font-size:40px;color:#ccc}
.product-card .info{padding:10px 12px 14px;flex:1;display:flex;flex-direction:column}
.product-card .info h3{font-size:14px;font-weight:400;color:#333;margin-bottom:4px;line-height:1.35;flex:1}
.product-card .price{font-size:22px;font-weight:400;color:#00a650;margin-bottom:2px}
.product-card .price-old{font-size:13px;color:#999;text-decoration:line-through;margin-bottom:1px}
.product-card .shipping-badge{font-size:12px;color:#00a650;font-weight:600;margin-top:4px}
.product-card .cat-label{font-size:11px;color:#999;margin-top:2px}

/* ── Product detail ── */
.product-detail{display:grid;grid-template-columns:1fr 1fr;gap:24px;align-items:start;background:#fff;border-radius:6px;padding:20px;box-shadow:0 1px 2px rgba(0,0,0,0.06)}
.gallery-section{background:#fff;border-radius:6px;overflow:hidden}
.gallery-main{width:100%;aspect-ratio:1;overflow:hidden;background:#fff;display:flex;align-items:center;justify-content:center}
.gallery-main img{width:100%;height:100%;object-fit:contain}
.gallery-main .no-img.big{width:100%;height:100%;display:flex;align-items:center;justify-content:center;font-size:64px;background:#f5f5f5}
.gallery-thumbs{display:flex;gap:6px;overflow-x:auto;padding:8px 0}
.gallery-thumbs .thumb{flex-shrink:0;width:52px;height:52px;border-radius:4px;overflow:hidden;border:2px solid transparent;cursor:pointer;padding:0;background:#f5f5f5;transition:border-color .2s}
.gallery-thumbs .thumb.active{border-color:#3483fa}
.gallery-thumbs .thumb:hover{border-color:#999}
.gallery-thumbs .thumb img{width:100%;height:100%;object-fit:contain}
.detail-info h1{font-size:22px;font-weight:500;margin-bottom:10px;color:#333;line-height:1.3}
.detail-info .desc{color:#666;font-size:14px;line-height:1.6;margin-bottom:14px}
.big-price{font-size:36px;font-weight:400;color:#00a650;margin-bottom:6px}
.price-shipping{font-size:14px;color:#00a650;font-weight:600;margin-bottom:12px}
.stock{font-size:14px;margin-bottom:14px}
.stock.ok{color:#00a650}
.stock.low{color:#999}
.buy-form{display:flex;gap:10px;align-items:center;margin-bottom:14px;flex-wrap:wrap}
.qty-picker{display:flex;align-items:center;border:1px solid #ccc;border-radius:6px;overflow:hidden;background:#fff}
.qty-picker button{width:34px;height:34px;border:none;background:#fff;font-size:16px;cursor:pointer;color:#666;transition:background .15s}
.qty-picker button:hover{background:#f5f5f5}
.qty-picker input{width:44px;height:34px;border:none;text-align:center;font-size:14px;font-weight:500;outline:none;border-left:1px solid #e5e5e5;border-right:1px solid #e5e5e5}
.qty-picker input[type=number]::-webkit-inner-spin-button,.qty-picker input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}
.qty-picker input[type=number]{-moz-appearance:textfield}
.btn-buy{padding:11px 20px;background:#fff;color:#3483fa;border:1px solid #3483fa;border-radius:6px;font-size:14px;font-weight:500;cursor:pointer;transition:all .2s}
.btn-buy:hover{background:rgba(52,131,250,0.05)}
.btn-buy-now{padding:11px 24px;background:#3483fa;color:#fff;border:none;border-radius:6px;font-size:14px;font-weight:500;cursor:pointer;transition:background .2s}
.btn-buy-now:hover{background:#2968c8}
.wa-link{display:inline-block;font-size:13px;color:#25D366;font-weight:500;margin-bottom:6px}
.delivery-badge{font-size:13px;color:#666;background:#f9f9f9;border:1px solid #e5e5e5;border-radius:6px;padding:8px 12px;margin-bottom:12px;line-height:1.4}
.delivery-badge strong{color:#333}
.desc-section{margin-top:16px;padding:14px 0;border-top:1px solid #e5e5e5}
.desc-section h3{font-size:13px;font-weight:600;color:#666;margin-bottom:6px;text-transform:uppercase}
.desc-section p{font-size:14px;color:#666;line-height:1.6;white-space:pre-line}
.specs-section{background:#fff;border-radius:6px;padding:16px;margin-top:12px;box-shadow:0 1px 2px rgba(0,0,0,0.06)}
.specs-section h3{font-size:13px;font-weight:600;color:#666;margin-bottom:10px;text-transform:uppercase}
.specs-table{width:100%;border-collapse:collapse}
.specs-table tr td{padding:8px 0;font-size:14px;border-bottom:1px solid #f0f0f0}
.specs-table tr td:first-child{color:#999;font-weight:400;width:140px}
.specs-table tr td:last-child{color:#333}
.specs-table tr:last-child td{border-bottom:none}

/* ── Cart ── */
.cart-items{background:#fff;border-radius:6px;overflow:hidden;box-shadow:0 1px 2px rgba(0,0,0,0.06)}
.cart-row{display:flex;align-items:center;gap:12px;padding:12px 14px;border-bottom:1px solid #f0f0f0}
.cart-row:last-child{border-bottom:none}
.cart-img{width:60px;height:60px;border-radius:4px;object-fit:contain;background:#f5f5f5;flex-shrink:0}
.cart-img.no-img{width:60px;height:60px;font-size:20px}
.cart-info{flex:1;min-width:0}
.cart-info a:hover{text-decoration:none}
.cart-info h4{font-size:14px;font-weight:400;color:#333;margin-bottom:2px}
.cart-price{font-size:13px;color:#666}
.cart-qty input{width:52px;padding:4px 6px;border:1px solid #ccc;border-radius:4px;text-align:center;font-size:13px}
.cart-subtotal{font-size:15px;font-weight:500;color:#00a650;min-width:70px;text-align:right}
.btn-remove{background:none;border:none;color:#ccc;font-size:16px;cursor:pointer;padding:4px 8px;border-radius:4px;transition:all .15s}
.btn-remove:hover{color:#e53935;background:#fff0f0}
.cart-footer{display:flex;align-items:center;justify-content:space-between;margin-top:14px;flex-wrap:wrap;gap:10px}
.cart-total{font-size:16px;color:#333}
.cart-total strong{font-size:22px;color:#00a650}

/* ── Buttons ── */
.btn-primary,.btn-outline{padding:10px 20px;border-radius:6px;font-size:14px;font-weight:500;border:none;cursor:pointer;transition:all .2s;text-decoration:none;display:inline-flex;align-items:center;gap:6px}
.btn-primary{background:#3483fa;color:#fff}
.btn-primary:hover{background:#2968c8;color:#fff;text-decoration:none}
.btn-outline{background:#fff;color:#666;border:1px solid #ccc}
.btn-outline:hover{background:#f5f5f5;text-decoration:none}
.btn-block{width:100%;justify-content:center;margin-top:6px}
.btn-primary:disabled,.btn-buy:disabled{opacity:.5;cursor:not-allowed}

/* ── Checkout ── */
.checkout-layout{display:grid;grid-template-columns:1fr 340px;gap:20px;align-items:start}
.checkout-form h3,.checkout-summary h3{font-size:16px;font-weight:500;color:#333;margin-bottom:14px;padding-bottom:8px;border-bottom:1px solid #e5e5e5}
.checkout-form{background:#fff;border-radius:6px;padding:20px;box-shadow:0 1px 2px rgba(0,0,0,0.06)}
.field{margin-bottom:14px}
.field label{display:block;font-size:13px;font-weight:500;color:#666;margin-bottom:4px}
.field input{width:100%;padding:9px 12px;border:1px solid #ccc;border-radius:6px;font-size:14px;transition:border .2s}
.field input:focus{outline:none;border-color:#3483fa;box-shadow:0 0 0 2px rgba(52,131,250,0.15)}
.checkout-summary{background:#fff;border-radius:6px;padding:20px;box-shadow:0 1px 2px rgba(0,0,0,0.06);position:sticky;top:74px}
.summary-row{display:flex;justify-content:space-between;font-size:14px;padding:6px 0;color:#666}
.summary-total{display:flex;justify-content:space-between;font-size:15px;padding:10px 0 0;margin-top:6px;border-top:2px solid #e5e5e5}
.summary-total strong{color:#00a650;font-size:20px}
.mp-info{font-size:12px;color:#999;margin-top:10px;text-align:center}

/* ── Gracias ── */
.gracias{text-align:center;max-width:500px;margin:32px auto}
.gracias-icon{font-size:48px;margin-bottom:6px}
.gracias h1{font-size:24px;font-weight:500;margin-bottom:4px}
.gracias-id{color:#666;font-size:14px;margin-bottom:16px}
.gracias-details{text-align:left;background:#fff;border-radius:6px;padding:14px;margin-bottom:14px;box-shadow:0 1px 2px rgba(0,0,0,0.06)}
.gracias-details p{font-size:14px;padding:3px 0;color:#333}
.gracias-table{width:100%;border-collapse:collapse;margin-bottom:14px;background:#fff;border-radius:6px;overflow:hidden;box-shadow:0 1px 2px rgba(0,0,0,0.06)}
.gracias-table th,.gracias-table td{padding:8px 12px;font-size:14px;text-align:left;border-bottom:1px solid #f0f0f0}
.gracias-table th{background:#fafafa;font-weight:500;color:#999;font-size:12px;text-transform:uppercase}
.gracias-table tfoot td{border-bottom:none;border-top:2px solid #e5e5e5;padding-top:10px}
.gracias-wa{font-size:14px;color:#666;margin-bottom:16px;line-height:1.5}
.gracias-wa a{color:#25D366;font-weight:600}
.gracias-msg{font-size:14px;color:#666;margin-bottom:16px;line-height:1.5;padding:10px 14px;background:#f5f5f5;border-radius:6px}

/* ── Bank info ── */
.bank-info{background:#f5f5f5;border:1px solid #e5e5e5;border-radius:6px;padding:14px;margin-bottom:14px;line-height:1.5}
.bank-title{font-weight:600;font-size:14px;color:#333;margin-bottom:6px}
.bank-table{width:100%;border-collapse:collapse;font-size:13px}
.bank-table tr td{padding:4px 0;border-bottom:1px solid #e8e8e8}
.bank-table tr:last-child td{border-bottom:none}
.bank-table td:first-child{color:#999;font-weight:400;width:70px}
.bank-table td:last-child{color:#333}
.bank-cbu{font-family:monospace;letter-spacing:1px;font-size:13px}
.bank-alias{font-weight:600;color:#333}

/* ── Empty state ── */
.empty{padding:60px 20px;text-align:center;color:#999}
.empty p{margin-bottom:12px;font-size:15px}

/* ── Footer ── */
.footer{background:#fff;padding:14px 24px;text-align:center;font-size:13px;color:#999;border-top:1px solid #e5e5e5;margin-top:auto}
.footer a{color:#666}

/* ── Responsive ── */
@media(max-width:768px){
  .topbar{padding:6px 10px;gap:8px}
  .search-bar input{padding:7px 10px;font-size:13px}
  .search-bar button{padding:7px 10px}
  .topbar nav a{font-size:12px;padding:4px 6px}
  .cat-bar{font-size:12px;padding:0 10px;gap:10px}
  .cat-bar a{padding:8px 0}
  .main-content{padding:10px}
  .product-grid{grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:10px}
  .product-card img{height:150px}
  .no-img{height:150px}
  .product-card .price{font-size:18px}
  .product-detail{grid-template-columns:1fr;gap:12px;padding:12px}
  .detail-info h1{font-size:18px}
  .big-price{font-size:28px}
  .checkout-layout{grid-template-columns:1fr}
  .checkout-summary{position:static}
  .cart-row{flex-wrap:wrap}
  .cart-subtotal{min-width:auto}
  .cart-footer{flex-direction:column;align-items:stretch}
  .cart-actions{flex-direction:column}
}
