/* =================================================================
   ICELL STORE — DEGRADÉ CONTINUO QUE SE DILUYE HACIA EL BLANCO
   No hay "caja" con bordes duros: todo es una misma página que va
   de un tono oscuro/rosado arriba hacia blanco, de forma difuminada.
   ================================================================= */

:root {
    --bg-main: #f5eef0;
    --bg-card: #ffffff;
    --text-main: #1d1d1f;
    --text-muted: #86868b;
    --shadow-soft: 0 10px 30px rgba(0, 0, 0, 0.04);

    /* Acentos de marca */
    --pink: #ff5c85;
    --orange: #ff8a5c;
    --green-wa: #25d366;
    --green-wa-dark: #1ea952;
    --green-wa-text: #1ea952;

    --hero-dark: #1b0f16;
    --hero-text-muted: rgba(255, 255, 255, 0.6);
    --hero-text-faint: rgba(255, 255, 255, 0.45);
    --hero-glass-bg: rgba(255, 255, 255, 0.1);
    --hero-glass-border: rgba(255, 255, 255, 0.16);

    --font-main: 'Inter', sans-serif;
    --font-heading: 'Outfit', sans-serif;
}

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

body {
    position: relative;
    background-color: var(--bg-main);
    color: var(--text-main);
    font-family: var(--font-main);
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

main { flex: 1; }

/* =================================================================
   CAPA DE COLOR DIFUMINADA (detrás de header + hero)
   Se disuelve gradualmente hacia blanco, sin bordes definidos.
   ================================================================= */

body::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 1100px;
    background:
        radial-gradient(at 12% 5%, rgba(255, 92, 133, 0.65) 0%, transparent 45%),
        radial-gradient(at 92% 12%, rgba(255, 180, 200, 0.45) 0%, transparent 42%),
        radial-gradient(at 45% 42%, rgba(220, 38, 38, 0.4) 0%, transparent 55%),
        radial-gradient(at 88% 60%, rgba(37, 211, 102, 0.2) 0%, transparent 45%),
        linear-gradient(180deg, var(--hero-dark) 0%, var(--hero-dark) 34%, rgba(150, 100, 115, 0.25) 55%, rgba(150, 100, 115, 0.1) 75%, rgba(150, 100, 115, 0) 100%);
    filter: blur(60px);
    -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 38%, rgba(0,0,0,0.5) 60%, transparent 100%);
    mask-image: linear-gradient(180deg, #000 0%, #000 38%, rgba(0,0,0,0.5) 60%, transparent 100%);
    z-index: 0;
    pointer-events: none;
}

header, .hero, .icell-footer, .stock-grid, .side-menu, .btn-whatsapp-float {
    position: relative;
    z-index: 1;
}

/* =================================================================
   HEADER — transparente, flota sobre la capa de color
   ================================================================= */

.main-header {
    width: 100%;
    padding: 1.2rem 1rem 0.6rem;
    display: flex;
    justify-content: center;
    align-items: center;
}

.menu-toggle {
    position: absolute;
    left: 20px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    z-index: 2;
}

.menu-toggle span {
    width: 22px;
    height: 2px;
    background-color: #ffffff;
    border-radius: 2px;
    transition: 0.3s;
}

.logo {
    max-width: 118px;
    height: auto;
    display: block;
}

/* =================================================================
   HERO — mismo lienzo continuo, sin caja ni bordes propios
   ================================================================= */

.hero {
    padding: 0.6rem 1.15rem 2.4rem;
}

.hero-search {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--hero-glass-bg);
    border: 1px solid var(--hero-glass-border);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 16px;
    padding: 13px 16px;
    margin-bottom: 1.3rem;
}

.search-icon {
    color: var(--hero-text-muted);
    font-size: 1rem;
    flex-shrink: 0;
}

.search-input {
    background: transparent;
    border: none;
    outline: none;
    color: #ffffff;
    font-family: var(--font-main);
    font-size: 0.85rem;
    width: 100%;
}

.search-input::placeholder {
    color: var(--hero-text-muted);
}

.hero-title {
    font-family: var(--font-heading);
    font-size: 1.9rem;
    line-height: 1.14;
    font-weight: 800;
    letter-spacing: -1px;
    color: #ffffff;
    margin-bottom: 0.5rem;
}

.text-highlight {
    background: linear-gradient(90deg, var(--pink), var(--orange));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 0.76rem;
    color: var(--hero-text-muted);
    font-weight: 500;
    margin-bottom: 1.1rem;
}

/* STAT CARDS */
.stat-row {
    display: flex;
    gap: 8px;
    margin-bottom: 1.1rem;
}

.stat-card {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--hero-glass-bg);
    border: 1px solid var(--hero-glass-border);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 14px;
    padding: 10px 12px;
}

.stat-icon {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    flex-shrink: 0;
}

.stat-icon-pink { background: rgba(255, 120, 150, 0.3); }
.stat-icon-green { background: rgba(37, 211, 102, 0.28); }

.stat-title {
    font-size: 0.68rem;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.2;
}

.stat-sub {
    font-size: 0.6rem;
    color: var(--hero-text-faint);
}

/* =================================================================
   FILTROS (CHIPS)
   ================================================================= */

.filter-sticky-wrapper {
    padding: 0;
}

.filter-scroll {
    display: flex;
    overflow-x: auto;
    gap: 8px;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

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

.filter-chip {
    flex: 0 0 auto;
    border: 1px solid var(--hero-glass-border);
    background-color: var(--hero-glass-bg);
    color: rgba(255, 255, 255, 0.85);
    padding: 9px 17px;
    border-radius: 20px;
    font-family: var(--font-main);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    -webkit-tap-highlight-color: transparent;
    white-space: nowrap;
}

.filter-chip.active {
    background: linear-gradient(90deg, var(--pink), var(--orange));
    color: #ffffff;
    border-color: transparent;
    box-shadow: 0 4px 18px rgba(255, 92, 133, 0.45);
}

.filter-chip:hover:not(.active) {
    background-color: rgba(255, 255, 255, 0.18);
}

/* =================================================================
   STOCK / TARJETAS — ya sobre blanco pleno
   ================================================================= */

.stock-grid {
    max-width: 640px;
    margin: 0 auto;
    padding: 0 1rem 5rem;
}

.loader-container {
    text-align: center;
    padding: 4rem 1rem;
    color: var(--text-muted);
}

.spinner {
    width: 36px;
    height: 36px;
    border: 3px solid #ececec;
    border-top: 3px solid var(--pink);
    border-radius: 50%;
    margin: 0 auto 1rem;
    animation: spin 1s linear infinite;
}

@keyframes spin { 100% { transform: rotate(360deg); } }

.card-iphone {
    display: block;
    background: var(--bg-card);
    border: 1px solid rgba(0, 0, 0, 0.04);
    border-radius: 18px;
    padding: 16px;
    margin-bottom: 12px;
    cursor: pointer;
    box-shadow: var(--shadow-soft);
    transition: transform 0.15s ease, background 0.15s ease;
    -webkit-tap-highlight-color: transparent;
}

.card-iphone:active {
    transform: scale(0.98);
    background: #fafafa;
}

.card-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
}

.model-title {
    font-family: var(--font-heading);
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--text-main);
    letter-spacing: -0.3px;
}

.model-metadata {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 3px;
}

.card-price {
    text-align: right;
    flex-shrink: 0;
}

.price-currency {
    display: block;
    font-size: 0.6rem;
    color: var(--text-muted);
    font-weight: 700;
}

.price-amount {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 800;
    background: linear-gradient(90deg, var(--pink), var(--orange));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.badges-container {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 12px;
}

.badge-item {
    font-size: 0.68rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 20px;
}

.badge-battery {
    background: #eefdf5;
    color: #1ea952;
}

.badge-detail {
    background: #fdf0f3;
    color: #e0507a;
}

.wa-pill {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 4px;
    background: #eefdf5;
    border: 1px solid rgba(37, 211, 102, 0.35);
    color: var(--green-wa-text);
    font-size: 0.72rem;
    font-weight: 700;
    padding: 6px 13px;
    border-radius: 20px;
    white-space: nowrap;
}

/* =================================================================
   MENÚ LATERAL — claro, con el logo original a color
   ================================================================= */

.side-menu {
    position: fixed;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    z-index: 1000;
    transition: left 0.4s cubic-bezier(0.77, 0.2, 0.05, 1.0);
}

.side-menu.active { left: 0; }

.menu-overlay {
    position: absolute;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(4px);
}

.menu-content {
    position: absolute;
    width: 85%;
    max-width: 320px;
    height: 100%;
    background: #ffffff;
    padding: 40px 25px;
    box-shadow: 10px 0 30px rgba(0, 0, 0, 0.1);
    overflow-y: auto;
}

.menu-header-logo img {
    max-width: 100px;
    margin-bottom: 30px;
}

.close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    font-size: 2rem;
    color: var(--text-muted);
    cursor: pointer;
}

.menu-section {
    margin-bottom: 30px;
}

.menu-section h4 {
    font-family: var(--font-heading);
    font-size: 1rem;
    margin-bottom: 10px;
    color: var(--text-main);
}

.menu-section p {
    font-size: 0.9rem;
    color: #6e6e73;
    line-height: 1.5;
}

.phone-link {
    display: inline-block;
    color: var(--pink);
    text-decoration: none;
    font-weight: 600;
    margin-top: 5px;
}

.map-container {
    margin-top: 15px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border-radius: 12px;
}

/* =================================================================
   BOTÓN FLOTANTE DE WHATSAPP
   ================================================================= */

.btn-whatsapp-float {
    position: fixed;
    bottom: 78px;
    right: 16px;
    width: 54px;
    height: 54px;
    background: linear-gradient(135deg, var(--green-wa), var(--green-wa-dark));
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    box-shadow: 0 6px 16px rgba(37, 211, 102, 0.4);
    z-index: 950;
    animation: floatWhatsapp 2.6s ease-in-out infinite;
}

@keyframes floatWhatsapp {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

.btn-whatsapp-float:active {
    animation-play-state: paused;
    transform: scale(0.92);
    filter: brightness(0.95);
}

.btn-whatsapp-float.hidden {
    opacity: 0;
    pointer-events: none;
    transform: translateY(20px);
}

/* =================================================================
   FOOTER
   ================================================================= */

.icell-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 38px;
    background: var(--bg-main);
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 900;
}

.footer-brand-link {
    font-size: 0.66rem;
    color: #c0c0c8;
    font-weight: 500;
    text-decoration: none;
    letter-spacing: 0.2px;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: color 0.2s ease;
}

.footer-brand-link strong {
    color: #8e8e93;
    font-weight: 700;
}

.footer-brand-link:active { color: var(--text-main); }

/* =================================================================
   RESPONSIVE / DESKTOP
   ================================================================= */

@media (min-width: 769px) {
    .hero { padding: 0.8rem 2rem 3rem; max-width: 700px; margin: 0 auto; }
    .hero-title { font-size: 2.4rem; }
    .filter-scroll { justify-content: center; }
    .stock-grid { max-width: 720px; }
    body::before { height: 1200px; }
}

@media (max-width: 380px) {
    .hero-title { font-size: 1.65rem; }
}