/* --- 1. VARIABLES & RESET --- */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Dancing+Script:wght@500;700&display=swap');

:root {
    --bg-body: #faf8fc; 
    --bg-card: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.5);
    
    --purple-soft: #f3e8ff;
    --purple-medium: #d8b4fe;
    --purple-accent: #9333ea; 
    --purple-dark: #7e22ce;
    --green-success: #10b981;
    --alert-red: #ef4444;
    
    --text-main: #3b0764;
    --text-muted: #6b7280;
    
    --shadow-soft: 0 8px 32px 0 rgba(147, 51, 234, 0.05);
    --shadow-hover: 0 15px 40px -5px rgba(147, 51, 234, 0.2);
    --shadow-glass: 0 8px 32px 0 rgba(31, 38, 135, 0.07);
    
    --radius-btn: 9999px;
    --radius-card: 24px;
    
    --font-main: 'Outfit', sans-serif;
    --font-cursive: 'Dancing Script', cursive;
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

body {
    font-family: var(--font-main);
    color: var(--text-main);
    padding-bottom: 140px; 
    overflow-x: hidden;
    min-height: 100vh;
}

/* Accesibilidad: Focus States */
button:focus-visible, input:focus-visible, select:focus-visible, .brand-container:focus-visible, .card-slider:focus-visible, .btn-qty:focus-visible {
    outline: 3px solid var(--purple-medium) !important;
    outline-offset: 3px !important;
}

/* body::before removed for WebGL Shader */

/* --- UTILIDADES --- */
.hidden { display: none !important; }
.glass-panel {
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow-glass);
}

/* --- ANIMACIONES GLOBALES FLUIDAS --- */
.animate-item {
    opacity: 0; transform: translateY(20px);
    animation: fadeSlideUp 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

@keyframes fadeSlideUp {
    0% { opacity: 0; transform: translateY(30px) scale(0.98); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes pulse-soft {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* --- NOTIFICACIONES TOAST --- */
#toast-container {
    position: fixed; top: 20px; right: 20px;
    z-index: 3000; display: flex; flex-direction: column; gap: 10px; pointer-events: none;
    align-items: flex-end;
}
.toast {
    background: var(--glass-border);
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,0.4);
    color: var(--text-main); padding: 14px 24px;
    border-radius: var(--radius-btn); font-weight: 600; font-size: 0.95rem;
    box-shadow: var(--shadow-hover); display: flex; align-items: center; gap: 8px;
    animation: toastIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), toastOut 0.4s ease 3s forwards;
}
.toast.error { border-left: 4px solid var(--alert-red); }
.toast.success { border-left: 4px solid var(--green-success); }

@keyframes toastIn { from { opacity: 0; transform: translateX(100%) scale(0.9); } to { opacity: 1; transform: translateX(0) scale(1); } }
@keyframes toastOut { from { opacity: 1; transform: translateX(0); } to { opacity: 0; transform: translateX(100%); } }

/* --- 2. HEADER --- */
header { text-align: center; padding: 40px 20px 20px; position: relative; z-index: 10; }

.brand-container { display: inline-flex; flex-direction: column; align-items: center; cursor: pointer; transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1); }
.brand-container:hover { transform: translateY(-3px) scale(1.02); }
.brand-container:active { transform: scale(0.95); transition: transform 0.1s; }

.logo-img {
    height: 120px; width: auto; object-fit: contain; margin-bottom: 10px;
    animation: pulse-soft 6s ease-in-out infinite; 
    filter: drop-shadow(0 15px 25px rgba(147, 51, 234, 0.2));
}

.site-title {
    font-size: 2.2rem; font-weight: 800;
    color: var(--text-main); letter-spacing: -0.5px;
    background: linear-gradient(135deg, var(--text-main), var(--purple-accent));
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}

.site-subtitle { font-family: var(--font-cursive); font-size: 1.6rem; color: var(--purple-accent); margin-top: 5px; }
.site-subtitle span { display: block; font-size: 2.2rem; font-weight: 700; color: var(--purple-dark); margin-top: 5px; }

/* --- 3. BUSCADOR Y FILTROS --- */
.search-container { padding: 10px 20px 20px; position: relative; z-index: 10; }
.search-wrapper { max-width: 550px; margin: 0 auto; position: relative; display: flex; align-items: center; gap: 10px;}

.search-input-wrapper { position: relative; flex-grow: 1; }
.search-input {
    width: 100%; padding: 16px 45px 16px 50px;
    border: 2px solid transparent; border-radius: var(--radius-btn);
    font-size: 1rem; font-family: var(--font-main); outline: none;
    color: var(--text-main); transition: all 0.3s;
    font-weight: 500;
}
.search-input::placeholder { color: #a1a1aa; font-weight: 400;}
.search-input:focus { border-color: var(--purple-medium); box-shadow: 0 0 0 4px rgba(216, 180, 254, 0.3); }

.search-icon { position: absolute; left: 20px; top: 50%; transform: translateY(-50%); color: var(--purple-accent); pointer-events: none; }
.clear-search {
    position: absolute; right: 15px; top: 50%; transform: translateY(-50%); background: none; border: none;
    color: var(--text-muted); font-size: 1.2rem; cursor: pointer; display: none;
    width: 30px; height: 30px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
    transition: background 0.2s;
}
.clear-search:hover { background: rgba(0,0,0,0.05); color: var(--text-main); }

/* --- 4. NAVEGACIÓN --- */
.container { max-width: 1100px; margin: 0 auto; padding: 0 20px; position: relative; z-index: 10;}

.controls-bar {
    display: flex; align-items: center; justify-content: space-between;
    margin: 10px 0 20px; flex-wrap: wrap; gap: 15px;
}

.btn-back {
    background: var(--bg-card); backdrop-filter: blur(10px); border: 1px solid var(--glass-border);
    color: var(--text-main); padding: 10px 22px; border-radius: var(--radius-btn);
    cursor: pointer; font-weight: 600; font-size: 0.95rem;
    display: inline-flex; align-items: center; gap: 8px; transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: var(--shadow-soft);
}
.btn-back:hover { background: var(--purple-soft); color: var(--purple-accent); transform: translateX(-4px); }
.btn-back:active { transform: translateX(-4px) scale(0.95); }

.sort-select {
    padding: 10px 16px; border-radius: var(--radius-btn); border: 1px solid var(--glass-border);
    background: var(--bg-card); color: var(--text-main); font-family: var(--font-main);
    font-weight: 500; font-size: 0.9rem; cursor: pointer; outline: none; box-shadow: var(--shadow-soft);
    backdrop-filter: blur(10px); transition: all 0.3s;
}
.sort-select:focus { border-color: var(--purple-medium); box-shadow: 0 0 0 3px rgba(216, 180, 254, 0.3); }

/* TÍTULO DE SECCIÓN */
.section-title {
    text-align: center; font-size: 1.8rem; color: var(--text-main); font-weight: 800;
    margin-top: 20px; margin-bottom: 30px; position: relative; padding-bottom: 12px;
    letter-spacing: -0.5px;
}
.section-title::after {
    content: ''; position: absolute; bottom: 0; left: 50%; transform: translateX(-50%);
    width: 40px; height: 4px; background: var(--purple-accent); border-radius: 2px;
}

/* --- 5. TARJETAS ANIMADAS (Categorías / Marcas) --- */
.grid { display: grid; gap: 24px; margin-bottom: 50px; }

.grid-cats { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); justify-content: center; }
.grid-nav { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); justify-content: center; }

.card-slider {
    position: relative; border-radius: var(--radius-card); overflow: hidden;
    cursor: pointer; box-shadow: var(--shadow-soft);
    transition: all 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
    background: var(--purple-dark); border: 1px solid var(--glass-border);
}
.card-slider.main { height: 200px; }
.card-slider.sub { height: 140px; }

.card-slider:hover { transform: translateY(-8px); box-shadow: var(--shadow-hover); z-index: 5;}
.card-slider:active { transform: scale(0.96); box-shadow: var(--shadow-soft); transition: transform 0.1s;}

.bg-slider { position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 0; }
.bg-img {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    object-fit: cover; opacity: 0; transition: opacity 1.2s ease-in-out, transform 5s linear;
}
.bg-img.active { opacity: 0.6; transform: scale(1.1); }

.card-overlay {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(to top, rgba(59, 7, 100, 0.9) 0%, rgba(147, 51, 234, 0.3) 100%);
    z-index: 1;
}

.card-content {
    position: relative; z-index: 2; height: 100%;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    color: white; text-shadow: 0 2px 10px rgba(0,0,0,0.5); padding: 20px; text-align: center;
}
.card-slider.main .card-name { font-size: 1.8rem; font-weight: 800; letter-spacing: -0.5px; }
.card-slider.sub .card-name { font-size: 1.2rem; font-weight: 700; }
.card-icon { font-size: 2.5rem; margin-bottom: 8px; filter: drop-shadow(0 4px 8px rgba(0,0,0,0.3)); }

/* --- 6. TARJETAS DE PRODUCTO --- */
.grid-products { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }

.product-card {
    border-radius: var(--radius-card); padding: 12px;
    display: flex; flex-direction: column; position: relative;
    transition: all 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
    /* Glassmorphism Translúcido */
    background: rgba(255, 255, 255, 0.1) !important;
    backdrop-filter: blur(15px) !important;
    -webkit-backdrop-filter: blur(15px) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3) !important;
}
.product-card:hover { transform: translateY(-8px); box-shadow: 0 15px 40px -5px rgba(0, 0, 0, 0.4) !important; border-color: rgba(255, 255, 255, 0.4) !important;}
.product-card.in-cart { border: 1px solid var(--purple-medium) !important; background: rgba(255, 255, 255, 0.2) !important; }

.img-wrapper { position: relative; padding-top: 100%; border-radius: 16px; overflow: hidden; cursor: zoom-in; background: #fff;}
.product-img { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s cubic-bezier(0.25, 0.8, 0.25, 1); }
.img-wrapper:hover .product-img { transform: scale(1.08); }

.card-body { padding: 16px 8px 8px; display: flex; flex-direction: column; flex-grow: 1; justify-content: space-between; }
.prod-title { font-size: 1.1rem; font-weight: 700; color: #ffffff !important; text-shadow: 0 2px 4px rgba(0,0,0,0.5); margin-bottom: 4px; line-height: 1.3; }
.prod-detail { font-size: 0.85rem; color: rgba(255,255,255,0.7) !important; margin-bottom: 12px; font-weight: 500;}
.prod-price { font-size: 1.4rem; font-weight: 800; color: #e9d5ff !important; text-shadow: 0 2px 4px rgba(0,0,0,0.5); margin-bottom: 16px; }

.tag-last {
    position: absolute; top: 10px; right: 10px;
    font-size: 0.7rem; font-weight: 800; padding: 6px 12px;
    border-radius: var(--radius-btn); z-index: 2; background: var(--alert-red); color: white;
    box-shadow: 0 4px 10px rgba(239, 68, 68, 0.3); animation: pulse-soft 2s infinite;
}

.cart-controls {
    display: flex; align-items: center; justify-content: space-between;
    background: rgba(255, 255, 255, 0.1) !important; padding: 6px; border-radius: var(--radius-btn);
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
}
.btn-qty {
    width: 44px; height: 44px; border-radius: 50%; border: none;
    background: rgba(255, 255, 255, 0.2) !important; color: #ffffff !important;
    font-size: 1.6rem; font-weight: 500; cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1); display: flex; align-items: center; justify-content: center;
    transition: all 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.btn-qty:hover:not(:disabled) { background: rgba(255, 255, 255, 0.4) !important; color: white; transform: scale(1.05); }
.btn-qty:active:not(:disabled) { transform: scale(0.9); }
.btn-qty:disabled { background: transparent !important; color: rgba(255,255,255,0.3) !important; cursor: not-allowed; box-shadow: none; }
.qty-num { font-weight: 700; width: 30px; text-align: center; color: #ffffff !important; font-size: 1.1rem;}

.flying-img {
    position: fixed; z-index: 9999; border-radius: 50%; object-fit: cover;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 15px 30px rgba(0,0,0,0.2); pointer-events: none;
}

/* --- EMPTY STATES --- */
.empty-state { text-align: center; padding: 40px 20px; grid-column: 1/-1; }
.empty-icon { font-size: 4rem; margin-bottom: 20px; opacity: 0.8; }
.empty-text { font-size: 1.2rem; color: var(--text-muted); font-weight: 500;}

/* --- 7. CÓMO COMPRAR & PUBLICIDAD --- */
.how-to-buy { padding: 30px; margin: 40px 0 20px; }
.how-to-buy h3 { color: var(--purple-accent); margin-bottom: 20px; text-align: center; font-size: 1.5rem; font-weight: 800; }
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 20px; }
.step { display: flex; align-items: center; gap: 15px; font-size: 0.95rem; font-weight: 600; color: var(--text-main); background: rgba(255,255,255,0.5); padding: 15px; border-radius: 16px; }
.step-num { 
    background: var(--purple-accent); color: white; min-width: 40px; height: 40px; 
    display: flex; align-items: center; justify-content: center; border-radius: 50%; font-weight: 800; font-size: 1.2rem;
    box-shadow: 0 4px 10px rgba(147, 51, 234, 0.3);
}

.promo-banner {
    display: block; background: linear-gradient(135deg, #1e1b4b, #581c87);
    color: white; text-align: center; padding: 25px; border-radius: var(--radius-card);
    text-decoration: none; font-weight: 500; margin-bottom: 40px; box-shadow: 0 10px 30px rgba(30, 27, 75, 0.3);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.promo-banner:hover { transform: translateY(-5px); box-shadow: 0 15px 40px rgba(30, 27, 75, 0.4); }
.promo-banner:active { transform: scale(0.97); }
.promo-banner span { color: #fbbf24; font-weight: 700;}

/* --- 8. CARRITO FLOTANTE --- */
.cart-bar {
    position: fixed; bottom: 20px; left: 50%; transform: translate(-50%, 150%);
    width: calc(100% - 40px); max-width: 600px;
    padding: 16px 24px; border-radius: var(--radius-btn);
    display: flex; justify-content: space-between; align-items: center;
    z-index: 1000; cursor: pointer;
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.cart-bar.visible { transform: translate(-50%, 0); }
.cart-bar:hover { transform: translate(-50%, -5px); box-shadow: var(--shadow-hover); }

.cart-info { display: flex; flex-direction: column; }
.cart-total { font-size: 1.5rem; font-weight: 800; color: var(--purple-accent); line-height: 1.2; }
.cart-count { font-size: 0.9rem; color: var(--text-main); font-weight: 600; display: flex; align-items: center; gap: 6px;}

.btn-open-cart {
    background: var(--purple-accent); color: white; border: none;
    padding: 14px 28px; border-radius: var(--radius-btn);
    font-weight: 700; font-size: 1.05rem; cursor: pointer;
    box-shadow: 0 8px 20px rgba(147, 51, 234, 0.3);
    transition: all 0.2s; display: flex; align-items: center; gap: 8px;
}
.btn-open-cart:hover { background: var(--purple-dark); transform: scale(1.05); }
.btn-open-cart:active { transform: scale(0.95); }

/* --- 9. MODALES --- */
.modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(15, 23, 42, 0.6); backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px);
    z-index: 2000; display: flex; justify-content: center; align-items: flex-end;
    visibility: hidden; opacity: 0; transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.modal-overlay.active { visibility: visible; opacity: 1; pointer-events: auto; }

.modal-content {
    background: var(--bg-body); width: 100%; max-width: 650px; height: 90vh; max-height: 800px;
    border-radius: 32px 32px 0 0; padding: 30px;
    display: flex; flex-direction: column;
    transform: translate3d(0, 100%, 0);
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 -20px 40px rgba(0,0,0,0.1);
}
.modal-overlay.active .modal-content { transform: translate3d(0, 0, 0); }

/* Swipe Handle para móviles */
.modal-handle {
    width: 50px; height: 5px; background: #cbd5e1; border-radius: 5px;
    margin: -10px auto 20px;
}

.modal-header {
    display: flex; justify-content: space-between; align-items: center;
    border-bottom: 2px solid var(--purple-soft); padding-bottom: 20px; margin-bottom: 20px; flex-shrink: 0;
}
.modal-title { font-size: 1.8rem; font-weight: 800; color: var(--text-main); letter-spacing: -0.5px;}
.btn-close { 
    background: var(--purple-soft); border: none; width: 40px; height: 40px; border-radius: 50%;
    font-size: 1.5rem; color: var(--purple-accent); cursor: pointer; 
    display: flex; align-items: center; justify-content: center; transition: all 0.2s;
}
.btn-close:hover { background: var(--purple-medium); color: white; transform: rotate(90deg); }
.btn-close:active { transform: scale(0.8); }

.modal-body-scroll { flex-grow: 1; overflow-y: auto; padding-right: 10px; }
.modal-body-scroll::-webkit-scrollbar { width: 6px; }
.modal-body-scroll::-webkit-scrollbar-track { background: transparent; }
.modal-body-scroll::-webkit-scrollbar-thumb { background: var(--purple-medium); border-radius: 10px; }

/* Lista de Carrito */
.cart-item {
    display: flex; align-items: center; margin-bottom: 16px;
    background: white; border: 1px solid var(--glass-border); padding: 16px; border-radius: 20px;
    box-shadow: var(--shadow-soft);
}
.cart-item-img { width: 70px; height: 70px; border-radius: 12px; object-fit: cover; margin-right: 16px; background: #f8fafc;}
.cart-item-info { flex-grow: 1; }
.cart-item-name { font-weight: 700; color: var(--text-main); font-size: 1.05rem; line-height: 1.3; margin-bottom: 4px;}
.cart-item-desc { font-size: 0.85rem; color: var(--text-muted); font-weight: 500; }
.cart-item-price { color: var(--purple-accent); font-weight: 800; font-size: 1.1rem; margin-top: 6px; }

.btn-trash {
    background: none; border: none; font-size: 1.3rem; cursor: pointer;
    padding: 5px; margin-left: 8px; opacity: 0.6; transition: all 0.2s;
}
.btn-trash:hover { opacity: 1; transform: scale(1.15) rotate(5deg); }
.btn-trash:active { transform: scale(0.9); }

.btn-clear-cart {
    background: var(--bg-card); color: var(--alert-red); border: 1px solid rgba(239, 68, 68, 0.3);
    padding: 8px 12px; border-radius: 12px; font-weight: 700; font-size: 0.9rem;
    cursor: pointer; transition: all 0.2s; display: flex; align-items: center; gap: 5px;
}
.btn-clear-cart:hover { background: #fee2e2; transform: translateY(-2px); border-color: var(--alert-red);}
.btn-clear-cart:active { transform: scale(0.95); }

/* Checkout Form */
.checkout-form { padding-top: 10px; }
.form-subtitle { color: var(--text-main); font-size: 1.2rem; margin-bottom: 16px; font-weight: 800; }
        
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 30px; }
.hidden-radio { display: none; }
.radio-label {
    background: white; border: 2px solid transparent; border-radius: 20px; padding: 16px 10px; text-align: center;
    cursor: pointer; font-weight: 700; font-size: 0.95rem; color: var(--text-muted); transition: all 0.3s; display: block;
    box-shadow: var(--shadow-soft);
}
.radio-label:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); }
.hidden-radio:checked + .radio-label { 
    background: var(--purple-soft); border-color: var(--purple-accent); color: var(--purple-accent);
    box-shadow: 0 0 0 4px rgba(147, 51, 234, 0.1);
}
        
.form-input {
    width: 100%; padding: 16px 20px; border: 2px solid transparent; border-radius: 16px;
    font-family: var(--font-main); font-size: 1rem; outline: none; margin-bottom: 24px; transition: all 0.3s; 
    color: var(--text-main); background: white; box-shadow: var(--shadow-soft); font-weight: 500;
}
.form-input::placeholder { color: #a1a1aa; }
.form-input:focus { border-color: var(--purple-accent); box-shadow: 0 0 0 4px rgba(147, 51, 234, 0.1); }

.input-error { border-color: var(--alert-red) !important; animation: shake 0.4s cubic-bezier(.36,.07,.19,.97) both; }
@keyframes shake {
  10%, 90% { transform: translate3d(-1px, 0, 0); }
  20%, 80% { transform: translate3d(2px, 0, 0); }
  30%, 50%, 70% { transform: translate3d(-4px, 0, 0); }
  40%, 60% { transform: translate3d(4px, 0, 0); }
}

.modal-footer { border-top: 2px solid var(--purple-soft); padding-top: 24px; margin-top: 20px; flex-shrink: 0; background: var(--bg-body); }
.total-row { display: flex; justify-content: space-between; font-size: 1.6rem; font-weight: 800; margin-bottom: 20px; color: var(--text-main); }
.total-row span:last-child { color: var(--purple-accent); }

.btn-primary {
    width: 100%; background: var(--purple-accent); color: white; border: none; padding: 18px; border-radius: var(--radius-btn);
    font-weight: 700; font-size: 1.1rem; cursor: pointer; box-shadow: 0 10px 25px rgba(147, 51, 234, 0.3);
    display: flex; align-items: center; justify-content: center; gap: 10px; transition: all 0.2s;
}
.btn-primary:hover { background: var(--purple-dark); transform: translateY(-2px); box-shadow: 0 15px 35px rgba(147, 51, 234, 0.4);}
.btn-primary:active { transform: scale(0.98); }
.btn-primary.green { background: var(--green-success); box-shadow: 0 10px 25px rgba(16, 185, 129, 0.3); }
.btn-primary.green:hover { background: #059669; box-shadow: 0 15px 35px rgba(16, 185, 129, 0.4); }

.btn-secondary {
    width: 100%; background: white; color: var(--text-main); border: 2px solid var(--glass-border); padding: 16px; border-radius: var(--radius-btn);
    font-weight: 700; font-size: 1.05rem; cursor: pointer; margin-bottom: 12px; transition: all 0.2s; box-shadow: var(--shadow-soft);
}
.btn-secondary:hover { background: var(--purple-soft); color: var(--purple-accent); border-color: var(--purple-medium); }
.btn-secondary:active { transform: scale(0.98); }

/* Modal Imagen (Lightbox) */
#img-modal { align-items: center; justify-content: center; }
#img-modal.active .modal-img-container { transform: scale(1); opacity: 1; }
.modal-img-container {
    position: relative; transform: scale(0.9); opacity: 0; transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    max-width: 90%; max-height: 90vh;
}
#modal-img-full { 
    max-width: 100%; max-height: 90vh; border-radius: 24px; 
    box-shadow: 0 25px 50px rgba(0,0,0,0.5); object-fit: contain; 
}
.btn-close-img {
    position: absolute; top: -20px; right: -20px;
    background: white; border: none; width: 44px; height: 44px; border-radius: 50%;
    font-size: 1.5rem; color: var(--text-main); cursor: pointer;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2); display: flex; align-items: center; justify-content: center;
    transition: all 0.2s; z-index: 2010;
}
.btn-close-img:hover { transform: scale(1.1); color: var(--alert-red); }

/* Modal Confirmación */
#confirm-modal { align-items: center; justify-content: center; }
#confirm-modal.active .confirm-content { transform: scale(1); opacity: 1; }
.confirm-content {
    background: var(--bg-body); width: 90%; max-width: 350px;
    border-radius: 32px; padding: 40px 30px; text-align: center;
    transform: scale(0.9); opacity: 0; transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 25px 50px rgba(0,0,0,0.3);
}
.confirm-icon { font-size: 4rem; margin-bottom: 20px; filter: drop-shadow(0 10px 15px rgba(0,0,0,0.1)); }
.confirm-title { font-size: 1.6rem; font-weight: 800; color: var(--text-main); margin-bottom: 12px; letter-spacing: -0.5px;}
.confirm-text { font-size: 1rem; color: var(--text-muted); font-weight: 500; margin-bottom: 30px; line-height: 1.4;}
.confirm-buttons { display: flex; gap: 12px; }
.confirm-buttons .btn-secondary, .confirm-buttons .btn-primary { margin: 0; padding: 14px; font-size: 1.05rem; flex: 1;}

/* Loader */
.loader-container { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 60px 20px; grid-column: 1/-1;}
.loader { width: 48px; height: 48px; border: 5px solid var(--purple-soft); border-bottom-color: var(--purple-accent); border-radius: 50%; animation: rotation 1s linear infinite; }
.loader-text { margin-top: 16px; font-weight: 600; color: var(--purple-accent); }
@keyframes rotation { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

/* --- SKELETON LOADING --- */
.skeleton-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 24px; padding: 20px; width: 100%; }
.skeleton-card {
    background: rgba(255, 255, 255, 0.05); border-radius: var(--radius-card); padding: 12px;
    height: 350px; display: flex; flex-direction: column; gap: 10px;
    border: 1px solid rgba(255,255,255,0.1);
}
.skeleton-img { width: 100%; height: 200px; border-radius: 16px; background: rgba(255,255,255,0.1); }
.skeleton-text { height: 16px; border-radius: 8px; background: rgba(255,255,255,0.1); }
.skeleton-text.short { width: 60%; }
.skeleton-text.price { width: 40%; height: 24px; margin-top: auto; }

.skeleton-shimmer {
    position: relative; overflow: hidden;
}
.skeleton-shimmer::after {
    content: ''; position: absolute; top: 0; left: -100%; width: 50%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    animation: shimmer 1.5s infinite;
}
@keyframes shimmer { 100% { left: 100%; } }

/* Media Queries para Responsive Design */
@media (max-width: 768px) {
    .site-title { font-size: 1.8rem; }
    .site-subtitle { font-size: 1.5rem; }
    header { padding: 20px 15px 10px; }
    .cart-bar { width: calc(100% - 30px); padding: 14px 20px; }
    .modal-content { padding: 20px 15px; border-radius: 24px 24px 0 0; }
    .form-grid { grid-template-columns: 1fr; gap: 12px; }
    .btn-close-img { top: 10px; right: 10px; }
}
