/* =========================
   CONTAINER
========================= */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
}

/* =========================
   HERO
========================= */
.hero-carousel {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    background: linear-gradient(135deg, #0f172a, #1e293b);
    margin-bottom: 50px;
}

.carousel-slide {
    padding: 60px;
    min-height: 320px;
    display: flex;
    align-items: center;
}

.carousel-content {
    max-width: 520px;
    color: #fff;
}

.hero-tag {
    display: inline-block;
    background: rgba(255,255,255,.15);
    padding: 6px 12px;
    border-radius: 999px;
    font-size: .75rem;
    margin-bottom: 12px;
}

.carousel-content h2 {
    font-size: 2.3rem;
    line-height: 1.2;
    margin-bottom: 12px;
}

.carousel-content p {
    opacity: .9;
    margin-bottom: 22px;
}

.hero-actions {
    display: flex;
    gap: 12px;
}

.btn-hero {
    padding: 12px 22px;
    border-radius: 12px;
    font-weight: 600;
    text-decoration: none;
}

.btn-hero.primary {
    background: #2563eb;
    color: #fff;
}

.btn-hero.secondary {
    background: rgba(255,255,255,.15);
    color: #fff;
}

/* =========================
   SECTION HEADER
========================= */
.section-header {
    margin-bottom: 30px;
}

.page-title {
    font-size: 1.8rem;
    margin-bottom: 6px;
}

.subtitle {
    color: #64748b;
}

/* =========================
   LAYOUT
========================= */
.shop-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 28px;
}

/* =========================
   SIDEBAR
========================= */
.shop-sidebar {
    position: sticky;
    top: 20px;
}

.sidebar-wrapper {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.sidebar-card {
    background: #fff;
    border-radius: 16px;
    padding: 18px;
    box-shadow: 0 10px 30px rgba(0,0,0,.06);
}

.sidebar-card h3 {
    margin-bottom: 12px;
    font-size: 1.05rem;
}

.category-list li {
    list-style: none;
}

.category-list a {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    font-weight: 500;
    color: #334155;
}

.category-list a.active,
.category-list a:hover {
    color: #2563eb;
}

/* =========================
   FORMS
========================= */
.input-group {
    display: flex;
    gap: 8px;
}

.input-group input,
.sort-form select {
    flex: 1;
    padding: 10px;
    border-radius: 10px;
    border: 1px solid #cbd5f5;
}

.btn-icon {
    width: 42px;
    border-radius: 10px;
    border: none;
    background: #2563eb;
    color: #fff;
}

/* =========================
   PRODUCTS GRID
========================= */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 22px;
}

/* =========================
   PRODUCT CARD
========================= */
.product-card {
    background: #fff;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 12px 30px rgba(0,0,0,.1);
    transition: transform .25s ease, box-shadow .25s ease;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 18px 40px rgba(0,0,0,.15);
}

.product-image {
    position: relative;
    background: #f8fafc;
}

.product-image img {
    width: 100%;
    height: 235px;
    object-fit: contain;
    padding: 18px;
}

.quick-view-overlay {
    position: absolute;
    inset: 0;
    background: rgba(15,23,42,.55);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: .25s;
}

.product-image:hover .quick-view-overlay {
    opacity: 1;
}

.btn-quick {
    background: #fff;
    padding: 10px 18px;
    border-radius: 999px;
    font-weight: 600;
}

/* =========================
   PRODUCT BODY
========================= */
.product-body {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.product-body h3 {
    font-size: .95rem;
    line-height: 1.3;
}

.price {
    font-size: 1.2rem;
    font-weight: 700;
    color: #16a34a;
}

/* =========================
   FOOTER / BUTTON
========================= */
.product-footer {
    margin-top: auto;
}

.btn-add-cart {
    width: 100%;
    padding: 11px;
    border-radius: 12px;
    border: none;
    background: #2563eb;
    color: #fff;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.btn-add-cart:disabled {
    background: #94a3b8;
    cursor: not-allowed;
}

/* =========================
   BADGES
========================= */
.badge {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 6px 10px;
    border-radius: 8px;
    font-size: .75rem;
    color: #fff;
    font-weight: 600;
}

.badge-sale { background: #ef4444; }
.badge-out { background: #64748b; }

/* =========================
   RESPONSIVE
========================= */
@media (max-width: 900px) {
    .shop-layout {
        grid-template-columns: 1fr;
    }

    .carousel-slide {
        padding: 40px 20px;
    }

    .carousel-content h2 {
        font-size: 1.8rem;
    }
}


:root {
    --primary: #2563eb;
    --primary-dark: #1e40af;
    --bg: #f8fafc;
    --card: #ffffff;
    --text: #0f172a;
    --muted: #64748b;
    --border: #e5e7eb;
    --radius: 14px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: 'Inter', system-ui, sans-serif;
    background: var(--bg);
    color: var(--text);
}

.container {
    max-width: 1280px;
    margin: auto;
    padding: 24px;
}

/* ===================== HERO ===================== */

.hero-carousel {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 48px;
    background: linear-gradient(120deg, #0f172a, #1e293b);
    color: #fff;
}

.carousel-slide {
    display: none;
    padding: 80px 60px;
}

.carousel-slide.active {
    display: block;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at top right, rgba(37,99,235,.35), transparent);
}

.carousel-content {
    position: relative;
    max-width: 600px;
}

.hero-tag {
    display: inline-block;
    background: rgba(255,255,255,.15);
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 13px;
    margin-bottom: 16px;
}

.hero-actions {
    display: flex;
    gap: 14px;
    margin-top: 24px;
}

.btn-hero {
    padding: 14px 22px;
    border-radius: 10px;
    font-weight: 600;
    text-decoration: none;
}

.btn-hero.primary {
    background: var(--primary);
    color: #fff;
}

.btn-hero.secondary {
    border: 1px solid rgba(255,255,255,.4);
    color: #fff;
}

/* ===================== LAYOUT ===================== */

.shop-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 32px;
}

.shop-sidebar {
    position: sticky;
    top: 20px;
}

.sidebar-card {
    background: var(--card);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 24px;
    border: 1px solid var(--border);
}

.sidebar-card h3 {
    margin-bottom: 14px;
    font-size: 16px;
}

.category-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.category-list a {
    display: flex;
    justify-content: space-between;
    padding: 10px 12px;
    border-radius: 8px;
    text-decoration: none;
    color: var(--text);
}

.category-list a:hover,
.category-list a.active {
    background: #eff6ff;
    color: var(--primary);
}

/* ===================== PRODUCTOS ===================== */

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 24px;
}

.product-card {
    background: var(--card);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    overflow: hidden;
    transition: transform .2s, box-shadow .2s;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0,0,0,.08);
}

.product-image {
    position: relative;
    height: 220px;
    background: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.badge {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    color: #fff;
}

.badge-sale {
    background: #16a34a;
}

.badge-out {
    background: #dc2626;
}

.quick-view-overlay {
    position: absolute;
    inset: 0;
    background: rgba(15,23,42,.65);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: .2s;
}

.product-card:hover .quick-view-overlay {
    opacity: 1;
}

.btn-quick {
    background: #fff;
    color: #000;
    padding: 10px 16px;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
}

/* ===================== PRODUCT BODY ===================== */

.product-body {
    padding: 12px 14px;
    text-align: center;



    
    display: flex;
    flex-direction: column;
    gap: 2px; 


}

.product-body h3 {
    font-size: 15px;
    margin: 10px 0;
    min-height: 42px;
}

.price {
    font-size: 20px;
    font-weight: 700;
    margin: 10px 0;
}

.product-footer {
    margin-top: 14px;
}

.btn-add-cart {
    width: 100%;
    padding: 12px;
    border-radius: 10px;
    border: none;
    font-weight: 600;
    background: var(--primary);
    color: #fff;
    cursor: pointer;
}

.btn-add-cart:disabled {
    background: #cbd5f5;
    cursor: not-allowed;
}











/* ===== HERO CAROUSEL ===== */
.hero-carousel {
    position: relative;
    width: 100%;
    aspect-ratio: 3.26 / 1; /* 3556x1089 */
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 48px;
}

/* Cada slide */
.carousel-slide {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: none;
}

/* Slide activo */
.carousel-slide.active {
    display: flex;
    align-items: center;
}

/* Overlay oscuro */
.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to right,
        rgba(15,23,42,.85),
        rgba(15,23,42,.3)
    );
}

/* Contenido del banner */
.carousel-content {
    position: relative;
    z-index: 2;
    max-width: 1200px;
    padding: 80px 60px;
    color: #fff;
}

/* ===== GRID PRODUCTOS ===== */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 24px;
}

/* ===== CONTAINER GRANDES PANTALLAS ===== */
@media (min-width: 1600px) {
    .container {
        max-width: 1600px;
    }
}

/* ===== MOBILE ===== */
@media (max-width: 768px) {
    .hero-carousel {
        aspect-ratio: 16 / 9;
        border-radius: 12px;
    }

    .carousel-content {
        padding: 40px 20px;
        text-align: center;
    }
}













.shop-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
    background: #fff;
    padding: 14px 18px;
    border-radius: 14px;
    border: 1px solid var(--border);
}

.toolbar-search {
    display: flex;
    gap: 10px;
    flex: 1;
}

.toolbar-search input {
    flex: 1;
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid var(--border);
}

.toolbar-search button {
    padding: 12px 16px;
    border-radius: 10px;
    border: none;
    background: var(--primary);
    color: #fff;
    cursor: pointer;
}

.toolbar-sort select {
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: #fff;
}

/* Responsive */
@media (max-width: 768px) {
    .shop-toolbar {
        flex-direction: column;
        align-items: stretch;
    }
}



/* Layout Ajustado */
.shop-layout {
    display: grid;
    grid-template-columns: 240px 1fr; /* Sidebar un poco más delgada */
    gap: 40px;
    align-items: start;
}

/* Sidebar Minimalista */
.sidebar-card {
    background: transparent; /* Quitamos el fondo blanco total para un look más moderno */
    border: none;
    padding: 0;
}

.sidebar-card h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: #1e293b;
}

.category-list a {
    padding: 12px 16px;
    border-radius: 12px;
    margin-bottom: 4px;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.category-list a.active {
    background: #fff;
    border-color: var(--border);
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    color: var(--primary) !important;
    font-weight: 600;
}

/* Toolbar Superior (Lo que hace que se vea PRO) */
.shop-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fff;
    padding: 16px 24px;
    border-radius: 16px;
    margin-bottom: 30px;
    border: 1px solid var(--border);
    box-shadow: 0 2px 10px rgba(0,0,0,0.02);
}

/* Buscador Moderno */
.search-form-modern {
    display: flex;
    background: #f1f5f9;
    padding: 4px 8px;
    border-radius: 12px;
    width: 350px;
    border: 1px solid transparent;
    transition: 0.3s;
}

.search-form-modern:focus-within {
    background: #fff;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

.search-form-modern input {
    background: transparent;
    border: none;
    padding: 8px 12px;
    width: 100%;
    outline: none;
}

.search-form-modern button {
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
}

/* Selector de Orden */
.sort-form-modern {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sort-form-modern label {
    font-size: 0.9rem;
    color: var(--muted);
    font-weight: 500;
}

.sort-form-modern select {
    border: 1px solid var(--border);
    padding: 8px 16px;
    border-radius: 10px;
    outline: none;
    cursor: pointer;
    background: #fff;
}



/* Layout Mejorado */
.shop-layout {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 32px;
}

/* Sidebar Estilizada */
.shop-sidebar {
    position: sticky;
    top: 20px;
}

.sidebar-card h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 20px;
    padding-left: 10px;
}

.category-list a {
    display: flex;
    justify-content: space-between;
    padding: 12px 16px;
    border-radius: 12px;
    color: #475569;
    text-decoration: none;
    transition: all 0.2s ease;
    font-weight: 500;
}

.category-list a:hover,
.category-list a.active {
    background: #fff;
    color: #2563eb;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

/* Shop Toolbar (NUEVA) */
.shop-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fff;
    padding: 16px 20px;
    border-radius: 16px;
    margin-bottom: 30px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 2px 15px rgba(0,0,0,0.02);
}

/* Buscador Moderno */
.search-form-modern {
    display: flex;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 4px 6px;
    width: 320px;
    transition: all 0.3s;
}

.search-form-modern:focus-within {
    border-color: #2563eb;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.search-form-modern input {
    border: none;
    background: transparent;
    padding: 8px 12px;
    width: 100%;
    outline: none;
    font-size: 0.95rem;
}

.btn-search-icon {
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
}

/* Filtro Ordenamiento */
.sort-form-modern {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sort-form-modern label {
    font-size: 0.85rem;
    color: #64748b;
    font-weight: 600;
}

.sort-form-modern select {
    border: 1px solid #e2e8f0;
    padding: 8px 14px;
    border-radius: 10px;
    background: #fff;
    color: #1e293b;
    font-weight: 500;
    outline: none;
}

/* Responsive */
@media (max-width: 992px) {
    .shop-layout {
        grid-template-columns: 1fr;
    }
    .shop-toolbar {
        flex-direction: column;
        gap: 16px;
    }
    .search-form-modern {
        width: 100%;
    }
}

.product-body h3 {
    font-size: 1rem;
    font-weight: 600;
    color: #1e293b;
    margin: 5px 0 12px 0;
    line-height: 1.4;
    min-height: 55px; /* Mantiene las cajas alineadas */
    
    /* Propiedades para cortar el texto a 2 líneas */
    display: -webkit-box;
    -webkit-line-clamp: 2; /* Límite de líneas */
    line-clamp: 2;         /* Propiedad estándar */
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.price {
    font-size: 1.25rem;
    font-weight: 800;
    color: #0f172a; /* Color más oscuro para el precio */
    margin-bottom: 15px;
}




/* Barra de Categorías (La tercera línea del header) */
.categories-nav {
    background: #ffffff;
    border-bottom: 1px solid #e2e8f0;
    padding: 10px 0;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 25px;
    align-items: center;
    margin: 0;
    padding: 0;
}

.nav-links a {
    text-decoration: none;
    color: #475569;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: #2563eb;
}

/* El botón de Categorías debe destacar */
.btn-categories {
    background: #2563eb;
    color: white !important;
    padding: 8px 16px;
    border-radius: 8px;
    font-weight: 600 !important;
}

/* Highlight para Ofertas */
.link-highlight {
    color: #ef4444 !important; /* Rojo para captar atención */
    font-weight: 700 !important;
}

/* User Pill (Efecto cápsula para el usuario) */
.user-pill {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #f1f5f9;
    padding: 5px 15px 5px 5px;
    border-radius: 50px;
    text-decoration: none;
    color: #1e293b;
    font-weight: 600;
    font-size: 0.85rem;
}

.avatar {
    width: 30px;
    height: 30px;
    background: #2563eb;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

















/* --- VARIABLES --- */
:root {
    --primary: #2563eb;
    --dark: #0f172a;
    --light-bg: #f8fafc;
    --border: #e2e8f0;
    --text-muted: #64748b;
}

/* --- TOP BAR (La franja negra superior) --- */
.header-top-info {
    background: var(--dark);
    color: #cbd5e1;
    font-size: 13px;
    padding: 8px 0;
}

.header-top-info .header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.top-info-right a {
    color: white;
    text-decoration: none;
    margin-left: 20px;
}

/* --- MAIN HEADER (Logo, Buscador, Nav) --- */
.main-header {
    background: white;
    border-bottom: 1px solid var(--border);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.main-header .header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* --- LOGO --- */
.logo {
    font-size: 24px;
    font-weight: 800;
    text-decoration: none;
    color: var(--dark);
}
.logo-accent { color: var(--primary); }



/* --- NAVEGACIÓN --- */
.nav-list {
    display: flex;
    align-items: center;
    list-style: none;
    gap: 25px;
    margin: 0;
}

.nav-link {
    text-decoration: none;
    color: var(--dark);
    font-weight: 500;
    font-size: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-link:hover { color: var(--primary); }

/* --- CARRITO --- */
.cart-link {
    display: flex; /* Alinea icono y precio en horizontal */
    align-items: center; /* Centra verticalmente ambos elementos */
    gap: 12px; /* Espacio exacto entre el icono y el monto */
    background: #f1f5f9; /* Color de fondo suave */
    padding: 8px 16px;
    border-radius: 50px; /* Forma de pastilla profesional */
    text-decoration: none;
    transition: all 0.3s ease;
}

.cart-icon-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.cart-icon-wrapper i {
    font-size: 1.2rem;
    color: #1e293b;
}



/* El circulito del número (Badge) */
.cart-badge {
    position: absolute;
    top: -10px;
    right: -10px;
    background: #2563eb; /* Azul corporativo */
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2px;
    border: 2px solid #ffffff; /* Borde blanco para que resalte */
}

/* El texto del precio S/ 0.00 */
.cart-link span:not(.cart-badge) {
    font-size: 0.95rem;
    font-weight: 700;
    color: #0f172a;
    white-space: nowrap; /* Evita que el precio se rompa en dos líneas */
}

/* --- PERFIL DE USUARIO --- */
.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-info-pill {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--light-bg);
    padding: 5px 15px 5px 5px;
    border-radius: 50px;
    text-decoration: none;
    color: var(--dark);
    font-weight: 600;
    border: 1px solid var(--border);
}

.avatar-circle {
    width: 32px;
    height: 32px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-logout-minimal {
    color: var(--text-muted);
    font-size: 18px;
    text-decoration: none;
}











/* ================= PRODUCT DETAIL ================= */

.product-detail {
    max-width: 1200px;
    margin: 40px auto;
}

/* Layout principal */
.product-main {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    background: #fff;
    padding: 32px;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0,0,0,.08);
}

/* Imagen */
.product-gallery {
    display: flex;
    justify-content: center;
    align-items: center;
}

.main-image {
    width: 100%;
    height: 420px;
    background: #f8fafc;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.main-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* Info */
.product-title {
    font-size: 1.9rem;
    margin-bottom: 14px;
}

.product-price {
    font-size: 1.8rem;
    font-weight: 700;
    color: #16a34a;
    margin-bottom: 10px;
}

.product-stock {
    font-weight: 600;
    margin-bottom: 18px;
}

.product-stock.in { color: #16a34a; }
.product-stock.out { color: #dc2626; }

.product-description {
    color: #475569;
    line-height: 1.6;
    margin-bottom: 24px;
}

/* Botón */
.btn-buy {
    width: 100%;
    padding: 14px;
    border-radius: 12px;
    border: none;
    background: #2563eb;
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
}

.btn-buy:disabled {
    background: #94a3b8;
    cursor: not-allowed;
}

.back-link {
    display: inline-block;
    margin-top: 20px;
    color: #2563eb;
    font-weight: 500;
}

/* ================= RELACIONADOS ================= */

.related-section {
    margin-top: 64px;
}

.related-title {
    font-size: 1.5rem;
    margin-bottom: 24px;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 24px;
}

.related-card {
    background: #fff;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid #e5e7eb;
    transition: transform .2s, box-shadow .2s;
}

.related-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 24px rgba(0,0,0,.08);
}

.related-image {
    height: 180px;
    background: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.related-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.related-body {
    padding: 14px;
    text-align: center;
}

.related-body h4 {
    font-size: .95rem;
    min-height: 40px;
}

.related-price {
    font-weight: 700;
    margin: 8px 0;
}

.btn-related {
    display: inline-block;
    margin-top: 8px;
    padding: 8px 14px;
    border-radius: 8px;
    background: #2563eb;
    color: #fff;
    font-size: .85rem;
    font-weight: 600;
    text-decoration: none;
}

.related-out {
    color: #dc2626;
    font-weight: 600;
    font-size: .85rem;
}

/* Responsive */
@media (max-width: 900px) {
    .product-main {
        grid-template-columns: 1fr;
    }

    .main-image {
        height: 300px;
    }
}

.product-description {
    text-align: justify;
    text-justify: inter-word;
    line-height: 1.7;
    font-size: 15px;
    color: #334155;
    margin-top: 15px;
}


.product-description.specs {
    font-size: 15px;
    line-height: 1.8;
    color: #1f2937;
}

.product-description.specs br {
    content: "";
    display: block;
    margin-bottom: 8px;
}















/* =========================
   FOOTER TIENDA
========================= */

.footer {
    background: #0f172a;
    color: #cbd5e1;
    margin-top: 80px;
    font-size: 14px;
}

.footer-container {
    max-width: 1400px;
    margin: auto;
    padding: 60px 20px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 40px;
}

.footer h3 {
    color: #fff;
    font-size: 22px;
    margin-bottom: 15px;
}

.footer h4 {
    color: #fff;
    font-size: 16px;
    margin-bottom: 15px;
}

.footer p {
    line-height: 1.7;
    color: #94a3b8;
}

.footer ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer ul li {
    margin-bottom: 10px;
}

.footer ul li a {
    color: #94a3b8;
    text-decoration: none;
    transition: color 0.3s;
}

.footer ul li a:hover {
    color: #38bdf8;
}

.footer-bottom {
    border-top: 1px solid #1e293b;
    text-align: center;
    padding: 20px;
    font-size: 13px;
    color: #64748b;
}

/* Responsive */
@media (max-width: 600px) {
    .footer {
        text-align: center;
    }
}



.product-body {
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 8px; /* controla el espacio entre nombre, precio y botón */
}

.product-body h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.2;
    color: #1f2937;
}

.product-body .price {
    margin: 0;
    display: center;
    align-items: baseline;
    gap: 4px;
    font-weight: 700;
    color: #2563eb;
}

.product-body .price .currency {
    font-size: 14px;
    font-weight: 600;
}

.product-body .price .amount {
    font-size: 18px;
}

.product-footer {
    margin-top: 6px;
}

.btn-add-cart {
    width: 100%;
    padding: 10px 12px;
    border: none;
    background: #2563eb;
    color: #fff;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    transition: transform .15s ease, background .2s ease;
}

.btn-add-cart:hover {
    background: #1d4ed8;
    transform: translateY(-1px);
}

.btn-add-cart:disabled {
    background: #94a3b8;
    cursor: not-allowed;
}

.btn-add-cart i {
    margin-right: 8px;
}


.product-stock.in {
    color: #16a34a;
    font-weight: 600;
}

.product-stock.out {
    color: #dc2626;
    font-weight: 600;
}

.info-section {
    margin-bottom: 40px;
}

.info-section h2 {
    margin-bottom: 10px;
    color: #111;
}

.info-section p {
    color: #555;
    line-height: 1.6;
}





















.page-title {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 30px;
    color: #111;
    text-align: center;
}

.info-section {
    background: #ffffff;
    padding: 25px 30px;
    margin-bottom: 30px;
    border-radius: 10px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.05);
}

.info-section h2 {
    font-size: 22px;
    margin-bottom: 15px;
    color: #1a1a1a;
    border-bottom: 2px solid #eee;
    padding-bottom: 8px;
}

.info-section p {
    color: #555;
    line-height: 1.7;
    margin-bottom: 12px;
}

.info-section ul {
    padding-left: 20px;
    margin-bottom: 10px;
}

.info-section ul li {
    margin-bottom: 8px;
    color: #444;
}

@media (max-width: 768px) {
    .page-title {
        font-size: 26px;
    }

    .info-section {
        padding: 20px;
    }

    .info-section h2 {
        font-size: 20px;
    }
}




/* ===== PRODUCT DETAIL HORIZONTAL ===== */
.product-detail-horizontal {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

/* ===== CONTENEDOR PRINCIPAL HORIZONTAL ===== */
.product-main-horizontal {
    display: flex;
    gap: 40px;
    align-items: flex-start;
    flex-wrap: wrap;
}

/* ===== IMAGEN ===== */
.product-gallery-horizontal {
    flex: 1 1 450px;
    max-width: 500px;
}

.product-gallery-horizontal img {
    width: 100%;
    border-radius: 12px;
    object-fit: cover;
}

/* ===== INFO ===== */
.product-info-horizontal {
    flex: 1 1 400px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.product-title {
    font-size: 2rem;
    font-weight: 700;
    color: #111827;
}

.product-price {
    font-size: 1.8rem;
    font-weight: 700;
    color: #2563eb;
}

.product-stock.in {
    color: #16a34a;
    font-weight: 600;
}

.product-stock.out {
    color: #dc2626;
    font-weight: 600;
}

.add-cart-form-horizontal {
    margin-top: 20px;
}

.btn-buy {
    padding: 14px 24px;
    font-size: 1.1rem;
    font-weight: 700;
    background-color: #2563eb;
    color: #fff;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: 0.3s;
}

.btn-buy:hover {
    background-color: #1e4ab8;
}

.btn-buy:disabled {
    background-color: #9ca3af;
    cursor: not-allowed;
}

.back-link {
    margin-top: 10px;
    color: #2563eb;
    text-decoration: none;
    font-weight: 500;
}

.back-link:hover {
    text-decoration: underline;
}

/* ===== DESCRIPCIÓN ===== */
.product-description-horizontal {
    margin-top: 20px;
    background: #f8fafc;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.product-description-horizontal h2 {
    color: #2563eb;
    margin-bottom: 12px;
}

.description-content {
    max-height: 200px;
    overflow-y: auto;
    line-height: 1.6;
    color: #334155;
}

/* ===== PRODUCTOS SIMILARES ===== */
.related-section {
    margin-top: 40px;
}

.related-title {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 15px;
}

.related-slider {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    padding-bottom: 10px;
}

.related-card {
    flex: 0 0 220px;
    background: #fff;
    border-radius: 12px;
    padding: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.related-card img {
    width: 100%;
    border-radius: 8px;
    height: 180px;
    object-fit: cover;
}

.related-body h4 {
    font-size: 1rem;
    font-weight: 600;
    color: #111827;
}

.related-price {
    font-weight: 600;
    color: #2563eb;
}

.btn-related {
    text-align: center;
    padding: 6px 12px;
    background-color: #2563eb;
    color: #fff;
    font-weight: 600;
    border-radius: 8px;
    text-decoration: none;
    display: inline-block;
    transition: 0.3s;
}

.btn-related:hover {
    background-color: #1e4ab8;
}

.related-out {
    color: #dc2626;
    font-weight: 600;
}

/* SCROLL ESTÉTICO */
.related-slider::-webkit-scrollbar {
    height: 6px;
}

.related-slider::-webkit-scrollbar-thumb {
    background-color: #2563eb;
    border-radius: 6px;
}

.related-slider::-webkit-scrollbar-track {
    background: #e5e7eb;
}

/* RESPONSIVE */
@media (max-width: 900px) {
    .product-main-horizontal {
        flex-direction: column;
        align-items: center;
    }

    .product-gallery-horizontal, .product-info-horizontal {
        flex: 1 1 100%;
    }
}


.product-stock {
    margin: 10px 0;
    font-size: 15px;
}

.stock-in {
    color: #16a34a;
    font-weight: 600;
}

.stock-low {
    color: #f59e0b;
    font-weight: 600;
}

.stock-out {
    color: #dc2626;
    font-weight: 600;
}


.stock-info {
    font-size: 13px;
}

.in-stock {
    color: #16a34a;
    font-weight: 600;
}

.low-stock {
    color: #f59e0b;
    font-weight: 600;
}

.out-stock {
    color: #dc2626;
    font-weight: 600;
}






















.hero-carousel {
    width: 100%;
    overflow: hidden;
}

/* Cada slide */
.carousel-slide {
    width: 100%;
    aspect-ratio: 3.26 / 1; /* proporción real 3556x1089 */
    background-size: cover;       /* llena sin deformar */
    background-position: center;  /* centra la imagen */
    background-repeat: no-repeat;
    position: relative;
    display: none;
}

/* Slide activo */
.carousel-slide.active {
    display: block;
}

/* Overlay */
.hero-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.45);
}

/* Contenido */
.carousel-content {
    position: relative;
    z-index: 2;
    color: white;
    max-width: 1200px;
    margin: auto;
    padding: 80px 20px;
}
@media (max-width: 768px) {
    .carousel-slide {
        aspect-ratio: 16 / 9;
    }

    .carousel-content {
        padding: 50px 20px;
        text-align: center;
    }
}





/* ===== FIX HEADER MOBILE ===== */

/* Asegura que el header siempre esté encima */
.main-header {
    position: sticky;
    top: 0;
    z-index: 9999 !important;
}

/* Evita que el hero tape el header */
.hero-carousel,
.carousel-slide {
    z-index: 1;
}

/* ===== HEADER RESPONSIVE ===== */

@media (max-width: 768px) {

    /* Oculta top bar en móvil */
    .header-top-info {
        display: none;
    }

    /* Ajusta header principal */
    .main-header .header-container {
        flex-wrap: wrap;
        gap: 10px;
    }

    /* Logo más pequeño */
    .logo {
        font-size: 18px;
    }

    /* Oculta menú secundario si es muy grande */
    .nav-list {
        gap: 12px;
    }

    /* Reduce padding del carrito */
    .cart-link {
        padding: 6px 10px;
    }

    /* Reduce texto del precio */
    .cart-link span:not(.cart-badge) {
        font-size: 0.85rem;
    }
}














































