* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --azul-profundo: #0E3A8A;
    --blanco-roto: #F6F7F9;
    --gris-carbon: #1E1E1E;
    --naranja-calido: #F29C38;
    --gris-claro: #D1D5DB;
    --azul-hover: #0A2D6B;
    --naranja-hover: #E08A2A;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--blanco-roto);
    min-height: 100vh;
    color: var(--gris-carbon);
    line-height: 1.6;
    padding: 0;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header - Solo para páginas que no usan index.css (producto.html, admin.html, etc.) */
body:not(.index-page) header {
    background: linear-gradient(135deg, var(--azul-profundo) 0%, #0A2D6B 100%);
    color: white;
    padding: 50px 20px 40px;
    text-align: center;
    margin-bottom: 0;
    box-shadow: 0 4px 12px rgba(14, 58, 138, 0.15);
    position: relative;
    overflow: hidden;
}

body:not(.index-page) header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><rect width="100" height="100" fill="none"/><path d="M0 50 Q25 30 50 50 T100 50" stroke="rgba(255,255,255,0.03)" fill="none" stroke-width="2"/></svg>');
    opacity: 0.3;
}

body:not(.index-page) header .container {
    position: relative;
    z-index: 1;
}

body:not(.index-page) header h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 8px;
    letter-spacing: -1px;
    text-transform: uppercase;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

body:not(.index-page) header .tagline {
    font-family: 'Playfair Display', serif;
    font-size: 1.3rem;
    opacity: 0.95;
    font-weight: 400;
    font-style: italic;
    margin-bottom: 20px;
    letter-spacing: 0.5px;
}

body:not(.index-page) header .benefits {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-top: 25px;
    flex-wrap: wrap;
}

body:not(.index-page) header .benefit-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
    opacity: 0.9;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    backdrop-filter: blur(10px);
}

body:not(.index-page) header .benefit-item::before {
    content: '✓';
    font-weight: bold;
    color: var(--naranja-calido);
    margin-right: 6px;
    font-size: 1.1rem;
}

@media (max-width: 768px) {
    body:not(.index-page) header {
        padding: 40px 20px 30px;
    }

    body:not(.index-page) header h1 {
        font-size: 2.5rem;
    }

    body:not(.index-page) header .tagline {
        font-size: 1.15rem;
        margin-bottom: 18px;
    }

    body:not(.index-page) header .benefits {
        gap: 15px;
        margin-top: 20px;
    }

    body:not(.index-page) header .benefit-item {
        font-size: 0.9rem;
        padding: 6px 14px;
    }
}

@media (max-width: 480px) {
    body:not(.index-page) header {
        padding: 35px 15px 25px;
    }

    body:not(.index-page) header h1 {
        font-size: 2rem;
    }

    body:not(.index-page) header .tagline {
        font-size: 1rem;
    }

    body:not(.index-page) header .benefits {
        flex-direction: column;
        gap: 10px;
    }
}

/* Main content */
main {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 20px;
}

/* Filtros de categorías */
.categories-filter {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 40px;
    padding: 0;
    background: transparent;
    border-radius: 0;
    box-shadow: none;
}

.category-btn {
    padding: 10px 24px;
    border: 1.5px solid var(--gris-claro);
    background: white;
    color: var(--gris-carbon);
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.category-btn:hover {
    background: var(--azul-profundo);
    color: white;
    border-color: var(--azul-profundo);
    transform: translateY(-1px);
}

.category-btn.active {
    background: var(--azul-profundo);
    color: white;
    border-color: var(--azul-profundo);
    font-weight: 600;
}

/* Estados de carga y error - Solo para páginas que no usan index.css */
body:not(.index-page) .loading, 
body:not(.index-page) .error, 
body:not(.index-page) .no-products {
    text-align: center;
    padding: 60px 20px;
    font-size: 1.1rem;
    color: var(--gris-carbon);
    grid-column: 1 / -1;
}

body:not(.index-page) .error {
    color: #DC2626;
}

body:not(.index-page) .no-products {
    color: #6B7280;
}

/* Grid de productos - Solo para páginas que no usan index.css */
body:not(.index-page) .products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    padding: 0;
}

/* Tarjetas de producto - Solo para páginas que no usan index.css */
body:not(.index-page) .product-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    border: 1px solid var(--gris-claro);
}

body:not(.index-page) .product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(14, 58, 138, 0.12);
    border-color: var(--azul-profundo);
}

body:not(.index-page) .product-image {
    width: 100%;
    height: 280px;
    overflow: hidden;
    background: var(--blanco-roto);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

body:not(.index-page) .product-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, transparent 0%, rgba(14, 58, 138, 0.05) 100%);
    pointer-events: none;
}

body:not(.index-page) .product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

body:not(.index-page) .product-card:hover .product-image img {
    transform: scale(1.08);
}

body:not(.index-page) .product-info {
    padding: 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

body:not(.index-page) .product-info h3 {
    font-size: 1.35rem;
    color: var(--gris-carbon);
    margin: 0;
    font-weight: 600;
    line-height: 1.3;
}

body:not(.index-page) .product-description {
    font-family: 'Playfair Display', serif;
    color: #4B5563;
    font-size: 0.95rem;
    font-style: italic;
    margin: 0;
    flex: 1;
    line-height: 1.5;
}

body:not(.index-page) .product-details {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin: 0;
    padding-top: 12px;
    border-top: 1px solid var(--gris-claro);
}

body:not(.index-page) .detail-item {
    font-size: 0.875rem;
    color: #6B7280;
    display: flex;
    align-items: center;
    gap: 6px;
}

body:not(.index-page) .product-price {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--azul-profundo);
    margin: 0;
    letter-spacing: -0.5px;
}

/* Los botones heredan la fuente del sitio */
button, .btn-buy, .btn-secondary, .btn-contact, .nav-cta, .filter-btn, .cta-button, .index-btn-buy, .index-btn-contact, .btn-login, .btn-small {
    font-family: inherit;
}

body:not(.index-page) .btn-buy {
    background: var(--naranja-calido);
    color: white;
    border: none;
    padding: 14px 24px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;
    margin-top: 8px;
    letter-spacing: 0.3px;
}

body:not(.index-page) .btn-buy:hover {
    background: var(--naranja-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(242, 156, 56, 0.3);
}

body:not(.index-page) .btn-buy:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(242, 156, 56, 0.2);
}

/* Botones flotantes de WhatsApp */
.whatsapp-buttons {
    position: fixed;
    bottom: 30px;
    right: 30px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 1000;
}

.whatsapp-btn {
    background: #25D366;
    color: white;
    padding: 14px 20px;
    border-radius: 50px;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
    transition: all 0.2s ease;
    font-weight: 600;
    font-size: 0.95rem;
    border: none;
}

.whatsapp-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(37, 211, 102, 0.4);
    background: #20BA5A;
}

.whatsapp-btn:active {
    transform: translateY(0);
}

.btn-icon {
    font-size: 1.3rem;
}

.btn-text {
    white-space: nowrap;
}

/* Responsive Design */
@media (max-width: 768px) {
    body {
        padding: 0;
    }

    header {
        padding: 40px 20px;
    }

    header h1 {
        font-size: 2.2rem;
    }

    header p {
        font-size: 1rem;
    }

    main {
        padding: 30px 15px;
    }

    .categories-filter {
        gap: 8px;
        margin-bottom: 30px;
    }

    .category-btn {
        padding: 8px 16px;
        font-size: 0.875rem;
    }

    body:not(.index-page) .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
        gap: 20px;
    }

    body:not(.index-page) .product-image {
        height: 220px;
    }

    body:not(.index-page) .product-info {
        padding: 20px;
    }

    body:not(.index-page) .product-info h3 {
        font-size: 1.2rem;
    }

    body:not(.index-page) .product-price {
        font-size: 1.5rem;
    }

    .whatsapp-buttons {
        bottom: 20px;
        right: 20px;
    }

    .whatsapp-btn {
        padding: 12px 18px;
        font-size: 0.875rem;
    }

    .btn-text {
        display: none;
    }

    .btn-icon {
        font-size: 1.4rem;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 1.8rem;
    }

    header p {
        font-size: 0.9rem;
    }

    body:not(.index-page) .products-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    body:not(.index-page) .product-image {
        height: 200px;
    }

    body:not(.index-page) .product-info {
        padding: 18px;
    }

    .whatsapp-buttons {
        bottom: 15px;
        right: 15px;
    }

    .whatsapp-btn {
        padding: 12px;
        width: 50px;
        height: 50px;
        justify-content: center;
    }
}

/* Animación de carga suave - Solo para páginas que no usan index.css */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

body:not(.index-page) .product-card {
    animation: fadeIn 0.5s ease-out;
}

body:not(.index-page) .product-card:nth-child(1) { animation-delay: 0.05s; }
body:not(.index-page) .product-card:nth-child(2) { animation-delay: 0.1s; }
body:not(.index-page) .product-card:nth-child(3) { animation-delay: 0.15s; }
body:not(.index-page) .product-card:nth-child(4) { animation-delay: 0.2s; }
body:not(.index-page) .product-card:nth-child(5) { animation-delay: 0.25s; }
body:not(.index-page) .product-card:nth-child(6) { animation-delay: 0.3s; }

/* Mejoras adicionales */
.category-btn:focus,
.btn-buy:focus,
.whatsapp-btn:focus {
    outline: 2px solid var(--naranja-calido);
    outline-offset: 2px;
}

/* Separador visual mejorado */
.product-details::before {
    content: '';
    display: block;
    height: 1px;
    background: var(--gris-claro);
    margin-bottom: 12px;
}

/* Footer - Estilos compartidos */
.main-footer {
    background: linear-gradient(135deg, var(--gris-carbon) 0%, #2a2a2a 100%);
    color: white;
    margin-top: 100px;
    padding: 60px 20px 30px;
}

.footer-container {
    max-width: 1400px;
    margin: 0 auto;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 50px;
}

.footer-column {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.footer-logo {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 8px;
    background: linear-gradient(135deg, var(--naranja-calido), var(--naranja-hover));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.footer-tagline {
    font-family: 'Playfair Display', serif;
    font-size: 1.1rem;
    font-style: italic;
    opacity: 0.9;
    margin-bottom: 15px;
}

.footer-description {
    font-family: 'Playfair Display', serif;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.7;
    font-size: 0.95rem;
    font-style: italic;
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 10px;
}

.social-link {
    width: 45px;
    height: 45px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    text-decoration: none;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.social-link:hover {
    background: var(--naranja-calido);
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 10px 25px rgba(242, 156, 56, 0.4);
}

.footer-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: white;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-links li a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: all 0.2s ease;
    font-size: 0.95rem;
}

.footer-links li a:hover {
    color: var(--naranja-calido);
    padding-left: 5px;
}

.footer-contact {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.footer-contact li {
    display: flex;
    gap: 15px;
    align-items: flex-start;
}

.contact-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
    margin-top: 2px;
}

.footer-contact li div {
    flex: 1;
}

.footer-contact li strong {
    display: block;
    margin-bottom: 5px;
    font-size: 0.95rem;
    color: white;
}

.footer-contact li p {
    margin: 0;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
}

.footer-contact li a {
    color: var(--naranja-calido);
    text-decoration: none;
}

.footer-contact li a:hover {
    text-decoration: underline;
}

.footer-hours {
    background: rgba(255, 255, 255, 0.05);
    padding: 30px;
    border-radius: 15px;
    margin-bottom: 40px;
    backdrop-filter: blur(10px);
}

.footer-hours h4 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 20px;
    text-align: center;
    color: white;
}

.hours-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.hours-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}

.hours-day {
    font-weight: 600;
    margin-bottom: 8px;
    color: white;
}

.hours-time {
    color: var(--naranja-calido);
    font-weight: 500;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 30px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: center;
    text-align: center;
}

.footer-certifications {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
}

.cert-badge {
    padding: 8px 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.footer-copyright {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
}

.footer-legal {
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: center;
    margin-top: 10px;
    flex-wrap: wrap;
}

.footer-legal a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.2s ease;
}

.footer-legal a:hover {
    color: var(--naranja-calido);
}

.footer-legal span {
    color: rgba(255, 255, 255, 0.4);
}

@media (max-width: 768px) {
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .footer-hours {
        padding: 20px;
    }

    .hours-grid {
        grid-template-columns: 1fr;
    }

    .footer-certifications {
        flex-direction: column;
        align-items: center;
    }

    .footer-legal {
        flex-direction: column;
        gap: 5px;
    }

    .footer-legal span {
        display: none;
    }
}
