:root {
    --primary: #1a237e;
    --accent: #ff9800;
    --whatsapp: #25d366;
    --danger: #e53935;
    --text: #1c1c2e;
    --text-muted: #888;
    --bg: #f5f5f7;
    --white: #ffffff;
    --card-shadow: 0 2px 10px rgba(0, 0, 0, 0.07);
    --radius: 12px;
    --transition: 0.22s ease;
    --border: #e0e0e0;
}

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: 'DM Sans', sans-serif;
    min-height: 100vh;
}

/* NAVBAR */
/* NAVBAR RESPONSIVE */
.navbar {
    background: var(--primary);
    padding: 0.8rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 16px rgba(26, 35, 126, 0.25);
    gap: 0.5rem;
}

.logo {
    color: var(--white);
    font-family: 'Playfair Display', serif;
    font-size: 1.2rem;
    font-weight: 900;
    white-space: nowrap;
}

.logo span {
    color: var(--accent);
}

.nav-buttons {
    display: flex;
    gap: 0.6rem;
    flex-shrink: 0;
}

.cart-btn {
    background: rgba(255, 255, 255, 0.12);
    border: 2px solid rgba(255, 255, 255, 0.25);
    color: var(--white);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    font-size: 1.1rem;
    cursor: pointer;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--transition);
}

.cart-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--accent);
    color: var(--white);
    font-size: 0.65rem;
    font-weight: 700;
    min-width: 19px;
    height: 19px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--primary);
    transition: transform 0.2s;
    padding: 0 4px;
    box-sizing: border-box;
}

/* Ajustes para móviles muy pequeños */
@media (max-width: 480px) {
    .navbar {
        padding: 0.6rem 0.8rem;
    }

    .logo {
        font-size: 1rem;
    }

    .cart-btn {
        width: 38px;
        height: 38px;
        font-size: 0.9rem;
    }

    .cart-badge {
        min-width: 17px;
        height: 17px;
        font-size: 0.6rem;
        top: -4px;
        right: -4px;
    }

    .nav-buttons {
        gap: 0.4rem;
    }
}

/* BUTTONS GLOBALES */
.btn-primary {
    background: var(--whatsapp);
    color: var(--white);
    padding: 12px 24px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: transform var(--transition), box-shadow var(--transition);
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.35);
    border: none;
    cursor: pointer;
}

.btn-primary:hover {
    transform: translateY(-2px);
    opacity: 0.95;
}

.btn-secondary {
    background: transparent;
    border: 1.5px solid var(--white);
    color: var(--white);
    padding: 10px 20px;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
    backdrop-filter: blur(4px);
    background-color: rgba(255, 255, 255, 0.1);
}

.btn-secondary:hover {
    background-color: var(--white);
    color: var(--primary);
    border-color: var(--white);
    transform: translateY(-2px);
}

/* SECTION TITLE */
.section-title {
    text-align: center;
    padding: 1.8rem 1rem 0.8rem;
}

.section-title h2 {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    color: var(--primary);
    margin-bottom: 0.3rem;
}

.section-title p {
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* PRODUCT GRID */
.product-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    padding: 8px;
    max-width: 1200px;
    margin: 0 auto;
}

@media (min-width: 600px) {
    .product-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
        padding: 12px;
    }
}

@media (min-width: 900px) {
    .product-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 14px;
        padding: 16px;
    }
}

@media (min-width: 1200px) {
    .product-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

/* PRODUCT CARD */
.product-card {
    background: var(--white);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--card-shadow);
    cursor: pointer;
    transition: transform var(--transition), box-shadow var(--transition);
    position: relative;
}

.product-card img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    display: block;
}

.product-info {
    padding: 8px 10px 10px;
}

.product-info h3 {
    font-size: 0.82rem;
    font-weight: 600;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.price {
    font-size: 1rem;
    font-weight: 800;
    color: var(--primary);
}

.vendedor {
    font-size: 0.7rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 3px;
    margin-bottom: 4px;
}

.card-btn-add {
    width: 100%;
    background: var(--primary);
    color: var(--white);
    border: none;
    padding: 8px;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    margin-top: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    transition: filter var(--transition);
}

.card-btn-add:hover:not(:disabled) {
    filter: brightness(1.15);
}

.card-btn-add:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* MODALS OVERLAY */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    backdrop-filter: blur(3px);
}

.modal-overlay[hidden] {
    display: none;
}

/* CART MODAL */
.modal-box {
    background: var(--white);
    width: 100%;
    max-width: 420px;
    border-radius: 20px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    max-height: 85vh;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.25);
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    background: var(--primary);
    color: var(--white);
    padding: 1rem 1.4rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    font-family: 'Playfair Display', serif;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.modal-close {
    background: none;
    border: none;
    color: var(--white);
    font-size: 1.6rem;
    cursor: pointer;
    opacity: 0.8;
}

.modal-close:hover {
    opacity: 1;
}

.modal-body {
    padding: 1rem;
    overflow-y: auto;
    flex: 1;
}

.cart-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
}

.cart-item:last-child {
    border-bottom: none;
}

.cart-item-info {
    flex: 1;
}

.cart-item-name {
    font-weight: 600;
    font-size: 0.88rem;
}

.cart-item-price {
    font-size: 0.82rem;
    color: var(--primary);
    font-weight: 700;
}

.qty-control {
    display: flex;
    align-items: center;
    gap: 6px;
    background: #f5f5f7;
    border-radius: 20px;
    padding: 4px 6px;
}

.qty-btn {
    background: var(--white);
    border: 1px solid #ddd;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    transition: background var(--transition), color var(--transition);
}

.qty-btn:hover {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}

.qty-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.qty-num {
    font-weight: 700;
    font-size: 0.9rem;
    min-width: 18px;
    text-align: center;
}

.cart-empty {
    text-align: center;
    padding: 2rem;
    color: var(--text-muted);
}

.cart-empty i {
    font-size: 2.5rem;
    display: block;
    margin-bottom: 0.5rem;
}

.modal-footer {
    padding: 1rem;
    border-top: 1px solid #eee;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1rem;
}

.total-row strong {
    color: var(--primary);
    font-size: 1.25rem;
}

.btn-whatsapp {
    background: var(--whatsapp);
    color: var(--white);
    border: none;
    padding: 13px;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: filter var(--transition);
}

.btn-whatsapp:hover {
    filter: brightness(0.9);
}

.btn-clear {
    background: none;
    border: 1px solid #e0e0e0;
    color: var(--text-muted);
    padding: 9px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 0.82rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: color var(--transition), border-color var(--transition);
}

.btn-clear:hover {
    color: var(--danger);
    border-color: var(--danger);
}

/* DETAIL MODAL */
#modal-detalle {
    align-items: flex-end;
    padding: 0;
}

.detalle-box {
    background: var(--white);
    width: 100%;
    max-width: 480px;
    height: 92vh;
    border-radius: 20px 20px 0 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    animation: slideUp 0.35s ease;
    position: relative;
}

.detalle-btn-cerrar {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 10;
    background: rgba(0, 0, 0, 0.4);
    border: none;
    color: var(--white);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 0.9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}

.detalle-img-wrap {
    width: 100%;
    height: 55vw;
    max-height: 320px;
    flex-shrink: 0;
    overflow: hidden;
}

.detalle-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.detalle-scroll {
    flex: 1;
    overflow-y: auto;
    padding: 1.2rem;
}

.detalle-vendedor {
    font-size: 0.78rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 5px;
}

.detalle-nombre {
    font-family: 'Playfair Display', serif;
    font-size: 1.3rem;
    color: var(--text);
    margin-bottom: 5px;
}

.detalle-precio {
    font-size: 1.5rem;
    color: var(--primary);
    font-weight: 800;
    margin-bottom: 10px;
}

.detalle-stock {
    font-size: 0.78rem;
    padding: 3px 12px;
    border-radius: 20px;
    display: inline-block;
    margin-bottom: 1rem;
    font-weight: 600;
}

.detalle-stock.ok {
    background: #e8f5e9;
    color: #2e7d32;
}

.detalle-stock.low {
    background: #fff3e0;
    color: #e65100;
}

.detalle-stock.agotado {
    background: #ffebee;
    color: #c62828;
}

.detalle-actions {
    display: flex;
    gap: 10px;
    margin-bottom: 1.5rem;
}

.detalle-btn-add,
.detalle-btn-share {
    flex: 1;
    padding: 12px;
    border-radius: 12px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s ease;
    border: none;
}

.detalle-btn-share {
    background: #25d366;
    color: white;
}

.detalle-btn-share:hover {
    filter: brightness(0.9);
}

.detalle-btn-add {
    background: var(--primary);
    color: white;
}

.detalle-btn-add:hover:not(:disabled) {
    filter: brightness(0.9);
}

.detalle-btn-add:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* REVIEWS */
.resenas-section {
    border-top: 1px solid #f0f0f0;
    padding-top: 1.2rem;
}

.resenas-titulo {
    font-family: 'Playfair Display', serif;
    font-size: 1.1rem;
    color: var(--text);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.resenas-titulo i {
    color: var(--accent);
}

.resenas-count {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 400;
}

.resena-form {
    background: var(--bg);
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1.2rem;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.resena-form input,
.resena-form textarea {
    background: var(--white);
    border: 1.5px solid #e0e0e0;
    border-radius: 8px;
    padding: 9px 12px;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.88rem;
    color: var(--text);
    outline: none;
    transition: border-color var(--transition);
}

.resena-form input:focus,
.resena-form textarea:focus {
    border-color: var(--primary);
}

.resena-form textarea {
    resize: none;
}

.estrellas-input {
    display: flex;
    gap: 8px;
    padding: 6px 0;
}

.estrellas-input i {
    font-size: 1.6rem;
    color: #ddd;
    cursor: pointer;
    transition: color 0.15s;
}

.estrellas-input i.activa {
    color: var(--accent);
}

.btn-enviar-resena {
    background: var(--primary);
    color: var(--white);
    border: none;
    padding: 10px;
    border-radius: 8px;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: filter var(--transition);
}

.btn-enviar-resena:hover {
    filter: brightness(1.15);
}

.resena-item {
    padding: 12px 0;
    border-bottom: 1px solid #f5f5f5;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.resena-item:last-child {
    border-bottom: none;
}

.resena-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.resena-autor {
    font-weight: 600;
    font-size: 0.85rem;
}

.resena-estrellas {
    color: var(--accent);
    font-size: 0.78rem;
}

.resena-texto {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.resena-fecha {
    font-size: 0.72rem;
    color: #bbb;
    margin-top: 3px;
}

.resenas-empty {
    text-align: center;
    padding: 1.5rem;
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* TOAST */
#toast-container {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column-reverse;
    gap: 8px;
    z-index: 9999;
    pointer-events: none;
    align-items: center;
}

.toast-item {
    background: #25a244;
    color: white;
    padding: 10px 20px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 500;
    max-width: 90vw;
    white-space: normal;
    word-break: break-word;
    text-align: center;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s, transform 0.3s;
}

.toast-item.show {
    opacity: 1;
    transform: translateY(0);
}

.toast-item.warning {
    background: #ff9800;
}

.toast-item.error {
    background: #e53935;
}

.toast-item.info {
    background: #1a237e;
}

/* SCROLLBAR */
.detalle-scroll::-webkit-scrollbar {
    width: 3px;
}

.detalle-scroll::-webkit-scrollbar-thumb {
    background: #ddd;
    border-radius: 3px;
}

@media (min-width: 600px) {
    #modal-detalle {
        align-items: center;
        padding: 1rem;
    }

    .detalle-box {
        border-radius: 20px;
        height: auto;
        max-height: 88vh;
    }

    .detalle-img-wrap {
        height: 300px;
        max-height: 300px;
    }
}

/* FOOTER */
.footer {
    background: var(--primary);
    color: rgba(255, 255, 255, 0.85);
    margin-top: 3rem;
}

.footer-top {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 2rem;
    padding: 3rem 2rem;
    max-width: 1100px;
    margin: 0 auto;
}

@media (max-width: 700px) {
    .footer-top {
        grid-template-columns: 1fr;
        padding: 2rem 1.5rem;
        gap: 1.5rem;
    }
}

.footer-logo {
    font-family: 'Playfair Display', serif;
    font-size: 1.4rem;
    font-weight: 900;
    color: var(--white);
    margin-bottom: 0.8rem;
}

.footer-logo span {
    color: var(--accent);
}

.footer-desc {
    font-size: 0.85rem;
    line-height: 1.6;
    opacity: 0.75;
    margin-bottom: 1.2rem;
    max-width: 280px;
}

.footer-wa {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: var(--whatsapp);
    color: var(--white);
    padding: 9px 18px;
    border-radius: 50px;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    transition: filter var(--transition);
}

.footer-wa:hover {
    filter: brightness(0.9);
}

.footer-links h4,
.footer-info h4 {
    font-family: 'Playfair Display', serif;
    color: var(--accent);
    font-size: 0.95rem;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.footer-links a {
    display: flex;
    align-items: center;
    gap: 8px;
    color: rgba(255, 255, 255, 0.75);
    text-decoration: none;
    font-size: 0.85rem;
    margin-bottom: 0.6rem;
    transition: color var(--transition);
}

.footer-links a:hover {
    color: var(--accent);
}

.footer-info p {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    margin-bottom: 0.6rem;
    opacity: 0.75;
}

.footer-info i {
    color: var(--accent);
    width: 14px;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1.2rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.78rem;
    opacity: 0.6;
    flex-wrap: wrap;
    gap: 0.5rem;
    max-width: 1100px;
    margin: 0 auto;
}

@media (max-width: 500px) {
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
}

/* SKELETON LOADER */
@keyframes shimmer {
    0% {
        background-position: -400px 0;
    }

    100% {
        background-position: 400px 0;
    }
}

.product-card.skeleton {
    pointer-events: none;
}

.skeleton-img,
.skeleton-line,
.skeleton-btn {
    background: linear-gradient(90deg, #e8e8ec 25%, #f4f4f7 50%, #e8e8ec 75%);
    background-size: 800px 100%;
    animation: shimmer 1.4s infinite linear;
    border-radius: 6px;
}

.skeleton-img {
    width: 100%;
    aspect-ratio: 1;
    border-radius: var(--radius) var(--radius) 0 0;
}

.skeleton-line {
    height: 14px;
    margin-bottom: 10px;
}

.skeleton-line.short {
    width: 45%;
}

.skeleton-line.medium {
    width: 60%;
}

.skeleton-btn {
    height: 38px;
    margin-top: 8px;
}

/* EMPTY STATE */
.grid-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem;
    color: #999;
}

.grid-empty i {
    font-size: 2.5rem;
    display: block;
    margin-bottom: 1rem;
}

/* OFERTAS */
.seccion-header {
    grid-column: 1 / -1;
    font-size: 0.95rem;
    font-weight: 700;
    padding: 0.5rem 0 0.8rem;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 2px solid;
    margin-bottom: 0.5rem;
}

.oferta-header {
    color: #e53935;
    border-color: #ffebee;
}

.oferta-header i {
    color: #e53935;
}

.normal-header {
    color: var(--primary);
    border-color: #e8eaf6;
    margin-top: 1rem;
}

.product-card.en-oferta {
    border: 1.5px solid #ffcdd2;
}

.card-badge-oferta {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #e53935;
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 20px;
    letter-spacing: 0.5px;
    z-index: 1;
}

.price-wrap {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 10px;
}

.price-original {
    font-size: 0.85rem;
    color: #aaa;
    text-decoration: line-through;
}

.price-oferta {
    color: #e53935 !important;
    font-size: 1.2rem !important;
}

.descuento-badge {
    background: #ffebee;
    color: #c62828;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 10px;
}

/* VARIANTES ESTILO SHEIN */
.variantes-titulo {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary);
    margin: 0.75rem 0 0.5rem 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

.variantes-grid {
    display: flex;
    flex-direction: row;
    gap: 12px;
    overflow-x: auto;
    padding: 4px 0 8px 0;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
}

.variante-card {
    flex: 0 0 auto;
    width: 70px;
    cursor: pointer;
    text-align: center;
    border-radius: 8px;
    transition: all 0.2s ease;
    background: transparent;
    border: 2px solid transparent;
    padding: 2px;
}

.variante-imagen {
    width: 66px;
    height: 66px;
    border-radius: 8px;
    overflow: hidden;
    background: #f5f5f7;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    border: 1px solid #e0e0e0;
}

.variante-imagen img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.variante-card.selected {
    border-color: var(--primary);
    background: transparent;
}

.variante-card.selected .variante-imagen {
    border-color: var(--primary);
    box-shadow: 0 0 0 1px var(--primary);
}

.variante-info {
    display: none !important;
}

@media (max-width: 480px) {
    .variante-card {
        width: 60px;
    }

    .variante-imagen {
        width: 56px;
        height: 56px;
    }
}

/* LIGHTBOX */
.lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s;
}

.lightbox-overlay.active {
    opacity: 1;
    visibility: visible;
}

.lightbox-img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    cursor: default;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 2rem;
    color: white;
    cursor: pointer;
    z-index: 1001;
    font-weight: bold;
}

/* ========== MODAL DE AUTENTICACIÓN (ESTILO SHEIN) ========== */
/* ========== MODAL DE AUTENTICACIÓN (ESTILO MODERNO) ========== */

/* Contenedor del modal */
#auth-modal .modal-box {
    max-width: 440px;
    width: 100%;
    border-radius: 28px;
    background: var(--white);
    box-shadow: 0 30px 50px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    animation: fadeInUp 0.3s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Cabecera del modal */
#auth-modal .modal-header {
    background: white;
    border-bottom: 1px solid #f0f0f0;
    padding: 1.2rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#auth-modal .modal-header h2 {
    font-family: 'Playfair Display', serif;
    font-size: 1.3rem;
    font-weight: 700;
    color: #1a237e;
    margin: 0;
}

#auth-modal .modal-close {
    font-size: 1.8rem;
    background: none;
    border: none;
    cursor: pointer;
    color: #999;
    transition: color 0.2s;
    line-height: 1;
}

#auth-modal .modal-close:hover {
    color: #333;
}

/* Cuerpo del modal */
#auth-modal .modal-body {
    padding: 1.8rem 1.5rem 2rem;
}

/* Pestañas */
#auth-modal .auth-tabs {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.8rem;
    border-bottom: 1px solid #eee;
}

#auth-modal .tab-btn {
    background: none;
    border: none;
    font-weight: 600;
    font-size: 1rem;
    padding: 0.5rem 0;
    color: #888;
    cursor: pointer;
    transition: all 0.2s;
    font-family: 'DM Sans', sans-serif;
    position: relative;
}

#auth-modal .tab-btn.active {
    color: #1a237e;
}

#auth-modal .tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 2px;
    background: #1a237e;
}

#auth-modal .tab-btn:hover:not(.active) {
    color: #1a237e;
}

/* Formularios */
#auth-modal .auth-form {
    display: none;
    flex-direction: column;
    gap: 1rem;
}

#auth-modal .auth-form.active {
    display: flex;
}

/* Inputs y select */
#auth-modal input,
#auth-modal select {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-radius: 14px;
    font-size: 0.95rem;
    font-family: 'DM Sans', sans-serif;
    background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
    box-sizing: border-box;
}

#auth-modal input:focus,
#auth-modal select:focus {
    border-color: #1a237e;
    box-shadow: 0 0 0 3px rgba(26, 35, 126, 0.1);
}

/* Contenedor para el ojito */
#auth-modal .password-wrapper {
    position: relative;
}

#auth-modal .toggle-password {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #888;
    font-size: 1.1rem;
}

/* Botón principal */
#auth-modal .btn-primary {
    background: #1a237e;
    border-radius: 40px;
    padding: 12px;
    font-size: 1rem;
    font-weight: 700;
    border: none;
    color: white;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
    width: 100%;
    margin-top: 0.5rem;
}

#auth-modal .btn-primary:hover {
    background: #0f195e;
    transform: scale(1.02);
}

#auth-modal .btn-primary:active {
    transform: scale(0.98);
}

/* Mensajes de error */
#auth-modal .error-msg {
    background: #fff5f5;
    border-radius: 40px;
    padding: 10px;
    font-size: 0.8rem;
    color: #e53e3e;
    text-align: center;
    border: 1px solid #fed7d7;
    margin-top: 0.5rem;
}

/* Enlaces de ayuda (olvidé contraseña, reenviar correo) */
#auth-modal .auth-links {
    display: flex;
    justify-content: space-between;
    margin-top: 0.5rem;
    font-size: 0.8rem;
}

#auth-modal .auth-links a {
    color: #1a237e;
    text-decoration: none;
    transition: opacity 0.2s;
}

#auth-modal .auth-links a:hover {
    text-decoration: underline;
    opacity: 0.8;
}

#auth-modal .register-link {
    justify-content: center;
    margin-top: 0.5rem;
}

/* Sección de login social */
#auth-modal .social-login {
    margin-top: 1.8rem;
    text-align: center;
}

#auth-modal .social-login p {
    color: #888;
    font-size: 0.8rem;
    margin-bottom: 1rem;
    position: relative;
}

#auth-modal .social-login p::before,
#auth-modal .social-login p::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 25%;
    height: 1px;
    background: #ddd;
}

#auth-modal .social-login p::before {
    left: 0;
}

#auth-modal .social-login p::after {
    right: 0;
}

#auth-modal .social-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

#login-google,
#login-facebook {
    background: white;
    border: 1px solid #ddd;
    border-radius: 50px;
    padding: 10px 20px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 600;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.9rem;
    color: #333;
}

#login-google:hover,
#login-facebook:hover {
    background: #f5f5f5;
    border-color: #ccc;
    transform: translateY(-2px);
}

#login-google i {
    color: #4285F4;
}

#login-facebook i {
    color: #1877F2;
}

/* Responsive para móviles */
@media (max-width: 480px) {
    #auth-modal .modal-body {
        padding: 1.5rem;
    }

    #auth-modal input,
    #auth-modal select {
        padding: 10px 14px;
        font-size: 0.9rem;
    }

    #auth-modal .auth-links {
        flex-direction: column;
        align-items: center;
        gap: 0.5rem;
    }

    .social-buttons {
        flex-direction: column;
        gap: 0.8rem;
    }

    #login-google,
    #login-facebook {
        justify-content: center;
    }
}

/* ========== DROPDOWN DE USUARIO ========== */
.user-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    min-width: 220px;
    z-index: 1000;
    display: none;
    overflow: hidden;
    font-family: 'DM Sans', sans-serif;
    animation: fadeInDropdown 0.2s ease;
}

@keyframes fadeInDropdown {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.user-dropdown.show {
    display: block;
}

.user-dropdown-header {
    padding: 14px 16px;
    background: #f8f9fc;
    border-bottom: 1px solid #eef2f6;
    font-size: 0.8rem;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 8px;
    word-break: break-all;
}

.user-dropdown-header i {
    color: #1a237e;
    font-size: 0.9rem;
}

.user-dropdown a,
.user-dropdown button {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    text-align: left;
    padding: 12px 16px;
    background: none;
    border: none;
    font-size: 0.85rem;
    cursor: pointer;
    text-decoration: none;
    color: #334155;
    transition: all 0.2s;
    font-family: 'DM Sans', sans-serif;
}

.user-dropdown a i,
.user-dropdown button i {
    width: 18px;
    text-align: center;
    color: #64748b;
}

.user-dropdown a:hover,
.user-dropdown button:hover {
    background: #f1f5f9;
    color: #1a237e;
}

.user-dropdown a:hover i,
.user-dropdown button:hover i {
    color: #1a237e;
}

.user-dropdown button {
    border-top: 1px solid #eef2f6;
    margin-top: 4px;
    color: #e53935;
}

.user-dropdown button i {
    color: #e53935;
}

.user-dropdown button:hover {
    background: #fff5f5;
    color: #c62828;
}

/* Estilo para el campo de nombre del comprador en el carrito */
#cliente-nombre {
    width: 100%;
    padding: 12px 16px;
    font-size: 0.95rem;
    font-family: 'DM Sans', sans-serif;
    border: 1.5px solid var(--border);
    border-radius: 12px;
    background-color: var(--white);
    color: var(--text);
    transition: all 0.2s ease;
    outline: none;
    box-sizing: border-box;
}

#cliente-nombre:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(26, 35, 126, 0.1);
}

#cliente-nombre::placeholder {
    color: var(--text-muted);
    font-size: 0.85rem;
    opacity: 0.7;
}

/* Mensaje de bienvenida en hero */
/* HERO SECTION - CORREGIDO */
.hero {
    background-image: linear-gradient(160deg, rgba(26, 35, 126, 0.82) 0%, rgba(0, 0, 0, 0.55) 100%),
        url('https://images.unsplash.com/photo-1534452203293-494d7ddbf7e0?auto=format&fit=crop&q=60&w=1200');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    min-height: 320px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem 1rem;
}

.hero-content {
    max-width: 90%;
    width: 100%;
}

.hero-subtitle {
    text-transform: uppercase;
    letter-spacing: 4px;
    font-size: 0.75rem;
    color: var(--accent);
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.hero h1 {
    font-family: 'Playfair Display', serif;
    font-size: clamp(1.8rem, 7vw, 3rem);
    font-weight: 900;
    line-height: 1.2;
    margin: 0.5rem 0;
    color: var(--white);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.hero h1 em {
    color: var(--accent);
    font-style: normal;
}

.hero-desc {
    font-size: 1rem;
    opacity: 0.9;
    margin-bottom: 1.5rem;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

/* Ajustes para móviles */
@media (max-width: 600px) {
    .hero {
        min-height: 280px;
        padding: 1.5rem 1rem;
    }

    .hero-subtitle {
        letter-spacing: 2px;
        font-size: 0.7rem;
    }

    .hero h1 {
        font-size: clamp(1.5rem, 6vw, 2.2rem);
    }

    .hero-desc {
        font-size: 0.85rem;
    }
}

.welcome-message {
    font-size: 1.1rem;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.2);
    display: inline-block;
    padding: 8px 20px;
    border-radius: 50px;
    backdrop-filter: blur(4px);
    color: white;
}

/* FILTROS POR CATEGORÍA */
.filtros-section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.filtros-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin: 1rem 0 1.5rem;
}

.filtro-btn {
    background: white;
    border: 1px solid var(--border);
    border-radius: 30px;
    padding: 8px 18px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--text);
    font-family: 'DM Sans', sans-serif;
}

.filtro-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.filtro-btn:hover:not(.active) {
    background: #f0f0f0;
    border-color: #ccc;
}

/* ===== CONFIGURACIÓN DE PAGOS (QvaPay) ===== */
#page-configuracion .table-card {
    max-width: 600px;
    margin: 0 auto;
    padding: 1.5rem;
}

#page-configuracion .form-group {
    margin-bottom: 1.2rem;
}

#page-configuracion label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: var(--primary);
}

#qvapay-enabled-checkbox {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

#qvapay-merchant-group {
    background: #f8f9fc;
    padding: 1rem;
    border-radius: 12px;
    margin-top: 0.5rem;
    border: 1px solid var(--border);
}

#qvapay-merchant-group label {
    font-size: 0.85rem;
    color: var(--text);
    margin-bottom: 0.25rem;
}

#qvapay-merchant-id {
    font-family: monospace;
    background-color: #fef9e6;
    border-color: #ffcd94;
}

#guardar-config-pagos {
    margin-top: 1rem;
    width: 100%;
    justify-content: center;
}

/* Estado visual (mensaje permanente) */
#qvapay-status {
    margin-top: 1.5rem;
    padding: 1rem;
    border-radius: 12px;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: #f5f5f7;
    border-left: 4px solid #2e7d32;
}

#qvapay-status i {
    font-size: 1.4rem;
}

#qvapay-status-text {
    flex: 1;
}

#qvapay-status-text strong {
    display: block;
    margin-bottom: 0.2rem;
}

#qvapay-status-text code {
    background: rgba(0, 0, 0, 0.05);
    padding: 2px 6px;
    border-radius: 6px;
    font-size: 0.8rem;
}

/* Botón de usuario con texto */
.user-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0 12px;
    width: auto;
    border-radius: 40px;
}

.user-btn-text {
    font-size: 0.85rem;
    font-weight: 500;
}

/* Ajuste responsive: en móviles muy pequeños ocultar texto */
@media (max-width: 480px) {
    .user-btn-text {
        display: none;
    }

    .user-btn {
        width: 44px;
        justify-content: center;
    }
}

/* Estilos para el tutorial modal */
/* ===== TUTORIAL / CÓMO SER VENDEDOR ===== */
.tutorial-step {
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
    padding-bottom: 1rem;
}

.tutorial-step:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.tutorial-step h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tutorial-step h3::before {
    content: "📘";
    font-size: 1rem;
}

.tutorial-step p {
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--text);
    margin-left: 1.8rem;
}

/* Botón de ayuda flotante (opcional) */
.help-button {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    z-index: 999;
    transition: transform 0.2s, background 0.2s;
}

.help-button:hover {
    transform: scale(1.05);
    background: var(--accent);
}

/* Ajuste para el modal del tutorial (reutiliza .modal-box y .modal-overlay) */
#tutorial-seller-modal .modal-body {
    max-height: 60vh;
    overflow-y: auto;
}

#tutorial-seller-modal .modal-footer {
    justify-content: center;
}

.user-dropdown-pending {
    padding: 12px 16px;
    font-size: 0.85rem;
    color: #ff9800;
    background: #fff8e1;
    border-bottom: 1px solid #eef2f6;
    display: flex;
    align-items: center;
    gap: 8px;
}

.help-btn-small {
    padding: 5px 12px !important;
    font-size: 0.75rem !important;
    gap: 4px !important;
    background-color: rgba(255, 255, 255, 0.2) !important;
}