:root {
    --color-primary: #5e1921;
    --color-secondary: #852e34;
    --color-dark: #2a0404;
    --color-dark-alt: #63141c;

    --color-cream: #fbfbf0;
    --color-cream-soft: #f7ede4;

    --color-text-light: #fbfbf0;
    --color-text-muted: rgba(251, 251, 240, 0.65);
    --color-light-pink: var(--color-cream-soft);
    --color-peach: var(--color-cream-soft);
    --color-wine: var(--color-secondary);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    min-height: 100vh;
    overflow-x: hidden;
}

/* ============================================
   CANVAS DE PARTÍCULAS
   ============================================ */
#particles-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

/* ============================================
   LAYOUT 100VH - FOOTER SIEMPRE ABAJO
   ============================================ */
.content-wrapper {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.content-wrapper main {
    flex: 1;
}



/* ============================================
   PÁGINA DE BIENVENIDA
   ============================================ */
.welcome-page {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 50%, #3d1015 100%);
    color: var(--color-cream);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 2rem;
}

/* ============================================
   FIX BIENVENIDA
   ============================================ */
.welcome-page .content-wrapper {
    justify-content: center;
    align-items: center;
    text-align: center;
}


.welcome-logo {
    max-width: 350px;
    width: 80%;
    height: auto;
    margin-bottom: 2rem;
    filter: drop-shadow(0 8px 24px rgba(0, 0, 0, 0.3));
    animation: logoFloat 4s ease-in-out infinite;
}

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

.welcome-tagline {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.5rem;
    font-weight: 400;
    color: var(--color-light-pink);
    margin-bottom: 3rem;
    letter-spacing: 0.05em;
}

.welcome-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 100%;
    max-width: 320px;
}

.btn-welcome {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1rem 2rem;
    border-radius: 50px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.btn-welcome i {
    font-size: 1.25rem;
}

.btn-primary-custom {
    background: var(--color-cream);
    color: var(--color-primary);
}

.btn-primary-custom:hover {
    background: transparent;
    border-color: var(--color-cream);
    color: var(--color-cream);
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.btn-secondary-custom {
    background: transparent;
    border-color: var(--color-light-pink);
    color: var(--color-light-pink);
}

.btn-secondary-custom:hover {
    background: var(--color-light-pink);
    color: var(--color-primary);
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

/* ============================================
   PÁGINAS INTERNAS
   ============================================ */
.internal-page {
    background-color: var(--color-dark);
    color: var(--color-text-light);
    min-height: 100vh;
}

.internal-header {
    padding: 1rem 2rem 0rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.header-logo {
    height: 78px;
    width: auto;
    filter: drop-shadow(0 6px 18px rgba(0, 0, 0, 0.45));
}

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

.nav-link-custom {
    color: var(--color-text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-link-custom:hover,
.nav-link-custom.active {
    color: var(--color-cream);
}

/* Secciones */
.section-header {
    text-align: center;
    padding: 3rem 2rem 2rem;
}

.section-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 2.5rem;
    font-weight: 600;
    color: var(--color-cream);
    margin-bottom: 0.5rem;
}

.section-subtitle {
    font-size: 1rem;
    color: var(--color-text-muted);
}

/* ============================================
   TABLA DE STOCK - DESKTOP
   ============================================ */
.stock-container {
    padding: 0 2rem 4rem;
    max-width: 1200px;
    margin: 0 auto;
}

.stock-table-wrapper {
    background: var(--color-dark-alt);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.stock-table {
    width: 100%;
    border-collapse: collapse;
}

.stock-table thead {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-wine) 100%);
}

.stock-table th {
    padding: 1.25rem 1rem;
    text-align: left;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-cream);
}

.stock-table tbody tr {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: background-color 0.2s ease;
}

.stock-table tbody tr:last-child {
    border-bottom: none;
}

.stock-table tbody tr:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

.stock-table td {
    padding: 1.25rem 1rem;
    font-size: 0.95rem;
    vertical-align: middle;
}

.model-name {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--color-cream);
}

.model-name .pro {
    color: var(--color-peach);
}

.storage-badge {
    display: inline-block;
    padding: 0.35rem 0.75rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--color-text-light);
}

.battery-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #22c55e;
}

.battery-indicator i {
    font-size: 1.1rem;
}

.battery-text {
    font-weight: 500;
    font-size: 0.9rem;
}

.color-display {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.color-dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.estado-text {
    font-style: italic;
    color: var(--color-text-muted);
    font-size: 0.9rem;
}

.price {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-cream);
}

.price-currency {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--color-text-muted);
    margin-left: 0.25rem;
}

.whatsapp-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #25d366 0%, #128c7e 100%);
    border-radius: 50%;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
    font-size: 1.4rem;
}

.whatsapp-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4);
    color: white;
}

/* ============================================
   CARDS DE STOCK - MOBILE
   ============================================ */
.stock-cards {
    display: none;
    flex-direction: column;
    gap: 1rem;
    padding: 0 1rem 3rem;
}

.stock-card {
    background: var(--color-dark-alt);
    border-radius: 12px;
    padding: 1.25rem;
    border-left: 4px solid var(--color-cream);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.card-info {
    flex: 1;
}

.card-model {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--color-cream);
    margin-bottom: 0.75rem;
}

.card-model .pro {
    color: var(--color-peach);
}

.card-specs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.card-specs .storage-badge {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
}

.card-specs .battery-indicator {
    font-size: 0.85rem;
}

.card-specs .battery-indicator i {
    font-size: 1rem;
}

.card-specs .separator {
    color: var(--color-text-muted);
}

.card-estado {
    font-style: italic;
    color: var(--color-text-muted);
    font-size: 0.85rem;
}

.card-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.75rem;
}

.card-price {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-cream);
}

.card-price .currency {
    font-size: 0.85rem;
    color: var(--color-text-muted);
}

.card-whatsapp {
    width: 44px;
    height: 44px;
    font-size: 1.3rem;
}

/* ============================================
   FAQ ACCORDION
   ============================================ */
.faq-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 2rem 4rem;
}

.accordion {
    --bs-accordion-bg: var(--color-dark-alt);
    --bs-accordion-border-color: rgba(255, 255, 255, 0.1);
    --bs-accordion-border-radius: 12px;
    --bs-accordion-btn-color: var(--color-text-light);
    --bs-accordion-btn-bg: var(--color-dark-alt);
    --bs-accordion-active-color: var(--color-cream);
    --bs-accordion-active-bg: rgba(212, 168, 83, 0.1);
    --bs-accordion-btn-focus-box-shadow: 0 0 0 0.25rem rgba(212, 168, 83, 0.25);
}

.accordion-item {
    margin-bottom: 1rem;
    border-radius: 12px !important;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    background: var(--color-dark-alt);
}

.accordion-item:first-of-type,
.accordion-item:last-of-type {
    border-radius: 12px !important;
}

.accordion-button {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 1rem;
    font-weight: 500;
    padding: 1.25rem 1.5rem;
    color: var(--color-text-light);
    background: var(--color-dark-alt);
}

.accordion-button:not(.collapsed) {
    color: var(--color-cream);
    background: rgba(212, 168, 83, 0.1);
    box-shadow: none;
}

.accordion-button:focus {
    box-shadow: 0 0 0 0.25rem rgba(212, 168, 83, 0.25);
}

.accordion-button::after {
    filter: invert(1);
}

.accordion-body {
    padding: 1.25rem 1.5rem;
    color: var(--color-text-muted);
    line-height: 1.7;
    font-size: 0.95rem;
    background: var(--color-dark-alt);
}

/* ============================================
   FOOTER
   ============================================ */
.internal-footer {
    text-align: center;
    padding: 1.2rem 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.3);
    margin-top: auto; /* Empuja el footer hacia abajo */
}

.footer-brand {
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.4px;
    color: var(--color-text-light);
    margin-bottom: 0.3rem;
    opacity: 0.9;
}

.footer-text {
    font-size: 0.75rem;
    color: var(--color-text-muted);
    margin: 0;
}

/* ============================================
   LOADING Y ESTADOS
   ============================================ */
.loading {
    text-align: center;
    padding: 3rem;
    color: var(--color-text-muted);
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--color-cream);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

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

.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--color-text-muted);
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
    display: block;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 900px) {
    .section-title {
        font-size: 2rem;
    }

    .welcome-logo {
        max-width: 280px;
    }

    .welcome-tagline {
        font-size: 1.25rem;
    }
}

@media (max-width: 768px) {
    .stock-table-wrapper {
        display: none;
    }

    .stock-cards {
        display: flex;
    }

    .stock-container {
        padding: 0 0 2rem;
    }

    .internal-header {
        padding: 1rem;
        flex-direction: column;
        gap: 1rem;
    }

    .header-logo {
        height: 64px;
    }

    .header-nav {
        width: 100%;
        justify-content: center;
    }

    .section-header {
        padding: 2rem 1rem 1.5rem;
    }

    .section-title {
        font-size: 1.75rem;
    }

    .faq-container {
        padding: 0 1rem 3rem;
    }

    .accordion-button {
        padding: 1rem;
        font-size: 0.9rem;
    }

    .accordion-body {
        padding: 1rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 400px) {
    .welcome-buttons {
        max-width: 100%;
    }

    .btn-welcome {
        padding: 0.875rem 1.5rem;
        font-size: 0.9rem;
    }

    .card-model {
        font-size: 1.1rem;
    }

    .card-price {
        font-size: 1.3rem;
    }
}

/* ============================================
   ANIMACIONES
   ============================================ */
.stock-table tbody tr {
    opacity: 0;
    transform: translateY(10px);
    animation: fadeInUp 0.4s ease forwards;
}

.stock-card {
    opacity: 0;
    transform: translateY(15px);
    animation: fadeInUp 0.5s ease forwards;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
