/* ============================================================
   DamBrothers — Identidad gráfica DamBrothers
   Paleta: rojo de marca + negro + blanco + grises sutiles
   ============================================================ */

:root {
    /* Marca */
    --brand: #C8202E;
    --brand-dark: #9A1722;
    --brand-darker: #6E0F18;
    --brand-light: #E94F5C;
    --brand-soft: #FDECEE;

    /* Neutrales (negro del logo) */
    --ink: #1A1A1A;
    --ink-soft: #2A2A2A;
    --ink-2: #3A3A3A;
    --gray-900: #1A1A1A;
    --gray-700: #404040;
    --gray-600: #525252;
    --gray-500: #737373;
    --gray-400: #A3A3A3;
    --gray-300: #D4D4D4;
    --gray-200: #E5E5E5;
    --gray-100: #F4F4F4;
    --gray-50:  #FAFAFA;

    /* Backgrounds */
    --bg: #FAFAFA;
    --bg-card: #FFFFFF;
    --bg-dark: #1A1A1A;
    --bg-darker: #0F0F0F;

    /* Texto */
    --text: #1A1A1A;
    --text-muted: #525252;
    --text-on-dark: #FFFFFF;
    --text-on-dark-muted: rgba(255,255,255,.7);

    /* Estados */
    --success: #15803D;
    --success-soft: #DCFCE7;
    --warning: #B45309;
    --warning-soft: #FEF3C7;
    --danger: #B91C1C;
    --danger-soft: #FEE2E2;
    --info: #1D4ED8;
    --info-soft: #DBEAFE;

    --price: #C8202E;
    --link: #C8202E;
    --link-hover: #9A1722;

    --border: #E5E5E5;
    --border-strong: #D4D4D4;

    --radius: 4px;
    --radius-lg: 8px;
    --shadow-sm: 0 1px 2px rgba(0,0,0,.04);
    --shadow: 0 2px 6px rgba(0,0,0,.06);
    --shadow-lg: 0 12px 32px rgba(0,0,0,.10);
    --transition: .18s ease;

    --header-h: 64px;
}

* { box-sizing: border-box; }

html, body {
    margin: 0; padding: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: var(--text);
    background: var(--bg);
    font-size: 14px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a { color: var(--link); text-decoration: none; }
a:hover { color: var(--link-hover); }

img { max-width: 100%; height: auto; display: block; }
button { font-family: inherit; cursor: pointer; }

h1, h2, h3, h4, h5 { font-weight: 700; letter-spacing: -0.01em; line-height: 1.2; }

.container { max-width: 1440px; margin: 0 auto; padding: 0 20px; }
.container-sm { max-width: 1100px; margin: 0 auto; padding: 0 20px; }

/* ===================== ICONS ===================== */
.ico { display: inline-block; flex-shrink: 0; vertical-align: middle; }
.ico-stroke-light { stroke-width: 1.5; }
button .ico, a .ico { display: inline-block; }

/* ===================== HEADER ===================== */
.topbar {
    background: var(--ink);
    color: var(--text-on-dark);
    padding: 10px 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    position: sticky;
    top: 0; z-index: 100;
    min-height: var(--header-h);
}
.topbar .logo {
    display: flex; align-items: center;
    padding: 4px 8px;
    border-radius: var(--radius);
    transition: opacity var(--transition);
    flex-shrink: 0;
}
.topbar .logo:hover { opacity: .85; }
.topbar .logo img { height: 42px; width: auto; }

.topbar .search {
    flex: 1;
    display: flex;
    background: #fff;
    border-radius: var(--radius-lg);
    overflow: hidden;
    max-width: 800px;
    border: 2px solid transparent;
    transition: border-color var(--transition);
}
.topbar .search:focus-within { border-color: var(--brand); }
.topbar .search select {
    background: var(--gray-100);
    border: 0;
    padding: 0 12px;
    font-size: 13px;
    color: var(--gray-700);
    border-right: 1px solid var(--gray-300);
    max-width: 200px;
    cursor: pointer;
}
.topbar .search input {
    flex: 1; border: 0; padding: 11px 14px; font-size: 14px; outline: none;
    color: var(--text);
}
.topbar .search button {
    background: var(--brand);
    border: 0; padding: 0 20px;
    color: #fff;
    display: flex; align-items: center; justify-content: center;
    transition: background var(--transition);
}
.topbar .search button:hover { background: var(--brand-dark); }

.topbar .actions { display: flex; align-items: center; gap: 4px; }
.topbar .action {
    color: var(--text-on-dark);
    padding: 8px 12px;
    border-radius: var(--radius);
    font-size: 12px;
    line-height: 1.2;
    text-decoration: none;
    display: flex; align-items: center; gap: 8px;
    transition: background var(--transition);
}
.topbar .action:hover { background: rgba(255,255,255,.08); color: var(--text-on-dark); }
.topbar .action .hello { font-size: 11px; color: var(--text-on-dark-muted); display: block; }
.topbar .action .label { font-size: 13px; font-weight: 600; color: var(--text-on-dark); }
.topbar .action-text { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }

.topbar .cart {
    color: var(--text-on-dark);
    padding: 8px 14px;
    border-radius: var(--radius);
    display: flex; align-items: center; gap: 8px;
    text-decoration: none;
    font-weight: 600;
    background: rgba(255,255,255,.05);
    border: 1px solid rgba(255,255,255,.1);
    transition: all var(--transition);
}
.topbar .cart:hover { background: var(--brand); border-color: var(--brand); color: #fff; }
.topbar .cart .badge {
    background: var(--brand);
    color: #fff;
    border-radius: 999px;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 11px; font-weight: 700;
}
.topbar .cart:hover .badge { background: #fff; color: var(--brand); }

/* Mobile menu toggle */
.menu-toggle {
    display: none;
    background: transparent; color: var(--text-on-dark);
    border: 1px solid rgba(255,255,255,.2); padding: 8px;
    border-radius: var(--radius);
}

/* Sub-nav con categorías */
.subnav {
    background: var(--ink-soft);
    color: var(--text-on-dark);
    padding: 0 20px;
    display: flex; align-items: center;
    overflow-x: auto; white-space: nowrap;
    border-bottom: 1px solid rgba(255,255,255,.04);
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.subnav::-webkit-scrollbar { display: none; }
.subnav a {
    color: var(--text-on-dark);
    padding: 12px 14px;
    font-size: 13px;
    font-weight: 500;
    position: relative;
    transition: color var(--transition);
}
.subnav a:hover { color: var(--brand-light); text-decoration: none; }
.subnav a:hover::after {
    content: ''; position: absolute; bottom: 0; left: 14px; right: 14px;
    height: 2px; background: var(--brand);
}
.subnav .all { display: flex; align-items: center; gap: 8px; font-weight: 700; }

/* ===================== HERO ===================== */
.hero {
    background: var(--ink);
    color: #fff;
    padding: 56px 0;
    position: relative;
    overflow: hidden;
}
.hero::before {
    content: ''; position: absolute; top: 0; right: 0; bottom: 0;
    width: 50%;
    background: linear-gradient(135deg, var(--brand-darker), var(--brand));
    clip-path: polygon(20% 0, 100% 0, 100% 100%, 0% 100%);
    opacity: .92;
}
.hero .container { position: relative; z-index: 1; display: grid; grid-template-columns: 1.1fr 1fr; gap: 50px; align-items: center; }
.hero-tag {
    display: inline-flex; align-items: center; gap: 6px;
    background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.18);
    padding: 6px 14px; border-radius: 999px;
    font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase;
    color: #fff; margin-bottom: 18px;
}
.hero h1 { font-size: 48px; margin: 0 0 16px; font-weight: 800; line-height: 1.05; color: #fff; }
.hero p { font-size: 17px; opacity: .9; margin: 0 0 28px; max-width: 460px; }
.hero .cta-group { display: flex; gap: 10px; flex-wrap: wrap; }
.hero .btn-hero {
    background: var(--brand);
    color: #fff;
    padding: 14px 28px;
    border-radius: var(--radius);
    font-weight: 700; font-size: 15px;
    border: 0;
    display: inline-flex; align-items: center; gap: 10px;
    transition: all var(--transition);
}
.hero .btn-hero:hover { background: var(--brand-dark); color: #fff; text-decoration: none; transform: translateY(-1px); }
.hero .btn-hero-outline {
    background: transparent;
    color: #fff;
    border: 1.5px solid rgba(255,255,255,.4);
    padding: 14px 28px;
    border-radius: var(--radius);
    font-weight: 600; font-size: 15px;
    display: inline-flex; align-items: center; gap: 10px;
    transition: all var(--transition);
}
.hero .btn-hero-outline:hover { background: rgba(255,255,255,.1); color: #fff; text-decoration: none; }

.hero .cat-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.hero .cat-card {
    background: rgba(255,255,255,.08);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,.15);
    color: #fff; padding: 22px;
    border-radius: var(--radius-lg);
    text-decoration: none;
    transition: all var(--transition);
    display: flex; flex-direction: column; gap: 10px;
}
.hero .cat-card:hover {
    background: rgba(255,255,255,.15);
    border-color: rgba(255,255,255,.3);
    color: #fff; text-decoration: none; transform: translateY(-3px);
}
.hero .cat-card .ico-circle {
    width: 44px; height: 44px;
    background: rgba(255,255,255,.1);
    border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    color: #fff;
}
.hero .cat-card h3 { margin: 0; color: #fff; font-size: 18px; }
.hero .cat-card p { margin: 0; opacity: .8; font-size: 13px; max-width: none; }

/* ===================== Sections ===================== */
.page-pad { padding: 28px 0; }

section.block {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 18px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
}
.block h2 { margin: 0 0 18px; font-size: 22px; font-weight: 700; color: var(--ink); }
.block .header-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; gap: 12px; }
.block .header-row h2 { margin: 0; }
.section-title { display: flex; align-items: center; gap: 10px; }
.section-title .ico { color: var(--brand); }

.cta-banner {
    background: linear-gradient(135deg, var(--ink) 0%, var(--ink-soft) 100%);
    color: #fff;
    border: 1px solid var(--ink-soft);
    border-left: 4px solid var(--brand);
    padding: 22px 26px;
    border-radius: var(--radius-lg);
    margin-bottom: 18px;
    display: flex; align-items: center; justify-content: space-between; gap: 20px;
    flex-wrap: wrap;
}
.cta-banner h3 { margin: 0; color: #fff; font-size: 17px; }
.cta-banner p { margin: 4px 0 0; color: var(--text-on-dark-muted); font-size: 14px; }

/* ===================== Product Grid ===================== */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
}
.product-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 16px;
    transition: all var(--transition);
    display: flex; flex-direction: column;
    text-decoration: none;
    color: var(--text);
    position: relative;
}
.product-card:hover {
    border-color: var(--brand);
    box-shadow: var(--shadow-lg);
    text-decoration: none;
    color: var(--text);
    transform: translateY(-2px);
}
.product-card .image {
    aspect-ratio: 1; background: var(--gray-100); border-radius: var(--radius);
    margin-bottom: 14px; display: flex; align-items: center; justify-content: center;
    overflow: hidden;
}
.product-card .image img { max-width: 88%; max-height: 88%; object-fit: contain; }
.product-card .name {
    font-size: 14px; font-weight: 600; margin: 0 0 6px;
    color: var(--ink);
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
    overflow: hidden; min-height: 2.6em; line-height: 1.3;
}
.product-card .brand { font-size: 11px; color: var(--text-muted); margin-bottom: 6px; text-transform: uppercase; letter-spacing: .05em; font-weight: 600; }
.product-card .price {
    color: var(--price); font-size: 20px; font-weight: 800; margin-top: auto; padding-top: 8px;
}
.product-card .price .currency { font-size: 12px; vertical-align: super; font-weight: 600; margin-right: 2px; }
.product-card .price-locked {
    background: var(--gray-100); color: var(--ink);
    padding: 8px 10px; border-radius: var(--radius);
    font-size: 12px; font-weight: 600;
    margin-top: auto;
    display: inline-flex; align-items: center; gap: 6px;
}
.product-card .price-locked .ico { color: var(--brand); }
.product-card .stock-badge {
    font-size: 11px; color: var(--success); margin-top: 6px; display: inline-flex; align-items: center; gap: 4px;
    font-weight: 600;
}
.product-card .stock-badge.low { color: var(--warning); }
.product-card .stock-badge.out { color: var(--danger); }

.product-card .featured-tag {
    position: absolute; top: 10px; left: 10px;
    background: var(--brand); color: #fff;
    font-size: 10px; font-weight: 700;
    padding: 4px 10px; border-radius: 999px;
    text-transform: uppercase; letter-spacing: .04em;
    display: inline-flex; align-items: center; gap: 4px;
    z-index: 1;
}

/* ===================== Category tile ===================== */
.cat-tile {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius-lg); padding: 22px; text-decoration: none;
    color: var(--text); transition: all var(--transition);
    display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px;
    aspect-ratio: 1.4;
}
.cat-tile:hover {
    border-color: var(--brand); transform: translateY(-3px);
    box-shadow: var(--shadow-lg); color: var(--brand); text-decoration: none;
}
.cat-tile .ico-bg {
    width: 56px; height: 56px; border-radius: 50%;
    background: var(--brand-soft); color: var(--brand);
    display: inline-flex; align-items: center; justify-content: center;
}
.cat-tile .name { font-weight: 700; font-size: 14px; color: var(--ink); }
.cat-tile:hover .name { color: var(--brand); }

/* ===================== Product Detail ===================== */
.product-detail {
    display: grid;
    grid-template-columns: 1fr 1.3fr 320px;
    gap: 28px;
    background: var(--bg-card);
    padding: 28px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
}
.product-detail .gallery .main {
    background: var(--gray-100); padding: 24px; border-radius: var(--radius-lg);
    aspect-ratio: 1; display: flex; align-items: center; justify-content: center;
    margin-bottom: 12px;
}
.product-detail .gallery .main img { max-width: 100%; max-height: 100%; object-fit: contain; }
.product-detail .gallery .thumbs { display: flex; gap: 8px; }
.product-detail .gallery .thumbs img {
    width: 64px; height: 64px; object-fit: contain;
    border: 2px solid var(--border); border-radius: var(--radius); cursor: pointer;
    padding: 4px; background: #fff;
    transition: border-color var(--transition);
}
.product-detail .gallery .thumbs img:hover, .product-detail .gallery .thumbs img.active { border-color: var(--brand); }

.product-detail .info h1 { font-size: 26px; margin: 0 0 8px; }
.product-detail .info .brand-line { color: var(--brand); font-size: 13px; margin-bottom: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
.product-detail .info .sku { font-size: 12px; color: var(--text-muted); font-family: 'SF Mono', Menlo, monospace; }
.product-detail .info .price {
    font-size: 32px; color: var(--price); font-weight: 800; margin: 18px 0 8px;
}
.product-detail .info .price .currency { font-size: 16px; vertical-align: super; font-weight: 600; }
.product-detail .info .description { margin-top: 18px; font-size: 14px; color: var(--gray-700); line-height: 1.65; }

.attribute-block { margin: 16px 0; }
.attribute-block label { font-weight: 700; display: block; margin-bottom: 8px; color: var(--ink); }
.attribute-options { display: flex; gap: 8px; flex-wrap: wrap; }
.attribute-options button {
    background: #fff; border: 1.5px solid var(--border-strong); padding: 9px 16px;
    border-radius: var(--radius); font-size: 13px; font-weight: 600;
    color: var(--ink);
    transition: all var(--transition);
}
.attribute-options button:hover { border-color: var(--brand); color: var(--brand); }
.attribute-options button.selected {
    background: var(--brand); color: #fff; border-color: var(--brand);
}
.attribute-options button:disabled {
    opacity: .4; cursor: not-allowed; text-decoration: line-through;
}

.buy-box {
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 22px;
    background: var(--bg-card);
    height: fit-content;
    position: sticky; top: calc(var(--header-h) + 50px);
}
.buy-box .price-big { color: var(--price); font-size: 30px; font-weight: 800; }
.buy-box .price-big .currency { font-size: 14px; vertical-align: super; font-weight: 600; }
.buy-box .stock-line { margin: 12px 0; font-size: 14px; display: flex; align-items: center; gap: 8px; }
.buy-box .stock-line.in { color: var(--success); font-weight: 700; }
.buy-box .stock-line.out { color: var(--danger); font-weight: 700; }
.buy-box .qty-row { display: flex; align-items: center; gap: 8px; margin: 16px 0; }
.buy-box .qty-row label { font-weight: 600; }
.qty-input { display: flex; align-items: center; border: 1px solid var(--border-strong); border-radius: var(--radius); overflow: hidden; }
.qty-input button { background: var(--gray-100); border: 0; padding: 8px 12px; color: var(--ink); }
.qty-input button:hover { background: var(--gray-200); }
.qty-input input { width: 60px; border: 0; text-align: center; font-weight: 600; padding: 8px; outline: none; }

/* ===================== Buttons ===================== */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 10px 18px;
    border-radius: var(--radius);
    border: 1px solid var(--border-strong);
    font-size: 14px; font-weight: 600;
    background: var(--bg-card);
    color: var(--ink);
    text-align: center;
    transition: all var(--transition);
    cursor: pointer;
    text-decoration: none;
    line-height: 1.2;
}
.btn:hover { background: var(--gray-100); text-decoration: none; color: var(--ink); }
.btn-primary {
    background: var(--brand); color: #fff !important;
    border-color: var(--brand);
}
.btn-primary:hover { background: var(--brand-dark); border-color: var(--brand-dark); color: #fff !important; }
.btn-dark { background: var(--ink); color: #fff !important; border-color: var(--ink); }
.btn-dark:hover { background: var(--ink-soft); color: #fff !important; }
.btn-outline { background: transparent; border-color: var(--border-strong); color: var(--ink); }
.btn-outline:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-soft); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--ink); }
.btn-ghost:hover { background: var(--gray-100); }
.btn-success { background: var(--success); color: #fff !important; border-color: var(--success); }
.btn-danger { background: var(--danger); color: #fff !important; border-color: var(--danger); }
.btn-danger:hover { background: #8b1414; color: #fff !important; }
.btn-sm { padding: 6px 12px; font-size: 12px; gap: 5px; }
.btn-lg { padding: 14px 28px; font-size: 15px; }
.btn-block { width: 100%; display: inline-flex; }
.btn-icon-only { padding: 8px; }
.btn:disabled { opacity: .5; cursor: not-allowed; pointer-events: none; }

/* ===================== Forms ===================== */
.form-group { margin-bottom: 16px; }
.form-group label { display: block; margin-bottom: 6px; font-weight: 600; font-size: 13px; color: var(--ink); }
.form-control {
    width: 100%;
    padding: 11px 13px;
    border: 1.5px solid var(--border-strong);
    border-radius: var(--radius);
    font-size: 14px;
    background: #fff;
    color: var(--ink);
    transition: all var(--transition);
    font-family: inherit;
}
.form-control:focus {
    outline: none; border-color: var(--brand);
    box-shadow: 0 0 0 3px var(--brand-soft);
}
.form-control:disabled { background: var(--gray-100); color: var(--text-muted); }
textarea.form-control { resize: vertical; min-height: 90px; }
.form-row { display: grid; gap: 14px; grid-template-columns: 1fr 1fr; }
.help-text { font-size: 12px; color: var(--text-muted); margin-top: 4px; }
.checkbox-row { display: flex; align-items: center; gap: 10px; }
.checkbox-row input[type=checkbox] { width: 17px; height: 17px; accent-color: var(--brand); }
.checkbox-row label { margin: 0; }

/* ===================== Alerts ===================== */
.alert {
    padding: 12px 16px;
    border-radius: var(--radius);
    margin-bottom: 14px;
    border-left: 4px solid;
    font-size: 14px;
    display: flex; gap: 10px; align-items: flex-start;
}
.alert .ico { flex-shrink: 0; margin-top: 2px; }
.alert-success { background: var(--success-soft); border-color: var(--success); color: #14532D; }
.alert-warning { background: var(--warning-soft); border-color: var(--warning); color: #78350F; }
.alert-error   { background: var(--danger-soft); border-color: var(--danger); color: #7F1D1D; }
.alert-info    { background: var(--info-soft); border-color: var(--info); color: #1E3A8A; }

/* ===================== Breadcrumb ===================== */
.breadcrumb {
    display: flex; gap: 6px; font-size: 13px; padding: 16px 0 8px;
    color: var(--text-muted); flex-wrap: wrap; align-items: center;
}
.breadcrumb a { color: var(--gray-700); }
.breadcrumb a:hover { color: var(--brand); }
.breadcrumb .sep { color: var(--gray-400); display: inline-flex; align-items: center; }
.breadcrumb .current { color: var(--ink); font-weight: 600; }

/* ===================== Footer ===================== */
footer.site-footer {
    background: var(--ink);
    color: var(--text-on-dark);
    padding: 50px 0 0;
    margin-top: 50px;
}
footer.site-footer .cols { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 40px; padding-bottom: 40px; }
footer.site-footer h4 { margin: 0 0 16px; font-size: 14px; color: #fff; text-transform: uppercase; letter-spacing: .06em; }
footer.site-footer ul { list-style: none; padding: 0; margin: 0; }
footer.site-footer li { margin-bottom: 10px; display: flex; align-items: center; gap: 8px; }
footer.site-footer a { color: var(--text-on-dark-muted); font-size: 13px; }
footer.site-footer a:hover { color: #fff; }
footer.site-footer li .ico { color: var(--brand-light); flex-shrink: 0; }
footer.site-footer .legal {
    background: var(--bg-darker); padding: 18px 0; text-align: center;
    font-size: 12px; color: var(--text-on-dark-muted);
}
footer .logo-foot img { height: 60px; margin-bottom: 14px; }
footer .about { color: var(--text-on-dark-muted); font-size: 13px; line-height: 1.6; max-width: 320px; }
footer .socials { display: flex; gap: 10px; margin-top: 16px; }
footer .socials a {
    width: 36px; height: 36px; border-radius: 50%;
    background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12);
    display: inline-flex; align-items: center; justify-content: center;
    color: #fff;
    transition: all var(--transition);
}
footer .socials a:hover { background: var(--brand); border-color: var(--brand); }

/* ===================== Cart ===================== */
.cart-layout { display: grid; grid-template-columns: 1fr 340px; gap: 22px; align-items: start; }
.cart-list { background: var(--bg-card); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); border: 1px solid var(--border); }
.cart-item {
    display: grid;
    grid-template-columns: 100px 1fr auto 110px;
    gap: 18px;
    padding: 18px;
    border-bottom: 1px solid var(--border);
    align-items: center;
}
.cart-item:last-child { border-bottom: 0; }
.cart-item .img { width: 100px; height: 100px; background: var(--gray-100); border-radius: var(--radius); display: flex; align-items: center; justify-content: center; }
.cart-item .img img { max-width: 90%; max-height: 90%; }
.cart-item .name { font-weight: 600; color: var(--ink); }
.cart-item .name a { color: var(--ink); }
.cart-item .name a:hover { color: var(--brand); }
.cart-item .meta { font-size: 12px; color: var(--text-muted); margin-top: 3px; }
.cart-item .qty input { width: 56px; padding: 7px; text-align: center; border: 1px solid var(--border-strong); border-radius: var(--radius); font-weight: 600; }
.cart-item .price { font-weight: 800; color: var(--price); text-align: right; font-size: 16px; }

.cart-summary {
    background: var(--bg-card); border-radius: var(--radius-lg); padding: 22px;
    box-shadow: var(--shadow-sm); border: 1px solid var(--border);
    position: sticky; top: calc(var(--header-h) + 20px);
}
.cart-summary .row { display: flex; justify-content: space-between; padding: 8px 0; }
.cart-summary .row.total { font-size: 18px; font-weight: 800; border-top: 1.5px solid var(--border); padding-top: 14px; margin-top: 8px; color: var(--ink); }
.cart-summary .row.total .ico-price { color: var(--price); }

/* ===================== Auth (split-screen) ===================== */
.auth-split {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1fr 1fr;
}
.auth-split .auth-brand {
    background: var(--ink);
    color: #fff;
    padding: 60px 60px;
    display: flex; flex-direction: column; justify-content: space-between;
    position: relative;
    overflow: hidden;
}
.auth-split .auth-brand::before {
    content: ''; position: absolute; inset: 0;
    background: radial-gradient(circle at 80% 20%, rgba(200,32,46,.35) 0%, transparent 60%),
                radial-gradient(circle at 20% 80%, rgba(200,32,46,.18) 0%, transparent 50%);
    pointer-events: none;
}
.auth-split .auth-brand > * { position: relative; z-index: 1; }
.auth-split .auth-brand .logo-block img { height: 78px; margin-bottom: 22px; }
.auth-split .auth-brand h2 { font-size: 36px; line-height: 1.15; color: #fff; margin: 0 0 14px; }
.auth-split .auth-brand p { color: var(--text-on-dark-muted); font-size: 15px; max-width: 420px; line-height: 1.65; }
.auth-split .auth-brand .features { list-style: none; padding: 0; margin: 30px 0 0; display: grid; gap: 14px; }
.auth-split .auth-brand .features li {
    display: flex; gap: 12px; align-items: flex-start;
    font-size: 14px; color: rgba(255,255,255,.92);
}
.auth-split .auth-brand .features li .ico {
    color: var(--brand-light); background: rgba(200,32,46,.18);
    padding: 6px; border-radius: 50%; flex-shrink: 0;
}
.auth-split .auth-brand .foot {
    color: var(--text-on-dark-muted); font-size: 12px;
}

.auth-split .auth-form {
    padding: 60px 60px;
    display: flex; flex-direction: column; justify-content: center;
    background: #fff;
}
.auth-split .auth-form-inner { max-width: 420px; width: 100%; margin: 0 auto; }
.auth-split .auth-form h1 { font-size: 28px; margin: 0 0 8px; }
.auth-split .auth-form .subhead { color: var(--text-muted); font-size: 14px; margin-bottom: 26px; }
.auth-split .auth-form .alt {
    margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--border);
    font-size: 13px; text-align: center; color: var(--text-muted);
}

/* ===================== Sidebar (catalog) ===================== */
.catalog-layout {
    display: grid; grid-template-columns: 260px 1fr; gap: 22px;
}
.sidebar {
    background: var(--bg-card); border-radius: var(--radius-lg); padding: 20px;
    box-shadow: var(--shadow-sm); height: fit-content; border: 1px solid var(--border);
}
.sidebar h4 {
    margin: 0 0 12px; font-size: 12px; text-transform: uppercase;
    color: var(--text-muted); letter-spacing: .08em; font-weight: 700;
}
.sidebar ul { list-style: none; padding: 0; margin: 0 0 22px; }
.sidebar li a {
    display: flex; align-items: center; gap: 6px;
    padding: 7px 0; color: var(--ink); font-size: 14px;
    transition: color var(--transition);
}
.sidebar li a.active { color: var(--brand); font-weight: 700; }
.sidebar li a:hover { color: var(--brand); text-decoration: none; }

/* Page banner para categoría */
.page-banner {
    background: linear-gradient(135deg, var(--ink) 0%, var(--brand-darker) 100%);
    color: #fff; padding: 32px 26px; border-radius: var(--radius-lg);
    margin-bottom: 18px;
}
.page-banner h1 { color: #fff; margin: 0; font-size: 28px; }
.page-banner p { color: rgba(255,255,255,.85); margin: 6px 0 0; }

/* ===================== Admin layout ===================== */
.admin-wrap { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.admin-side {
    background: var(--ink);
    color: #fff;
    padding: 0; position: sticky; top: 0; height: 100vh; overflow-y: auto;
    border-right: 1px solid var(--ink-soft);
}
.admin-side .brand { padding: 20px 20px 16px; border-bottom: 1px solid rgba(255,255,255,.08); }
.admin-side .brand img { height: 44px; }
.admin-side nav { padding: 14px 0; }
.admin-side nav a {
    display: flex; align-items: center; gap: 12px;
    padding: 11px 20px; color: rgba(255,255,255,.7); text-decoration: none;
    border-left: 3px solid transparent;
    transition: all var(--transition); font-size: 14px; font-weight: 500;
}
.admin-side nav a:hover { background: rgba(255,255,255,.04); color: #fff; }
.admin-side nav a.active {
    background: rgba(200,32,46,.18); color: #fff; border-left-color: var(--brand); font-weight: 600;
}
.admin-side nav a .ico { flex-shrink: 0; color: inherit; }
.admin-side nav .sep { height: 1px; background: rgba(255,255,255,.06); margin: 10px 20px; }

.admin-main { padding: 24px 32px; background: var(--bg); min-width: 0; overflow-x: hidden; }
.admin-main > *, .admin-main > * > * { min-width: 0; }
.admin-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; flex-wrap: wrap; gap: 12px; }
.admin-header h1 { margin: 0; font-size: 24px; display: flex; align-items: center; gap: 12px; }
.admin-header h1 .ico { color: var(--brand); }
.admin-card {
    background: var(--bg-card); border-radius: var(--radius-lg);
    padding: 22px; box-shadow: var(--shadow-sm); margin-bottom: 18px;
    border: 1px solid var(--border);
}
.admin-card h2 { margin: 0 0 14px; font-size: 17px; }

.kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 22px; }
.kpi {
    background: var(--bg-card); border-radius: var(--radius-lg);
    padding: 18px 18px 16px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    border-top: 3px solid var(--brand);
    display: flex; flex-direction: column; gap: 4px;
    min-width: 0; overflow: hidden;
}
.kpi .label { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: .06em; font-weight: 600; display: flex; align-items: center; gap: 6px; }
.kpi .val { font-size: 28px; font-weight: 800; color: var(--ink); line-height: 1.1; }
.kpi .sub { font-size: 12px; color: var(--text-muted); }
.kpi.warn { border-top-color: var(--warning); }
.kpi.success { border-top-color: var(--success); }
.kpi.info { border-top-color: var(--info); }

/* Admin mobile menu */
.admin-mobile-bar {
    display: none;
    background: var(--ink); color: #fff;
    padding: 12px 16px;
    align-items: center; justify-content: space-between;
    position: sticky; top: 0; z-index: 99;
}
.admin-mobile-bar .brand img { height: 32px; }
.admin-mobile-bar button { background: transparent; border: 1px solid rgba(255,255,255,.2); color: #fff; padding: 8px; border-radius: var(--radius); }

/* ===================== Tables ===================== */
table.table {
    width: 100%; border-collapse: collapse; background: var(--bg-card);
    border-radius: var(--radius-lg); overflow: hidden;
}
table.table th, table.table td { padding: 13px 14px; text-align: left; border-bottom: 1px solid var(--border); font-size: 13px; vertical-align: middle; }
table.table th { background: var(--gray-50); font-weight: 700; color: var(--text-muted); font-size: 11px; text-transform: uppercase; letter-spacing: .06em; }
table.table tr:last-child td { border-bottom: 0; }
table.table tr:hover { background: var(--gray-50); }
table.table code { background: var(--gray-100); padding: 2px 6px; border-radius: 3px; font-size: 12px; }

.badge {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 3px 10px; border-radius: 999px;
    font-size: 11px; font-weight: 700; text-transform: uppercase;
    letter-spacing: .04em;
}
.badge.success { background: var(--success-soft); color: var(--success); }
.badge.warning { background: var(--warning-soft); color: var(--warning); }
.badge.danger  { background: var(--danger-soft); color: var(--danger); }
.badge.info    { background: var(--info-soft); color: var(--info); }
.badge.muted   { background: var(--gray-200); color: var(--gray-700); }

/* ===================== Pagination ===================== */
.pagination { display: flex; gap: 4px; justify-content: center; margin: 24px 0; }
.pagination a, .pagination span {
    padding: 8px 14px; border: 1px solid var(--border-strong);
    border-radius: var(--radius); color: var(--ink); font-size: 13px;
    font-weight: 600;
}
.pagination a:hover { background: var(--brand); color: #fff; border-color: var(--brand); text-decoration: none; }
.pagination .current { background: var(--brand); color: #fff; border-color: var(--brand); }

/* ===================== Utilities ===================== */
.text-muted { color: var(--text-muted); }
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-brand { color: var(--brand); }
.text-price { color: var(--price); font-weight: 700; }
.mt-1 { margin-top: 6px; } .mt-2 { margin-top: 12px; } .mt-3 { margin-top: 20px; } .mt-4 { margin-top: 30px; }
.mb-1 { margin-bottom: 6px; } .mb-2 { margin-bottom: 12px; } .mb-3 { margin-bottom: 20px; } .mb-4 { margin-bottom: 30px; }
.flex { display: flex; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.flex-center { display: flex; align-items: center; gap: 8px; }
.gap-1 { gap: 6px; } .gap-2 { gap: 12px; } .gap-3 { gap: 20px; }
.hidden { display: none !important; }
.full-width { width: 100%; }
.no-wrap { white-space: nowrap; }

/* ===================== Responsive ===================== */
@media (max-width: 1100px) {
    .product-detail { grid-template-columns: 1fr 1fr; }
    .product-detail .buy-box { grid-column: span 2; position: static; }
    footer.site-footer .cols { grid-template-columns: repeat(2, 1fr); gap: 28px; }
    .hero h1 { font-size: 38px; }
    .hero { padding: 44px 0; }
    .auth-split { grid-template-columns: 1fr; }
    .auth-split .auth-brand { padding: 40px 30px; min-height: 240px; }
    .auth-split .auth-brand .features { display: none; }
    .auth-split .auth-form { padding: 40px 24px; }
}

@media (max-width: 900px) {
    .catalog-layout { grid-template-columns: 1fr; }
    .sidebar { position: static; order: 2; }
    .cart-layout { grid-template-columns: 1fr; }
    .kpi-grid { grid-template-columns: repeat(2, 1fr); }

    /* Grids de 2 columnas en admin (cualquier inline-style con fr) */
    .admin-main div[style*="grid-template-columns"] {
        grid-template-columns: 1fr !important;
    }
}

@media (max-width: 760px) {
    .container { padding: 0 14px; }
    .topbar { flex-wrap: wrap; padding: 10px 14px; gap: 10px; }
    .topbar .logo img { height: 36px; }
    .topbar .search { order: 3; flex-basis: 100%; max-width: none; }
    .topbar .action .hello { display: none; }
    .topbar .actions { gap: 2px; margin-left: auto; }
    .topbar .action { padding: 6px 8px; }
    .topbar .cart span:not(.badge) { display: none; }

    .subnav { padding: 0 14px; }
    .subnav a { padding: 11px 12px; font-size: 12px; }

    .hero { padding: 36px 0; }
    .hero::before { display: none; }
    .hero { background: linear-gradient(135deg, var(--ink) 0%, var(--brand-darker) 100%); }
    .hero .container { grid-template-columns: 1fr; gap: 26px; }
    .hero h1 { font-size: 30px; }
    .hero p { font-size: 15px; }
    .hero .cat-cards { grid-template-columns: 1fr; gap: 10px; }
    .hero .cta-group { width: 100%; }
    .hero .btn-hero, .hero .btn-hero-outline { flex: 1; justify-content: center; }

    .product-detail { grid-template-columns: 1fr; padding: 18px; }
    .product-detail .buy-box { grid-column: span 1; }

    /* Cart items en mobile (card layout) */
    .cart-item {
        grid-template-columns: 80px 1fr;
        grid-template-rows: auto auto;
        gap: 12px;
        padding: 14px;
    }
    .cart-item .img { width: 80px; height: 80px; }
    .cart-item .qty, .cart-item .price { grid-column: span 2; }
    .cart-item .qty { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
    .cart-item .price { text-align: right; }

    .form-row { grid-template-columns: 1fr; }
    .kpi-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
    .kpi .val { font-size: 22px; }

    /* Admin sidebar → hamburger */
    .admin-wrap { grid-template-columns: 1fr; }
    .admin-mobile-bar { display: flex; }
    .admin-side {
        position: fixed; left: 0; top: 0; bottom: 0; width: 270px;
        transform: translateX(-100%);
        transition: transform .25s ease;
        z-index: 200;
        box-shadow: var(--shadow-lg);
    }
    .admin-side.open { transform: translateX(0); }
    .admin-side-backdrop {
        display: none; position: fixed; inset: 0;
        background: rgba(0,0,0,.5); z-index: 199;
    }
    .admin-side-backdrop.open { display: block; }
    .admin-main { padding: 18px 16px; }
    .admin-header h1 { font-size: 20px; }

    /* Tablas en mobile - scroll horizontal */
    .table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: var(--radius-lg); border: 1px solid var(--border); }
    .table-scroll table { min-width: 600px; }

    .page-banner h1 { font-size: 22px; }
    .product-card { padding: 12px; }
    .product-card .name { font-size: 13px; }
    .product-card .price { font-size: 17px; }

    .hidden-sm { display: none !important; }
}

@media (max-width: 420px) {
    .product-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
    .product-card .image { aspect-ratio: 1; }
    .hero h1 { font-size: 26px; }
    .auth-split .auth-form { padding: 30px 18px; }
}
