:root {
    --purple: #7a2cbe;
    --purple-dark: #5a2094;
    --black: #121212;
    --gray: #a4a4a4;
    --gray-light: #f0f0f0;
    --gray-bg: #f8f9fa;
    --white: #ffffff;
    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'San Francisco', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    --font-heading: 'Inter', sans-serif;
    --gold: #c9a15a;
}

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

body {
    font-family: var(--font);
    color: var(--black);
    background: var(--gray-bg);
    line-height: 1.6;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }

.container { width: 90%; max-width: 1200px; margin: 0 auto; }

.text-center { text-align: center; }

/* ===== HEADER ===== */
.site-header {
    background: rgba(248,249,250,0.85);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--gray-light);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    gap: 1rem;
}

.logo {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.4rem;
    letter-spacing: 0.02em;
    color: var(--purple);
    white-space: nowrap;
}

.logo-img {
    height: 26px;
    width: auto;
    max-width: 130px;
    display: block;
}

.main-nav {
    display: flex;
    gap: 1.5rem;
}

.main-nav a {
    font-size: 0.85rem;
    font-weight: 400;
    letter-spacing: 0.3px;
    padding: 6px 0;
    transition: color 0.2s;
}

.main-nav a:hover { color: var(--purple); }

.header-tools {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.cart-link { position: relative; display: flex; }

.search-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--black);
    padding: 2px;
    transition: color 0.2s;
}

.search-toggle:hover { color: var(--purple); }
.cart-badge {
    position: absolute;
    top: -6px;
    right: -8px;
    background: var(--purple);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 600;
    padding: 2px 5px;
    border-radius: 10px;
    min-width: 16px;
    text-align: center;
    line-height: 1;
}

.btn-login, .btn-account, .btn-logout {
    font-size: 0.85rem;
    padding: 6px 14px;
    border-radius: 20px;
    transition: all 0.2s;
}

.btn-login {
    border: 1px solid var(--purple);
    color: var(--purple);
}

.btn-login:hover {
    background: var(--purple);
    color: #fff;
}

.btn-account {
    background: var(--purple);
    color: #fff;
}

.btn-logout {
    color: var(--gray);
    font-size: 0.8rem;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--black);
    padding: 4px;
}

/* ===== FLASH MESSAGES ===== */
.flash {
    padding: 12px 20px;
    text-align: center;
    font-size: 0.9rem;
}

.flash-error { background: #fdecea; color: #b71c1c; }
.flash-success { background: #e8f5e9; color: #2e7d32; }

/* ===== BUTTONS ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 28px;
    border-radius: 28px;
    font-family: var(--font);
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    text-decoration: none;
    font-weight: 400;
}

.btn-primary {
    background: var(--purple);
    color: #fff;
}

.btn-primary:hover {
    background: var(--purple-dark);
    transform: translateY(-1px);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--purple);
    color: var(--purple);
}

.btn-outline:hover {
    background: var(--purple);
    color: #fff;
}

.btn-sm {
    padding: 8px 20px;
    font-size: 0.85rem;
}

.btn-block { width: 100%; }

/* ===== HERO ===== */
.hero {
    position: relative;
    min-height: 80vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    overflow: hidden;
    padding: clamp(3.25rem, 5vw, 4.5rem) 2rem 3rem;
    text-align: center;
    color: #121212;
}

.hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hero-slide {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0;
    animation-name: heroFade;
    animation-iteration-count: infinite;
    animation-timing-function: ease-in-out;
}

/* Degradados de respaldo si aún no hay fotos cargadas en el panel admin (Carrusel Hero) */
.hero-slide-fallback-1 {
    background: radial-gradient(circle at 20% 20%, #3d1a5c, transparent 60%),
                linear-gradient(135deg, #1a0f2e, #5a2094 55%, #7a2cbe 100%);
}
.hero-slide-fallback-2 {
    background: radial-gradient(circle at 80% 30%, #c9a15a55, transparent 55%),
                linear-gradient(135deg, #121212, #3d1a5c 45%, #7a2cbe 120%);
}
.hero-slide-fallback-3 {
    background: radial-gradient(circle at 50% 80%, #c9a15a44, transparent 60%),
                linear-gradient(135deg, #2c0f4a, #5a2094 50%, #121212 100%);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: none;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero h1 {
    font-family: var(--font-heading);
    font-size: clamp(2.25rem, 5.5vw, 3.5rem);
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 0.5rem;
    text-transform: lowercase;
    letter-spacing: 0.01em;
    color: #121212;
}

.hero p {
    font-size: clamp(1.06rem, 2.2vw, 1.5rem);
    font-weight: 400;
    color: #121212;
    margin-bottom: clamp(1.25rem, 2vw, 1.5rem);
}

.hero .btn {
    font-size: clamp(0.875rem, 2vw, 1.0625rem);
    padding: 0.5rem 1.125rem;
    font-weight: 300;
}

.section-novedades .btn {
    padding: 0.5rem 1.125rem;
    font-weight: 300;
}

@media (prefers-reduced-motion: reduce) {
    .hero-slide { animation: none !important; opacity: 0; }
    .hero-slide:first-child { opacity: 1; }
}

/* ===== SECTIONS ===== */
.section { padding: clamp(2rem, 4vw, 4rem) 0 clamp(3rem, 5vw, 4rem) 0; }
.section-gray { background: var(--gray-light); }

.home-section {
    border-bottom: 0.75rem solid #ffffff;
}

.home-section:last-of-type {
    border-bottom: none;
}

@media (max-width: 480px) {
    .home-section {
        border-bottom-width: 0.5rem;
    }
}
.section-title {
    font-family: var(--font-heading);
    font-size: clamp(2.25rem, 5.5vw, 3.5rem);
    font-weight: 600;
    text-align: center;
    margin-bottom: clamp(1.25rem, 2.5vw, 2rem);
    text-transform: lowercase;
}

.section-novedades .section-title,
.section-espacio .section-title {
    margin-bottom: clamp(1.25rem, 2vw, 1.5rem);
}

/* ===== CATEGORY GRID ===== */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 1rem;
}

.category-card {
    text-align: center;
    transition: transform 0.3s ease;
}

.category-card:hover { transform: translateY(-4px); }

.category-img {
    aspect-ratio: 1/1;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 0.5rem;
    background: var(--gray-light);
}

.category-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    display: block;
}

.category-img.fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    color: #fff;
    font-weight: 700;
}

.category-product-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    width: 100%;
    height: 100%;
    gap: 1px;
    background: var(--gray-light);
}

.category-product-grid.single {
    grid-template-columns: 1fr;
    grid-template-rows: 1fr;
}

.category-product-grid img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    display: block;
}

.category-product-grid .grid-fill {
    width: 100%;
    height: 100%;
}

.category-card h3 {
    font-size: 0.8rem;
    font-weight: 600;
}

/* ===== CATEGORY CAROUSEL (home page) ===== */
.category-carousel-wrap {
    position: relative;
}

.carousel-arrow {
    position: absolute;
    top: 40%;
    transform: translateY(-50%);
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: none;
    background: rgba(128,128,128,0.35);
    box-shadow: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    line-height: 1;
    color: #fff;
    cursor: pointer;
    z-index: 3;
    transition: transform 0.2s ease;
}
.carousel-arrow:hover {
    transform: translateY(-50%) scale(1.15);
    background: rgba(128,128,128,0.35);
    color: #fff;
}
.carousel-arrow-prev { left: -6px; }
.carousel-arrow-next { right: -6px; }

/* Estado que agrega Swiper al llegar al inicio/fin del carrusel */
.carousel-arrow.swiper-button-disabled {
    opacity: 0.35;
    cursor: default;
    pointer-events: none;
}

@media (max-width: 768px) {
    .carousel-arrow {
        display: none;
    }

    .category-carousel {
        padding-left: 1.25rem;
        padding-right: 1.25rem;
    }
}

/* El layout del carrusel lo maneja Swiper (.swiper/.swiper-wrapper/.swiper-slide) */
.category-carousel {
    padding-bottom: 0.5rem;
}

.category-carousel .category-card {
    position: relative;
    display: flex;
    flex-direction: column;
    height: auto;
}

/* Título superpuesto sobre la imagen, al 8% del borde superior */
.category-carousel .category-title {
    position: absolute;
    top: 8%;
    left: 0;
    right: 0;
    z-index: 2;
    text-align: left;
    margin: 0;
    padding: 0 0.75rem;
    max-width: none;
    color: #121212;
    font-size: clamp(1.5rem, 3.125vw, 2rem);
    font-weight: 700;
    text-transform: lowercase;
    line-height: 1;
    letter-spacing: -0.02em;
}

.category-carousel .category-img {
    aspect-ratio: 4 / 5;
    height: auto;
    margin-bottom: 0;
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    background: var(--gray-light);
    display: flex;
    align-items: center;
    justify-content: center;
}

.category-cover {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

.category-title {
    margin: 0;
    font-size: clamp(1rem, 2.8vw, 1.8rem);
    font-weight: 800;
    color: #121212;
    text-transform: capitalize;
    line-height: 1.1;
}

/* ===== ESPACIO SECTION (nuestro espacio) ===== */
.btn-espacio {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 20px;
    border: 1px solid var(--purple);
    border-radius: 28px;
    background: transparent;
    color: var(--purple);
    font-size: 0.88rem;
    font-weight: 300;
    text-decoration: none;
    transition: background 0.2s, color 0.2s;
}

.btn-espacio:hover {
    background: var(--purple);
    color: #fff;
}

.espacio-carousel-wrap {
    position: relative;
}

.espacio-carousel {
    padding-bottom: 0.5rem;
}

.espacio-card {
    aspect-ratio: 4 / 5;
    border-radius: 12px;
    overflow: hidden;
}

.espacio-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    display: block;
}

/* ===== SOCIAL SECTION (twenty + vos) ===== */
.social-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: clamp(1rem, 2vw, 1.5rem);
    flex-wrap: wrap;
    gap: 0.75rem;
}

.social-title {
    font-family: var(--font-heading);
    font-size: clamp(1.4rem, 3vw, 2rem);
    font-weight: 600;
    text-transform: lowercase;
}

.btn-social {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 20px;
    border: 1px solid var(--purple);
    border-radius: 28px;
    background: transparent;
    color: var(--purple);
    font-size: 0.88rem;
    font-weight: 500;
    text-decoration: none;
    transition: background 0.2s, color 0.2s;
}

.btn-social:hover {
    background: var(--purple);
    color: #fff;
}

.social-carousel {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 0.5rem;
}

.social-carousel::-webkit-scrollbar { display: none; }

.social-card {
    flex: 0 0 calc(33.333% - 0.67rem);
    scroll-snap-align: start;
    aspect-ratio: 4 / 5;
    border-radius: 12px;
    overflow: hidden;
}

.social-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    display: block;
}

@media (max-width: 768px) {
    .social-card {
        flex: 0 0 calc(55% - 0.5rem);
    }
}

@media (max-width: 480px) {
    .social-card {
        flex: 0 0 82vw;
    }
}

/* ===== PRODUCT GRID ===== */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.5rem;
}

.product-card {
    display: flex;
    flex-direction: column;
    background: var(--white);
    border-radius: 16px;
    padding: 10px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    transition: transform 0.35s cubic-bezier(.22,1,.36,1), box-shadow 0.35s ease;
}

.product-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 28px rgba(18,18,18,0.1);
}

.product-card-media {
    position: relative;
    display: block;
    overflow: hidden;
    border-radius: 12px;
    margin-bottom: 0.75rem;
}

.product-card-media > a { display: block; }

.product-card img, .product-img-placeholder {
    aspect-ratio: 1/1;
    object-fit: cover;
    border-radius: 12px;
    width: 100%;
    background: #ffffff;
    margin-bottom: 0;
    transition: transform 0.5s cubic-bezier(.22,1,.36,1);
}

.product-card:hover .product-card-media img { transform: scale(1.08); }

.product-img-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--gray);
}

.product-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 2;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: var(--white);
    animation: badgePop 0.4s cubic-bezier(.22,1,.36,1) both;
}

.product-badge-sale { background: var(--purple); }
.product-badge-new { background: var(--black); }
.product-badge-oos { background: #dc2626; top: auto; bottom: 10px; left: 10px; }

.stock-oos-msg {
    color: #dc2626;
    font-weight: 600;
    font-size: 0.95rem;
    margin: 0.75rem 0;
    padding: 0.5rem 0.75rem;
    background: #fef2f2;
    border-radius: 8px;
    text-align: center;
}

@keyframes badgePop {
    from { transform: scale(0.5); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.product-card .btn-add-cart {
    align-self: flex-start;
    border: 1px solid var(--black);
    background: transparent;
    color: var(--black);
    border-radius: 999px;
    padding: 6px 18px;
    font-size: 0.8rem;
    font-weight: 600;
    transition: background 0.2s ease, color 0.2s ease;
}

.product-card .btn-add-cart:hover {
    background: var(--black);
    color: var(--white);
}

/* Scroll-reveal para tarjetas de producto (visibles por defecto para evitar tarjetas ocultas) */
.reveal {
    opacity: 1;
    transform: none;
    transition: opacity 0.6s cubic-bezier(.22,1,.36,1), transform 0.6s cubic-bezier(.22,1,.36,1);
}

.reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
    .reveal { opacity: 1; transform: none; transition: none; }
    .product-card, .product-card-media img, .btn-add-cart { transition: none; }
}

.product-brand {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: capitalize;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
}

.product-title {
    font-size: 0.95rem;
    font-weight: 400;
    margin-bottom: 6px;
    line-height: 1.3;
}

.product-title a:hover { color: var(--purple); }

.product-price {
    display: flex;
    gap: 8px;
    align-items: baseline;
    margin-bottom: 0.75rem;
    font-weight: 600;
    font-size: 0.95rem;
}

.price-old {
    color: var(--gray);
    font-weight: 400;
    text-decoration: line-through;
    font-size: 0.9rem;
}

.price-sale { color: var(--purple); }

/* ===== SHOP LAYOUT ===== */
.shop-layout {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 2rem;
    padding-top: 2rem;
    padding-bottom: 3rem;
}

.shop-sidebar h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.category-list {
    list-style: none;
}

.category-list li { margin-bottom: 0.5rem; }

.category-list a {
    font-size: 0.9rem;
    color: #555;
    padding: 4px 0;
    display: block;
    transition: color 0.2s;
}

.category-list a:hover, .category-list a.active {
    color: var(--purple);
    font-weight: 500;
}

.shop-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--gray-light);
}

.result-count {
    font-size: 0.9rem;
    color: var(--gray);
}

.order-form select {
    border: none;
    background: transparent;
    font-family: var(--font);
    font-size: 0.85rem;
    color: var(--gray);
    padding: 6px 20px 6px 0;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23a4a4a4' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 2px center;
}

/* ===== PRODUCT SINGLE ===== */
.product-single {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    padding-top: 2rem;
    padding-bottom: 3rem;
}

.main-image, .main-image-placeholder {
    width: 100%;
    aspect-ratio: 1/1;
    object-fit: cover;
    border-radius: 12px;
    background: var(--gray-light);
}

.main-image-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: var(--gray);
}

.gallery-thumbs {
    display: flex;
    gap: 8px;
    margin-top: 1rem;
}

.gallery-thumbs .thumb {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.2s;
}

.gallery-thumbs .thumb.active, .gallery-thumbs .thumb:hover { opacity: 1; }

.product-info h1 {
    font-size: 1.5rem;
    font-weight: 400;
    margin-bottom: 0.5rem;
}

.product-info .product-price {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

.product-desc {
    color: #555;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.add-to-cart-form {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    margin-bottom: 2rem;
}

/* ===== VARIANTES (color / talla) ===== */
.variant-group { margin-bottom: 1.25rem; }

.variant-group-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.variant-selected-label { font-weight: 400; color: var(--gray); text-transform: none; }

.variant-options { display: flex; flex-wrap: wrap; gap: 10px; }

.variant-swatch {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 2px solid var(--white);
    outline: 1px solid var(--gray-light);
    cursor: pointer;
    padding: 0;
    transition: transform 0.2s ease, outline-color 0.2s ease;
}

.variant-swatch:hover { transform: scale(1.1); }

.variant-swatch.is-selected {
    outline: 2px solid var(--purple);
    outline-offset: 2px;
    transform: scale(1.05);
}

.variant-swatch.is-oos {
    cursor: not-allowed;
    opacity: 0.35;
    position: relative;
}

.variant-pill {
    min-width: 42px;
    padding: 8px 14px;
    border-radius: 8px;
    border: 1px solid var(--gray-light);
    background: var(--white);
    font-size: 0.88rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.variant-pill:hover { border-color: var(--purple); }

.variant-pill.is-selected {
    border-color: var(--purple);
    background: var(--purple);
    color: var(--white);
}

.variant-pill.is-oos {
    cursor: not-allowed;
    opacity: 0.4;
    text-decoration: line-through;
}

.variant-stock-note {
    width: 100%;
    font-size: 0.82rem;
    margin: -6px 0 6px;
    color: var(--gray);
}

.variant-stock-note.is-low { color: #c0392b; }
.variant-stock-note.is-oos { color: #c0392b; font-weight: 600; }

.qty-wrapper {
    display: flex;
    align-items: center;
    border: 1px solid var(--purple);
    border-radius: 30px;
    overflow: hidden;
}

.qty-btn {
    background: none;
    border: none;
    padding: 10px 14px;
    cursor: pointer;
    font-size: 1.1rem;
    color: var(--purple);
    transition: background 0.2s;
}

.qty-btn:hover { background: var(--gray-bg); }

.qty-input {
    width: 50px;
    text-align: center;
    border: none;
    background: transparent;
    font-size: 1rem;
    font-family: var(--font);
    padding: 10px 0;
    -moz-appearance: textfield;
}

.qty-input::-webkit-inner-spin-button { -webkit-appearance: none; }

.product-details {
    border-top: 1px solid var(--gray-light);
    padding-top: 1.5rem;
}

.product-details h3 {
    font-size: 1.1rem;
    font-weight: 500;
    margin-bottom: 0.75rem;
}

.product-details div {
    color: #555;
    font-size: 0.95rem;
    line-height: 1.7;
}

.related-products { border-top: 1px solid var(--gray-light); }

/* ===== CART ===== */
.cart-page, .checkout-page { padding-top: 2rem; padding-bottom: 3rem; }
.cart-page h1, .checkout-page h1 { margin-bottom: 2rem; }

.empty-cart { text-align: center; padding: 3rem 0; }
.empty-cart p { color: var(--gray); margin-bottom: 1rem; }

.cart-items { margin-bottom: 2rem; }

.cart-item {
    display: grid;
    grid-template-columns: 80px 1fr auto auto auto;
    gap: 1rem;
    align-items: center;
    padding: 1rem 0;
    border-bottom: 1px solid var(--gray-light);
}

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

.cart-item-info a {
    font-weight: 500;
    font-size: 0.95rem;
}

.cart-item-info a:hover { color: var(--purple); }

.cart-item-price { color: var(--gray); font-size: 0.85rem; margin-top: 4px; }
.cart-item-variant, .item-variant-tag { color: var(--purple); font-size: 0.8rem; font-weight: 600; }

.cart-item-qty {
    display: flex;
    align-items: center;
    gap: 4px;
}

.cart-item-qty .qty-btn {
    padding: 6px 10px;
    font-size: 0.9rem;
}

.qty-value {
    min-width: 24px;
    text-align: center;
    font-weight: 500;
}

.cart-item-total { font-weight: 600; }

.cart-item-remove {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--gray);
    cursor: pointer;
    padding: 4px;
    line-height: 1;
}

.cart-item-remove:hover { color: #c62828; }

.cart-summary {
    text-align: right;
    padding-top: 1rem;
}

.cart-total {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

/* ===== CHECKOUT ===== */
.checkout-layout {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 2rem;
    align-items: start;
}

.checkout-summary {
    background: var(--white);
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid var(--gray-light);
}

.checkout-summary h3 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.summary-items { margin-bottom: 1rem; }

.summary-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    font-size: 0.9rem;
    border-bottom: 1px solid var(--gray-light);
}

.summary-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    padding: 4px 0;
    color: var(--gray);
}

.summary-total {
    display: flex;
    justify-content: space-between;
    font-size: 1.1rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--gray-light);
    margin-top: 0.5rem;
}

.form-note {
    font-size: 0.8rem;
    color: var(--gray);
    margin-top: 0.75rem;
    text-align: center;
}

/* ===== FORMS ===== */
.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 6px;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-radius: 12px;
    font-family: var(--font);
    font-size: 0.95rem;
    background: var(--white);
    transition: box-shadow 0.2s;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(122,44,190,0.1);
    border-color: var(--purple);
}

/* ===== AUTH ===== */
.auth-page {
    display: flex;
    justify-content: center;
    padding-top: 3rem;
    padding-bottom: 4rem;
}

.auth-card {
    width: 100%;
    max-width: 400px;
    background: var(--white);
    padding: 2.5rem;
    border-radius: 16px;
    border: 1px solid var(--gray-light);
}

.auth-card h1 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    text-align: center;
}

.auth-link {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 0.9rem;
    color: var(--gray);
}

.auth-link a { color: var(--purple); font-weight: 500; }

/* ===== ORDER CONFIRMED ===== */
.order-confirmed {
    text-align: center;
    padding-top: 3rem;
    padding-bottom: 4rem;
    max-width: 600px;
}

.success-icon {
    width: 64px;
    height: 64px;
    background: #2e7d32;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin: 0 auto 1.5rem;
}

.order-details {
    background: var(--white);
    border-radius: 12px;
    padding: 2rem;
    margin: 2rem 0;
    text-align: left;
}

.order-details h3 { margin-bottom: 0.5rem; }

.order-actions { margin-top: 1.5rem; }

/* ===== TABLE ===== */
.order-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.order-table th, .order-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid var(--gray-light);
}

.order-table th {
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--gray);
}

/* ===== BADGES ===== */
.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.badge-pending { background: #fff3e0; color: #e65100; }
.badge-procesando { background: #e3f2fd; color: #1565c0; }
.badge-enviado { background: #ede7f6; color: #4527a0; }
.badge-completado { background: #e8f5e9; color: #2e7d32; }
.badge-cancelado { background: #fdecea; color: #b71c1c; }

/* ===== PAGINATION ===== */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 2rem;
}

.page-link {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.page-link:hover, .page-link.active {
    background: var(--purple);
    color: #fff;
}

/* ===== ACCOUNT ===== */
.account-page { padding-top: 2rem; padding-bottom: 3rem; }
.account-info {
    background: var(--white);
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid var(--gray-light);
    margin-bottom: 2rem;
}

.account-info p { margin-bottom: 6px; }

.account-layout {
    display: grid;
    grid-template-columns: 1fr 1.3fr;
    gap: 2.5rem;
    align-items: start;
}
.account-col h2 { margin: 0 0 1rem; font-size: 1.1rem; }
.account-col h2:not(:first-child) { margin-top: 2rem; }

.account-form {
    background: var(--white);
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid var(--gray-light);
    margin-bottom: 1.5rem;
}
.account-form .form-group { margin-bottom: 1rem; }
.account-form label { display: block; font-weight: 600; font-size: 0.85rem; margin-bottom: 0.3rem; }
.account-form input, .account-form textarea {
    width: 100%;
    padding: 0.6rem;
    border-radius: 8px;
    border: 1px solid var(--gray-light);
    font-family: var(--font);
}
.account-form input:disabled { background: var(--gray-bg); color: var(--gray); }
.account-form .form-note { font-size: 0.8rem; color: var(--gray); margin-top: 0.6rem; }

.order-table { width: 100%; border-collapse: collapse; background: var(--white); border-radius: 12px; overflow: hidden; }
.order-table th, .order-table td { text-align: left; padding: 0.7rem 0.9rem; border-bottom: 1px solid var(--gray-light); font-size: 0.92rem; }
.order-table th { background: var(--gray-light); }

@media (max-width: 800px) {
    .account-layout { grid-template-columns: 1fr; }
}

/* ===== NOT FOUND ===== */
.not-found { text-align: center; padding: 5rem 0; }
.not-found h1 { font-size: 5rem; color: var(--gray); margin-bottom: 0.5rem; }

.error-page {
    text-align: center;
    padding: 2rem 0 3rem;
    max-width: 500px;
    margin: 0 auto;
}

.error-image {
    max-width: 240px;
    width: 100%;
    height: auto;
    border-radius: 16px;
    margin-bottom: 1rem;
}

.error-page h1 {
    font-size: 3rem;
    font-weight: 700;
    color: var(--black);
    margin-bottom: 0.5rem;
    line-height: 1;
}

.error-page p {
    color: var(--gray);
    font-size: 1rem;
    margin-bottom: 1.5rem;
}

/* ===== FOOTER ===== */
.site-footer {
    background: var(--black);
    color: var(--gray-bg);
    padding: 3rem 0 0;
}

.footer-inner {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
}

.footer-brand h3 {
    color: var(--white);
    margin-bottom: 0.5rem;
}

.footer-brand p {
    color: var(--gray);
    font-size: 0.9rem;
}

.footer-links h4 {
    color: var(--white);
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
}

.footer-links a, .footer-links p {
    display: block;
    color: var(--gray);
    font-size: 0.85rem;
    margin-bottom: 6px;
    transition: color 0.2s;
}

.footer-links a:hover { color: var(--white); }

.footer-bottom {
    border-top: 1px solid #222;
    padding: 1.5rem 0;
    margin-top: 2rem;
    text-align: center;
    font-size: 0.8rem;
    color: var(--gray);
}

/* ===== TABLE RESPONSIVE ===== */
.table-wrap {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.table-wrap table { min-width: 480px; }

/* ===== CATEGORY TOGGLE (mobile) ===== */
.category-toggle {
    display: none;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .main-nav { display: none; }
    .menu-toggle { display: flex; }

    .hero { min-height: clamp(520px, 75vh, 550px); padding: clamp(2rem, 4vw, 3rem) 1.25rem 2rem; }

    .shop-layout {
        grid-template-columns: 1fr;
    }

    .shop-sidebar {
        display: block;
        margin-bottom: 1.25rem;
    }

    .category-toggle {
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        padding: 10px 16px;
        border: 1px solid var(--gray-light);
        border-radius: 12px;
        background: var(--white);
        font-family: var(--font);
        font-size: 0.9rem;
        font-weight: 500;
        cursor: pointer;
        color: var(--black);
        transition: border-color 0.2s;
    }

    .category-toggle:hover { border-color: var(--purple); }

    .category-toggle::after {
        content: '';
        width: 8px;
        height: 8px;
        border-right: 2px solid var(--gray);
        border-bottom: 2px solid var(--gray);
        transform: rotate(45deg);
        transition: transform 0.2s;
        margin-bottom: 4px;
    }

    .category-toggle.open::after {
        transform: rotate(-135deg);
        margin-bottom: 0;
        margin-top: 4px;
    }

    .category-list {
        display: none;
        margin-top: 0.5rem;
        background: var(--white);
        border-radius: 12px;
        padding: 0.5rem 0;
        border: 1px solid var(--gray-light);
    }

    .category-list.open { display: block; }

    .category-list li { margin-bottom: 0; }

    .category-list a {
        padding: 8px 16px;
        font-size: 0.95rem;
    }

    .product-single {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .checkout-layout {
        grid-template-columns: 1fr;
    }

    .cart-item {
        grid-template-columns: 60px 1fr auto;
        gap: 0.75rem;
    }

    .cart-item-total { display: none; }

    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .product-scroll {
        display: flex;
        gap: 1rem;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        padding: 0 1.25rem 0.5rem 1.25rem;
        scroll-padding-left: 1.25rem;
    }

    .product-scroll::-webkit-scrollbar { display: none; }

    .product-scroll .product-card {
        flex: 0 0 calc((100% + 2.5rem - 4.2px) / 1.3);
        scroll-snap-align: start;
    }

    .category-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .reveal { opacity: 1; transform: none; transition: none; }

    .header-tools .btn-login,
    .header-tools .btn-account,
    .header-tools .btn-logout {
        display: none;
    }

    .mobile-menu-open .main-nav {
        overflow-y: auto;
        padding-bottom: 9rem;
    }

    .gallery-thumbs .thumb {
        width: 50px;
        height: 50px;
    }
}

@media (max-width: 480px) {
    .container { width: 94%; }

    .hero { padding: clamp(1.5rem, 4vw, 2rem) 1rem 1.5rem; }

    .product-grid {
        grid-template-columns: 1fr;
        gap: 0.875rem;
    }

    .product-scroll {
        display: flex;
        gap: 0.75rem;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        padding: 0 1.25rem 0.5rem 1.25rem;
        scroll-padding-left: 1.25rem;
    }

    .product-scroll::-webkit-scrollbar { display: none; }

    .product-scroll .product-card {
        flex: 0 0 calc((100% + 2.5rem - 2.4px) / 1.2);
        min-width: auto;
        scroll-snap-align: start;
    }

    .category-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }

    .section-categories { padding: 1.5rem 0 1.5rem; }

    .error-page { padding: 1rem 0 2rem; }
    .error-page h1 { font-size: 2rem; }
    .error-image { max-width: 180px; }

    .product-single { gap: 1rem; }

    .cart-item {
        grid-template-columns: 50px 1fr auto;
        gap: 0.5rem;
    }

    .cart-item-img img {
        width: 50px;
        height: 50px;
    }

    .cart-item .qty-btn {
        padding: 4px 8px;
    }

    .product-card .btn-add-cart {
        width: 100%;
        text-align: center;
        justify-content: center;
        padding: 8px 18px;
    }

    .gallery-thumbs {
        gap: 6px;
    }

    .gallery-thumbs .thumb {
        width: 44px;
        height: 44px;
    }

    .variant-swatch {
        width: 30px;
        height: 30px;
    }

    .variant-pill {
        padding: 6px 10px;
        font-size: 0.82rem;
    }

    .qty-wrapper .qty-input {
        width: 40px;
    }

    .auth-card {
        padding: 1.5rem;
    }

    .checkout-layout {
        gap: 1rem;
    }

    .cart-summary .btn-block {
        font-size: 0.9rem;
        padding: 10px 20px;
    }

    .page-link {
        width: 34px;
        height: 34px;
        font-size: 0.85rem;
    }
}

/* ===== COLECCIONES DESKTOP FULL-WIDTH (>=1024px) ===== */
@media (min-width: 1024px) {
    .section-categories .container {
        max-width: none;
        width: 100%;
        padding-left: 2rem;
        padding-right: 2rem;
    }

    .section-categories .carousel-arrow {
        width: 48px;
        height: 48px;
        font-size: 1.5rem;
    }

    .section-categories .carousel-arrow-prev {
        left: -1.5rem;
    }

    .section-categories .carousel-arrow-next {
        right: -1.5rem;
    }
}

/* Touch devices: desactivar hover transforms, agrandar targets */
@media (hover: none) and (pointer: coarse) {
    .product-card:hover {
        transform: none;
        box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    }

    .product-card:hover .product-card-media img {
        transform: none;
    }

    .btn-primary:hover {
        transform: none;
    }

    .product-card .btn-add-cart {
        padding: 8px 18px;
    }

    .btn {
        padding: 14px 28px;
    }

    .page-link {
        width: 40px;
        height: 40px;
    }

    .category-card:hover {
        transform: none;
    }
}

/* Mobile menu */
.mobile-menu-open .main-nav {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: var(--gray-bg);
    padding: 5rem 2rem 2rem;
    z-index: 999;
    gap: 0.5rem;
}

.mobile-menu-open .main-nav a {
    font-size: 1.5rem;
    font-weight: 600;
    padding: 12px 0;
}

.mobile-menu-open .menu-toggle {
    position: fixed;
    top: 14px;
    right: 5%;
    z-index: 1000;
}

.menu-line {
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-menu-open .menu-line-top {
    transform: translateY(5px) rotate(45deg);
    transform-origin: 12px 7px;
}

.mobile-menu-open .menu-line-bottom {
    transform: translateY(-5px) rotate(-45deg);
    transform-origin: 12px 17px;
}

.mobile-menu-open .header-tools .btn-login,
.mobile-menu-open .header-tools .btn-account,
.mobile-menu-open .header-tools .btn-logout {
    display: flex;
    position: fixed;
    bottom: 2rem;
    left: 5%;
    width: 90%;
    text-align: center;
    justify-content: center;
}

.mobile-menu-open .header-tools .btn-logout { bottom: 6rem; }
.mobile-menu-open .header-tools .btn-account { bottom: 4rem; }

/* ===== SEARCH OVERLAY ===== */
.search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    z-index: 9999;
    visibility: hidden;
    opacity: 0;
    transition: visibility 0.25s, opacity 0.25s;
}

.search-overlay.active {
    visibility: visible;
    opacity: 1;
}

.search-overlay-panel {
    background: #f8f9fa;
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.search-backdrop {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100vw;
    height: 50vh;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    cursor: pointer;
    z-index: 9998;
    visibility: hidden;
    opacity: 0;
    transition: visibility 0.25s, opacity 0.25s;
    display: none;
}

.search-backdrop.active {
    visibility: visible;
    opacity: 1;
}

.search-input-wrap {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}

.search-input-icon {
    flex-shrink: 0;
}

.search-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    font-family: var(--font);
    font-size: 1.5rem;
    font-weight: 400;
    color: #000000;
    padding: 0;
    min-width: 0;
}

.search-input::placeholder {
    color: #86868b;
    font-size: 1.5rem;
    font-weight: 400;
}

.search-close {
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    cursor: pointer;
    color: #86868b;
    padding: 4px;
    flex-shrink: 0;
    transition: color 0.2s;
}

.search-close:hover { color: #000000; }

.search-body {
    flex: 1;
    overflow-y: auto;
    padding-top: 1.5rem;
}

.search-section { margin-bottom: 1.5rem; }

.search-section-title {
    font-size: 0.75rem;
    font-weight: 500;
    color: #86868b;
    letter-spacing: 0.04em;
    margin-bottom: 0.5rem;
}

.trending-list {
    display: flex;
    flex-direction: column;
}

.trending-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 10px 0;
    font-size: 0.95rem;
    color: #000000;
    text-decoration: none;
    transition: color 0.15s;
}

.trending-item:hover { color: var(--purple); }

.trending-arrow {
    font-size: 0.85rem;
    color: #aaa;
    transition: color 0.15s;
}

.trending-item:hover .trending-arrow { color: var(--purple); }

.suggested-products {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.suggested-item {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    padding: 8px 0;
    text-decoration: none;
    border-bottom: 1px solid #f5f5f5;
    transition: background 0.15s;
}

.suggested-item:hover { background: #fafafa; }

.suggested-thumb {
    width: 48px;
    height: 48px;
    aspect-ratio: 1/1;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;
    background: #f2f2f2;
}

.suggested-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.suggested-brand {
    font-size: 0.7rem;
    font-weight: 500;
    color: #86868b;
    text-transform: capitalize;
    letter-spacing: 0.03em;
}

.suggested-name {
    font-size: 0.9rem;
    font-weight: 500;
    color: #000000;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-empty {
    text-align: center;
    color: #86868b;
    font-size: 0.9rem;
    padding: 2rem 0;
}

@media (min-width: 769px) {
    .search-overlay {
        height: 50vh;
        background: rgba(255,255,255,0.8);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
    }

    .search-overlay-panel {
        padding: 4rem 6rem;
        border-radius: 0 0 24px 24px;
        box-shadow: 0 4px 40px rgba(0,0,0,0.1);
    }

    .search-backdrop {
        display: block;
    }

    .search-input,
    .search-input::placeholder {
        font-size: 1.75rem;
    }
}

@media (max-width: 768px) {
    .search-overlay-panel {
        padding: 2.4rem 1.875rem;
    }
}
