/* ============================================================
   VINNY EMPORIUM — BASE (design tokens, header, footer, cart,
   product card, modal, buttons, utilities)
   ============================================================ */

:root {
    --primary: #00a86b;
    --primary-dark: #008a56;
    --primary-soft: #e6f7f0;
    --accent: #ff6b00;
    --accent-dark: #e55f00;
    --accent-soft: #fff1e6;
    --ink: #111827;
    --ink-2: #374151;
    --muted: #6b7280;
    --line: #e5e7eb;
    --bg: #f8fafc;
    --bg-2: #ffffff;
    --danger: #dc2626;
    --gold: #f1c40f;
    --blue: #2563eb;
    --shadow-sm: 0 1px 3px rgba(17,24,39,.06), 0 1px 2px rgba(17,24,39,.04);
    --shadow-md: 0 4px 16px rgba(17,24,39,.08);
    --shadow-lg: 0 12px 40px rgba(17,24,39,.12);
    --radius: 12px;
    --radius-lg: 18px;
    --radius-pill: 999px;
    --header-h: 68px;
    --container: 1240px;
}

html, body {
    overflow-x: hidden;
    max-width: 100vw;
    width: 100%;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    font-size: 15px;
    line-height: 1.55;
    color: var(--ink);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; font-size: inherit; }

.container { max-width: var(--container); margin: 0 auto; padding: 0 20px; }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 11px 20px; border-radius: var(--radius-pill);
    font-weight: 600; font-size: 14px; border: 2px solid transparent;
    transition: transform .12s ease, box-shadow .15s ease, background .15s ease, color .15s ease, border-color .15s ease;
    text-decoration: none; white-space: nowrap; line-height: 1;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); box-shadow: 0 6px 20px rgba(0,168,107,.28); }
.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { background: var(--accent-dark); box-shadow: 0 6px 20px rgba(255,107,0,.3); }
.btn-outline { background: #fff; color: var(--ink); border-color: var(--line); }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }
.btn-wa { background: #25D366; color: #fff; }
.btn-wa:hover { background: #1ebe57; }
.btn-ghost { background: transparent; color: var(--ink-2); }
.btn-ghost:hover { color: var(--primary); }

.icon-btn {
    display: inline-flex; align-items: center; justify-content: center;
    width: 42px; height: 42px; border-radius: 50%;
    border: none; background: transparent; color: var(--ink-2);
    font-size: 18px; transition: background .15s ease, color .15s ease;
}
.icon-btn:hover { background: var(--bg); color: var(--primary); }

/* ---------- Header ---------- */
.site-header {
    position: sticky; top: 0; z-index: 100;
    background: #fff;
    border-bottom: 1px solid var(--line);
    height: var(--header-h);
    display: flex; align-items: center;
}
.header-inner {
    display: flex; align-items: center; gap: 16px;
    width: 100%;
}
.brand {
    display: inline-flex; align-items: center; gap: 10px;
    flex-shrink: 0;
}
.brand-logo {
    width: 40px; height: 40px; border-radius: 50%;
    object-fit: cover; background: #111;
}
.brand-name {
    font-weight: 800; font-size: 18px; color: var(--ink); letter-spacing: -.3px;
}
.header-search {
    flex: 1 1 auto; display: flex; align-items: center;
    background: var(--bg); border: 2px solid transparent;
    border-radius: var(--radius-pill);
    padding: 0 6px 0 16px; height: 44px; max-width: 640px;
    transition: border-color .15s ease, background .15s ease;
}
.header-search:focus-within { border-color: var(--primary); background: #fff; }
.header-search .search-icon { color: var(--muted); font-size: 14px; margin-right: 8px; }
.header-search input {
    flex: 1; border: none; outline: none; background: transparent;
    font-size: 14px; color: var(--ink); height: 100%;
}
.header-search .btn-search {
    border: none; background: var(--primary); color: #fff;
    height: 34px; padding: 0 18px; border-radius: var(--radius-pill);
    font-size: 13px; font-weight: 600;
}
.header-search .btn-search:hover { background: var(--primary-dark); }

.desktop-nav {
    display: flex; align-items: center; gap: 22px;
    font-weight: 600; font-size: 14px; color: var(--ink-2);
    flex-shrink: 0;
}
.desktop-nav a { padding: 6px 0; position: relative; }
.desktop-nav a:hover { color: var(--primary); }
.desktop-nav a::after {
    content: ''; position: absolute; left: 0; right: 0; bottom: 0;
    height: 2px; background: var(--primary); transform: scaleX(0);
    transform-origin: left; transition: transform .18s ease;
}
.desktop-nav a:hover::after { transform: scaleX(1); }

.header-actions { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.wa-icon { color: #25D366; }
.wa-icon:hover { background: #e9fbf1; color: #128c7e; }
.cart-btn { position: relative; }
.cart-count {
    position: absolute; top: 2px; right: 0;
    background: var(--accent); color: #fff;
    min-width: 18px; height: 18px; padding: 0 5px;
    border-radius: var(--radius-pill);
    font-size: 11px; font-weight: 700;
    display: inline-flex; align-items: center; justify-content: center;
    border: 2px solid #fff;
}
.menu-toggle { display: none; }

/* ---------- Mobile menu ---------- */
.mobile-menu {
    position: fixed; inset: 0; z-index: 300;
    pointer-events: none; opacity: 0;
    transition: opacity .2s ease;
}
.mobile-menu.open { pointer-events: auto; opacity: 1; }
.mobile-menu::before {
    content: ''; position: absolute; inset: 0;
    background: rgba(17,24,39,.5);
}
.mobile-menu-panel {
    position: relative; background: #fff; width: 84%; max-width: 340px;
    height: 100%; padding: 20px;
    transform: translateX(-100%); transition: transform .25s ease;
    display: flex; flex-direction: column; gap: 16px;
}
.mobile-menu.open .mobile-menu-panel { transform: translateX(0); }
.mobile-menu-head { display: flex; justify-content: space-between; align-items: center; font-weight: 700; font-size: 18px; }
.mobile-search {
    display: flex; align-items: center; gap: 8px;
    background: var(--bg); border-radius: var(--radius-pill);
    padding: 0 14px; height: 44px;
}
.mobile-search i { color: var(--muted); }
.mobile-search input { flex: 1; border: none; outline: none; background: transparent; }
.mobile-nav { display: flex; flex-direction: column; }
.mobile-nav a {
    display: flex; align-items: center; gap: 12px;
    padding: 14px 8px; font-weight: 600; color: var(--ink-2);
    border-bottom: 1px solid var(--line);
}
.mobile-nav a i { width: 20px; color: var(--primary); }
.mobile-nav a:hover { color: var(--primary); }

/* ---------- Product card ---------- */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 18px;
}
.product-card {
    position: relative; display: flex; flex-direction: column;
    background: #fff; border-radius: var(--radius-lg);
    border: 1px solid var(--line); overflow: hidden;
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
    cursor: pointer;
}
.product-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: #d8dee5; }
.pc-media {
    position: relative; aspect-ratio: 1 / 1;
    background: #f3f5f7; overflow: hidden;
}
.pc-media img {
    width: 100%; height: 100%; object-fit: contain; padding: 12px;
    transition: transform .35s ease;
}
.product-card:hover .pc-media img { transform: scale(1.05); }
.pc-badge {
    position: absolute; top: 10px; left: 10px;
    background: var(--accent); color: #fff;
    font-size: 11px; font-weight: 700; letter-spacing: .3px;
    padding: 5px 10px; border-radius: var(--radius-pill);
    text-transform: uppercase; z-index: 2;
}
.pc-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.pc-cat { font-size: 11px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .4px; }
.pc-name { font-size: 14px; font-weight: 600; color: var(--ink); line-height: 1.35; margin: 0;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pc-price { font-size: 17px; font-weight: 800; color: var(--ink); }
.pc-price .currency { font-size: 12px; font-weight: 700; color: var(--muted); margin-right: 3px; }
.pc-actions { display: flex; gap: 6px; margin-top: 8px; }
.pc-actions .btn { flex: 1; padding: 9px 10px; font-size: 13px; }
.pc-actions .btn-wa { flex: 0 0 42px; padding: 9px; }

/* ---------- Ribbons (from product.status) ---------- */
.pc-ribbon {
    position: absolute; z-index: 3; color: #fff;
    font-size: 10px; font-weight: 700; text-transform: uppercase;
    padding: 5px 9px; border-radius: 6px; letter-spacing: .4px;
    box-shadow: var(--shadow-sm); pointer-events: none;
    max-width: 70%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ribbon-top-left { top: 8px; left: 8px; background: var(--danger); }
.ribbon-top-right { top: 8px; right: 8px; background: var(--accent); }
.ribbon-bottom-left { bottom: 8px; left: 8px; background: var(--gold); color: var(--ink); }
.ribbon-bottom-right { bottom: 8px; right: 8px; background: var(--blue); }

/* ---------- Cart drawer ---------- */
.cart-drawer-overlay {
    position: fixed; inset: 0; background: rgba(17,24,39,.5);
    opacity: 0; pointer-events: none; transition: opacity .2s ease;
    z-index: 400;
}
.cart-drawer-overlay.open { opacity: 1; pointer-events: auto; }
.cart-drawer {
    position: fixed; top: 0; right: 0; height: 100%;
    width: 100%; max-width: 420px; background: #fff;
    z-index: 401; transform: translateX(100%);
    transition: transform .28s cubic-bezier(.4,0,.2,1);
    display: flex; flex-direction: column;
    box-shadow: -8px 0 40px rgba(0,0,0,.12);
}
.cart-drawer.open { transform: translateX(0); }
.cart-head {
    display: flex; justify-content: space-between; align-items: center;
    padding: 18px 20px; border-bottom: 1px solid var(--line);
}
.cart-head h3 { margin: 0; font-size: 18px; display: flex; align-items: center; gap: 8px; }
.cart-head i { color: var(--primary); }
.cart-body { flex: 1; overflow-y: auto; padding: 14px 20px; }
.cart-empty { text-align: center; padding: 48px 12px; color: var(--muted); }
.cart-empty i { font-size: 48px; color: var(--line); margin-bottom: 12px; display: block; }
.cart-item {
    display: grid; grid-template-columns: 64px 1fr auto;
    gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line);
}
.cart-item img {
    width: 64px; height: 64px; object-fit: contain;
    background: var(--bg); border-radius: 10px; padding: 4px;
}
.ci-info h4 { margin: 0 0 4px; font-size: 14px; font-weight: 600; line-height: 1.3; }
.ci-price { color: var(--ink); font-weight: 700; font-size: 14px; }
.ci-qty { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.qty-stepper {
    display: inline-flex; align-items: center;
    border: 1px solid var(--line); border-radius: var(--radius-pill);
    overflow: hidden; background: #fff;
}
.qty-stepper button {
    width: 30px; height: 30px; border: none; background: transparent;
    color: var(--ink-2); font-size: 16px; font-weight: 700;
    display: inline-flex; align-items: center; justify-content: center;
}
.qty-stepper button:hover { background: var(--bg); color: var(--primary); }
.qty-stepper input {
    width: 40px; height: 30px; border: none; text-align: center;
    outline: none; font-weight: 600; font-size: 13px;
    -moz-appearance: textfield;
}
.qty-stepper input::-webkit-outer-spin-button,
.qty-stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.ci-remove {
    background: transparent; border: none; color: var(--muted);
    font-size: 13px; padding: 4px; align-self: flex-start;
}
.ci-remove:hover { color: var(--danger); }
.cart-foot {
    border-top: 1px solid var(--line);
    padding: 16px 20px 20px;
    background: #fff;
}
.cart-subtotal {
    display: flex; justify-content: space-between; align-items: center;
    font-size: 15px; margin-bottom: 12px;
}
.cart-subtotal strong { font-size: 20px; color: var(--ink); }
.cart-foot .btn { width: 100%; padding: 13px; font-size: 15px; }
.cart-foot .btn + .btn { margin-top: 8px; }
.cart-note { font-size: 12px; color: var(--muted); text-align: center; margin: 10px 0 0; }

/* ---------- Product modal ---------- */
.modal-overlay {
    position: fixed; inset: 0; z-index: 500;
    background: rgba(17,24,39,.75);
    display: none; align-items: center; justify-content: center;
    padding: 20px; overflow-y: auto;
}
.modal-overlay.open { display: flex; }
.modal-card {
    background: #fff; border-radius: var(--radius-lg);
    width: 100%; max-width: 960px; max-height: 92vh;
    overflow-y: auto; position: relative;
    padding: 24px; box-shadow: var(--shadow-lg);
    animation: modalIn .25s ease;
}
@keyframes modalIn {
    from { opacity: 0; transform: translateY(16px) scale(.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
.modal-close {
    position: absolute; top: 12px; right: 14px;
    width: 36px; height: 36px; border-radius: 50%;
    border: none; background: #fff; color: var(--ink-2);
    font-size: 22px; line-height: 1; z-index: 3;
    box-shadow: var(--shadow-sm);
}
.modal-close:hover { background: var(--bg); }
.pm-layout {
    display: grid; grid-template-columns: 1fr 1fr; gap: 28px;
}
.pm-gallery { position: relative; }
.pm-image-wrap {
    position: relative; background: #f3f5f7; border-radius: var(--radius);
    aspect-ratio: 1 / 1; display: flex; align-items: center; justify-content: center;
    overflow: hidden;
}
.pm-image-wrap img { max-width: 100%; max-height: 100%; object-fit: contain; padding: 16px; }
.pm-arrow {
    position: absolute; top: 50%; transform: translateY(-50%);
    width: 40px; height: 40px; border-radius: 50%;
    background: rgba(255,255,255,.95); border: 1px solid var(--line);
    color: var(--ink); display: flex; align-items: center; justify-content: center;
    box-shadow: var(--shadow-sm);
}
.pm-arrow:hover { background: #fff; color: var(--primary); }
.pm-prev { left: 10px; }
.pm-next { right: 10px; }
.pm-dots {
    position: absolute; bottom: 12px; left: 50%; transform: translateX(-50%);
    display: flex; gap: 6px;
}
.pm-dots .dot {
    width: 8px; height: 8px; border-radius: 50%;
    background: rgba(17,24,39,.25); cursor: pointer;
    transition: background .15s ease, transform .15s ease;
}
.pm-dots .dot.active { background: var(--primary); transform: scale(1.2); }
.pm-info { display: flex; flex-direction: column; gap: 10px; }
.pm-category { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; font-weight: 600; }
.pm-info h2 { font-size: 22px; margin: 0; line-height: 1.3; }
.pm-price { font-size: 26px; font-weight: 800; color: var(--primary); }
.pm-desc { color: var(--ink-2); line-height: 1.6; font-size: 14px; margin: 6px 0; }
.pm-qty { display: flex; align-items: center; gap: 12px; margin-top: 6px; }
.pm-qty label { font-weight: 600; font-size: 14px; }
.pm-actions { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.pm-actions .btn { padding: 13px; font-size: 15px; }
.pm-note { font-size: 13px; color: var(--muted); margin-top: 6px; display: flex; align-items: center; gap: 6px; }
.pm-note i { color: var(--primary); }

/* ---------- Footer ---------- */
.site-footer {
    background: #0f1419; color: #cbd5e1;
    margin-top: 60px;
}
.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
    gap: 32px; padding: 48px 20px 28px;
}
.footer-brand { margin-bottom: 12px; }
.footer-brand .brand-name { color: #fff; }
.footer-tag { font-size: 13px; color: #94a3b8; margin: 0 0 16px; line-height: 1.6; }
.footer-socials { display: flex; gap: 10px; }
.footer-socials a {
    width: 36px; height: 36px; border-radius: 50%;
    background: rgba(255,255,255,.08); color: #e2e8f0;
    display: inline-flex; align-items: center; justify-content: center;
    transition: background .15s ease, color .15s ease;
}
.footer-socials a:hover { background: var(--primary); color: #fff; }
.footer-col h4 { color: #fff; margin: 0 0 12px; font-size: 14px; font-weight: 700; letter-spacing: .2px; }
.footer-col a, .footer-col p {
    display: block; color: #94a3b8; font-size: 13px;
    padding: 5px 0; line-height: 1.6;
}
.footer-col a:hover { color: var(--primary); }
.footer-col p i { width: 16px; margin-right: 4px; color: var(--primary); }
.footer-bottom {
    border-top: 1px solid rgba(255,255,255,.08);
    padding: 16px 0; font-size: 12px; color: #94a3b8; text-align: center;
}
.footer-bottom a { color: #cbd5e1; }
.footer-bottom a:hover { color: var(--primary); }

/* ---------- Sticky WhatsApp ---------- */
.sticky-wa {
    position: fixed; bottom: 20px; right: 20px;
    width: 56px; height: 56px; border-radius: 50%;
    background: #25D366; color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 28px; z-index: 90;
    box-shadow: 0 6px 20px rgba(37,211,102,.4);
    transition: transform .15s ease, box-shadow .15s ease;
}
.sticky-wa:hover { transform: scale(1.06); color: #fff; box-shadow: 0 8px 26px rgba(37,211,102,.55); }

/* ---------- Section helpers ---------- */
.section { padding: 52px 0; }
.section-head {
    display: flex; justify-content: space-between; align-items: end;
    gap: 20px; margin-bottom: 24px; flex-wrap: wrap;
}
.section-head h2 {
    font-size: 26px; margin: 0; font-weight: 800; letter-spacing: -.4px;
}
.section-head p { color: var(--muted); margin: 4px 0 0; font-size: 14px; }
.section-head .see-all {
    color: var(--primary); font-weight: 600; font-size: 14px;
    display: inline-flex; align-items: center; gap: 6px;
}
.section-head .see-all:hover { color: var(--primary-dark); }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
    .desktop-nav { display: none; }
    .menu-toggle { display: inline-flex; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
    :root { --header-h: 60px; }
    .header-inner { gap: 8px; padding: 0 12px; }
    .header-search {
        order: 5; flex: 1 1 100%;
        margin: 0 -12px 8px; border-radius: 0;
        background: #fff; border-bottom: 1px solid var(--line);
        padding: 0 16px;
    }
    .site-header {
        height: auto; min-height: var(--header-h);
        flex-wrap: wrap; padding: 8px 0 0;
    }
    .header-inner { flex-wrap: wrap; padding: 0 12px; }
    .brand-name { font-size: 15px; }
    .brand-logo { width: 34px; height: 34px; }
    .product-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .pc-body { padding: 10px; }
    .pc-name { font-size: 12.5px; }
    .pc-price { font-size: 15px; }
    .pc-actions { flex-direction: column; }
    .pc-actions .btn-wa { flex: 0 0 auto; width: 100%; }
    .section { padding: 36px 0; }
    .section-head h2 { font-size: 20px; }
    .pm-layout { grid-template-columns: 1fr; gap: 16px; }
    .pm-info h2 { font-size: 18px; }
    .pm-price { font-size: 22px; }
    .modal-card { padding: 16px; }
    .footer-grid { grid-template-columns: 1fr; padding: 32px 16px 20px; }
    .sticky-wa { width: 50px; height: 50px; font-size: 24px; }
}