:root {
    --primary-dark-red: #c30f45;
    --primary-light-red: #d6265b;
    --primary-pink: #c30f45;
    --dark-accent: #c30f45;
    --light-accent: #FBCFD2;
    --dark-background: #1a1a1a;
    --text-color-light: #FDFCFC;
    --text-color-dark: #231123;
    --section-background-dark: #2a2a2a;
    --border-color: var(--primary-dark-red);
    --primary-dark-red-rgb: 200, 15, 54;
    --transition-duration: 0.3s;
    --transition-timing: cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --box-shadow: 0 10px 30px rgba(var(--primary-dark-red-rgb), 0.1);
    --box-shadow-hover: 0 15px 35px rgba(var(--primary-dark-red-rgb), 0.2);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Montserrat";
    background-color: #f9f9f9;
    color: var(--text-color-dark);
    line-height: 1.6;
}


.top-bar {
    background-color: var(--primary-dark-red);
    color: #FDFCFC;
    padding: 0.8rem 25%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1rem;
}

.top-bar h3{
    font-size: 0.9rem;
    font-weight: 500;
    text-align: center;
}

.top-bar a {
    color: #FDFCFC;
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.top-bar a:hover {
    opacity: 0.8;
}



.follow-text {
    font-weight: 600;
    color: #231123;
}

.social-icons {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 1rem;
    width: auto; /* Was 1200px */
}

.social-icons a {
    font-size: 1.7rem;
}

/* Animaciones para redes sociales del header */
.social-icons a {
    position: relative;
    transition: all 0.5s ease;
}

.social-icons a:nth-child(1) { animation: float 4s ease-in-out infinite; }
.social-icons a:nth-child(2) { animation: float 4s ease-in-out infinite 0.5s; }
.social-icons a:nth-child(3) { animation: float 4s ease-in-out infinite 1s; }

/* Asegúrate de que la animación float esté definida (si no la tienes ya) */
@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-5px); }
    100% { transform: translateY(0px); }
}

/* Mejora los hover existentes */
.social-icons a:hover {
    color: #c30f45;
    transform: scale(1.1) translateY(-5px);
    animation: none; /* Detiene la animación al hacer hover para un efecto más controlado */
}



.social-icons .separator {
    opacity: 0.5;
    color: #231123;
}

.social-icons .social-links{
    text-decoration: none;
    font-size: 1rem;
    color: #231123;
    font-weight: 500;

}

h6{
    margin-top: 1rem;
    text-align: center;
}

.top-links {
    display: flex;
    gap: 1rem;
}

.top-bar-right {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

header {
    background: #FDFCFC;
    box-shadow: 0 4px 12px rgba(238, 12, 12, 0.152);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 5%;
    max-width: 1400px;
    margin: 0 auto;
}

.nav-logo img {
    height: 150px;
    width: 450px;
    max-width: 180%;
    transition: transform 0.3s ease;
    margin-right: 10rem;
}

.nav-logo img:hover {
    transform: scale(1.05);
}


.icons-bar{
    display: flex;
    align-items: center; /* Alinear social icons y toggle de búsqueda verticalmente */
    /* flex-direction: column; ELIMINADO */
    /* width: 80%; ELIMINADO o ajustar si es necesario */
    gap: 1rem; /* Espacio entre social-icons y área de búsqueda, si son hijos directos */
}

.social-icons i {
    color: #231123;
        transition: transform 0.3s ease;
}


.social-icons i:hover {
    color: #c30f45;
    transform: scale(1.05);
}

/* Estilos para el botón de activación de búsqueda (icono de lupa) */
.search-toggle-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem; 
    font-size: 1.2rem; 
    color: var(--text-color-dark); 
    display: flex; 
    align-items: center;
    justify-content: center;
    /* order: 2; Si es necesario para el ordenamiento flex dentro de .icons-bar */
}

.search-toggle-btn:hover {
    color: var(--primary-dark-red);
}

/* Contenedor de búsqueda real (input + botón) */
.search-container {
    /* display: flex; Se elimina display:flex de aquí, se controla con .active */
    align-items: center; /* Mantener la alineación interna */
    /* max-width: 500px; Se mantiene para cuando está en el flujo normal (escritorio, si no es desplegable) */
}

.search-container:not(.active) {
    display: none; 
}

.search-container.active {
    display: flex; 
    position: absolute;
    top: 100%; /* Relativo al <header> que es sticky */
    left: 0;
    right: 0; 
    width: 100%; /* Ocupará el ancho del header */
    max-width: none !important; /* Sobreescribir cualquier max-width anterior */
    background-color: #FDFCFC; 
    z-index: 1010; 
    padding: 1rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-top: 1px solid #eee;
}

.search-container.active .search-input {
    flex-grow: 1; /* El input toma el espacio disponible */
}


.search-input {
    width: 100%;
    padding: 0.6rem 1rem;
    border: 1px solid #ddd;
    border-radius: 4px 0 0 4px;
    font-family: 'Poppins', sans-serif;
}

.search-button {
    background-color: var(--primary-dark-red);
    color: #FDFCFC;
    border: none;
    padding: 0.6rem 1rem;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.search-button:hover {
    background-color: var(--dark-accent);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    color: #231123;
    text-decoration: none;
    font-weight: 500;
    position: relative;
    padding: 0.5rem 0;
    transition: all var(--transition-duration) var(--transition-timing);
    font-family: "Montserrat";
    font-size: 1.2rem;
}

.nav-links a:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-light-red);
    transition: width var(--transition-duration) var(--transition-timing);
}

.nav-links a:hover {
    color: var(--primary-light-red);
    text-shadow: 0 0 8px rgba(var(--primary-dark-red-rgb), 0.5);
}

.nav-links a:hover:after {
    width: 100%;
}

.nav-cart {
    position: relative;
    background-color: transparent;
    border-radius: 4px;
    width: auto; /* Was 500px */
    transition: all 0.3s ease;
    margin-left: 1rem; /* Added to push cart to the right */
}

.nav-cart a {
    color: var(--text-color-dark);
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    font-weight: 500;
}

.nav-cart:hover {
    background-color: transparent;
    transform: scale(1.05);
}

.nav-cart #cart-count {
    color: var(--primary-dark-red);
    font-weight: bold;
}
        /* Main Content */
main {
    max-width: 1400px;
    margin: 2rem auto;
    /* height: 80vh; */ /* Allow content to define height */
    padding: 0 5%;
    animation: fadeIn 0.6s var(--transition-timing);
    min-height: calc(100vh - 250px); /* Adjust 250px based on header/footer height */
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Cart Page Section */
#cart-page-section {
    background: white;
    border-radius: 12px;
    box-shadow: var(--box-shadow);
    overflow: hidden;
    transition: transform var(--transition-duration) var(--transition-timing);
    margin-bottom: 4rem;
    margin-top: 2rem;
    padding: 0;
}

#cart-page-section:hover {
    transform: translateY(-5px);
    box-shadow: var(--box-shadow-hover);
}

#cart-page-section h2 {
    color: var(--primary-dark-red);
    padding: 2rem 2rem 1rem;
    font-size: 1.8rem;
    position: relative;
}

#cart-page-section h2:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 2rem;
    width: 50px;
    height: 3px;
    background: linear-gradient(to right, var(--primary-dark-red), var(--primary-pink));
}

#cart-items-container {
    padding: 0 2rem;
}

.cart-items-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.cart-item {
    display: flex;
    align-items: center;
    padding: 1.5rem 0;
    border-bottom: 1px solid #f0f0f0;
    transition: all var(--transition-duration) var(--transition-timing);
}

.cart-item:hover {
    background-color: rgba(var(--primary-dark-red-rgb), 0.03);
}

.cart-item:last-child {
    border-bottom: none;
}

.cart-item-image {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    margin-right: 1.5rem;
    border: 1px solid #eee;
}

.cart-item-details {
    flex-grow: 1;
}

.item-name {
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--dark-background);
}

.item-price {
    font-weight: 600;
    color: var(--primary-dark-red);
}

.item-actions {
    display: flex;
    align-items: center;
    margin-top: 0.5rem;
}

.item-actions button {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all var(--transition-duration) var(--transition-timing);
}

.item-actions .quantity-value {
    margin: 0 0.5rem;
    min-width: 20px;
    text-align: center;
}

.item-actions .quantity-decrease,
.item-actions .quantity-increase {
    background-color: #f0f0f0;
    color: var(--text-color-dark);
}

.item-actions .quantity-decrease:hover,
.item-actions .quantity-increase:hover {
    background-color: var(--primary-light-red);
    color: white;
}

.item-actions .remove-item {
    color: #ff6347;
    margin-left: 1rem;
    font-size: 1.2rem;
}

.item-actions .remove-item:hover {
    color: #d32f2f;
    transform: scale(1.1);
}

#cart-summary {
    background-color: #f9f9f9;
    padding: 2rem;
    text-align: right;
    border-top: 2px solid var(--primary-light-red);
}

#cart-summary h3 {
    font-size: 1.4rem;
    margin-bottom: 1.5rem;
    color: var(--dark-background);
}

#cart-total {
    font-size: 1.5rem;
    color: var(--primary-dark-red);
    font-weight: 700;
}

.checkout-button {
    background: linear-gradient(135deg, var(--primary-dark-red), var(--primary-pink));
    color: white;
    padding: 1rem 2.5rem;
    text-decoration: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: all var(--transition-duration) var(--transition-timing);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 4px 15px rgba(var(--primary-dark-red-rgb), 0.3);
}

.checkout-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(var(--primary-dark-red-rgb), 0.4);
    background: linear-gradient(135deg, var(--dark-accent), var(--primary-dark-red));
}

.checkout-button:disabled {
    background: #cccccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Empty Cart State - Enhanced */
.empty-cart {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px; /* Aumentar padding */
    text-align: center;
    border-radius: 12px; /* Bordes más redondeados */
    background-color: transparent; /* Fondo coherente */
    margin-top: 30px; /* Más espacio superior */
    opacity: 0;
    animation: fadeInEmptyCart 0.6s var(--transition-timing, ease-out) forwards;
    min-height: 250px; /* Asegurar altura mínima para el efecto visual */
}

@keyframes fadeInEmptyCart {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.empty-cart-icon i.fas.fa-shopping-cart { /* Selector más específico para el ícono FontAwesome */
    font-size: 52px; /* Un poco más grande */
    color: var(--primary-light-red, #c30f45);
    margin-bottom: 25px; /* Más espacio inferior */
}
/* Si el ícono no es FontAwesome o no está en un <i>, ajustar el selector anterior o este: */
/* .empty-cart-icon { 
    font-size: 52px; 
    color: var(--primary-light-red, #c30f45);
    margin-bottom: 25px;
} */


.empty-cart-message {
    font-size: 1.6em; /* Mensaje más grande */
    color: var(--text-color-dark, #333);
    margin-bottom: 30px; /* Más espacio */
    font-weight: 600;
}

.continue-shopping-btn {
    display: inline-block;
    padding: 14px 30px; /* Botón más grande */
    font-size: 1.1em;
    color: var(--text-color-light, #fff);
    background: linear-gradient(135deg, var(--primary-dark-red), var(--primary-pink)); /* Gradiente como el de checkout */
    border: none;
    border-radius: 8px; /* Coherente con otros botones */
    text-decoration: none;
    font-weight: 600; /* Texto más bold */
    transition: all var(--transition-duration, 0.3s) var(--transition-timing, ease);
    box-shadow: var(--box-shadow, 0 4px 15px rgba(0,0,0,0.2));
}

.continue-shopping-btn:hover,
.continue-shopping-btn:focus {
    background: linear-gradient(135deg, var(--dark-accent), var(--primary-dark-red));
    transform: translateY(-4px); /* Efecto hover más pronunciado */
    box-shadow: var(--box-shadow-hover, 0 8px 25px rgba(0,0,0,0.3));
    color: var(--text-color-light, #fff);
    text-decoration: none;
}

/* Ajuste para el contenedor de items si es necesario para centrar */
#cart-items-container {
    /* display: flex; // Descomentar si .empty-cart no se centra bien
    justify-content: center;
    align-items: center; */
    /* min-height ya estaba en el archivo original para .empty-cart,
       así que se puede ajustar o quitar de #cart-items-container si no es necesario */
}


/* Cart Layout and Shipping Calculator */
.cart-layout-container {
    display: flex;
    flex-wrap: wrap; /* Allows wrapping on smaller screens */
    gap: 2rem; /* Space between cart items and shipping calculator */
    padding: 0 2rem 2rem; /* Add padding to the bottom */
}

#cart-items-container {
    flex: 2; /* Takes 2/3 of the space */
    min-width: 300px; /* Minimum width before wrapping */
}

#shipping-calculator-container {
    flex: 1; /* Takes 1/3 of the space */
    background-color: #f9f9f9;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    min-width: 280px; /* Minimum width before wrapping */
    align-self: flex-start; /* Aligns to the top with cart items */
}

#shipping-calculator-container h3 {
    font-size: 1.3rem;
    color: var(--primary-dark-red);
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #eee;
}

.shipping-form .form-group {
    margin-bottom: 1rem;
}

.shipping-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--text-color-dark);
}

.shipping-form select,
.shipping-form input[type="text"] { /* If you add text inputs later */
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: "Montserrat", sans-serif;
    font-size: 1rem;
    background-color: white;
    transition: border-color 0.3s ease;
}

.shipping-form select:focus,
.shipping-form input[type="text"]:focus {
    outline: none;
    border-color: var(--primary-dark-red);
    box-shadow: 0 0 0 2px rgba(var(--primary-dark-red-rgb), 0.2);
}

.shipping-form select:disabled {
    background-color: #e9ecef;
    cursor: not-allowed;
}

#calculate-shipping-btn {
    width: 100%;
    padding: 0.8rem;
    background: linear-gradient(135deg, var(--primary-dark-red), var(--primary-pink));
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-duration) var(--transition-timing);
    margin-top: 1rem;
}

#calculate-shipping-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, var(--dark-accent), var(--primary-dark-red));
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(var(--primary-dark-red-rgb), 0.2);
}

#calculate-shipping-btn:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

#shipping-options-container {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #eee;
}

#shipping-options-container h4 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: var(--text-color-dark);
}

.shipping-option {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid #f0f0f0;
}

.shipping-option:last-child {
    border-bottom: none;
}

.shipping-option input[type="radio"] {
    margin-right: 0.75rem;
    accent-color: var(--primary-dark-red); /* Modern way to style radio button color */
}

.shipping-option label {
    flex-grow: 1;
    font-size: 0.95rem;
    color: var(--text-color-dark);
}

.shipping-option span {
    font-weight: 600;
    color: var(--primary-dark-red);
    font-size: 0.95rem;
}


/* Cart Summary adjustments */
#cart-summary {
    /* Existing styles */
    margin-top: 0; /* Remove top margin if cart-layout-container handles spacing */
    width: 100%; /* Make summary take full width below the flex container */
    clear: both; /* Ensure it clears floated elements if any (though flex is used here) */
}

#cart-summary p { /* Style for subtotal and shipping cost lines */
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
    color: var(--text-color-dark);
    display: flex;
    justify-content: space-between;
}
#cart-summary p span {
    font-weight: 600;
}


/* Responsive adjustments for cart layout */
@media (max-width: 992px) { /* Adjust breakpoint as needed */
    .cart-layout-container {
        flex-direction: column;
    }

    #cart-items-container,
    #shipping-calculator-container {
        flex: none; /* Reset flex sizing */
        width: 100%; /* Make them full width */
    }

    #shipping-calculator-container {
        margin-top: 2rem; /* Add space when stacked */
    }
}


/* Footer Styles */
footer {
    background: #231123;
    color: var(--text-color-light);
    padding: 3rem 5% 0;
    margin-top: 5rem;
    position: relative;
    overflow: hidden;
}

.footer-container {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

.footer-logo-section {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    margin-bottom: 2rem;
}

.footer-logo {
    height: 100px;
    width: auto;
    margin-bottom: 1.5rem;
    transition: transform 0.5s ease;
}

.footer-logo:hover {
    transform: scale(1.05);
}

.footer-social {
    display: flex;
    gap: 1.5rem;
}

.footer-social a {
    color: #FDFCFC;
    font-size: 1.5rem;
    transition: all 0.3s ease;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
}

.footer-social a:hover {
    background: var(--primary-light-red);
    transform: translateY(-3px);
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.footer-column h3 {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    position: relative;
    padding-bottom: 0.5rem;
    color: var(--primary-light-red);
}

.footer-column h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 2px;
    background: var(--primary-light-red);
}

.footer-column ul {
    list-style: none;
}

.footer-column ul li {
    margin-bottom: 0.8rem;
}

.footer-column ul li a {
    color: #FDFCFC;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    padding-left: 0;
}

.footer-column ul li a::before {
    content: '→';
    position: absolute;
    left: -20px;
    opacity: 0;
    transition: all 0.3s ease;
    color: var(--primary-light-red);
}

.footer-column ul li a:hover {
    color: var(--primary-light-red);
    padding-left: 20px;
}

.footer-column ul li a:hover::before {
    opacity: 1;
    left: 0;
}

.newsletter-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.newsletter-form input {
    padding: 0.8rem;
    border: none;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.1);
    color: #FDFCFC;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.newsletter-form input:focus {
    outline: none;
    border-color: var(--primary-light-red);
    background: rgba(255, 255, 255, 0.2);
}

.newsletter-form input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.newsletter-form button {
    padding: 0.8rem;
    background: var(--primary-light-red);
    color: #FDFCFC;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.newsletter-form button:hover {
    background: var(--primary-dark-red);
    transform: translateY(-2px);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1.5rem 0;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.footer-bottom p {
    margin: 0;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
}

.payment-methods {
    display: flex;
    gap: 1rem;
    font-size: 1.8rem;
    color: rgba(255, 255, 255, 0.7);
}

/* Footer Modal Styles */
.footer-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 3000;
    overflow-y: auto;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.footer-modal.active {
    display: block;
    opacity: 1;
}

.modal-content {
    background-color: #231123;
    margin: 5% auto;
    padding: 2rem;
    border-radius: 8px;
    max-width: 800px;
    width: 90%;
    position: relative;
    box-shadow: 0 5px 30px rgba(0, 0, 0, 0.3);
    transform: translateY(-50px);
    transition: transform 0.3s ease;
    border: 1px solid var(--primary-light-red);
}

.footer-modal.active .modal-content {
    transform: translateY(0);
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    font-size: 2rem;
    color: #FDFCFC;
    cursor: pointer;
    transition: all 0.3s ease;
}

.modal-close:hover {
    color: var(--primary-light-red);
    transform: rotate(90deg);
}

.modal-content h2 {
    color: var(--primary-light-red);
    margin-bottom: 1.5rem;
    font-size: 1.8rem;
}

.modal-body {
    max-height: 70vh;
    overflow-y: auto;
    padding-right: 1rem;
}

.modal-body p {
    margin-bottom: 1rem;
    line-height: 1.6;
}

/* Scrollbar styling for modal */
.modal-body::-webkit-scrollbar {
    width: 8px;
}

.modal-body::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
}

.modal-body::-webkit-scrollbar-thumb {
    background: var(--primary-light-red);
    border-radius: 4px;
}

/* Animations */
/* Re-define float animation if it was different here, or remove if same as header's */
/* @keyframes float { ... } */

.footer-social a:nth-child(1) { animation: float 4s ease-in-out infinite; }
.footer-social a:nth-child(2) { animation: float 4s ease-in-out infinite 0.5s; }
.footer-social a:nth-child(3) { animation: float 4s ease-in-out infinite 1s; }
.footer-social a:nth-child(4) { animation: float 4s ease-in-out infinite 1.5s; }

/* Responsive */
@media (max-width: 768px) {
    .footer-links {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-logo-section {
        align-items: center;
        text-align: center;
    }
    
    .footer-social {
        justify-content: center;
    }
    
    .footer-column h3::after {
        left: 50%;
        transform: translateX(-50%);
    }
}

@media (max-width: 480px) {
    .footer-links {
        grid-template-columns: 1fr;
    }
    
    .footer-column {
        text-align: center;
    }
    
    .footer-column ul li a:hover {
        padding-left: 0;
    }
    
    .footer-column ul li a::before {
        display: none;
    }
    
    .modal-content {
        padding: 1.5rem;
    }
    
    .modal-content h2 {
        font-size: 1.5rem;
    }

    /* Ajustes para los botones flotantes en pantallas pequeñas */
    .floating-action-buttons {
        bottom: 0.5rem; /* Reducido aún más */
        right: 0.5rem;  /* Reducido aún más */
        gap: 0.75rem; 
    }

    .floating-cart-btn,
    .floating-whatsapp-btn {
        width: 48px; /* Reducir tamaño del botón */
        height: 48px;
        font-size: 1.2rem; /* Ajustar tamaño del ícono */
    }

    #floating-cart-count {
        width: 20px; /* Ajustar tamaño del contador */
        height: 20px;
        font-size: 0.6rem;
        top: -4px;
        right: -4px;
    }
}

.floating-action-buttons {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    z-index: 999;
}

.floating-cart-btn,
.floating-whatsapp-btn {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #FDFCFC;
    font-size: 1.5rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    position: relative;
    text-decoration: none;
}

.floating-cart-btn {
    background: var(--primary-dark-red);
}
.floating-whatsapp-btn {
    background: #25D366;
}

.floating-cart-btn:hover,
.floating-whatsapp-btn:hover {
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

#floating-cart-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: var(--primary-light-red);
    color: #FDFCFC;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: bold;
}


/* Animations */
@keyframes itemAdded {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.item-added {
    animation: itemAdded 0.5s ease;
}

@keyframes itemRemoved {
    0% { opacity: 1; transform: translateX(0); }
    100% { opacity: 0; transform: translateX(100px); }
}

.item-removed {
    animation: itemRemoved 0.3s ease forwards;
}

/* Estilos para el stock del producto */
.cart-item-details .item-stock {
    font-size: 0.9em;
    color: #555; /* Color gris oscuro para el texto normal del stock */
    margin-top: 5px;
    transition: color 0.3s ease; /* Transición suave para el cambio de color */
}

.cart-item-details .item-stock.stock-error {
    color: red; /* Color rojo para el error */
    font-weight: bold; /* Texto en negrita para destacar */
}

.cart-item-details .item-stock.stock-error-animate {
    animation: shake 0.5s cubic-bezier(.36,.07,.19,.97) both; /* Animación de "sacudida" */
}

/* Keyframes para la animación de "sacudida" */
@keyframes shake {
  10%, 90% {
    transform: translate3d(-1px, 0, 0);
  }
  20%, 80% {
    transform: translate3d(2px, 0, 0);
  }
  30%, 50%, 70% {
    transform: translate3d(-3px, 0, 0); /* Ajusta estos valores para más o menos "salto" */
  }
  40%, 60% {
    transform: translate3d(3px, 0, 0); /* Ajusta estos valores */
  }
}


/* Responsive Design */
@media (max-width: 768px) {
    .top-bar {
        padding: 0.8rem 1rem; /* Changed from 25% to 1rem for less horizontal space */
        flex-direction: column; /* Para consistencia con style.css */
        gap: 0.5rem;
        text-align: center;
    }
    .top-bar h3 {
        font-size: 0.8rem; /* Reducir tamaño de fuente para móviles */
    }

    main {
        padding: 0 1rem; /* Changed from 0 5% for less horizontal space */
    }

    .social-icons {
        /* display: none; ELIMINADO para que sean visibles */
        display: flex; /* Asegurar que sea flex si no lo hereda bien */
        align-items: center; /* Asegurar alineación vertical */
        gap: 0.5rem; /* Reducir gap para móviles */
        justify-content: flex-start; /* Alinear al inicio del contenedor .icons-bar */
        margin-bottom: 0; /* Quitar margen inferior si ya no es necesario */
        flex-grow: 1; /* Para que ocupe el espacio disponible junto a la lupa */
        /* flex-wrap: wrap; */ /* Considerar si los elementos no caben */
    }
    .social-icons .follow-text {
        display: none; /* Ocultar "Síguenos" en móviles para ahorrar espacio */
    }
    .social-icons a { /* Iconos de redes y enlaces de texto */
        font-size: 1rem; /* Reducir tamaño de iconos y enlaces de texto */
    }
    .social-icons .social-links { /* Específicamente para "Regístrate", "Preguntas Frecuentes" */
        font-size: 0.8rem;
    }
    .social-icons .separator {
        margin: 0 0.25rem; /* Reducir margen del separador */
    }
    /* Asumiendo que .nav-cart (el del header) está dentro de .social-icons o se estiliza de forma similar */
    .navbar .nav-cart a { /* Selector más específico para el carrito del navbar */
        font-size: 0.9rem;
    }
    .navbar .nav-cart #cart-count {
        font-size: 0.7rem; /* Ajustar contador del carrito */
    }

    /* Asumiendo que .hamburger-button es el de categorías y debe mostrarse aquí */
    .hamburger-button { /* Definición/sobreescritura para cart.html móvil */
        display: block !important; /* Asegurar que se muestre si style.css lo oculta por error */
        position: absolute;
        top: 34px; /* Alineado verticalmente con el centro del logo de 75px + padding del navbar */
        right: 1rem; /* Alineado con el padding del navbar */
        z-index: 1002; /* Por si acaso, encima de otros elementos del header */
        /* El color y la forma de X se heredan de style.css o se deben replicar si no se carga style.css */
    }
    /* Si el .hamburger-button span no hereda el color rojo, añadir: */
    /* .hamburger-button span { background-color: var(--primary-dark-red); } */


    .icons-bar { /* En móvil, .icons-bar contiene .social-icons y .search-toggle-btn */
        justify-content: space-between; 
        width: 100%; 
        order: 2; /* Debajo del logo y la hamburguesa (que está absoluta) */
    }

    .nav-logo img {
        height: 75px; /* Aumentado de 60px para móviles */
        width: auto;  /* Ajustar width automáticamente a la nueva altura */
        margin-right: 1rem; /* Reducir margen derecho significativamente */
    }

    /* El .search-container (input+botón) se maneja por .active y position:absolute, 
       por lo que las reglas de order/width/margin-top ya no aplican directamente a él en el flujo.
       Los tamaños de input/button ya estaban definidos para 768px en cart.css y se heredarán bien. */

    .search-toggle-btn { /* Ajustes para el icono de lupa en móvil */
        font-size: 1.1rem; 
        padding: 0.4rem; 
    }

    .search-container.active { /* Ajustes para el contenedor de búsqueda activo en móvil */
        padding: 0.8rem; 
    }
    /* Los estilos de .search-input y .search-button dentro de .active se heredan de los ajustes de 768px */
    /* que ya tiene cart.css para .search-input y .search-button en general. */
    /* Si es necesario, se pueden añadir aquí:
    .search-container.active .search-input,
    .search-container.active .search-button {
        font-size: 0.9rem;
        padding: 0.5rem 0.8rem; 
    }
    */

    .navbar {
        padding: 1rem;
        display: flex; /* Asegurar que es flex */
        flex-direction: column; /* Ya está */
        align-items: center; /* Centrar logo y .icons-bar horizontalmente */
        gap: 1rem; /* Ya está */
    }
    
    .nav-links { /* Si los nav-links principales se mueven a una hamburguesa diferente o se ocultan */
        /* gap: 1rem; */
        /* Considerar ocultarlos o moverlos a una hamburguesa principal si es necesario */
        display: none; /* Ocultar nav-links principales en móvil en cart.html por simplicidad, asumiendo que no son cruciales aquí o se accede de otra forma */
    }
    
    .cart-item {
        flex-direction: column;
        align-items: flex-start;
        padding: 1.5rem 0;
    }
    
    .cart-item-image {
        margin-right: 0;
        margin-bottom: 1rem;
        width: 100%;
        height: auto;
        max-height: 200px;
    }
    
    .item-actions {
        margin-top: 1rem;
        width: 100%;
        justify-content: space-between;
    }
    
    #cart-summary {
        text-align: center;
    }

    /* Ajustes para la barra de cookies en móviles, si .cookie-banner se estiliza aquí */
    .cookie-banner {
        padding: 1rem; /* Simplificar padding para móviles */
        height: auto; /* Permitir que la altura se ajuste al contenido */
        /* Asumiendo que .cookie-banner y .cookie-close-btn existen y son relevantes para cart.html */
        /* Si .cookie-banner no tiene padding-right: 5% aquí, no hay nada que eliminar específicamente para eso */
    }

    .cookie-close-btn { /* Reajustar posición del botón de cierre si es necesario */
        top: 0.5rem;
        right: 0.5rem;
    }
}
