/* Variables globales */
:root {
    --primary-color: #6f4e37;
    --secondary-color: #a67c52;
    --background-color: #fff8f0;
    --text-color: #6f4e37;
    --spacing-unit: 8px;
    --border-radius: 8px;
    --transition-speed: 0.3s;
}

/* Reset y estilos base */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body, main {
    background: var(--background-color) !important;
}

body {
    margin: 0;
    font-family: 'Montserrat', Arial, sans-serif;
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
    padding-top: 80px;
}

/* Botón hamburguesa */
.navbar-toggle {
    display: none;
}

/* En móvil, visible y bien posicionado */
@media (max-width: 900px) {
    .navbar-toggle {
        display: block !important;
        background: none;
        border: none;
        cursor: pointer;
        padding: 10px;
        margin-right: 8px;
        margin-left: 0;
        height: 54px;
        width: 54px;
        border-radius: 50%;
        box-shadow: 0 2px 8px rgba(0,0,0,0.08);
        transition: background 0.2s;
    }
    .navbar-toggle:active,
    .navbar-toggle:focus {
        background: rgba(255,255,255,0.08);
        outline: none;
    }
    .navbar-toggle i {
        color: #fff;
        font-size: 2.2em;
        display: block;
        line-height: 1;
        text-shadow: 0 2px 8px rgba(0,0,0,0.18);
        transition: color 0.2s;
    }
}

/* Navbar responsivo */
.navbar {
    position: fixed !important;
    top: 0;
    left: 0;
    width: 100%;
    background: var(--primary-color) !important;
    z-index: 100000 !important;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    color: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.navbar-logo {
    display: flex;
    align-items: center;
    font-weight: bold;
    font-size: 1.3em;
    letter-spacing: 1px;
}
.navbar-logo span {
    margin-left: 8px;
    color: #fff;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
}

.navbar-menu {
    display: flex;
    gap: 24px;
}

.navbar-menu a {
    color: #fff;
    background: transparent;
    text-decoration: none;
    font-weight: 600;
    font-size: 1em;
    padding: 6px 12px;
    border-radius: 8px;
    transition: all 0.3s ease;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}
.navbar-menu a.active,
.navbar-menu a:hover {
    background: #a67c52;
    color: #fff;
}

.navbar-actions {
    display: flex;
    gap: 16px;
    align-items: center;
}

/* Botones */
.btn-login {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
    border: 2px solid #ffffff;
    border-radius: 8px;
    padding: 10px 22px;      /* Más padding horizontal */
    font-weight: 600;
    cursor: pointer;
    font-size: 1em;
    transition: all 0.3s ease;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 140px;        /* Asegura ancho mínimo */
    white-space: nowrap;     /* Evita que se corte el texto */
    box-sizing: border-box;
}
.navbar.scrolled .btn-login {
    background: #6f4e37;
    border-color: #6f4e37;
    color: #ffffff;
    text-shadow: none;
}
.btn-login:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: #ffffff;
}
.navbar.scrolled .btn-login:hover {
    background: #a67c52;
    border-color: #a67c52;
}

/* Hero section */
.hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
    padding: 48px 8vw 32px 8vw;
    flex-wrap: wrap;
}

.hero-content {
    flex: 1 1 320px;
    min-width: 260px;
}
.hero-title {
    font-size: 2.8em;
    font-weight: 700;
    margin-bottom: 18px;
    line-height: 1.1;
}
.hero-desc {
    font-size: 1.15em;
    color: #6f4e37;
    margin-bottom: 28px;
}
.hero-buttons {
    display: flex;
    gap: 16px;
}
.btn-main {
    background: #6f4e37;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 12px 28px;
    font-size: 1.1em;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
}
.btn-main:hover {
    background: #a67c52;
}
.btn-secondary {
    background: #fff;
    color: #6f4e37;
    border: 2px solid #a67c52;
    border-radius: 8px;
    padding: 12px 22px;
    font-size: 1.1em;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
}
.btn-secondary:hover {
    background: #f5e6d6;
    color: #a67c52;
}

/* Imagen del héroe */
.hero-image {
    width: 420px;
    height: 320px;
    background: #ececec;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3em;
    color: #bdbdbd;
}
.hero-image img {
    max-width: 100%;
    height: auto;
    border-radius: 18px;
    box-shadow: 0 4px 24px rgba(111,78,55,0.12);
}

@media (max-width: 900px) {
    .hero {
        flex-direction: column;
        gap: 24px;
        padding: 32px 4vw 24px 4vw;
    }
    .navbar {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 0;
        padding: 12px 5vw;
        position: fixed;
        width: 100%;
        height: 64px;
        min-height: 64px;
    }
    .navbar-logo {
        flex: 1 1 auto;
    }
    .navbar-logo img {
        width: 36px;
        height: 36px;
    }
    .navbar-actions {
        margin-top: 0;
        order: 2;
        gap: 8px;
    }
    .navbar-toggle {
        display: block;
        order: 3;
    }
    .navbar-menu {
        position: fixed;
        top: 0;
        right: 0;
        left: auto !important;
        height: 100vh;
        width: 320px;
        max-width: 90vw;
        background: #3e2723;
        flex-direction: column;
        align-items: flex-start;
        padding: 40px 0 24px 0;
        gap: 0;
        box-shadow: -2px 0 24px rgba(0,0,0,0.18);
        transform: translateX(100%);
        opacity: 0;
        visibility: hidden;
        transition: transform 0.35s cubic-bezier(.77,0,.18,1), opacity 0.2s;
        z-index: 99999 !important;
    }
    .navbar-menu.show {
        transform: translateX(0);
        opacity: 1;
        visibility: visible;
    }
    .navbar-menu a {
        display: block;
        width: 100%;
        color: #fff;
        font-size: 1.25em;
        font-weight: 600;
        padding: 18px 32px;
        border: none;
        background: none;
        text-align: left;
        letter-spacing: 1px;
        transition: background 0.18s, color 0.18s;
        border-radius: 0;
        margin: 0;
    }
    .navbar-menu a:hover,
    .navbar-menu a.active {
        background: #f5e6d6;
        color: #3e2723;
    }
    .navbar-menu .btn-login {
        display: flex !important;
        width: calc(100% - 64px);
        margin: 32px 32px 0 32px;
        background: #6f4e37;
        color: #fff;
        border: 2px solid #fff8f0;
        border-radius: 10px;
        padding: 16px 0;
        font-size: 1.1em;
        font-weight: bold;
        justify-content: center;
        align-items: center;
        gap: 10px;
        box-shadow: 0 2px 8px rgba(0,0,0,0.04);
        transition: background 0.2s, color 0.2s;
    }
    .navbar-menu .btn-login:hover {
        background: #fff8f0;
        color: #6f4e37;
        border-color: #6f4e37;
    }
    .navbar-toggle {
        display: block !important;
        position: relative;
        z-index: 2100;
    }
    .navbar-actions {
        display: flex !important;
        align-items: center;
        gap: 12px;
    }
    .navbar-actions .btn-login {
        display: none !important;
    }
    .navbar-menu .btn-login {
        display: flex !important;
    }
    .cart-icon {
        color: #fff;
        font-size: 1.2em;
        padding: 8px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    .cart-icon i {
        color: #fff !important;
    }
    .btn-login {
        display: none;
    }
    .hero-image {
        margin-top: 32px;
        width: 90vw;
        max-width: 340px;
        height: 220px;
    }
}

/* En escritorio, el botón login sigue en la barra */
@media (min-width: 901px) {
    .navbar-actions {
        display: flex !important;
        align-items: center;
        gap: 16px;
    }
    .navbar-actions .btn-login {
        display: flex !important;
    }
    .navbar-menu .btn-login {
        display: none !important;
    }
}

/* Ajuste para el contenido principal */
main {
    margin-top: 0 !important;
    padding-top: 80px;
}

/* Ajuste para que el menú no tape el contenido */
@media (max-width: 900px) {
    main {
        padding-top: 90px;
    }
}

/* Ordena los elementos en móvil */
@media (max-width: 900px) {
    .navbar {
        flex-wrap: wrap;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
    .navbar-logo {
        flex: 1 1 auto;
    }
    .navbar-actions {
        order: 2;
    }
    .navbar-toggle {
        order: 3;
    }
    .navbar-menu {
        order: 4;
        width: 100%;
        left: 0;
        top: 64px;
        background: #fff8f0;
        box-shadow: 0 2px 8px rgba(111,78,55,0.06);
    }
    .navbar-menu a {
        color: #6f4e37;
        background: transparent;
        text-shadow: none;
    }
    .navbar-menu a.active,
    .navbar-menu a:hover {
        background: #f5e6d6;
        color: #a67c52;
    }
}

/* Botón hamburguesa visible solo en móvil */
@media (max-width: 600px) {
    .navbar {
        padding: 12px 4vw;
    }
    .navbar-toggle {
        margin-left: 8px;
    }
    .navbar-menu {
        padding: 16px;
    }
    .navbar-menu a {
        padding: 10px;
        font-size: 1em;
    }
}

/* Oculta el botón de login dentro del menú hamburguesa por defecto */
.navbar-menu .btn-login {
    display: none !important;
}

/* Muestra el botón de login en la barra en escritorio */
.navbar-actions .btn-login {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-right: 40px;
}

/* En móvil: oculta el botón de login en la barra y muéstralo en el menú */
@media (max-width: 900px) {
    .navbar-actions .btn-login {
        display: none !important;
    }
    .navbar-menu .btn-login {
        display: flex !important;
        align-items: center;
        gap: 8px;
        margin: 12px 18px 0 18px;
        width: calc(100% - 36px);
        justify-content: center;
    }
}

/* Estilos para la grilla de productos */
.grid-productos {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: calc(var(--spacing-unit) * 3);
    padding: calc(var(--spacing-unit) * 3);
    max-width: 1400px;
    margin: 0 auto;
}

/* Tarjeta de producto */
.product-item {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(111,78,55,0.10);
    padding: 24px 18px 18px 18px;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: box-shadow 0.2s;
}

.product-item:hover {
    box-shadow: 0 6px 24px rgba(111,78,55,0.18);
}

.product-item img {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 50%;
    margin-bottom: 16px;
    box-shadow: 0 2px 8px rgba(111,78,55,0.08);
}

.product-item h2 {
    font-size: 1.2em;
    margin: 0 0 8px 0;
    color: #6f4e37;
    text-align: center;
}

.product-item .precio {
    font-weight: bold;
    color: #a67c52;
    margin-bottom: 12px;
    font-size: 1.1em;
}

.product-item .add-to-cart {
    background: #6f4e37;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 10px 22px;
    font-weight: 600;
    cursor: pointer;
    font-size: 1em;
    transition: background 0.2s;
    margin-top: 8px;
}

.product-item .add-to-cart:hover {
    background: #a67c52;
}

/* Quantity control styles */
.quantity-control {
    display: flex;
    align-items: center;
    justify-content: center; /* Center the control within its parent */
    margin-top: 10px; /* Space from price */
    margin-bottom: 15px; /* Space to add to cart button */
    gap: 5px; /* Space between buttons and quantity span */
}

.quantity-btn {
    background: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: 5px; /* Slightly rounded corners */
    width: 30px;
    height: 30px;
    font-size: 1.2em;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, transform 0.1s;
}

.quantity-btn:hover {
    background: var(--secondary-color);
    transform: scale(1.05);
}

.product-quantity {
    font-size: 1.1em;
    font-weight: bold;
    color: var(--text-color);
    padding: 0 10px; /* Space around the number */
    min-width: 30px; /* Ensure enough space for 2-3 digits */
    text-align: center;
}

/* Responsivo para móvil */
@media (max-width: 600px) {
    .grid-productos {
        grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
        gap: calc(var(--spacing-unit) * 2);
        padding: calc(var(--spacing-unit) * 2);
    }
    .product-item {
        margin: 0;
    }
    .product-item img {
        height: 200px;
    }
}

/* Estilos para la sección del carrito */
#carrito {
    background: linear-gradient(135deg, #fff 0%, #faf8f5 100%);
    border-radius: 24px;
    box-shadow: 0 8px 32px rgba(111,78,55,0.12);
    padding: 40px 32px;
    margin: 40px auto 0 auto;
    max-width: 800px;
    border: 1px solid rgba(111,78,55,0.08);
    position: relative;
    overflow: hidden;
}

#carrito::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #6f4e37, #a67c52, #6f4e37);
    border-radius: 24px 24px 0 0;
}

#carrito h2 {
    color: #6f4e37;
    margin-bottom: 32px;
    text-align: center;
    font-size: 2.2em;
    font-weight: 700;
    position: relative;
    padding-bottom: 16px;
}

#carrito h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, #6f4e37, #a67c52);
    border-radius: 2px;
}

#contenido-carrito {
    min-height: 200px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

#contenido-carrito > p {
    text-align: center;
    color: #8d6e63;
    font-size: 1.1em;
    padding: 40px 20px;
    background: linear-gradient(135deg, #fff8f0 0%, #f5f0e8 100%);
    border-radius: 16px;
    border: 2px dashed #d7ccc8;
    margin: 20px 0;
}

#contenido-carrito > div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, #fff 0%, #faf8f5 100%);
    border-radius: 16px;
    padding: 20px 24px;
    margin-bottom: 16px;
    box-shadow: 0 4px 16px rgba(111,78,55,0.08);
    border: 1px solid rgba(111,78,55,0.06);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

#contenido-carrito > div::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, #6f4e37, #a67c52);
    border-radius: 0 2px 2px 0;
}

#contenido-carrito > div:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(111,78,55,0.15);
    border-color: rgba(111,78,55,0.12);
}

#contenido-carrito .item-details {
    display: flex;
    align-items: center;
    gap: 16px;
    flex: 1;
}

#contenido-carrito .item-image {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    object-fit: cover;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

#contenido-carrito .item-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

#contenido-carrito .item-name {
    font-weight: 600;
    color: #6f4e37;
    font-size: 1.05em;
}

#contenido-carrito .item-description {
    color: #8d6e63;
    font-size: 0.85em;
    line-height: 1.3;
    margin: 4px 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    max-height: 2.6em;
}

#contenido-carrito .item-description:hover {
    -webkit-line-clamp: unset;
    max-height: none;
    background: rgba(255, 255, 255, 0.9);
    padding: 8px;
    border-radius: 8px;
    position: relative;
    z-index: 10;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

#contenido-carrito .item-price {
    color: #a67c52;
    font-weight: 500;
    font-size: 0.95em;
}

#contenido-carrito .item-quantity {
    background: #fff8f0;
    color: #6f4e37;
    padding: 6px 12px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9em;
    border: 1px solid #e8d5c4;
    min-width: 60px;
    text-align: center;
}

#contenido-carrito .item-total {
    color: #6f4e37;
    font-weight: 700;
    font-size: 1.1em;
    margin: 0 16px;
}

#contenido-carrito button {
    background: linear-gradient(135deg, #d84315 0%, #e64a19 100%);
    color: #fff;
    border: none;
    border-radius: 12px;
    padding: 10px 16px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9em;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(216, 67, 21, 0.3);
    display: flex;
    align-items: center;
    gap: 6px;
}

#contenido-carrito button:hover {
    background: linear-gradient(135deg, #bf360c 0%, #d84315 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(216, 67, 21, 0.4);
}

#total-carrito {
    background: linear-gradient(135deg, #6f4e37 0%, #8d6e63 100%);
    color: #fff;
    font-size: 1.3em;
    font-weight: 700;
    margin: 32px 0 24px 0;
    text-align: center;
    padding: 20px 24px;
    border-radius: 16px;
    box-shadow: 0 4px 16px rgba(111,78,55,0.3);
    position: relative;
    overflow: hidden;
}

.carrito-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 24px;
}

#vaciar-carrito {
    background: linear-gradient(135deg, #a67c52 0%, #8d6e63 100%);
    color: #fff;
    border: none;
    border-radius: 12px;
    padding: 14px 28px;
    font-weight: 600;
    cursor: pointer;
    font-size: 1em;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(166, 124, 82, 0.3);
    display: flex;
    align-items: center;
    gap: 8px;
}

#vaciar-carrito:hover {
    background: linear-gradient(135deg, #8d6e63 0%, #6f4e37 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(166, 124, 82, 0.4);
}

#pagar-carrito {
    background: linear-gradient(135deg, #4caf50 0%, #66bb6a 100%);
    color: #fff;
    border: none;
    border-radius: 12px;
    padding: 14px 32px;
    font-weight: 600;
    cursor: pointer;
    font-size: 1.1em;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
    display: flex;
    align-items: center;
    gap: 8px;
}

#pagar-carrito:hover {
    background: linear-gradient(135deg, #388e3c 0%, #4caf50 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(76, 175, 80, 0.4);
}

/* Botón de pago mejorado */
.btn-pagar-mejorado {
    background: linear-gradient(135deg, #4caf50 0%, #66bb6a 100%);
    color: #fff;
    border: none;
    border-radius: 16px;
    padding: 16px 32px;
    font-weight: 600;
    cursor: pointer;
    font-size: 1.1em;
    transition: all 0.3s ease;
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.3);
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
    overflow: hidden;
}

.btn-pagar-mejorado::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn-pagar-mejorado:hover::before {
    left: 100%;
}

.btn-pagar-mejorado:hover {
    background: linear-gradient(135deg, #388e3c 0%, #4caf50 100%);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(76, 175, 80, 0.4);
}

.btn-pagar-mejorado:active {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
}

.btn-pagar-mejorado .btn-text {
    font-weight: 700;
    letter-spacing: 0.5px;
}

.btn-pagar-mejorado .btn-arrow {
    font-size: 0.9em;
    transition: transform 0.3s ease;
}

.btn-pagar-mejorado:hover .btn-arrow {
    transform: translateY(2px);
}

/* Modal de pago */
.modal-pago-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-pago {
    background: linear-gradient(135deg, #fff 0%, #faf8f5 100%);
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(111, 78, 55, 0.2);
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow: hidden;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from { 
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to { 
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-pago-header {
    background: linear-gradient(135deg, #6f4e37 0%, #8d6e63 100%);
    color: #fff;
    padding: 24px 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-pago-header h3 {
    margin: 0;
    font-size: 1.4em;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 12px;
}

.cerrar-modal {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: #fff;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.cerrar-modal:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.modal-pago-content {
    padding: 32px;
}

.opciones-pago {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 32px;
}

.opcion-pago {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px 24px;
    background: linear-gradient(135deg, #fff 0%, #faf8f5 100%);
    border: 2px solid #e8d5c4;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.opcion-pago::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, #6f4e37, #a67c52);
    border-radius: 0 2px 2px 0;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.opcion-pago:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(111, 78, 55, 0.15);
    border-color: #a67c52;
}

.opcion-pago:hover::before {
    opacity: 1;
}

.opcion-pago.seleccionada {
    border-color: #4caf50;
    background: linear-gradient(135deg, #f1f8e9 0%, #e8f5e8 100%);
    box-shadow: 0 4px 16px rgba(76, 175, 80, 0.2);
}

.opcion-pago.seleccionada::before {
    opacity: 1;
    background: linear-gradient(180deg, #4caf50, #66bb6a);
}

.opcion-icono {
    width: 60px;
    height: 60px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8em;
    color: #fff;
    background: linear-gradient(135deg, #6f4e37 0%, #a67c52 100%);
    flex-shrink: 0;
}

.opcion-pago.seleccionada .opcion-icono {
    background: linear-gradient(135deg, #4caf50 0%, #66bb6a 100%);
}

.opcion-info {
    flex: 1;
}

.opcion-info h4 {
    margin: 0 0 8px 0;
    color: #6f4e37;
    font-size: 1.2em;
    font-weight: 600;
}

.opcion-info p {
    margin: 0;
    color: #8d6e63;
    font-size: 0.95em;
    line-height: 1.4;
}

.opcion-check {
    color: #4caf50;
    font-size: 1.5em;
    opacity: 0;
    transition: all 0.3s ease;
    transform: scale(0.8);
}

.opcion-pago.seleccionada .opcion-check {
    opacity: 1;
    transform: scale(1);
}

.modal-pago-actions {
    display: flex;
    gap: 16px;
    justify-content: flex-end;
}

.btn-cancelar {
    background: linear-gradient(135deg, #f5f5f5 0%, #e0e0e0 100%);
    color: #6f4e37;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 12px 24px;
    font-weight: 600;
    cursor: pointer;
    font-size: 1em;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-cancelar:hover {
    background: linear-gradient(135deg, #e0e0e0 0%, #d0d0d0 100%);
    border-color: #d0d0d0;
    transform: translateY(-1px);
}

.btn-confirmar {
    background: linear-gradient(135deg, #4caf50 0%, #66bb6a 100%);
    color: #fff;
    border: none;
    border-radius: 12px;
    padding: 12px 28px;
    font-weight: 600;
    cursor: pointer;
    font-size: 1em;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-confirmar:hover {
    background: linear-gradient(135deg, #388e3c 0%, #4caf50 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(76, 175, 80, 0.4);
}

.btn-confirmar:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Responsive para el modal */
@media (max-width: 768px) {
    .modal-pago {
        width: 95%;
        margin: 20px;
    }
    
    .modal-pago-header {
        padding: 20px 24px;
    }
    
    .modal-pago-header h3 {
        font-size: 1.2em;
    }
    
    .modal-pago-content {
        padding: 24px;
    }
    
    .opcion-pago {
        padding: 16px 20px;
        gap: 16px;
    }
    
    .opcion-icono {
        width: 50px;
        height: 50px;
        font-size: 1.5em;
    }
    
    .modal-pago-actions {
        flex-direction: column;
    }
    
    .btn-cancelar,
    .btn-confirmar {
        width: 100%;
        justify-content: center;
    }
}

/* Estilos para el footer */
footer {
    background: var(--background-color);
    color: var(--text-color);
    padding: calc(var(--spacing-unit) * 3) 5vw;
    text-align: center;
    font-size: 1.1em;
    letter-spacing: 1px;
    border-top-left-radius: 24px;
    border-top-right-radius: 24px;
    box-shadow: 0 -2px 12px rgba(111,78,55,0.10);
    margin-top: 48px;
}

footer p {
    margin: 0;
    padding: 0;
    color: var(--text-color);
    font-weight: 500;
    letter-spacing: 1px;
}

footer a {
    color: var(--primary-color);
    text-decoration: underline;
    margin: 0 8px;
    transition: color 0.2s;
}
footer a:hover {
    color: var(--secondary-color);
}

.cart-icon i {
    color: #fff !important;
}

/* Mejoras en el hero section */
@media (max-width: 768px) {
    .hero {
        padding: 120px 5vw 40px 5vw;
        text-align: center;
    }

    .hero-content {
        flex: 1 1 100%;
    }

    .hero-title {
        font-size: 2.2em;
    }

    .hero-desc {
        font-size: 1.1em;
        margin-bottom: 24px;
    }

    .hero-buttons {
        justify-content: center;
        flex-wrap: wrap;
    }

    .hero-image {
        width: 100%;
        max-width: 500px;
        margin: 0 auto;
        height: auto;
        aspect-ratio: 4/3;
    }
}

/* Mejoras en los botones y elementos interactivos */
.btn-main, .btn-secondary {
    padding: 12px 24px;
    font-size: 1em;
    white-space: nowrap;
    text-align: center;
    justify-content: center;
}

@media (max-width: 480px) {
    .btn-main, .btn-secondary {
        width: 100%;
        padding: 14px 20px;
    }

    .hero-buttons {
        flex-direction: column;
        width: 100%;
    }

    .navbar-actions {
        gap: 8px;
    }

    .cart-icon {
        padding: 8px;
    }
}

/* Mejoras en la notificación */
#notificacion {
    max-width: 90%;
    width: 400px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    z-index: 999999 !important;
    position: fixed !important;
    top: 30px !important;
}

@media (max-width: 480px) {
    #notificacion {
        width: 90%;
        padding: 12px 20px;
        font-size: 0.9em;
    }
}

/* Overlay para menú lateral */
.menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.32);
    z-index: 99998 !important;
    transition: opacity 0.3s;
    opacity: 0;
}
.menu-overlay.active {
    display: block;
    opacity: 1;
}

/* Estilos para modales de autenticación (login, registro, recuperación) */
.modal-auth-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.5); z-index: 1000; display: flex; justify-content: center; align-items: center;
}

.modal-auth {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color)); /* Using defined brown colors */
    border-radius: 20px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
    padding: 0;
    width: 400px;
    max-width: 90%;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.modal-content-wrapper {
    padding: 30px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.modal-avatar-container {
    width: 100px; height: 100px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex; justify-content: center; align-items: center;
    margin-bottom: 25px;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.modal-avatar-container i {
    font-size: 3.5em;
    color: rgba(255, 255, 255, 0.7);
}

.modal-form {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 20px;
    color: #fff;
}

.modal-form h2 {
    text-align: center;
    color: #fff;
    margin-bottom: 15px;
    font-size: 1.8em;
    font-weight: 600;
}

.input-group {
    display: flex;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.5);
    padding-bottom: 5px;
    margin-bottom: 15px;
}

.input-group i {
    color: rgba(255, 255, 255, 0.7);
    margin-right: 10px;
    font-size: 1.1em;
}

.modal-form input {
    flex-grow: 1;
    background: transparent;
    border: none;
    outline: none;
    color: #fff;
    font-size: 1.1em;
    padding: 5px 0;
}

.modal-form input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.modal-form input:focus {
    border-bottom-color: #fff;
}

.options-group {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9em;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 25px;
}

.remember-me input[type="checkbox"] {
    margin-right: 8px;
    accent-color: #fff;
}

.forgot-password-link {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.2s;
}

.forgot-password-link:hover {
    color: #fff;
}

.gradient-button {
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color)); /* Using defined brown colors */
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 12px 0;
    font-size: 1.2em;
    font-weight: bold;
    cursor: pointer;
    margin-top: 10px;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.gradient-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.modal-links {
    text-align: center;
    font-size: 0.9em;
    margin-top: 20px;
}

.modal-links a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.2s;
}

.modal-links a:hover {
    color: #fff;
}

/* --- CONTADOR DE PRODUCTOS EN CARRITO --- */
.cart-icon {
    position: relative;
}

.cart-count {
    position: absolute;
    top: -5px; 
    right: -10px; 
    background: #e74c3c; 
    color: #fff; 
    font-size: 0.7em; 
    font-weight: bold; 
    border-radius: 50%; 
    width: 18px; height: 18px; 
    display: flex; 
    justify-content: center; 
    align-items: center; 
    pointer-events: none;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
    animation: pulse 1s infinite alternate;
}

@keyframes pulse {
    from { transform: scale(1); opacity: 1; }
    to { transform: scale(1.1); opacity: 0.9; }
}

/* Responsive para el carrito */
@media (max-width: 768px) {
    #carrito {
        margin: 20px 16px;
        padding: 24px 20px;
        border-radius: 20px;
    }
    
    #carrito h2 {
        font-size: 1.8em;
        margin-bottom: 24px;
    }
    
    #contenido-carrito > div {
        flex-direction: column;
        gap: 16px;
        padding: 16px 20px;
        text-align: center;
    }
    
    #contenido-carrito .item-details {
        flex-direction: column;
        gap: 12px;
    }
    
    #contenido-carrito .item-description {
        -webkit-line-clamp: 3;
        text-align: center;
        margin: 8px 0;
    }
    
    #contenido-carrito .item-total {
        margin: 8px 0;
    }
    
    .carrito-actions {
        flex-direction: column;
        align-items: center;
    }
    
    #vaciar-carrito,
    #pagar-carrito {
        width: 100%;
        max-width: 280px;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    #carrito {
        margin: 16px 12px;
        padding: 20px 16px;
    }
    
    #carrito h2 {
        font-size: 1.6em;
    }
    
    #contenido-carrito > div {
        padding: 14px 16px;
    }
    
    #total-carrito {
        font-size: 1.2em;
        padding: 16px 20px;
    }
}
