/* ========================================== */
/* GENERALES Y RESETS */
/* ========================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Arial', sans-serif;
}

body {
    background: linear-gradient(125deg, #840808c4 0%, #046519e1 100%);
    color: white;
    overflow-x: hidden;
    min-height: 100vh;
}

/* capa sutil para oscurecer y dar contraste al contenido */
.site-overlay {
    position: fixed;
    inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0.25), rgba(0,0,0,0.45));
    pointer-events: none;
    z-index: 0;
}

/* ========================================== */
/* HEADER & NAVEGACIÓN */
/* ========================================== */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 5%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    flex-wrap: wrap;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo img {
    width: 40px;
    height: 40px;
}

.logo h1 {
    font-size: 20px;
    letter-spacing: 2px;
    font-weight: 800;
}

.navbar {
    display: flex;
    gap: 25px;
}

.navbar a, .dropbtn {
    color: #ccc;
    text-decoration: none;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: 0.3s;
    background: transparent;
    border: none;
    cursor: pointer;
}

.navbar a:hover, .dropbtn:hover {
    color: #ff6600;
}

/* DROPDOWN MENU */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-content {
    display: none;
    position: absolute;
    background: rgba(15, 15, 15, 0.95);
    backdrop-filter: blur(10px);
    min-width: 160px;
    box-shadow: 0px 8px 16px rgba(0,0,0,0.5);
    z-index: 1;
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 4px;
}

.dropdown-content a {
    color: white;
    padding: 12px 16px;
    text-transform: none;
    display: block;
}

.dropdown-content a:hover {
    background: rgba(255, 102, 0, 0.2);
}

.dropdown:hover .dropdown-content {
    display: block;
}

.menu-toggle {
    display: none;
    font-size: 24px;
    cursor: pointer;
}

.product-hero {
    padding-top: 60px;
}

.category-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    margin: 30px auto 50px;
    max-width: 1200px;
    padding: 0 5%;
}

.category-links a {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255,255,255,0.1);
    color: white;
    padding: 12px 20px;
    border-radius: 999px;
    text-decoration: none;
    transition: 0.3s;
}

.category-links a:hover {
    background: #ff6600;
    color: white;
    transform: translateY(-2px);
}

    .auth-page {
        padding: 60px 5%;
        display: flex;
        justify-content: center;
        align-items: center;
        min-height: calc(100vh - 90px);
    }

    .auth-card {
        width: min(520px, 100%);
        background: rgba(255,255,255,0.06);
        border: 1px solid rgba(255,255,255,0.1);
        backdrop-filter: blur(18px);
        border-radius: 24px;
        padding: 36px;
        display: grid;
        gap: 24px;
    }

    .auth-card h1 {
        font-size: 28px;
        letter-spacing: 1px;
        margin-bottom: 8px;
    }

    .user-card {
        display: flex;
        align-items: center;
        gap: 18px;
        border-radius: 16px;
        padding: 18px;
        background: rgba(255,255,255,0.08);
        border: 1px solid rgba(255,255,255,0.1);
    }

    .user-card img {
        width: 68px;
        height: 68px;
        border-radius: 50%;
        object-fit: cover;
        border: 2px solid #ff6600;
    }

    .auth-help {
        display: grid;
        gap: 18px;
    }

    .manual-form {
        display: grid;
        gap: 14px;
    }

    .manual-form input,
    .auth-card button {
        width: 100%;
        background: rgba(255,255,255,0.12);
        border: 1px solid rgba(255,255,255,0.18);
        color: white;
        padding: 14px 16px;
        border-radius: 10px;
        outline: none;
    }

    .manual-form button,
    .logout-btn {
        cursor: pointer;
        background: #ff6600;
        border: none;
        color: white;
        font-weight: bold;
        transition: 0.3s;
    }

    .manual-form button:hover,
    .logout-btn:hover {
        background: #e05500;
    }

    .hidden {
        display: none !important;
    }

    .logout-btn {
        padding: 14px 16px;
        border-radius: 10px;
    }

    .auth-card p {
        color: #ccc;
        line-height: 1.6;
    }

    .auth-card a {
        color: #ff6600;
        text-decoration: none;
    }
    .auth-card a:hover {
        text-decoration: underline;
    }
    .dashboard {
    margin: 0 auto;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 16px;
    padding: 40px;
    }

.admin-login,
.dashboard-content {
    display: grid;
    gap: 20px;
}

.admin-login input {
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.1);
    color: white;
    padding: 14px;
    border-radius: 8px;
}

.admin-login button {
    background: #ff6600;
    border: none;
    color: white;
    padding: 14px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
}

.admin-login button:hover {
    background: #e05500;
}

.login-note {
    color: #bbb;
    font-size: 14px;
}

.hidden {
    display: none !important;
}

.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(180px, 1fr));
    gap: 20px;
}

.dashboard-stats div {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px;
    padding: 30px;
    text-align: center;
}

.dashboard-stats h3 {
    font-size: 32px;
    margin-bottom: 10px;
}

.orders-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.orders-table th,
.orders-table td {
    padding: 14px 12px;
    border: 1px solid rgba(255,255,255,0.08);
    color: white;
    text-align: left;
}

.orders-table th {
    background: rgba(255,255,255,0.05);
}

.orders-table tr:nth-child(even) {
    background: rgba(255,255,255,0.04);
}

/* Menu responsivo: cuando el header tiene .open mostramos la nav en móvil */
@media (max-width: 768px) {
    .header.open { align-items: flex-start; }
    .header.open .navbar {
        display: flex;
        position: absolute;
        top: 68px;
        left: 0;
        right: 0;
        background: rgba(0,0,0,0.7);
        flex-direction: column;
        gap: 0;
        padding: 10px 5%;
        z-index: 150;
    }
    .header.open .navbar a, .header.open .dropbtn {
        padding: 12px 0;
        border-bottom: 1px solid rgba(255,255,255,0.04);
    }
}

/* INTERFAZ DEL BUSCADOR */
.icons {
    display: flex;
    align-items: center;
    gap: 20px;
    font-size: 18px;
}

.search-container {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 6px 15px;
    border-radius: 20px;
    transition: 0.3s ease;
}

.search-container:focus-within {
    border-color: #ff6600;
    box-shadow: 0 0 12px rgba(255, 102, 0, 0.3);
}

#search-input {
    background: transparent;
    border: none;
    outline: none;
    color: white;
    font-size: 14px;
    width: 150px;
    min-width: 100px;
}

#search-input::placeholder {
    color: #666;
}

@media (max-width: 768px) {
    #search-input {
        width: 100px;
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    #search-input {
        width: 80px;
        font-size: 12px;
    }
}

.search-icon {
    cursor: pointer;
}

.cart-icon {
    position: relative;
    cursor: pointer;
}

#cart-count {
    position: absolute;
    top: -10px;
    right: -10px;
    background: #ff6600;
    color: white;
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 50%;
    font-weight: bold;
}

.user-icon {
    font-size: 18px;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

.user-icon:hover {
    transform: scale(1.05);
}

/* ========================================== */
/* PANEL CARRITO LATERAL */
/* ========================================== */
.cart-panel {
    position: fixed;
    top: 0;
    right: -400px;
    width: 380px;
    height: 100vh;
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(20px);
    border-left: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: -10px 0 30px rgba(0,0,0,0.7);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    transition: 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    padding: 30px;
    overflow-y: auto;
}

.cart-panel.active {
    right: 0;
}

@media (max-width: 768px) {
    .cart-panel {
        width: 90vw;
        max-width: 350px;
        right: -90vw;
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .cart-panel {
        width: 100vw;
        max-width: 100vw;
        right: -100vw;
        padding: 15px;
        border-radius: 0;
    }
}

.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    padding-bottom: 15px;
}

.close-cart {
    cursor: pointer;
    font-size: 18px;
    transition: 0.3s;
}

.cart-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.clear-cart {
    background: transparent;
    border: none;
    color: #ff6666;
    font-size: 18px;
    cursor: pointer;
}

.clear-cart:hover {
    transform: scale(1.05);
}

.close-cart:hover {
    color: #ff6600;
}

.cart-items {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.empty-cart {
    text-align: center;
    color: #666;
    margin-top: 40px;
}

.cart-item {
    display: flex;
    align-items: center;
    gap: 15px;
    background: rgba(255,255,255,0.02);
    padding: 10px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.05);
}

.cart-item img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
}

.cart-item div {
    flex: 1;
}

.cart-item h4 {
    font-size: 14px;
    margin-bottom: 5px;
}

.cart-item p {
    color: #ff6600;
    font-size: 13px;
    font-weight: bold;
}

.remove-item {
    background: transparent;
    border: none;
    color: #555;
    cursor: pointer;
    font-size: 14px;
    transition: 0.3s;
}

.remove-item:hover {
    color: #ff3333;
}

.cart-footer {
    border-top: 1px solid rgba(255,255,255,0.05);
    padding-top: 20px;
    margin-top: 20px;
}

.cart-footer h3 {
    display: flex;
    justify-content: space-between;
    font-size: 18px;
    margin-bottom: 20px;
}

.cart-footer span {
    color: #ff6600;
}

.checkout-btn {
    width: 100%;
    background: #ff6600;
    color: white;
    border: none;
    padding: 15px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 4px;
    cursor: pointer;
    transition: 0.3s;
}

.checkout-btn:hover {
    background: #e05500;
    transform: translateY(-2px);
}

/* ========================================== */
/* SECCIONES HERO, SLIDER Y CONTENIDOS */
/* ========================================== */
.hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 80vh;
    align-items: center;
    padding: 40px 5%;
    gap: 40px;
}

.hero-text .subtitulo {
    color: #ff6600;
    font-weight: bold;
    letter-spacing: 3px;
    margin-bottom: 10px;
    font-size: 14px;
}

.hero-text h2 {
    font-size: 55px;
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 20px;
    letter-spacing: -1px;
}

.hero-text .descripcion {
    color: #aaa;
    margin-bottom: 30px;
    font-size: 16px;
    max-width: 450px;
}

.hero-text button, .personalizados-texto button {
    background: transparent;
    border: 2px solid white;
    color: white;
    padding: 12px 30px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: 0.3s;
}

.hero-text button:hover, .personalizados-texto button:hover {
    background: white;
    color: black;
}

.hero-img img, .personalizados-img img {
    width: 100%;
    max-height: 550px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.5);
}

/* SLIDER */
.carrusel-contenedor {
    position: relative; /* Necesario para ubicar los botones encima */
    width: 100%;
    max-width: 1200px;
    height: 520px;
    margin: 0 auto;
    overflow: hidden;
    border-radius: 12px;
}

/* Escondemos todas las imágenes por defecto */
.carrusel-imagenes {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    transition: transform 0.6s ease;
    will-change: transform;
}

.carrusel-item {
    display: block;
    max-width: 100%;
    width: auto;
    height: 100%;
    object-fit: contain;
    object-position: center;
    background: transparent;
    padding: 0;
}

/* Ajustes responsivos para móviles */
@media (max-width: 768px) {
    .carrusel-contenedor { height: 320px; }
}

/* Solo se ve la que tenga la clase 'active' */
/* .carrusel-item.active no necesita bloqueo con la nueva implementación */

/* Estilo rápido para los botones flotantes */
.btn-carrusel {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    padding: 15px;
    cursor: pointer;
    font-size: 18px;
    border-radius: 50%;
}

@keyframes slideAnimation {
    0%, 25% { transform: translateX(0); }
    33%, 58% { transform: translateX(-33.33%); }
    66%, 91% { transform: translateX(-66.66%); }
}

/* ========================================== */
/* GRILLA DINÁMICA DE PRODUCTOS */
/* ========================================== */
.productos {
    padding: 80px 5%;
}

.productos-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 40px;
}

.productos-header h2 {
    font-size: 32px;
    font-weight: 800;
}

.productos-header a {
    color: #ff6600;
    text-decoration: none;
    font-weight: bold;
    font-size: 14px;
}

.categorias {
    display: flex;
    gap: 15px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.btn-categoria {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.08);
    color: white;
    padding: 8px 20px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    transition: 0.3s;
}

.btn-categoria:hover {
    border-color: #ff6600;
}

.productos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 30px;
}

.card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    transition: 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    border-color: rgba(255,255,255,0.15);
    box-shadow: 0 10px 20px rgba(0,0,0,0.4);
}

.card img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: 6px;
    margin-bottom: 15px;
}

.card h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
}

.card p {
    color: #ff6600;
    font-weight: bold;
    font-size: 15px;
    margin-bottom: 15px;
}

.card button {
    width: 100%;
    background: white;
    color: black;
    border: none;
    padding: 10px;
    font-weight: bold;
    border-radius: 4px;
    cursor: pointer;
    transition: 0.3s;
}

.card button:hover {
    background: #ff6600;
    color: white;
}

@media (max-width: 768px) {
    .productos {
        padding: 60px 3%;
    }
    
    .productos-header {
        flex-direction: column;
        align-items: flex-start;
        margin-bottom: 30px;
    }
    
    .productos-header h2 {
        font-size: 24px;
        margin-bottom: 15px;
    }
    
    .productos-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
        gap: 15px;
    }
    
    .card {
        padding: 12px;
    }
    
    .card img {
        height: 180px;
        margin-bottom: 10px;
    }
    
    .card h3 {
        font-size: 14px;
        margin-bottom: 5px;
    }
    
    .card p {
        font-size: 13px;
        margin-bottom: 10px;
    }
    
    .card button {
        padding: 8px;
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .productos {
        padding: 40px 2%;
    }
    
    .productos-header h2 {
        font-size: 20px;
    }
    
    .productos-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 10px;
    }
    
    .card {
        padding: 8px;
    }
    
    .card img {
        height: 140px;
        margin-bottom: 8px;
    }
    
    .card h3 {
        font-size: 12px;
    }
    
    .card p {
        font-size: 11px;
    }
}

/* ========================================== */
/* SECCIÓN PERSONALIZADOS Y COMPONENTES */
/* ========================================== */
.personalizados {
    display: grid;
    grid-template-columns: 1fr 1fr;
    padding: 80px 5%;
    gap: 40px;
    align-items: center;
    background: rgba(255,255,255,0.01);
}

.subtitulo-personalizados {
    color: #ff6600;
    font-weight: bold;
    letter-spacing: 3px;
    margin-bottom: 10px;
}

.personalizados-texto h2 {
    font-size: 45px;
    font-weight: 900;
    margin-bottom: 20px;
    line-height: 1.1;
}

.personalizados-texto p {
    color: #aaa;
    margin-bottom: 30px;
}

@media (max-width: 768px) {
    .personalizados {
        padding: 60px 3%;
        gap: 20px;
    }
    
    .subtitulo-personalizados {
        font-size: 14px;
        letter-spacing: 2px;
    }
    
    .personalizados-texto h2 {
        font-size: 28px;
        margin-bottom: 15px;
    }
    
    .personalizados-texto p {
        font-size: 14px;
        margin-bottom: 20px;
    }
}

@media (max-width: 480px) {
    .personalizados {
        padding: 40px 2%;
    }
    
    .personalizados-texto h2 {
        font-size: 22px;
    }
    
    .personalizados-texto p {
        font-size: 12px;
    }
}

/* BENEFICIOS */
.beneficios {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 30px;
    padding: 60px 5%;
    border-top: 1px solid rgba(255,255,255,0.05);
}

.beneficio-card {
    text-align: center;
    padding: 20px;
}

.beneficio-card .icono {
    font-size: 35px;
    margin-bottom: 15px;
}

.beneficio-card h3 {
    font-size: 16px;
    margin-bottom: 10px;
}

.beneficio-card p {
    color: #777;
    font-size: 13px;
}

@media (max-width: 768px) {
    .beneficios {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 20px;
        padding: 40px 3%;
    }
    
    .beneficio-card {
        padding: 15px;
    }
    
    .beneficio-card .icono {
        font-size: 28px;
        margin-bottom: 10px;
    }
    
    .beneficio-card h3 {
        font-size: 14px;
        margin-bottom: 8px;
    }
    
    .beneficio-card p {
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .beneficios {
        grid-template-columns: 1fr;
        gap: 15px;
        padding: 30px 2%;
    }
    
    .beneficio-card .icono {
        font-size: 24px;
    }
}

/* ========================================== */
/* FOOTER */
/* ========================================== */
.footer {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    padding: 60px 5%;
    background: #050505;
    border-top: 1px solid rgba(255,255,255,0.05);
}

.footer-box h2 {
    font-size: 18px;
    margin-bottom: 15px;
    letter-spacing: 1px;
}

.footer-box p {
    color: #666;
    font-size: 14px;
    line-height: 1.6;
}

.footer-box h3 {
    font-size: 15px;
    color: white;
    margin-bottom: 20px;
    text-transform: uppercase;
}

.footer-box a {
    display: block;
    color: #666;
    text-decoration: none;
    font-size: 14px;
    margin-bottom: 10px;
    transition: 0.3s;
}

.footer-box a:hover {
    color: white;
}

@media (max-width: 768px) {
    .footer {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 25px;
        padding: 40px 3%;
    }
    
    .footer-box h2 {
        font-size: 16px;
    }
    
    .footer-box h3 {
        font-size: 13px;
    }
    
    .footer-box p {
        font-size: 12px;
    }
    
    .footer-box a {
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .footer {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 30px 2%;
    }
    
    .footer-box {
        text-align: center;
    }
}

.copyright {
    text-align: center;
    padding: 20px;
    background: #000;
    color: #444;
    font-size: 13px;
    border-top: 1px solid rgba(255,255,255,0.02);
}

/* NOTIFICACIÓN TOAST */
.toast {
    position: fixed;
    bottom: -50px;
    left: 50%;
    transform: translateX(-50%);
    background: #ff6600;
    color: white;
    padding: 12px 30px;
    border-radius: 30px;
    font-weight: bold;
    box-shadow: 0 10px 20px rgba(0,0,0,0.3);
    z-index: 2000;
    transition: 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    opacity: 0;
}

.toast.show {
    bottom: 30px;
    opacity: 1;
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .header {
        padding: 15px 3%;
    }
    
    .logo h1 {
        font-size: 16px;
    }
    
    .icons {
        gap: 12px;
    }
    
    .search-container {
        padding: 5px 10px;
    }
    
    .navbar { display: none; }
    .menu-toggle { display: block; }
    .hero, .personalizados { grid-template-columns: 1fr; text-align: center; }
    .hero-text h2 { font-size: 38px; }
    .hero-text .descripcion { margin: 0 auto 30px; }
    .carrusel-contenedor { height: 320px; }
}

@media (max-width: 480px) {
    .header {
        padding: 12px 2%;
    }
    
    .logo img {
        width: 35px;
        height: 35px;
    }
    
    .logo h1 {
        font-size: 14px;
        letter-spacing: 1px;
    }
    
    .icons {
        gap: 8px;
        font-size: 16px;
    }
    
    .search-container {
        padding: 4px 8px;
    }
    
    .cart-icon {
        font-size: 16px;
    }
    
    #cart-count {
        font-size: 9px;
        padding: 1px 4px;
    }
    
    .user-icon {
        font-size: 16px;
    }
}