/* ═══════════════════════════════════════════════════════════════
   TIENDA PROFESIONAL — style.css
   Paleta premium oscura con acento naranja
═══════════════════════════════════════════════════════════════ */

:root {
    --primary:    #0f172a;
    --secondary:  #1e293b;
    --accent:     #f97316;
    --accent-dark:#ea580c;
    --light-bg:   #f8fafc;
    --border:     #e2e8f0;
    --muted:      #64748b;
    --dark:       #0f172a;
    --radius:     14px;
    --shadow:     0 2px 12px rgba(0,0,0,.07);
    --shadow-h:   0 8px 32px rgba(0,0,0,.13);
    --font:       'Segoe UI', system-ui, -apple-system, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

body {
    font-family: var(--font);
    background: var(--light-bg);
    color: #1e293b;
    margin: 0;
}

/* ─── NAVBAR ─────────────────────────────────────────────── */
.navbar-tienda {
    background: var(--primary) !important;
    padding: 0.75rem 0;
    position: sticky;
    top: 0;
    z-index: 1030;
    box-shadow: 0 2px 16px rgba(0,0,0,.25);
}

.navbar-tienda .navbar-brand {
    font-weight: 800;
    font-size: 1.4rem;
    color: #fff !important;
    letter-spacing: -0.5px;
}

.navbar-tienda .navbar-brand span {
    color: var(--accent);
}

.navbar-tienda .nav-link {
    color: rgba(255,255,255,.8) !important;
    font-weight: 500;
    font-size: 0.95rem;
    transition: color .2s;
    padding: 0.4rem 0.85rem !important;
    border-radius: 8px;
}

.navbar-tienda .nav-link:hover,
.navbar-tienda .nav-link.active {
    color: #fff !important;
    background: rgba(255,255,255,.1);
}

.navbar-tienda .navbar-toggler {
    border-color: rgba(255,255,255,.3);
}

.navbar-tienda .navbar-toggler-icon {
    filter: invert(1);
}

/* Cart button */
.cart-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--accent);
    color: #fff !important;
    border-radius: 10px;
    padding: 0.4rem 1rem !important;
    font-weight: 600;
    transition: background .2s;
    text-decoration: none;
}

.cart-btn:hover { background: var(--accent-dark) !important; color: #fff !important; }

.cart-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    background: #fff;
    color: var(--accent);
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 0.7rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

/* ─── TICKER ─────────────────────────────────────────────── */
.ticker-bar {
    background: var(--accent);
    color: #fff;
    padding: 0.55rem 0;
    overflow: hidden;
    font-size: 0.9rem;
    font-weight: 600;
}

.ticker-inner {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.ticker-label {
    white-space: nowrap;
    background: rgba(0,0,0,.18);
    padding: 2px 12px;
    border-radius: 20px;
    font-size: 0.82rem;
    flex-shrink: 0;
}

.ticker-message {
    flex: 1;
    overflow: hidden;
    min-height: 1.4em;
    position: relative;
}

.ticker-text {
    display: block;
    animation: tickerSlideUp 0.5s ease;
}

@keyframes tickerSlideUp {
    from { transform: translateY(100%); opacity: 0; }
    to   { transform: translateY(0);    opacity: 1; }
}

/* ─── HERO ───────────────────────────────────────────────── */
.hero-section {
    color: #fff;
    padding: 5rem 0 4rem;
    position: relative;
    overflow: hidden;
}
/* Fondo degradado sólo cuando NO hay imagen (las imágenes usan inline style) */
.hero-section:not(.has-hero-image) {
    background: linear-gradient(135deg, var(--primary) 0%, #1a2744 60%, #2d1f3a 100%);
}
/* Cuando hay imagen, aseguramos que la sección tenga color y tamaño mínimo */
.hero-section.has-hero-image {
    min-height: 520px;
    background-size: cover !important;
    background-position: center top !important;
    background-repeat: no-repeat !important;
}

.hero-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 70% 50%, rgba(249,115,22,.15) 0%, transparent 60%);
}

.hero-section .container { position: relative; }

.hero-title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 1rem;
}

.hero-title span { color: var(--accent); }

.hero-subtitle {
    font-size: 1.15rem;
    color: rgba(255,255,255,.75);
    margin-bottom: 2rem;
    max-width: 520px;
}

.btn-accent {
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 0.65rem 1.5rem;
    font-weight: 700;
    font-size: 0.95rem;
    transition: background .2s, transform .15s;
}

.btn-accent:hover {
    background: var(--accent-dark);
    color: #fff;
    transform: translateY(-1px);
}

.btn-outline-light-custom {
    background: transparent;
    color: #fff;
    border: 2px solid rgba(255,255,255,.4);
    border-radius: 10px;
    padding: 0.65rem 1.5rem;
    font-weight: 700;
    font-size: 0.95rem;
    transition: border-color .2s, background .2s;
    text-decoration: none;
    display: inline-block;
}

.btn-outline-light-custom:hover {
    border-color: #fff;
    background: rgba(255,255,255,.1);
    color: #fff;
}

/* ─── SECCIÓN TÍTULOS ────────────────────────────────────── */
.section-title {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--dark);
    margin-bottom: 0.3rem;
}

.section-subtitle {
    color: var(--muted);
    font-size: 0.95rem;
    margin-bottom: 2rem;
}

.section-divider {
    width: 48px;
    height: 4px;
    background: var(--accent);
    border-radius: 2px;
    margin-bottom: 0.5rem;
}

/* ─── CATEGORY CARDS ─────────────────────────────────────── */
.category-card {
    background: #fff;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform .2s, box-shadow .2s;
    text-decoration: none;
    display: block;
    color: inherit;
}

.category-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-h);
    color: inherit;
}

.category-img-wrap {
    height: 140px;
    background: var(--secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.category-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.category-img-placeholder {
    font-size: 3rem;
    color: rgba(255,255,255,.4);
}

.category-body {
    padding: 1rem;
}

.category-name {
    font-weight: 700;
    font-size: 1rem;
    margin: 0;
    color: var(--dark);
}

.category-desc {
    font-size: 0.82rem;
    color: var(--muted);
    margin: 0.25rem 0 0;
}

/* ─── PRODUCT CARDS ──────────────────────────────────────── */
.product-card {
    background: #fff;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform .2s, box-shadow .2s;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-h);
}

.product-img-wrap {
    position: relative;
    padding-top: 72%;
    background: #f1f5f9;
    overflow: hidden;
    border-radius: var(--radius) var(--radius) 0 0;
}

.product-img-wrap img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform .3s;
}

.product-card:hover .product-img-wrap img {
    transform: scale(1.04);
}

.product-img-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: #cbd5e1;
}

.badge-oferta {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--accent);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 800;
    padding: 3px 10px;
    border-radius: 20px;
    letter-spacing: 0.5px;
    z-index: 2;
}

.badge-stock-out {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #ef4444;
    color: #fff;
    font-size: 0.7rem;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: 20px;
    z-index: 2;
    letter-spacing: .4px;
    text-transform: uppercase;
    box-shadow: 0 2px 6px rgba(239,68,68,.35);
}

/* Imagen ligeramente grisada cuando sin stock */
.product-card.out-of-stock .product-img-wrap img,
.product-card.out-of-stock .product-img-wrap .product-img-placeholder {
    filter: grayscale(45%) opacity(.8);
}

/* Overlay sutil sobre la imagen */
.product-card.out-of-stock .product-img-wrap::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,.18);
    border-radius: inherit;
    z-index: 1;
    pointer-events: none;
}

.product-body {
    padding: 1rem 1rem 1.2rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.product-category-tag {
    display: inline-block;
    background: var(--dark);
    color: #fff;
    font-size: 0.68rem;
    font-weight: 700;
    padding: 2px 10px;
    border-radius: 20px;
    margin-bottom: 0.5rem;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

.product-name {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 0.5rem;
    line-height: 1.3;
    flex: 1;
}

.product-price {
    margin-bottom: 0.75rem;
    display: flex;
    align-items: baseline;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.price-current {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--accent);
}

.price-old {
    font-size: 0.85rem;
    color: #94a3b8;
    text-decoration: line-through;
}

.product-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    margin-top: auto;
}

.product-actions .btn {
    border-radius: 8px;
    font-size: 0.82rem;
    font-weight: 600;
    padding: 0.4rem 0.85rem;
}

.product-actions .btn-cart {
    background: var(--accent);
    color: #fff;
    border: none;
    transition: background .2s;
}

.product-actions .btn-cart:hover {
    background: var(--accent-dark);
    color: #fff;
}

/* ─── PRODUCT CARD RELACIONADOS (smaller) ────────────────── */
/* Precio en gris metalizado (distinto del acento) para no competir con el botón */
.product-card-sm .price-current {
    color: #64748b;
    font-size: .9rem;
    font-weight: 700;
    background: linear-gradient(135deg, #94a3b8 0%, #64748b 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.product-card-sm .price-old {
    font-size: .72rem;
    color: #94a3b8;
    text-decoration: line-through;
    -webkit-text-fill-color: #94a3b8;
}

/* Placeholder de imagen centrado */
.product-img-placeholder-sm {
    width: 100%;
    aspect-ratio: 1/1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}
.product-img-placeholder-sm .placeholder-dots {
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle, rgba(255,255,255,.12) 1px, transparent 1px);
    background-size: 12px 12px;
}
.product-img-placeholder-sm .placeholder-name {
    position: relative;
    z-index: 1;
    color: #fff;
    font-weight: 700;
    font-size: .7rem;
    text-align: center;
    padding: .4rem;
    text-shadow: 0 1px 4px rgba(0,0,0,.5);
    line-height: 1.3;
    word-break: break-word;
}

.product-card-sm {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform .2s, box-shadow .2s;
    display: flex;
    flex-direction: column;
}

.product-card-sm:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-h);
}

.product-img-wrap-sm {
    width: 100%;
    aspect-ratio: 1/1;
    background: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: var(--radius) var(--radius) 0 0;
}

.product-img-wrap-sm img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    object-position: center;
}

.product-body-sm {
    padding: 0.75rem;
}

/* ─── BREADCRUMB PILLS ───────────────────────────────────── */
.breadcrumb-pills {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-wrap: wrap;
    list-style: none;
    padding: 0.5rem 0;
    margin: 0 0 1.5rem;
}

.breadcrumb-pills li {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.breadcrumb-pills a {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    background: var(--light-bg, #f1f5f9);
    color: var(--muted, #64748b);
    border: 1px solid var(--border, #e2e8f0);
    font-size: 0.78rem;
    font-weight: 600;
    padding: 4px 14px;
    padding: 4px 12px;
    border-radius: 999px;
    text-decoration: none;
    transition: background .18s, color .18s, border-color .18s, box-shadow .18s;
    white-space: nowrap;
}

.breadcrumb-pills a:hover {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
    box-shadow: 0 2px 8px rgba(var(--accent-rgb, 249,115,22),.25);
}

.breadcrumb-pills .active span {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    background: var(--accent);
    color: #fff;
    border: 1px solid var(--accent);
    font-size: 0.78rem;
    font-weight: 700;
    padding: 4px 14px;
    border-radius: 999px;
    box-shadow: 0 2px 8px rgba(var(--accent-rgb, 249,115,22),.2);
    white-space: nowrap;
}

.breadcrumb-pills .separator {
    color: #94a3b8;
    font-size: 0.65rem;
    line-height: 1;
}

/* ─── PRODUCTO DETALLE ───────────────────────────────────── */
.product-detail-img {
    border-radius: var(--radius);
    width: 100%;
    max-height: 480px;
    object-fit: contain;
    object-position: center;
    background: #f1f5f9;
    padding: 1rem;
}

.product-detail-price {
    font-size: 2rem;
    font-weight: 900;
    color: var(--accent);
}

.product-detail-price-old {
    font-size: 1.1rem;
    color: #94a3b8;
    text-decoration: line-through;
}

/* Separador "—" entre precio mínimo y máximo de variantes */
.product-detail-price-sep {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--muted);
    align-self: baseline;
    line-height: 1;
}

.qty-control {
    display: flex;
    align-items: center;
    gap: 0;
    border: 2px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
    width: fit-content;
}

.qty-control button {
    background: #f1f5f9;
    border: none;
    padding: 0.4rem 0.8rem;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: background .15s;
    color: var(--dark);
}

.qty-control button:hover { background: var(--border); }

.qty-control input {
    border: none;
    border-left: 2px solid var(--border);
    border-right: 2px solid var(--border);
    width: 52px;
    text-align: center;
    font-weight: 700;
    font-size: 1rem;
    padding: 0.4rem;
    outline: none;
    background: #fff;
}

.btn-whatsapp {
    background: #25D366;
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 0.65rem 1.4rem;
    font-weight: 700;
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: background .2s;
    text-decoration: none;
}

.btn-whatsapp:hover {
    background: #1da850;
    color: #fff;
}

/* ─── CARRITO ────────────────────────────────────────────── */
.cart-table th {
    background: var(--secondary);
    color: #fff;
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0.75rem 1rem;
    border: none;
}

.cart-table td {
    vertical-align: middle;
    padding: 0.85rem 1rem;
    border-bottom: 1px solid var(--border);
}

.cart-product-img {
    width: 64px;
    height: 64px;
    object-fit: contain;
    border-radius: 8px;
    background: #f1f5f9;
}

.cart-summary-card {
    background: #fff;
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    position: sticky;
    top: 80px;
}

/* ─── CHECKOUT ───────────────────────────────────────────── */
.checkout-card {
    background: #fff;
    border-radius: var(--radius);
    padding: 2rem;
    box-shadow: var(--shadow);
}

.payment-option {
    border: 2px solid var(--border);
    border-radius: 10px;
    padding: 0.75rem 1rem;
    cursor: pointer;
    transition: border-color .2s, background .2s;
}

.payment-option:has(input:checked) {
    border-color: var(--accent);
    background: #fff7f0;
}

.order-success {
    background: #fff;
    border-radius: var(--radius);
    padding: 3rem 2rem;
    text-align: center;
    box-shadow: var(--shadow);
}

.order-success .success-icon {
    width: 80px;
    height: 80px;
    background: #dcfce7;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    margin: 0 auto 1.5rem;
}

/* ─── CONTACTO ───────────────────────────────────────────── */
.contact-card {
    background: #fff;
    border-radius: var(--radius);
    padding: 2rem;
    box-shadow: var(--shadow);
}

.contact-info-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.93rem;
}

.contact-info-item:last-child { border-bottom: none; }

.contact-info-item .icon {
    width: 36px;
    height: 36px;
    background: var(--accent);
    color: #fff;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1rem;
}

/* ─── FORMS ──────────────────────────────────────────────── */
.form-control, .form-select {
    border-radius: 8px;
    border: 2px solid var(--border);
    padding: 0.55rem 0.85rem;
    font-size: 0.93rem;
    transition: border-color .2s, box-shadow .2s;
    box-shadow: 0 1px 3px rgba(0,0,0,.06), inset 0 1px 2px rgba(0,0,0,.03);
    background: #fff;
}

.form-control:focus, .form-select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(0,0,0,.06), 0 1px 4px rgba(0,0,0,.08);
    outline: none;
}

.input-group-text {
    border: 2px solid var(--border);
    background: #f8fafc;
    box-shadow: 0 1px 3px rgba(0,0,0,.06);
    font-size: .93rem;
}

.form-label {
    font-weight: 600;
    font-size: 0.88rem;
    color: #374151;
    margin-bottom: 0.35rem;
}

/* ─── CTA BANNER ─────────────────────────────────────────── */
.cta-banner {
    background: linear-gradient(135deg, var(--secondary), var(--primary));
    color: #fff;
    border-radius: var(--radius);
    padding: 2.5rem 2rem;
    text-align: center;
}

.cta-banner h3 {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.cta-banner p {
    color: rgba(255,255,255,.7);
    margin-bottom: 1.5rem;
}

/* ─── CATALOGO ───────────────────────────────────────────── */
.filter-sidebar {
    background: #fff;
    border-radius: var(--radius);
    padding: 1.25rem;
    box-shadow: var(--shadow);
    position: sticky;
    top: 80px;
}

.filter-title {
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--muted);
    margin-bottom: 0.75rem;
}

.filter-cat-btn {
    display: flex;
    align-items: center;
    width: 100%;
    background: none;
    border: none;
    padding: 0.45rem 0.75rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    color: #374151;
    transition: background .15s, color .15s;
    text-align: left;
    text-decoration: none;
}

.filter-cat-btn:hover, .filter-cat-btn.active {
    background: var(--accent);
    color: #fff;
}

/* Radio-style filter buttons (categoría + precio rango) */
.filter-cats { display: flex; flex-direction: column; gap: 2px; }

.filter-radio-btn {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 0.42rem 0.75rem;
    border-radius: 8px;
    font-size: 0.86rem;
    font-weight: 500;
    color: #374151;
    cursor: pointer;
    transition: background .15s, color .15s;
    user-select: none;
    margin: 0;
}
.filter-radio-btn input[type="radio"] { display: none; }
.filter-radio-btn:hover { background: rgba(var(--accent-rgb), .08); color: var(--accent); }
.filter-radio-btn.active { background: var(--accent); color: #fff; }
.filter-radio-btn.active .filter-count { background: rgba(255,255,255,.25); color: #fff; }

.filter-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 18px;
    padding: 0 5px;
    background: #f1f5f9;
    color: var(--muted);
    border-radius: 10px;
    font-size: .7rem;
    font-weight: 700;
    flex-shrink: 0;
}

/* ─── ADMIN STYLES ───────────────────────────────────────── */
.admin-sidebar {
    background: var(--primary);
    height: 100vh;
    width: 240px;
    padding: 1.5rem 0 0;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 100;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.admin-sidebar .brand {
    padding: 0.5rem 1.5rem 1.5rem;
    color: #fff;
    font-weight: 800;
    font-size: 1.15rem;
    display: block;
    text-decoration: none;
    border-bottom: 1px solid rgba(255,255,255,.1);
    margin-bottom: 0.75rem;
}

.admin-sidebar .brand span { color: var(--accent); }

.admin-nav-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.55rem 1.5rem;
    color: rgba(255,255,255,.7);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: background .15s, color .15s;
    border-radius: 0;
}

.admin-nav-item:hover, .admin-nav-item.active {
    background: rgba(255,255,255,.08);
    color: #fff;
}

.admin-nav-item i { font-size: 1rem; width: 18px; }

.admin-nav-section {
    font-size: 0.68rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255,255,255,.3);
    padding: 1rem 1.5rem 0.4rem;
}

.admin-content {
    margin-left: 240px;
    padding: 2rem;
    min-height: 100vh;
}

/* Oculto por defecto (desktop); el media query lo muestra en mobile */
.admin-mobile-bar { display: none; }

.admin-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.75rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.admin-page-title {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--dark);
    margin: 0;
}

.stat-card {
    background: #fff;
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    border-left: 4px solid var(--accent);
    transition: transform .2s, box-shadow .2s;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-h);
}

.stat-card .stat-value {
    font-size: 1.9rem;
    font-weight: 900;
    color: var(--dark);
    line-height: 1;
    margin-bottom: 0.25rem;
}

.stat-card .stat-label {
    font-size: 0.82rem;
    color: var(--muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-card .stat-icon {
    font-size: 1.8rem;
    opacity: .15;
}

.admin-card {
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.admin-card-header {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.admin-card-header h5 {
    font-weight: 700;
    margin: 0;
    font-size: 0.95rem;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
}

.admin-table th {
    background: #f8fafc;
    font-weight: 700;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--muted);
    padding: 0.75rem 1rem;
    border-bottom: 2px solid var(--border);
    white-space: nowrap;
}

.admin-table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

.admin-table tr:last-child td { border-bottom: none; }

.admin-table tr:hover td { background: #f8fafc; }

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 22px;
}

.toggle-switch input { opacity: 0; width: 0; height: 0; }

.toggle-slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: #cbd5e1;
    border-radius: 22px;
    transition: background .2s;
}

.toggle-slider::before {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    left: 3px;
    top: 3px;
    background: #fff;
    border-radius: 50%;
    transition: transform .2s;
}

.toggle-switch input:checked + .toggle-slider { background: var(--accent); }
.toggle-switch input:checked + .toggle-slider::before { transform: translateX(18px); }

.thumb-admin {
    width: 48px;
    height: 48px;
    object-fit: cover;
    border-radius: 6px;
    background: #f1f5f9;
}

/* ─── FOOTER ─────────────────────────────────────────────── */
.site-footer {
    background: var(--primary);
    color: rgba(255,255,255,.65);
    padding: 3rem 0 1.5rem;
    margin-top: 4rem;
}

.footer-brand {
    font-size: 1.3rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 0.5rem;
}

.footer-brand span { color: var(--accent); }

.footer-desc {
    font-size: 0.88rem;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.footer-title {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255,255,255,.4);
    margin-bottom: 0.75rem;
}

.footer-link {
    display: block;
    color: rgba(255,255,255,.6);
    text-decoration: none;
    font-size: 0.88rem;
    padding: 0.2rem 0;
    transition: color .15s;
}

.footer-link:hover { color: var(--accent); }

.footer-social {
    display: flex;
    gap: 0.6rem;
    margin-top: 0.5rem;
}

.footer-social a {
    width: 36px;
    height: 36px;
    background: rgba(255,255,255,.1);
    color: rgba(255,255,255,.7);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: background .2s, color .2s;
    font-size: 1rem;
}

.footer-social a:hover {
    background: var(--accent);
    color: #fff;
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,.1);
    padding-top: 1.25rem;
    margin-top: 2rem;
    font-size: 0.82rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem;
}

/* ─── ALERTS & MISC ──────────────────────────────────────── */
.alert-tienda {
    border-radius: 10px;
    border: none;
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
    font-weight: 500;
}

.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--muted);
}

.empty-state i { font-size: 3.5rem; margin-bottom: 1rem; display: block; }

.no-image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f1f5f9;
    color: #cbd5e1;
    font-size: 3rem;
}

/* ─── PRECIO RANGO (variantes) ───────────────────────────── */
.price-range-sep {
    font-size: .85rem;
    font-weight: 600;
    color: var(--muted);
    padding: 0 .1rem;
    align-self: center;
}

/* ─── RESPONSIVE ─────────────────────────────────────────── */

/* Admin mobile — sidebar oculto por defecto, desliza con toggle */
@media (max-width: 991.98px) {
    .admin-sidebar {
        transform: translateX(-260px);
        transition: transform .28s cubic-bezier(.4,0,.2,1);
        z-index: 1050;
        box-shadow: none;
    }
    .admin-sidebar.sidebar-open {
        transform: translateX(0);
        box-shadow: 6px 0 24px rgba(0,0,0,.35);
    }
    .admin-sidebar-backdrop {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,.45);
        z-index: 1049;
        transition: opacity .28s;
    }
    .admin-sidebar-backdrop.show { display: block; }

    .admin-content {
        margin-left: 0;
        padding: 0;
    }
    /* Barra superior mobile */
    .admin-mobile-bar {
        display: flex;
        align-items: center;
        justify-content: space-between;
        background: var(--primary);
        padding: .65rem 1rem;
        position: sticky;
        top: 0;
        z-index: 200;
    }
    .admin-mobile-bar .brand-name {
        color: #fff;
        font-weight: 800;
        font-size: 1rem;
    }
    .admin-mobile-bar .brand-name span { color: var(--accent); }
    .admin-page-wrap { padding: 1rem; }

    /* Admin cards y tablas en mobile */
    .admin-table { font-size: .78rem; }
    .admin-table th, .admin-table td { padding: .45rem .5rem; }
    .admin-topbar { flex-direction: column; align-items: flex-start; }
    .prod-block-body, .prod-sidebar-body { padding: .85rem; }

    /* Flotante "personas viendo esto" — solo en desktop */
    .online-float { display: none !important; }
}

@media (min-width: 992px) {
    .admin-mobile-bar { display: none; }
    .admin-sidebar-backdrop { display: none; }
    .admin-page-wrap { padding: 2rem; }
}

@media (max-width: 767.98px) {
    .hero-section { padding: 3rem 0 2.5rem; }
    .hero-title { font-size: 1.9rem; }
    /* Tablas admin con scroll horizontal */
    .admin-card { overflow-x: auto; }
}

/* ─── CARRITO MOBILE ─────────────────────────────────────── */
@media (max-width: 575.98px) {
    .cart-table thead { display: none; }
    .cart-table tr {
        display: grid;
        grid-template-columns: 64px 1fr auto;
        grid-template-rows: auto auto;
        gap: .35rem .6rem;
        padding: .85rem .75rem;
        border-bottom: 1px solid var(--border);
    }
    .cart-table tbody tr:last-child { border-bottom: none; }
    .cart-table td { border: none; padding: 0; display: flex; align-items: center; }
    .cart-table td:nth-child(1) { grid-row: 1 / 3; align-items: flex-start; padding-top: 2px; }
    .cart-table td:nth-child(2) { grid-column: 2; grid-row: 1; align-items: flex-start; font-size:.88rem; }
    .cart-table td:nth-child(3) { display: none; }
    .cart-table td:nth-child(4) { grid-column: 2; grid-row: 2; }
    .cart-table td:nth-child(5) { grid-column: 3; grid-row: 2; justify-content: flex-end; font-weight: 700; font-size:.9rem; }
    .cart-table td:nth-child(6) { grid-column: 3; grid-row: 1; justify-content: flex-end; align-items: flex-start; }
    .cart-product-img { width: 60px; height: 60px; }
    .qty-control { transform: scale(.82); transform-origin: left center; }
}

/* ─── ONLINE VIEWERS FLOTANTE ────────────────────────────── */
.online-float {
    position: fixed;
    bottom: 130px;
    left: 16px;
    z-index: 900;
    background: #fff;
    color: #1e293b;
    padding: .6rem 1rem .6rem .75rem;
    border-radius: 50px;
    font-size: .8rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: .5rem;
    box-shadow: 0 4px 24px rgba(0,0,0,.13), 0 1px 4px rgba(0,0,0,.07);
    border: 1.5px solid rgba(0,200,83,.25);
    pointer-events: none;
    opacity: 0;
    transform: translateX(-32px);
    transition: opacity .5s ease, transform .5s ease;
    white-space: nowrap;
}
.online-float.visible { opacity: 1; transform: translateX(0); }
.online-float .viewers-count {
    color: var(--accent, #00c853);
    font-weight: 800;
    font-size: .9rem;
}
.online-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #00c853;
    flex-shrink: 0;
    position: relative;
}
.online-dot::after {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    background: rgba(0,200,83,.25);
    animation: dot-pulse 1.8s ease-out infinite;
}
@keyframes dot-pulse {
    0%   { transform: scale(.6); opacity: 1; }
    100% { transform: scale(1.8); opacity: 0; }
}

/* ─── UTILITIES ──────────────────────────────────────────── */
.text-accent { color: var(--accent) !important; }
.bg-accent { background: var(--accent) !important; }
.rounded-pill-sm { border-radius: 20px; }
.fw-800 { font-weight: 800 !important; }
.fw-900 { font-weight: 900 !important; }

.msg-unread { background: #fffbeb !important; }
.msg-unread td { border-left: 3px solid var(--accent); }

.stock-badge {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 20px;
}

.stock-ok { background: #dcfce7; color: #166534; }
.stock-low { background: #fef9c3; color: #854d0e; }
.stock-out { background: #fee2e2; color: #991b1b; }
.stock-unlimited { background: #e0f2fe; color: #075985; }

/* ═══════════════════════════════════════════════════════════════
   CARD LAYOUTS — data-card-layout attribute on .products-grid
═══════════════════════════════════════════════════════════════ */

/* Base: siempre 2 columnas en mobile (cualquier layout) */
.products-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

/* ─── LAYOUT: VERTICAL (default) ─────────────────────────────
   Grid: auto-fill columns minmax(240px, 1fr)
   Imagen arriba (aspect-ratio 1:1), body abajo
   ────────────────────────────────────────────────────────── */
.products-grid[data-card-layout="vertical"] {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}
@media (min-width: 576px) {
    .products-grid[data-card-layout="vertical"] { grid-template-columns: repeat(auto-fill, minmax(var(--card-min, 240px), 1fr)); }
}

.products-grid[data-card-layout="vertical"] .product-img-wrap {
    padding-top: 100%; /* 1:1 cuadrada */
}

/* ─── LAYOUT: HORIZONTAL ─────────────────────────────────────
   Grid: 1 col mobile, 2 col tablet+
   Cada card: flex row, imagen 42% / body 58%
   ────────────────────────────────────────────────────────── */
.products-grid[data-card-layout="horizontal"] {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

@media (min-width: 576px) {
    .products-grid[data-card-layout="horizontal"] {
        grid-template-columns: repeat(2, 1fr);
    }
}

.products-grid[data-card-layout="horizontal"] .product-card {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    height: auto;
}

.products-grid[data-card-layout="horizontal"] .product-img-wrap {
    width: 42%;
    flex-shrink: 0;
    padding-top: 0;
    height: auto;
    min-height: 180px;
}

.products-grid[data-card-layout="horizontal"] .product-img-wrap img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.products-grid[data-card-layout="horizontal"] .product-img-wrap {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius) 0 0 var(--radius);
}

.products-grid[data-card-layout="horizontal"] .product-body {
    width: 58%;
    padding: 1.25rem 1.25rem 1.25rem;
    display: flex;
    flex-direction: column;
}

.products-grid[data-card-layout="horizontal"] .product-name {
    font-size: 1.05rem;
    font-weight: 700;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    display: -webkit-box;
    overflow: hidden;
}

.products-grid[data-card-layout="horizontal"] .product-desc-short {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 0.85rem;
    color: var(--muted);
    margin-bottom: 0.5rem;
}

.products-grid[data-card-layout="horizontal"] .price-current {
    font-size: 1.35rem;
    font-weight: 800;
}

.products-grid[data-card-layout="horizontal"] .product-actions {
    margin-top: auto;
    flex-direction: row;
    align-items: center;
}

/* ─── LAYOUT: MINIMAL ────────────────────────────────────────
   Grid: auto-fill minmax(200px, 1fr) — más columnas
   Sin border en reposo, solo imagen + nombre + precio
   Botones aparecen en hover con fade
   ────────────────────────────────────────────────────────── */
.products-grid[data-card-layout="minimal"] {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}
@media (min-width: 576px) {
    .products-grid[data-card-layout="minimal"] { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
}

.products-grid[data-card-layout="minimal"] .product-card {
    border: 1px solid transparent;
    box-shadow: none;
    border-radius: 2px;
    background: #fff;
    transition: border-color .2s;
    overflow: visible;
}

.products-grid[data-card-layout="minimal"] .product-card:hover {
    transform: none;
    box-shadow: none;
    border-color: #000;
}

.products-grid[data-card-layout="minimal"] .product-img-wrap {
    padding-top: 100%; /* cuadrada */
    overflow: hidden;
    border-radius: 2px;
}

.products-grid[data-card-layout="minimal"] .product-img-wrap img {
    transition: transform .35s ease;
}

.products-grid[data-card-layout="minimal"] .product-card:hover .product-img-wrap img {
    transform: scale(1.03);
}

.products-grid[data-card-layout="minimal"] .product-body {
    padding: 0.6rem 0.25rem 0.5rem;
}

.products-grid[data-card-layout="minimal"] .product-category-tag {
    display: none;
}

.products-grid[data-card-layout="minimal"] .product-name {
    font-size: 0.85rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 0.2rem;
    flex: none;
}

.products-grid[data-card-layout="minimal"] .price-current {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--dark);
}

.products-grid[data-card-layout="minimal"] .price-old {
    font-size: 0.78rem;
}

.products-grid[data-card-layout="minimal"] .product-actions {
    opacity: 1;
    margin-top: 0.4rem;
}

/* ═══════════════════════════════════════════════════════════════
   DETAIL LAYOUTS — .product-detail-hero
═══════════════════════════════════════════════════════════════ */

/* HERO layout — banner ancho + info centrada */
.product-detail-hero-banner {
    width: 100%;
    max-height: 420px;
    object-fit: cover;
    object-position: center;
    display: block;
    background: #1e293b;
}

.product-detail-hero-placeholder {
    width: 100%;
    height: 320px;
    background: #1e293b;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,.2);
    font-size: 6rem;
}

.product-detail-hero-info {
    max-width: 860px;
    margin: 0 auto;
    text-align: center;
    padding: 2rem 1rem;
}

.product-detail-hero-info .product-detail-price {
    font-size: 2.2rem;
}

.product-detail-hero-desc {
    max-width: 640px;
    margin: 0 auto;
    font-size: .93rem;
    line-height: 1.7;
    color: #374151;
}

/* ─── FAQ SECTION ─────────────────────────────── */
.faq-section { background: var(--light-bg); }
.faq-accordion .accordion-item.faq-item {
    border: 1px solid var(--border);
    border-radius: var(--radius) !important;
    margin-bottom: .5rem;
    overflow: hidden;
}
.faq-accordion .accordion-button {
    font-weight: 600;
    font-size: .95rem;
    background: #fff;
    color: var(--dark);
}
.faq-accordion .accordion-button:not(.collapsed) {
    background: rgba(var(--accent-rgb), .07);
    color: var(--accent);
    box-shadow: none;
}
.faq-accordion .accordion-button::after {
    filter: none;
}

/* ─── PROMO BANNER ────────────────────────────── */
.promo-banner-section { }
.promo-banner {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
}

/* ─── WHATSAPP FLOTANTE ───────────────────────── */
.wa-flotante {
    position: fixed;
    bottom: 28px;
    right: 28px;
    z-index: 9999;
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: #25d366;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.65rem;
    box-shadow: 0 4px 20px rgba(37,211,102,.45);
    text-decoration: none;
    transition: transform .2s ease, box-shadow .2s ease;
    animation: wa-pulse 2.5s ease-in-out infinite;
}
.wa-flotante:hover {
    transform: scale(1.12);
    box-shadow: 0 8px 32px rgba(37,211,102,.65);
    color: #fff;
}
.wa-flotante .wa-tooltip {
    position: absolute;
    right: 68px;
    background: #1a1a1a;
    color: #fff;
    font-size: .78rem;
    font-weight: 600;
    white-space: nowrap;
    padding: .35rem .75rem;
    border-radius: 8px;
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s;
}
.wa-flotante .wa-tooltip::after {
    content: '';
    position: absolute;
    right: -6px;
    top: 50%;
    transform: translateY(-50%);
    border: 6px solid transparent;
    border-left-color: #1a1a1a;
    border-right: none;
}
.wa-flotante:hover .wa-tooltip {
    opacity: 1;
}
@keyframes wa-pulse {
    0%, 100% { box-shadow: 0 4px 20px rgba(37,211,102,.45); }
    50%       { box-shadow: 0 4px 28px rgba(37,211,102,.7), 0 0 0 10px rgba(37,211,102,.1); }
}

/* ─── VARIANTES ─────────────────────────────── */
.variantes-wrap {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem 1.1rem;
    background: #fff;
}

.variantes-wrap .group-label {
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .07em;
    color: var(--muted);
    margin-bottom: .45rem;
    display: flex;
    align-items: center;
    gap: .35rem;
}

.variantes-wrap .group-label::before {
    content: '';
    display: inline-block;
    width: 3px;
    height: 12px;
    background: var(--accent);
    border-radius: 2px;
    flex-shrink: 0;
}

.variante-opciones {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
}

.variante-btn {
    border-radius: 8px !important;
    min-width: 44px;
    font-size: .84rem;
    font-weight: 600;
    padding: .35rem .85rem;
    border: 2px solid #cbd5e1 !important;
    background: #fff !important;
    color: var(--dark) !important;
    transition: border-color .15s, background .15s, color .15s, transform .1s;
    line-height: 1.3;
}

.variante-btn:hover {
    border-color: var(--accent) !important;
    background: #fff7f0 !important;
    color: var(--accent-dark) !important;
    transform: translateY(-1px);
}

.btn-check:checked + .variante-btn {
    background: var(--accent) !important;
    border-color: var(--accent) !important;
    color: #fff !important;
    box-shadow: 0 2px 8px rgba(249,115,22,.35) !important;
    transform: translateY(-1px);
}

.variante-agotada {
    opacity: .35;
    text-decoration: line-through;
    cursor: not-allowed !important;
    pointer-events: none;
    border-color: #e2e8f0 !important;
    color: #94a3b8 !important;
    background: #f8fafc !important;
    position: relative;
}
.variante-agotada::after {
    content: '';
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        135deg,
        transparent,
        transparent 4px,
        rgba(0,0,0,.06) 4px,
        rgba(0,0,0,.06) 5px
    );
    border-radius: inherit;
    pointer-events: none;
}

/* ─── GALERÍA PRODUCTO ──────────────────────── */
/* Base (mobile): imagen arriba, miniaturas scroll horizontal abajo */
.product-gallery {
    display: flex;
    flex-direction: column;
    gap: .5rem;
}
.gallery-main {
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--light-bg);
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: zoom-in;
}
.gallery-main img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform .35s ease;
}
.gallery-main:hover img { transform: scale(1.04); }
.gallery-thumbs {
    display: flex;
    flex-direction: row;
    gap: .4rem;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 2px;
    scrollbar-width: none;
}
.gallery-thumbs::-webkit-scrollbar { display: none; }
.gallery-thumb {
    flex-shrink: 0;
    width: 62px;
    height: 62px;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color .18s, opacity .18s;
    opacity: .65;
}
.gallery-thumb:hover { opacity: 1; }
.gallery-thumb.active { border-color: var(--accent); opacity: 1; }
.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; }

/* Desktop (≥ 768px): miniaturas columna vertical a la IZQUIERDA */
@media (min-width: 768px) {
    .product-gallery {
        flex-direction: row;
        align-items: flex-start;
        gap: .5rem;
    }
    .product-gallery .gallery-thumbs {
        flex-direction: column;
        overflow-x: hidden;
        overflow-y: auto;
        flex-shrink: 0;
        width: 82px;
        gap: .4rem;
        order: -1;
        padding-bottom: 0;
        max-height: 520px;
        scrollbar-width: thin;
    }
    .product-gallery .gallery-main {
        flex: 1;
        min-width: 0;
    }
    .product-gallery .gallery-thumb {
        width: 78px;
        height: 78px;
    }
}

/* ─── LIGHTBOX ──────────────────────────────── */
.lightbox { position: fixed; inset: 0; z-index: 99999; background: rgba(0,0,0,.92); display: none; align-items: center; justify-content: center; }
.lightbox.open { display: flex; }
.lightbox img { max-width: 90vw; max-height: 90vh; object-fit: contain; border-radius: 8px; }
.lightbox-close { position: absolute; top: 16px; right: 20px; background: rgba(255,255,255,.1); border: none; color: #fff; font-size: 1.4rem; width: 44px; height: 44px; border-radius: 50%; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.lightbox-close:hover { background: rgba(255,255,255,.25); }
.lightbox-prev, .lightbox-next { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(255,255,255,.1); border: none; color: #fff; font-size: 1.6rem; width: 52px; height: 52px; border-radius: 50%; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.lightbox-prev { left: 16px; }
.lightbox-next { right: 16px; }
.lightbox-prev:hover, .lightbox-next:hover { background: rgba(255,255,255,.25); }

/* ─── SIDEBAR PRODUCTO ──────────────────────── */
.sidebar-widget {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.2rem;
    margin-bottom: 1.25rem;
}
.sidebar-widget-title {
    font-size: .78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .07em;
    color: var(--muted);
    margin-bottom: .85rem;
    padding-bottom: .6rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
}
.sidebar-cat-link {
    display: flex;
    align-items: center;
    padding: .42rem .5rem;
    border-radius: 8px;
    text-decoration: none;
    color: var(--dark);
    font-size: .87rem;
    transition: background .15s, color .15s;
    margin-bottom: .15rem;
}
.sidebar-cat-link:hover { background: var(--light-bg); color: var(--accent); }
.sidebar-cat-link.active {
    background: rgba(var(--accent-rgb), .1);
    color: var(--accent);
    font-weight: 600;
}
.sidebar-novedad {
    display: flex;
    align-items: flex-start;
    gap: .55rem;
    font-size: .85rem;
    color: var(--dark);
    padding: .38rem 0;
    border-bottom: 1px solid var(--border);
    line-height: 1.4;
}
.sidebar-novedad:last-child { border-bottom: none; }
.sidebar-novedad-emoji { font-size: .95rem; flex-shrink: 0; margin-top: .05rem; }
.sidebar-wa-cta {
    background: linear-gradient(135deg, #f0fdf4, #dcfce7);
    border-color: #bbf7d0;
}
.sidebar-product-mini {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .55rem 0;
    border-bottom: 1px solid var(--border);
    text-decoration: none;
    color: inherit;
    transition: opacity .15s;
}
.sidebar-product-mini:last-child { border-bottom: none; }
.sidebar-product-mini:hover { opacity: .72; }
.sidebar-product-img {
    width: 54px;
    height: 54px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
    background: var(--light-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
}
.sidebar-product-img img { width: 100%; height: 100%; object-fit: cover; }
.sidebar-product-name {
    font-size: .82rem;
    font-weight: 600;
    color: var(--dark);
    line-height: 1.3;
    margin-bottom: .15rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.sidebar-product-price {
    font-size: .88rem;
    font-weight: 700;
    color: var(--accent);
}

/* ─── ADMIN — PRODUCT FORM (WordPress-style two-column) ─────── */
.prod-block {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

.prod-block-title {
    display: flex;
    align-items: center;
    gap: .45rem;
    font-size: .78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .07em;
    color: var(--muted);
    padding: .7rem 1.1rem;
    background: #f8fafc;
    border-bottom: 1px solid var(--border);
}

.prod-block-title .bi {
    font-size: .9rem;
    color: var(--accent);
    flex-shrink: 0;
}

/* Content wrapper inside each block */
.prod-block-body {
    padding: 1rem 1.1rem;
}

/* Inner rows: reset Bootstrap negative margins */
.prod-block-body > .row {
    margin-left: 0;
    margin-right: 0;
}

/* Textarea full-width flush inside body */
.prod-block-body textarea.form-control {
    resize: vertical;
    min-height: 140px;
}

.prod-sidebar-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

.prod-sidebar-title {
    display: flex;
    align-items: center;
    gap: .4rem;
    font-size: .75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .07em;
    color: var(--muted);
    padding: .6rem .9rem;
    background: #f8fafc;
    border-bottom: 1px solid var(--border);
}

.prod-sidebar-title .bi {
    font-size: .85rem;
    color: var(--accent);
    flex-shrink: 0;
}

.prod-sidebar-body {
    padding: .9rem;
}

/* Sticky sidebar on large screens */
@media (min-width: 992px) {
    .prod-sidebar-sticky {
        position: sticky;
        top: 80px;
    }
}

/* ─── ADMIN — section label above inputs ────────────────────── */
.prod-label {
    font-size: .72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--muted);
    margin-bottom: .3rem;
    display: block;
}
