/* ===== RESET & BASE ===== */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-primary: #0a0a0f;
    --bg-secondary: #12121a;
    --bg-card: rgba(20, 20, 30, 0.7);
    --text-primary: #f0f0f5;
    --text-secondary: #a0a0b5;
    --accent: #7c3aed;
    --accent-glow: #a78bfa;
    --border: rgba(255, 255, 255, 0.08);
    --success: #10b981;
    --danger: #ef4444;
    --radius: 16px;
    --radius-sm: 10px;
    --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

/* ===== BUTTONS ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 28px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    outline: none;
    text-align: center;
}

.btn--primary {
    background: linear-gradient(135deg, #8b5cf6, #6d28d9);
    color: white;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.4);
}
.btn--primary:hover {
    box-shadow: 0 6px 25px rgba(139, 92, 246, 0.6);
    transform: translateY(-2px);
}

.btn--outline {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: var(--text-primary);
}
.btn--outline:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.5);
}

.btn--full {
    width: 100%;
    margin-top: 8px;
}

.btn--clear {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    color: var(--text-secondary);
}
.btn--clear:hover {
    color: var(--danger);
    border-color: var(--danger);
}

.btn--large {
    padding: 16px 32px;
    font-size: 1.1rem;
}

.btn-icon {
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.3rem;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background var(--transition), color var(--transition);
    position: relative;
}
.btn-icon:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--accent-glow);
}

/* ===== HEADER ===== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 16px 0;
    transition: background 0.3s, padding 0.3s, box-shadow 0.3s;
    backdrop-filter: blur(0px);
}
.header--scrolled {
    background: rgba(10, 10, 15, 0.85);
    backdrop-filter: blur(20px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
    padding: 10px 0;
}
.header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 800;
    font-size: 1.5rem;
    color: white;
}
.logo__icon {
    color: var(--accent-glow);
    font-size: 1.8rem;
}
.logo__text span {
    color: var(--accent-glow);
}

.nav__list {
    display: flex;
    gap: 28px;
}
.nav__link {
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--text-secondary);
    transition: color var(--transition);
    position: relative;
    padding-bottom: 4px;
}
.nav__link:hover,
.nav__link.active {
    color: white;
}
.nav__link.active::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--accent-glow);
    border-radius: 1px;
}

.header__actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.cart-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    background: var(--accent);
    color: white;
    font-size: 0.7rem;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

.menu-toggle {
    display: none;
}

/* Search Bar */
.search-bar {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: rgba(20, 20, 30, 0.95);
    backdrop-filter: blur(20px);
    padding: 0;
    height: 0;
    overflow: hidden;
    transition: height 0.3s ease, padding 0.3s;
    border-bottom: 1px solid var(--border);
}
.search-bar.active {
    height: 70px;
    padding: 10px 0;
}
.search-bar__inner {
    display: flex;
    align-items: center;
    gap: 12px;
}
.search-bar__icon {
    color: var(--text-secondary);
    font-size: 1.2rem;
}
.search-bar__input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    font-size: 1.1rem;
    color: white;
    font-family: inherit;
}
.search-bar__input::placeholder {
    color: var(--text-secondary);
}
.search-bar__close {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.2rem;
    cursor: pointer;
}

/* ===== HERO ===== */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    overflow: hidden;
    padding: 120px 0 80px;
}
.hero__bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}
.hero__glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.3;
}
.hero__glow--1 {
    width: 600px;
    height: 600px;
    background: #7c3aed;
    top: -200px;
    right: -100px;
}
.hero__glow--2 {
    width: 400px;
    height: 400px;
    background: #3b82f6;
    bottom: -100px;
    left: -50px;
}
.hero__content {
    position: relative;
    z-index: 2;
    text-align: left;
    max-width: 700px;
}
.hero__badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    padding: 8px 18px;
    border-radius: 50px;
    font-size: 0.9rem;
    color: var(--accent-glow);
    margin-bottom: 24px;
}
.hero__title {
    font-size: 3.8rem;
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 20px;
}
.hero__title span {
    background: linear-gradient(to right, #a78bfa, #60a5fa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.hero__subtitle {
    font-size: 1.15rem;
    color: var(--text-secondary);
    max-width: 500px;
    margin-bottom: 32px;
}
.hero__actions {
    display: flex;
    gap: 16px;
    margin-bottom: 48px;
    flex-wrap: wrap;
}
.hero__stats {
    display: flex;
    gap: 40px;
}
.stat__number {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: white;
}
.stat__label {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* ===== SECTIONS ===== */
.section {
    padding: 80px 0;
}
.section__title {
    font-size: 2.4rem;
    font-weight: 700;
    margin-bottom: 8px;
}
.section__subtitle {
    color: var(--text-secondary);
    margin-bottom: 40px;
    font-size: 1.05rem;
}

/* Categories */
.categories__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 20px;
}
.category-card {
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px 16px;
    text-align: center;
    transition: transform var(--transition), border-color var(--transition);
    cursor: pointer;
}
.category-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent);
}
.category-card i {
    font-size: 2rem;
    color: var(--accent-glow);
    margin-bottom: 12px;
}
.category-card h4 {
    font-size: 1rem;
    font-weight: 600;
}

/* Products Grid */
.products__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 32px;
}
.products__filters {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
.filter-btn {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-secondary);
    padding: 8px 18px;
    border-radius: 50px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all var(--transition);
}
.filter-btn:hover,
.filter-btn.active {
    background: var(--accent);
    border-color: var(--accent);
    color: white;
}

.products__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 28px;
}
.product-card {
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: transform 0.3s, border-color 0.3s, box-shadow 0.3s;
}
.product-card:hover {
    transform: translateY(-6px);
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}
.product-card__img {
    height: 220px;
    background: rgba(255, 255, 255, 0.03);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}
/* Imagen representativa con emoji grande, sin enlaces rotos */
.product-emoji {
    font-size: 5rem;
    line-height: 1;
    filter: drop-shadow(0 0 12px rgba(139, 92, 246, 0.3));
    transition: transform 0.4s;
}
.product-card:hover .product-emoji {
    transform: scale(1.1);
}
.product-card__badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: var(--accent);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}
.product-card__body {
    padding: 20px;
}
.product-card__category {
    font-size: 0.8rem;
    color: var(--accent-glow);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}
.product-card__title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 8px;
}
.product-card__price {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 16px;
}
.price-current {
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
}
.price-old {
    text-decoration: line-through;
    color: var(--text-secondary);
    font-size: 0.95rem;
}
.product-card__actions {
    display: flex;
    gap: 10px;
}
.btn--add {
    flex: 1;
    padding: 10px 16px;
    font-size: 0.9rem;
}

.products__empty {
    text-align: center;
    padding: 60px 0;
    color: var(--text-secondary);
}
.products__empty i {
    font-size: 3rem;
    margin-bottom: 16px;
    opacity: 0.5;
}

/* Features */
.features__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 24px;
}
.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px 24px;
    text-align: center;
    transition: transform var(--transition);
}
.feature-card:hover {
    transform: translateY(-5px);
}
.feature-card__icon {
    font-size: 2.2rem;
    color: var(--accent-glow);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.feature-card__icon svg {
    width: 44px;
    height: 44px;
}
.feature-card h3 {
    margin-bottom: 8px;
    font-size: 1.2rem;
}
.feature-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* Footer */
.footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    padding: 60px 0 30px;
}
.footer__grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 2fr;
    gap: 40px;
    margin-bottom: 40px;
}
.footer__brand p {
    margin: 16px 0;
    color: var(--text-secondary);
}
.footer__social {
    display: flex;
    gap: 12px;
    font-size: 1.3rem;
}
.footer__links h4,
.footer__newsletter h4 {
    margin-bottom: 16px;
}
.footer__links ul li {
    margin-bottom: 8px;
}
.footer__links ul li a {
    color: var(--text-secondary);
    transition: color var(--transition);
}
.footer__links ul li a:hover {
    color: white;
}
.footer__form {
    display: flex;
    margin-top: 12px;
}
.footer__form input {
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    padding: 10px 16px;
    border-radius: 50px 0 0 50px;
    color: white;
    outline: none;
}
.footer__form button {
    background: var(--accent);
    border: none;
    padding: 0 18px;
    border-radius: 0 50px 50px 0;
    color: white;
    cursor: pointer;
}
.footer__bottom {
    display: flex;
    justify-content: space-between;
    color: var(--text-secondary);
    font-size: 0.85rem;
    border-top: 1px solid var(--border);
    padding-top: 20px;
}

/* ===== CART SIDEBAR ===== */
.cart-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s;
}
.cart-overlay.active {
    opacity: 1;
    visibility: visible;
}
.cart-sidebar {
    position: fixed;
    top: 0;
    right: -420px;
    width: 100%;
    max-width: 420px;
    height: 100vh;
    background: var(--bg-secondary);
    backdrop-filter: blur(20px);
    z-index: 2100;
    display: flex;
    flex-direction: column;
    transition: right 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    border-left: 1px solid var(--border);
}
.cart-sidebar.active {
    right: 0;
}
.cart-sidebar__header {
    padding: 20px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border);
}
.cart-sidebar__body {
    flex: 1;
    overflow-y: auto;
    padding: 20px 24px;
}
.cart-empty {
    text-align: center;
    padding: 60px 0;
    color: var(--text-secondary);
}
.cart-empty i {
    font-size: 3rem;
    margin-bottom: 12px;
}
.cart-item {
    display: flex;
    gap: 16px;
    align-items: center;
    padding: 16px 0;
    border-bottom: 1px solid var(--border);
}
.cart-item__img {
    width: 70px;
    height: 70px;
    background: rgba(255,255,255,0.03);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.2rem;
}
.cart-item__info {
    flex: 1;
}
.cart-item__title {
    font-weight: 600;
    margin-bottom: 4px;
}
.cart-item__price {
    color: var(--accent-glow);
    font-weight: 700;
}
.cart-item__actions {
    display: flex;
    align-items: center;
    gap: 8px;
}
.cart-item__qty {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,0.05);
    border-radius: 30px;
    padding: 4px 8px;
}
.qty-btn {
    background: none;
    border: none;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.qty-btn:hover {
    background: rgba(255,255,255,0.1);
}
.cart-item__remove {
    color: var(--text-secondary);
    cursor: pointer;
    margin-left: 8px;
}
.cart-sidebar__footer {
    padding: 20px 24px;
    border-top: 1px solid var(--border);
}
.cart-totals__row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}
.cart-totals__row--total {
    font-size: 1.2rem;
    font-weight: 700;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid var(--border);
}
.cart-totals__installments {
    font-size: 0.8rem;
    color: var(--accent-glow);
    margin: 8px 0;
}

/* ===== MODAL ===== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.7);
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: 0.3s;
}
.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}
.modal {
    background: var(--bg-secondary);
    border-radius: var(--radius);
    width: 90%;
    max-width: 700px;
    max-height: 90vh;
    overflow-y: auto;
    z-index: 3100;
    border: 1px solid var(--border);
}
.modal__header {
    padding: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border);
}
.modal__body {
    padding: 24px;
}
.modal__footer {
    padding: 24px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}
.checkout-summary__item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 6px;
    font-size: 0.95rem;
}
.payment-methods__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
    margin: 16px 0;
}
.payment-option input { display: none; }
.payment-option__content {
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 16px;
    text-align: center;
    cursor: pointer;
    transition: 0.2s;
}
.payment-option input:checked + .payment-option__content {
    border-color: var(--accent);
    background: rgba(139, 92, 246, 0.1);
}
.card-form {
    margin-top: 20px;
}
.form-group {
    margin-bottom: 16px;
}
.form-group label {
    display: block;
    margin-bottom: 6px;
    font-size: 0.9rem;
    color: var(--text-secondary);
}
.form-input {
    width: 100%;
    padding: 10px 14px;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: white;
    font-family: inherit;
    outline: none;
}
.form-row {
    display: flex;
    gap: 16px;
}
.form-row .form-group { flex: 1; }

/* Toast */
.toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: var(--bg-card);
    border: 1px solid var(--accent);
    padding: 14px 24px;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 4000;
    transform: translateX(120%);
    transition: transform 0.3s;
    backdrop-filter: blur(10px);
}
.toast.active {
    transform: translateX(0);
}
.toast__icon { color: var(--success); }

/* Responsive */
@media (max-width: 900px) {
    .nav { display: none; }
    .menu-toggle { display: flex; }
    .hero__title { font-size: 2.5rem; }
    .footer__grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
    .hero__stats { flex-direction: column; gap: 20px; }
    .footer__grid { grid-template-columns: 1fr; }
}