/* ============================================================
   Ducler Access — style.css
   Diseño propio "control de acceso digital": tema claro, acero
   metálico + circuitos + acento LED azul, siguiendo la línea del logo.
   Paleta: fondo #ffffff | superficie #ffffff | acero #5b6b85 | accent #2f5fd6
   ============================================================ */

/* ── Variables ── */
:root {
    --bg:          #ffffff;
    --bg-alt:      #f4f7fb;
    --surface:     #ffffff;
    --surface-2:   #f4f7fb;
    --border:      #e2e8f2;
    --border-soft: #edf1f8;

    --steel:       #5b6b85;
    --steel-dim:   #8a96ab;

    --accent:      #2f5fd6;
    --accent-bright:#4f8bff;
    --accent-dark: #1c3d8f;

    --ink:         #101b2b;
    --ink-dim:     #56637a;
    --white:       #ffffff;

    --success:     #16a34a;
    --danger:      #dc2626;
    --warning:     #d97706;

    --font-display:'Chakra Petch', 'Segoe UI', system-ui, sans-serif;
    --font-sans:   'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;

    --radius:      4px;
    --radius-lg:   4px;
    --notch:       14px;

    --shadow:      0 1px 3px rgba(16,27,43,.08), 0 1px 2px rgba(16,27,43,.05);
    --shadow-md:   0 6px 16px rgba(16,27,43,.10), 0 2px 6px rgba(16,27,43,.06);
    --shadow-lg:   0 16px 40px rgba(16,27,43,.14), 0 4px 12px rgba(16,27,43,.08);
    --glow:        0 0 0 3px rgba(47,95,214,.15);
    --transition:  .18s ease;
}

/* ── Reset base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
    font-family: var(--font-sans); font-size: 15px; color: var(--ink-dim);
    background: var(--bg);
    line-height: 1.6;
}
img  { max-width: 100%; height: auto; display: block; }
a    { color: var(--accent-bright); text-decoration: none; }
a:hover { color: var(--ink); }
ul   { list-style: none; }
button { cursor: pointer; font-family: inherit; border: none; background: none; }
h1, h2, h3, h4, .font-display { font-family: var(--font-display); color: var(--ink); letter-spacing: .01em; }

/* ── Notch (esquina cortada, motivo "tarjeta de acceso") ── */
.notched {
    clip-path: polygon(0 0, calc(100% - var(--notch)) 0, 100% var(--notch), 100% 100%, 0 100%);
}

/* ── Trama de circuito decorativa ── */
.circuit-bg {
    position: relative;
    background-image:
        linear-gradient(rgba(47,95,214,.10) 1px, transparent 1px),
        linear-gradient(90deg, rgba(47,95,214,.10) 1px, transparent 1px);
    background-size: 34px 34px;
    background-position: center;
}

/* ── Utilidades ── */
.container { max-width: 1280px; margin: 0 auto; padding: 0 16px; }
.sr-only   { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
.text-center { text-align: center; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-2 { margin-bottom: 16px; }
.gap-1 { gap: 8px; }

/* ── Botones ── */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    padding: 10px 22px; border-radius: var(--radius); font-size: .85rem;
    font-family: var(--font-display); font-weight: 600; letter-spacing: .04em; text-transform: uppercase;
    transition: background var(--transition), box-shadow var(--transition), border-color var(--transition), color var(--transition);
    border: 1.5px solid transparent;
    clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 0 100%);
}
.btn--primary   { background: var(--accent); color: var(--white); }
.btn--primary:hover { background: var(--accent-bright); box-shadow: var(--glow); }
.btn--secondary { background: var(--surface-2); color: var(--ink); border-color: var(--border); }
.btn--secondary:hover { border-color: var(--accent); color: var(--accent-bright); }
.btn--outline   { background: transparent; border-color: var(--accent); color: var(--accent-bright); }
.btn--outline:hover { background: rgba(47,95,214,.12); box-shadow: var(--glow); }
.btn--danger    { background: var(--danger); color: #2a0a0a; }
.btn--sm        { padding: 7px 16px; font-size: .74rem; }
.btn--block     { width: 100%; }
.btn:disabled   { opacity: .5; cursor: not-allowed; box-shadow: none; }

/* ── Topbar ── */
.topbar { background: var(--bg-alt); color: var(--steel-dim); font-size: .76rem; padding: 7px 0; border-bottom: 1px solid var(--border-soft); }
.topbar__inner { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 6px; }
.topbar a { color: var(--steel); }
.topbar a:hover { color: var(--accent-bright); }

/* ── Header ── */
.site-header {
    background: rgba(255,255,255,.92); backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 1px 0 rgba(47,95,214,.15);
    position: sticky; top: 0; z-index: 200;
}
.header__inner { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 16px; padding: 12px 16px; }
.header__logo img { height: 46px; width: auto; object-fit: contain; }

.header__search { display: flex; align-items: center; background: var(--surface); border: 1.5px solid var(--border); border-radius: var(--radius); overflow: hidden; transition: border-color var(--transition), box-shadow var(--transition); }
.header__search:focus-within { border-color: var(--accent); box-shadow: var(--glow); }
.header__search input { flex: 1; border: none; background: transparent; padding: 9px 16px; font-size: .9rem; outline: none; color: var(--ink); }
.header__search input::placeholder { color: var(--steel-dim); }
.header__search button { padding: 9px 14px; color: var(--steel); background: transparent; transition: color var(--transition); }
.header__search button:hover { color: var(--accent-bright); }
.mobile-search { display: none; padding: 8px 16px 10px; border-top: 1px solid var(--border-soft); }

.header__actions { display: flex; align-items: center; gap: 10px; }

/* ── Cart button ── */
.btn-cart { position: relative; padding: 8px; color: var(--steel); border-radius: var(--radius); transition: color var(--transition), background var(--transition); }
.btn-cart:hover { color: var(--accent-bright); background: var(--surface); }
.cart-badge { position: absolute; top: 2px; right: 2px; background: var(--accent); color: var(--white); font-size: .65rem; font-weight: 700; min-width: 17px; height: 17px; border-radius: 50%; display: flex; align-items: center; justify-content: center; box-shadow: 0 0 8px rgba(47,95,214,.7); }

/* ── Hamburger ── */
.btn-hamburger { display: none; flex-direction: column; gap: 5px; padding: 8px 6px; border-radius: var(--radius); }
.btn-hamburger span { display: block; width: 22px; height: 2px; background: var(--steel); border-radius: 2px; transition: transform .2s, opacity .2s; }
.btn-hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.btn-hamburger.open span:nth-child(2) { opacity: 0; }
.btn-hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Nav ── */
.site-nav { background: var(--bg-alt); border-bottom: 1px solid var(--border-soft); }
.nav__inner { }
.nav__list  {
    /* flex-wrap, NUNCA overflow-x/auto aquí: el mega-menú (nivel 2/3) es un hijo
       position:absolute de un <li> de esta lista — si el padre tuviera overflow-x,
       CSS fuerza overflow-y a 'auto' también y recortaría el panel al abrirse
       (mismo problema ya documentado en Tienda Serviteg con .cat-nav). */
    display: flex; align-items: stretch; flex-wrap: wrap;
}
.nav__list > li { flex: none; }
.nav__list > li > a {
    display: block; padding: 12px 18px; color: var(--steel); font-family: var(--font-display);
    font-size: .82rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
    border-bottom: 2px solid transparent; transition: color var(--transition), border-color var(--transition);
    white-space: nowrap;
}
.nav__list > li > a:hover,
.nav__list > li > a.active { color: var(--ink); border-color: var(--accent); }
.nav__list > li > a.active { color: var(--accent-bright); }

/* Dropdown */
.nav__dropdown { position: relative; }
.nav__dropdown-toggle { display: flex !important; align-items: center; gap: 4px; }
.nav__submenu { display: none; position: absolute; top: 100%; left: 0; min-width: 220px; background: var(--surface); border: 1px solid var(--border); border-top: 2px solid var(--accent); box-shadow: var(--shadow-lg); z-index: 300; }
.nav__dropdown:hover .nav__submenu { display: block; }
.nav__submenu li a { display: block; padding: 10px 16px; color: var(--ink-dim); font-size: .87rem; border-bottom: 1px solid var(--border-soft); transition: background var(--transition), color var(--transition); }
.nav__submenu li a:hover { background: var(--surface-2); color: var(--accent-bright); }
.nav__submenu-all a { color: var(--accent-bright) !important; font-weight: 600; }

/* Mega-menú (nivel 2/3, submenu del nav de categorías) */
.nav__submenu--mega {
    min-width: 640px; max-width: min(880px, 92vw); max-height: 70vh;
    overflow-y: auto; padding: 20px 24px;
}
.nav__dropdown:hover .nav__submenu--mega,
.nav__dropdown.open .nav__submenu--mega {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 18px 22px;
}
.nav__submenu-col-title {
    display: block; font-family: var(--font-display); font-weight: 700; font-size: .82rem;
    color: var(--ink); letter-spacing: .02em; margin-bottom: 8px; padding-bottom: 6px;
    border-bottom: 2px solid var(--border-soft);
}
.nav__submenu-col-title:hover { color: var(--accent-bright); }
.nav__submenu-link {
    display: block; font-size: .8rem; color: var(--ink-dim); padding: 4px 0; line-height: 1.3;
}
.nav__submenu-link:hover { color: var(--accent-bright); }
.nav__submenu--mega .nav__submenu-all {
    display: block; grid-column: 1 / -1; margin-top: 4px; padding-top: 14px;
    border-top: 1px solid var(--border-soft); color: var(--accent-bright); font-weight: 700; font-size: .85rem;
}

/* Acordeón de subcategorías (sidebar de categoria.php) */
.cat-sidebar-item { display: flex; align-items: center; justify-content: space-between; padding: 6px 0; gap: 6px; }
.cat-sidebar-caret {
    background: none; border: none; cursor: pointer; color: var(--steel-dim); font-size: .7rem;
    padding: 4px 6px; flex-shrink: 0; transition: transform .2s;
}
.cat-sidebar-caret.open { transform: rotate(180deg); }
.cat-sidebar-sub { max-height: 0; overflow: hidden; transition: max-height .25s ease; }
.cat-sidebar-sub.open { max-height: 1200px; }

/* ── Carrito Drawer ── */
.cart-overlay { position: fixed; inset: 0; background: rgba(2,5,10,.7); z-index: 400; opacity: 0; pointer-events: none; transition: opacity .2s; }
.cart-overlay.open { opacity: 1; pointer-events: all; }
.cart-drawer { position: fixed; top: 0; right: -380px; width: 360px; max-width: 95vw; height: 100vh; background: var(--bg-alt); border-left: 1px solid var(--border); z-index: 500; display: flex; flex-direction: column; box-shadow: var(--shadow-lg); transition: right .25s ease; }
.cart-drawer.open { right: 0; }
.cart-drawer__header { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; background: var(--surface); border-bottom: 1px solid var(--border); color: var(--ink); }
.cart-drawer__header h2 { font-size: 1rem; font-weight: 600; font-family: var(--font-display); }
.cart-drawer__close { color: var(--steel); font-size: 1.2rem; padding: 4px 8px; border-radius: var(--radius); }
.cart-drawer__close:hover { background: var(--surface-2); color: var(--ink); }
.cart-drawer__items { flex: 1; overflow-y: auto; padding: 16px; }
.cart-empty { color: var(--steel-dim); text-align: center; margin-top: 40px; }
.cart-drawer__footer { padding: 16px; border-top: 1px solid var(--border); }
.cart-subtotal { display: flex; justify-content: space-between; margin-bottom: 12px; font-size: .95rem; color: var(--ink-dim); }
.cart-subtotal strong { color: var(--accent-bright); font-size: 1.1rem; font-family: var(--font-display); }

/* Item carrito */
.cart-item { display: grid; grid-template-columns: 64px 1fr auto; gap: 10px; align-items: start; padding: 10px 0; border-bottom: 1px solid var(--border-soft); }
.cart-item__img { width: 64px; height: 64px; object-fit: contain; border-radius: var(--radius); background: var(--white); }
.cart-item__name { font-size: .85rem; font-weight: 500; line-height: 1.3; margin-bottom: 2px; color: var(--ink); }
.cart-item__modelo { font-size: .75rem; color: var(--steel-dim); margin-bottom: 4px; }
.cart-item__price { font-size: .9rem; color: var(--accent-bright); font-weight: 700; }
.cart-item__qty { display: flex; align-items: center; gap: 6px; margin-top: 6px; }
.cart-item__qty button { width: 24px; height: 24px; border-radius: 50%; background: var(--surface-2); color: var(--ink); font-weight: 700; display: flex; align-items: center; justify-content: center; font-size: .9rem; transition: background var(--transition); }
.cart-item__qty button:hover { background: var(--accent); color: var(--white); }
.cart-item__qty span { min-width: 20px; text-align: center; font-weight: 600; color: var(--ink); }
.cart-item__remove { color: var(--steel-dim); font-size: 1rem; align-self: start; padding: 2px 4px; }
.cart-item__remove:hover { color: var(--danger); }

/* ── Productos grid ── */
.products-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 20px; }

.product-card {
    background: var(--surface); border: 1px solid var(--border);
    overflow: hidden; display: flex; flex-direction: column;
    transition: box-shadow var(--transition), transform var(--transition), border-color var(--transition);
    clip-path: polygon(0 0, calc(100% - var(--notch)) 0, 100% var(--notch), 100% 100%, 0 100%);
}
.product-card:hover { box-shadow: var(--glow); transform: translateY(-2px); border-color: var(--accent); }
.product-card__img { aspect-ratio: 1; overflow: hidden; background: var(--white); }
.product-card__img img { width: 100%; height: 100%; object-fit: contain; padding: 12px; transition: transform .3s; }
.product-card:hover .product-card__img img { transform: scale(1.04); }
.product-card__body { padding: 14px; flex: 1; display: flex; flex-direction: column; gap: 6px; }
.product-card__brand { font-family: var(--font-display); font-size: .72rem; font-weight: 700; color: var(--accent-bright); text-transform: uppercase; letter-spacing: .08em; }
.product-card__name  { font-size: .88rem; font-weight: 500; color: var(--ink); line-height: 1.35; flex: 1; }
.product-card__price { font-family: var(--font-display); font-size: 1.15rem; font-weight: 700; color: var(--ink); }
.product-card__price-desc { font-size: .82rem; color: var(--accent-bright); font-weight: 600; }
.product-card__actions { padding: 12px 14px; border-top: 1px solid var(--border-soft); display: flex; gap: 8px; }
.product-card__actions .btn { flex: 1; font-size: .74rem; padding: 8px 10px; }

/* ── Producto detalle ── */
.product-detail { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }
.product-gallery { position: sticky; top: 80px; }
.product-gallery__main { aspect-ratio: 1; background: var(--white); border: 1px solid var(--border); overflow: hidden; margin-bottom: 12px; }
.product-gallery__main img { width: 100%; height: 100%; object-fit: contain; padding: 20px; }
.product-info__brand { font-family: var(--font-display); font-size: .8rem; font-weight: 700; color: var(--accent-bright); text-transform: uppercase; letter-spacing: .1em; margin-bottom: 8px; }
.product-info__name  { font-size: 1.6rem; font-weight: 700; color: var(--ink); line-height: 1.25; margin-bottom: 12px; }
.product-info__price { font-family: var(--font-display); font-size: 2rem; font-weight: 800; color: var(--accent-dark); margin-bottom: 8px; }
.product-info__price-desc { font-size: .9rem; color: var(--ink-dim); margin-bottom: 20px; }
.product-info__sku  { font-size: .8rem; color: var(--steel-dim); margin-bottom: 16px; }

/* ── Formularios ── */
.form-group { margin-bottom: 18px; }
.form-group label { display: block; margin-bottom: 5px; font-size: .87rem; font-weight: 600; color: var(--ink); }
.form-control { width: 100%; padding: 10px 14px; border: 1.5px solid var(--border); border-radius: var(--radius); font-size: .9rem; font-family: inherit; transition: border-color var(--transition), box-shadow var(--transition); background: var(--surface); color: var(--ink); }
.form-control::placeholder { color: var(--steel-dim); }
.form-control:focus { outline: none; border-color: var(--accent); box-shadow: var(--glow); }
textarea.form-control { resize: vertical; min-height: 100px; }
.form-error { color: var(--danger); font-size: .82rem; margin-top: 4px; }
.form-hint  { color: var(--steel-dim); font-size: .8rem; margin-top: 3px; }

/* ── Alertas ── */
.alert { padding: 12px 16px; border-radius: var(--radius); margin-bottom: 16px; font-size: .9rem; border-left: 3px solid transparent; background: var(--surface); }
.alert--success { border-color: var(--success); color: var(--success); }
.alert--danger  { border-color: var(--danger); color: var(--danger); }
.alert--warning { border-color: var(--warning); color: var(--warning); }
.alert--info    { border-color: var(--accent); color: var(--accent-bright); }

/* ── Page header ── */
.page-header { background: linear-gradient(135deg, var(--bg-alt) 0%, var(--surface) 100%); border-bottom: 1px solid var(--border); color: var(--ink); padding: 40px 0; margin-bottom: 32px; }
.page-header h1 { font-size: 1.8rem; font-weight: 700; margin-bottom: 6px; }
.page-header p   { color: var(--ink-dim); font-size: .95rem; }
.breadcrumb { font-size: .8rem; color: var(--steel-dim); margin-bottom: 10px; }
.breadcrumb a { color: var(--steel); }
.breadcrumb a:hover { color: var(--accent-bright); }
.breadcrumb span { margin: 0 6px; }

/* ── Filtros / Sidebar ── */
.catalog-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 28px; align-items: start; }
.filters-panel { background: var(--surface); border: 1px solid var(--border); padding: 20px; position: sticky; top: 85px; clip-path: polygon(0 0, calc(100% - var(--notch)) 0, 100% var(--notch), 100% 100%, 0 100%); }
.filters-panel h3 { font-size: .95rem; font-weight: 700; margin-bottom: 14px; border-bottom: 2px solid var(--accent); padding-bottom: 6px; }
.filter-group { margin-bottom: 20px; }
.filter-group label { font-size: .85rem; font-weight: 600; color: var(--ink); display: block; margin-bottom: 8px; }
.filter-option { display: flex; align-items: center; gap: 8px; padding: 4px 0; font-size: .85rem; color: var(--ink-dim); cursor: pointer; }
.filter-option input { accent-color: var(--accent); }

/* ── Paginación ── */
.pagination { display: flex; justify-content: center; gap: 6px; flex-wrap: wrap; margin-top: 32px; }
.pagination a, .pagination span { padding: 8px 14px; border-radius: var(--radius); font-size: .88rem; font-weight: 500; border: 1.5px solid var(--border); color: var(--ink-dim); transition: all var(--transition); }
.pagination a:hover  { background: var(--surface); border-color: var(--accent); color: var(--accent-bright); }
.pagination .active  { background: var(--accent); border-color: var(--accent); color: var(--white); }
.pagination .disabled { opacity: .4; pointer-events: none; }

/* ── Admin Layout ── */
.admin-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); min-height: 100vh; }
.admin-sidebar { background: var(--bg-alt); border-right: 1px solid var(--border); color: var(--ink); padding: 0; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.admin-sidebar__brand { padding: 20px 16px; border-bottom: 1px solid var(--border); font-family: var(--font-display); font-weight: 700; font-size: .95rem; color: var(--accent-bright); }
.admin-sidebar__brand span { display: block; font-size: .72rem; color: var(--steel-dim); font-weight: 400; margin-top: 2px; font-family: var(--font-sans); }
.admin-sidebar nav ul li a { display: flex; align-items: center; gap: 10px; padding: 11px 20px; color: var(--steel); font-size: .88rem; transition: background var(--transition), color var(--transition); border-left: 3px solid transparent; }
.admin-sidebar nav ul li a:hover,
.admin-sidebar nav ul li a.active { background: rgba(47,95,214,.14); color: var(--ink); border-left-color: var(--accent); }
.admin-sidebar nav ul li a svg { flex-shrink: 0; }
.admin-main { padding: 28px; background: var(--bg); }
.admin-page-title { font-size: 1.4rem; font-weight: 700; margin-bottom: 24px; display: flex; align-items: center; gap: 10px; }
.admin-card { background: var(--surface); border: 1px solid var(--border); padding: 20px; margin-bottom: 20px; clip-path: polygon(0 0, calc(100% - var(--notch)) 0, 100% var(--notch), 100% 100%, 0 100%); }
.admin-card__title { font-size: 1rem; font-weight: 600; color: var(--ink); margin-bottom: 16px; border-bottom: 2px solid var(--border-soft); padding-bottom: 8px; }
.table-wrapper { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .88rem; }
th, td { padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--border-soft); color: var(--ink-dim); }
th { background: var(--bg-alt); font-family: var(--font-display); font-weight: 600; color: var(--steel); font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; white-space: nowrap; }
tr:hover td { background: var(--surface-2); }
.badge { display: inline-block; padding: 3px 10px; border-radius: 50px; font-size: .7rem; font-weight: 700; letter-spacing: .04em; border: 1px solid transparent; }
.badge--success { background: rgba(52,211,153,.12); color: var(--success); border-color: rgba(52,211,153,.35); }
.badge--danger  { background: rgba(248,113,113,.12); color: var(--danger); border-color: rgba(248,113,113,.35); }
.badge--warning { background: rgba(251,191,36,.12); color: var(--warning); border-color: rgba(251,191,36,.35); }
.badge--info    { background: rgba(79,139,255,.12); color: var(--accent-bright); border-color: rgba(79,139,255,.35); }
.badge--gray    { background: var(--surface-2); color: var(--steel); border-color: var(--border); }

/* Hamburger admin móvil */
.admin-hamburger { display: none; }
.admin-sidebar-overlay { display: none; }
.site-nav-overlay { display: none; }

/* ── Checkout ── */
.checkout-grid { display: grid; grid-template-columns: 1fr 380px; gap: 28px; align-items: start; }
.checkout-summary { background: var(--surface); border: 1px solid var(--border); padding: 20px; position: sticky; top: 85px; clip-path: polygon(0 0, calc(100% - var(--notch)) 0, 100% var(--notch), 100% 100%, 0 100%); }
.checkout-summary__title { font-size: 1rem; font-weight: 700; color: var(--ink); margin-bottom: 16px; }
.checkout-item { display: flex; gap: 12px; align-items: start; padding: 10px 0; border-bottom: 1px solid var(--border-soft); }
.checkout-item img { width: 56px; height: 56px; object-fit: contain; background: var(--white); flex-shrink: 0; }
.checkout-totals { margin-top: 14px; color: var(--ink-dim); }
.checkout-totals tr td:last-child { text-align: right; font-weight: 600; }
.checkout-totals .total-row td { font-size: 1.1rem; font-weight: 700; color: var(--accent-bright); border-top: 2px solid var(--border); padding-top: 10px; }

/* ── Footer ── */
.site-footer { background: var(--bg-alt); border-top: 1px solid var(--border); color: var(--ink-dim); padding: 40px 0 20px; margin-top: 60px; }
.footer__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 32px; margin-bottom: 28px; }
.footer__col h4 { font-family: var(--font-display); color: var(--ink); font-size: .85rem; font-weight: 700; margin-bottom: 14px; letter-spacing: .06em; text-transform: uppercase; }
.footer__col ul li { margin-bottom: 6px; }
.footer__col ul li a { color: var(--steel); font-size: .85rem; transition: color var(--transition); }
.footer__col ul li a:hover { color: var(--accent-bright); }
.footer__bottom { border-top: 1px solid var(--border-soft); padding-top: 16px; text-align: center; font-size: .78rem; color: var(--steel-dim); }

/* ── Responsive ── */
/* Carrusel de imágenes de portada (admin/banners.php) */
.img-banner { position: relative; width: 100%; aspect-ratio: 16/5; overflow: hidden; background: var(--bg-alt); border-bottom: 1px solid var(--border); }
.img-banner__track { position: relative; width: 100%; height: 100%; }
.img-banner__slide { position: absolute; inset: 0; display: block; opacity: 0; visibility: hidden; transition: opacity .6s ease, visibility .6s; }
.img-banner__slide.active { opacity: 1; visibility: visible; z-index: 1; }
/* Imagen completa sin recorte en cualquier pantalla; las de 1920×600 (16:5) llenan la caja exacta */
.img-banner__slide img { width: 100%; height: 100%; object-fit: contain; display: block; }
.img-banner__dots { position: absolute; left: 0; right: 0; bottom: 14px; display: flex; justify-content: center; gap: 8px; z-index: 2; }
.img-banner__dot { width: 10px; height: 10px; border-radius: 50%; background: rgba(255,255,255,.6); border: 1.5px solid rgba(0,0,0,.2); padding: 0; cursor: pointer; }
.img-banner__dot.active { background: var(--accent); border-color: #fff; }
.img-banner__nav { position: absolute; top: 50%; transform: translateY(-50%); z-index: 2; width: 40px; height: 40px; border: 0; border-radius: 50%; background: rgba(16,27,43,.45); color: #fff; font-size: 1.6rem; line-height: 1; cursor: pointer; opacity: 0; transition: opacity .2s, background .2s; }
.img-banner:hover .img-banner__nav, .img-banner__nav:focus-visible { opacity: 1; }
.img-banner__nav:hover { background: rgba(16,27,43,.7); }
.img-banner__nav--prev { left: 14px; }
.img-banner__nav--next { right: 14px; }
@media (max-width: 640px) { .img-banner__nav { display: none; } .img-banner__dots { bottom: 6px; } .img-banner__dot { width: 7px; height: 7px; } }

@media (max-width: 900px) {
    .header__inner { grid-template-columns: auto auto; }
    .header__search { display: none; }
    .btn-hamburger  { display: flex; }
    .mobile-search  { display: block; }

    .site-nav { display: none; }
    .site-nav.open {
        display: block; position: fixed; top: 0; left: 0; width: 280px; height: 100vh;
        background: var(--bg-alt); border-right: 1px solid var(--border); z-index: 600; overflow-y: auto; padding-top: 60px; box-shadow: var(--shadow-lg);
    }
    .site-nav-overlay {
        display: block; position: fixed; inset: 0; background: rgba(16,27,43,.5); z-index: 590;
        opacity: 0; pointer-events: none; transition: opacity .2s;
    }
    .site-nav-overlay.open { opacity: 1; pointer-events: all; }
    .nav__list { flex-direction: column; }
    .nav__list > li { flex: initial; }
    .nav__list > li > a { padding: 14px 20px; color: var(--ink-dim); border-bottom: 1px solid var(--border-soft); white-space: normal; }
    .nav__submenu { position: static; display: none; background: var(--surface-2); box-shadow: none; border-top: none; border: none; }
    .nav__dropdown.open .nav__submenu { display: block; }

    /* Mega-menú en móvil: se apila en 1 columna dentro del drawer, sin grid */
    .nav__submenu--mega { min-width: 0; max-width: none; max-height: none; overflow: visible; padding: 4px 20px 12px; }
    .nav__dropdown.open .nav__submenu--mega { display: block; }
    .nav__submenu-col { margin-bottom: 14px; }
    .nav__submenu--mega .nav__submenu-all { border-top: 1px solid var(--border-soft); }

    .catalog-layout { grid-template-columns: 1fr; }
    .product-detail { grid-template-columns: 1fr; }
    .product-gallery { position: static; }
    .checkout-grid  { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    /* Admin responsive */
    .admin-layout { grid-template-columns: 1fr; }
    .admin-sidebar { position: fixed; left: -260px; width: 260px; top: 0; height: 100vh; z-index: 700; transition: left .25s; }
    .admin-sidebar.open { left: 0; }
    .admin-hamburger { display: flex; align-items: center; gap: 10px; padding: 14px 16px; background: var(--bg-alt); border-bottom: 1px solid var(--border); color: var(--ink); font-weight: 600; font-size: .9rem; }
    .admin-hamburger button { color: var(--ink); font-size: 1.3rem; }
    .admin-sidebar-overlay { display: block; position: fixed; inset: 0; background: rgba(2,5,10,.7); z-index: 690; opacity: 0; pointer-events: none; transition: opacity .2s; }
    .admin-sidebar-overlay.open { opacity: 1; pointer-events: all; }
    .admin-main { padding: 16px; }
    .products-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
}

@media (max-width: 480px) {
    .topbar__inner { justify-content: center; font-size: .72rem; }
    .page-header h1 { font-size: 1.4rem; }
    .products-grid  { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .footer__grid   { grid-template-columns: 1fr; }
}

/* ── Spinner ── */
.spinner { width: 36px; height: 36px; border: 3px solid var(--border); border-top-color: var(--accent-bright); border-radius: 50%; animation: spin .7s linear infinite; margin: 40px auto; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Skeleton ── */
.skeleton { background: linear-gradient(90deg, var(--surface) 25%, var(--surface-2) 50%, var(--surface) 75%); background-size: 200% 100%; animation: shimmer 1.4s infinite; border-radius: var(--radius); }
@keyframes shimmer { to { background-position: -200% 0; } }
