header {
    background: linear-gradient(135deg, #0f2580 0%, #1938a2 50%, #2547c2 100%);
    color: white;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    z-index: 100;
    box-shadow: 0 4px 20px rgba(15, 37, 128, 0.5);
    border-bottom: 3px solid var(--accent);
}

.mobile-menu-toggle {
    display: block;
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 2100;
}

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Outfit:wght@300;400;500;600;700;800&display=swap');

:root {
    --primary: #1938a2;
    --accent: #f69812;
    --light: #f5f6fa;
    --font-main: 'Inter', sans-serif;
    --font-heading: 'Outfit', sans-serif;
}

body {
    font-family: var(--font-main);
    margin: 0;
    padding: 0;
    background-color: var(--light);
    font-size: 15px;
    line-height: 1.5;
    color: #333;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
}

header {
    background: linear-gradient(135deg, #0f2580 0%, #1938a2 50%, #2547c2 100%);
    color: white;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 4px 20px rgba(15, 37, 128, 0.5);
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo {
    height: 50px;
    width: auto;
    border-radius: 5px;
    background-color: white;
    padding: 5px;
}

.logo-container h1 {
    margin: 0;
    font-size: 1.2rem;
}

.nav-container {
    display: flex;
    align-items: center;
    gap: 20px;
}

.nav-menu {
    list-style: none;
    display: flex;
    gap: 15px;
    margin: 0;
    padding: 0;
}

.nav-menu li a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    padding: 8px 12px;
    border-radius: 4px;
    transition: background 0.3s;
}

.nav-menu li a:hover,
.nav-menu li a.active {
    background: rgba(255, 255, 255, 0.2);
}

.nav-cart {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--accent);
    color: white;
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 50px;
    font-weight: bold;
    transition: transform 0.2s, box-shadow 0.2s;
}

.nav-cart:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(255, 153, 0, 0.4);
}

.cart-badge {
    background: white;
    color: var(--accent);
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 900;
}

#catalogo {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    padding: 20px;
    align-items: stretch;
    /* todas las tarjetas igual de altas */
}

/* Botones dentro de la tarjeta — siempre al fondo */
.card-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: auto !important;
    padding-top: 12px;
    flex-shrink: 0;
}

.card {
    background: white;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
    text-align: center;
    display: flex;
    flex-direction: column;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2);
}

.card img {
    max-width: 100%;
    height: 180px;
    object-fit: contain;
    flex-shrink: 0;
}

.card h3 {
    flex-grow: 1;
    /* empuja todo lo de abajo al fondo */
    margin: 10px 0 6px;
    font-size: 1rem;
    font-family: var(--font-heading);
    font-weight: 700;
    color: #1a1a1a;
    line-height: 1.3;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    /* máximo 3 líneas */
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card .sku {
    font-size: 0.8rem;
    color: #777;
    margin: 0 0 10px;
    letter-spacing: 0.5px;
    flex-shrink: 0;
}

.card .precio {
    flex-shrink: 0;
    margin: 0 0 15px;
    font-size: 1.25rem;
    color: var(--primary);
}

.card .precio strong {
    font-weight: 800;
    font-family: var(--font-heading);
}

.card>div:last-child {
    /* contenedor de botones */
    flex-shrink: 0;
    margin-top: auto;
}

.original {
    text-decoration: line-through;
    color: red;
    font-size: 0.9em;
}

.modal {
    display: none;
    position: fixed;
    z-index: 200;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
}

.modal-content {
    background: white;
    margin: 10% auto;
    padding: 20px;
    width: 90%;
    max-width: 500px;
}

/* Product Detail Page Styles */
.product-page {
    padding: 40px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.product-detail-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    padding: 0;
}

@media (max-width: 768px) {
    header {
        flex-direction: row;
        flex-wrap: wrap;
        padding: 15px;
    }

    .mobile-menu-toggle {
        display: block;
    }

    .logo-container {
        flex: 1;
    }

    .logo-container h1 {
        display: none;
        /* Hide on mobile to save space */
    }

    .nav-container {
        display: none;
        /* Hidden by default */
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: rgba(25, 56, 162, 0.98);
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        padding-top: 80px;
        /* space for header */
        z-index: 2000;
        gap: 30px;
    }

    .nav-container.open {
        display: flex;
    }

    .nav-container.open {
        display: flex;
    }

    .nav-menu {
        flex-direction: column;
        align-items: center;
        gap: 20px;
        width: 100%;
    }

    .nav-menu li a {
        font-size: 1.5rem;
        display: block;
        width: 100%;
        text-align: center;
    }

    .nav-cart {
        font-size: 1.2rem;
        padding: 12px 25px;
    }

    .product-detail-container {
        grid-template-columns: 1fr;
    }

    .hero-slider {
        height: 250px;
    }

    .slide-content h2 {
        font-size: 1.8rem;
    }

    .slide-content p {
        font-size: 1rem;
    }
}

.product-gallery {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

#main-image {
    width: 100%;
    max-height: 400px;
    object-fit: contain;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 10px;
}

.thumbnail-list {
    display: flex;
    gap: 10px;
    overflow-x: auto;
}

.thumbnail-list img {
    width: 80px;
    height: 80px;
    object-fit: contain;
    border: 1px solid #ccc;
    border-radius: 4px;
    cursor: pointer;
    transition: border-color 0.3s;
}

.thumbnail-list img:hover {
    border-color: var(--primary);
}

.product-info {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.product-title {
    margin: 0;
    font-size: 1.8rem;
    font-family: var(--font-heading);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--primary);
    line-height: 1.2;
}

.product-info .sku {
    color: #777;
    margin: 0;
}

.product-price-section {
    display: flex;
    align-items: center;
    gap: 15px;
    margin: 10px 0;
}

.original-price {
    text-decoration: line-through;
    color: #999;
    font-size: 1.2rem;
}

.current-price {
    font-size: 1.8rem;
    font-weight: bold;
    color: #d9534f;
}

.product-description {
    line-height: 1.6;
    color: #555;
}

.product-characteristics table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

.product-characteristics th,
.product-characteristics td {
    border: 1px solid #ddd;
    padding: 10px;
    text-align: left;
}

.product-characteristics th {
    background-color: #f9f9f9;
    width: 40%;
}

.product-actions {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 20px;
}

.qty-input {
    width: 60px;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 1.1rem;
    text-align: center;
}



/* Nuevos Estilos - Contenedor y Categorías */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.category-section {
    margin-bottom: 40px;
}

.category-title {
    font-size: 1.4rem;
    color: var(--primary);
    border-bottom: 2px solid var(--primary);
    padding-bottom: 8px;
    margin-bottom: 15px;
}

/* Cart Page Styles */
.cart-page {
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.cart-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.cart-table th,
.cart-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.cart-table th {
    background: #f8f9fa;
    font-weight: bold;
}

.btn-remove {
    background: #e74c3c;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
}

.cart-total {
    font-size: 1.3rem;
    font-weight: bold;
    text-align: right;
    margin-top: 15px;
}

.cart-actions {
    display: flex;
    justify-content: flex-end;
    gap: 15px;
    margin-top: 20px;
}

.btn-checkout {
    background: var(--green, #27ae60);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 5px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.3s;
}

.btn-checkout:hover {
    background: #219a52;
}

/* Card Buttons */
.btn-primary {
    background-color: var(--accent);
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 5px;
    font-weight: bold;
    cursor: pointer;
    flex: 1;
    transition: background-color 0.3s, transform 0.1s;
    text-align: center;
}

.btn-primary:hover {
    background-color: #e68a00;
}

.btn-primary:active {
    transform: scale(0.95);
}

.btn-outline {
    background-color: transparent;
    color: #333;
    border: 2px solid #ddd;
    padding: 8px 15px;
    border-radius: 5px;
    font-weight: bold;
    cursor: pointer;
    text-decoration: none;
    transition: border-color 0.3s, color 0.3s, background-color 0.3s;
    text-align: center;
}

.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
    background-color: #f0f8ff;
}

/* Hero Slider */
.hero-slider {
    position: relative;
    width: 100%;
    height: 400px;
    overflow: hidden;
    background-color: #111;
}

.hero-slider .slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
}

.hero-slider .slide::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    /* Oscurecer para leer el texto */
    z-index: 2;
}

.hero-slider .slide.active {
    opacity: 1;
    z-index: 3;
}

.slide-content {
    position: relative;
    z-index: 10;
    text-align: center;
    color: white;
    max-width: 800px;
    padding: 0 20px;
}

.slide-content h2 {
    font-size: 3rem;
    margin-bottom: 15px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    font-weight: 900;
}

.slide-content p {
    font-size: 1.2rem;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.8);
    line-height: 1.6;
}

/* =====================
   TAMBIÉN TE PUEDE INTERESAR
   ===================== */
.related-section {
    background: white;
    padding: 50px 0 30px;
    margin-top: 0px;
    border-top: 1px solid #eee;
}

.related-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
    margin: 0 0 25px;
    padding-bottom: 10px;
    border-bottom: 3px solid var(--accent);
    display: inline-block;
}

/* =====================
   FOOTER
   ===================== */
.site-footer {
    background: linear-gradient(135deg, #060f3a 0%, #0d1f6b 50%, #162888 100%);
    color: #cdd5f0;
    margin-top: 0px;
    border-top: 3px solid var(--accent);
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 50px 30px 30px;
    display: grid;
    grid-template-columns: 2fr 2fr 1fr 1.5fr;
    gap: 40px;
}

.footer-logo {
    height: 55px;
    background: white;
    padding: 6px;
    border-radius: 6px;
    margin-bottom: 14px;
    display: block;
}

.footer-brand p {
    font-size: 0.88rem;
    line-height: 1.7;
    color: #a8b8e8;
}

.footer-contact h4,
.footer-links h4,
.footer-social h4 {
    color: white;
    font-size: 0.95rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 0 0 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--accent);
    display: inline-block;
}

.footer-contact ul,
.footer-links ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-contact li {
    font-size: 0.85rem;
    color: #a8b8e8;
    line-height: 1.5;
}

.footer-contact a,
.footer-links a {
    color: #a8b8e8;
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.25s;
}

.footer-contact a:hover,
.footer-links a:hover {
    color: var(--accent);
}

/* Social icons */
.social-icons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 6px;
}

.social-btn {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.25s, opacity 0.25s;
    color: white;
}

.social-btn svg {
    width: 20px;
    height: 20px;
}

.social-btn:hover {
    transform: translateY(-4px);
    opacity: 0.85;
}

.social-btn.facebook {
    background: #1877f2;
}

.social-btn.instagram {
    background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
}

.social-btn.whatsapp {
    background: #25d366;
}

.social-btn.linkedin {
    background: #0a66c2;
}

/* Footer bottom bar */
.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    padding: 16px 20px;
    font-size: 0.78rem;
    color: #7080b0;
}

/* Footer responsive */
@media (max-width: 900px) {
    .footer-inner {
        grid-template-columns: 1fr 1fr;
        gap: 30px;
    }
}

@media (max-width: 560px) {
    .footer-inner {
        grid-template-columns: 1fr;
        padding: 30px 20px;
    }
}