/* ========================================
   Jultipsen - Custom Styles
   Modern Christmas Gift Guide
   ======================================== */

/* ========================================
   CSS Variables - Color Palette
   ======================================== */
:root {
    /* Christmas-inspired modern palette */
    --primary-color: #8B1538;
    --primary-dark: #6B0F2A;
    --primary-light: #A91D45;
    --accent-red: #C41E3A;
    --accent-gold: #D4AF37;
    --accent-green: #165B33;
    --soft-cream: #FFF8F0;
    --warm-white: #FDFCFA;
    --text-dark: #2C3E50;
    --text-medium: #546E7A;
    --text-light: #7B8794;
    --border-light: #E8E9EC;
    --shadow-sm: rgba(0, 0, 0, 0.08);
    --shadow-md: rgba(0, 0, 0, 0.12);
    --gradient-primary: linear-gradient(135deg, #8B1538 0%, #6B0F2A 100%);
    --gradient-accent: linear-gradient(135deg, #C41E3A 0%, #8B1429 100%);
}

/* ========================================
   Base Styles
   ======================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--warm-white);
    overflow-x: hidden;
}

/* ========================================
   Header & Navigation
   ======================================== */
.header-main {
    background: var(--gradient-primary);
    box-shadow: 0 2px 12px var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar {
    padding: 0.75rem 0;
}

.navbar-brand {
    display: flex;
    align-items: center;
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--warm-white) !important;
    transition: transform 0.2s ease;
}

.navbar-brand:hover {
    transform: scale(1.05);
}

.brand-icon {
    font-size: 1.8rem;
    margin-right: 0.5rem;
}

.brand-text {
    letter-spacing: -0.5px;
}

.nav-link {
    color: var(--soft-cream) !important;
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--accent-gold) !important;
}

/* ========================================
   Hero Section
   ======================================== */
.hero {
    background: var(--gradient-accent);
    padding: 3rem 1rem;
    color: var(--warm-white);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.4;
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    position: relative;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.95;
    position: relative;
}

.search-box {
    max-width: 600px;
    margin: 0 auto;
    position: relative;
}

.search-box .form-control {
    padding: 1rem 1.25rem;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.search-box .form-control:focus {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.2);
    outline: none;
}

/* ========================================
   Categories Section
   ======================================== */
.categories-section {
    padding: 3rem 1rem;
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 2.5rem;
    text-align: center;
}

.category-group {
    margin-bottom: 3rem;
}

.category-group-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 3px solid var(--accent-gold);
    display: inline-block;
}

.category-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.5rem 0.75rem;
    background: white;
    border: 2px solid var(--border-light);
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.3s ease;
    min-height: 120px;
    text-align: center;
    box-shadow: 0 2px 8px var(--shadow-sm);
}

.category-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 20px var(--shadow-md);
    border-color: var(--primary-red);
}

.category-icon {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    line-height: 1;
}

.category-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-dark);
    line-height: 1.3;
}

/* ========================================
   Countdown Badge
   ======================================== */
.countdown-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    padding: 0.5rem 1.5rem;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    border: 2px solid rgba(255, 255, 255, 0.3);
    animation: pulse 2s ease-in-out infinite;
}

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

/* ========================================
   Statistics Section
   ======================================== */
.stats-section {
    padding: 3rem 1rem;
    background: var(--warm-white);
}

.stat-card {
    text-align: center;
    padding: 1.5rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px var(--shadow-sm);
    transition: transform 0.3s ease;
}

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

.stat-number {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    line-height: 1;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-medium);
    font-weight: 500;
}

/* ========================================
   Quick Gift Finder
   ======================================== */
.quick-finder {
    padding: 3rem 1rem;
    background: linear-gradient(135deg, var(--soft-cream) 0%, var(--warm-white) 100%);
}

.finder-card {
    background: white;
    padding: 2.5rem;
    border-radius: 16px;
    box-shadow: 0 4px 20px var(--shadow-md);
    text-align: center;
}

.finder-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.finder-subtitle {
    color: var(--text-medium);
    margin-bottom: 1rem;
}

.btn-budget {
    width: 100%;
    padding: 1rem;
    background: white;
    border: 2px solid var(--primary-color);
    border-radius: 10px;
    color: var(--primary-color);
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    cursor: pointer;
}

.btn-budget:hover,
.btn-budget.active {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--shadow-md);
}

/* ========================================
   Gift Guides Section
   ======================================== */
.gift-guides-section {
    padding: 4rem 1rem;
    background: var(--warm-white);
}

.guide-card {
    display: block;
    position: relative;
    height: 220px;
    border-radius: 16px;
    overflow: hidden;
    text-decoration: none;
    background: var(--gradient-primary);
    transition: transform 0.3s ease;
    box-shadow: 0 4px 16px var(--shadow-sm);
}

.guide-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 24px var(--shadow-md);
}

.guide-card:nth-child(2) {
    background: var(--gradient-accent);
}

.guide-card:nth-child(3) {
    background: linear-gradient(135deg, #D4AF37 0%, #B8941E 100%);
}

.guide-card:nth-child(4) {
    background: linear-gradient(135deg, #2E7D32 0%, #1B5E20 100%);
}

.guide-card:nth-child(5) {
    background: linear-gradient(135deg, #6A1B9A 0%, #4A148C 100%);
}

.guide-card:nth-child(6) {
    background: linear-gradient(135deg, #C2185B 0%, #880E4F 100%);
}

.guide-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.2);
}

.guide-content {
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    color: white;
    text-align: center;
}

.guide-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.guide-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.guide-description {
    font-size: 0.95rem;
    opacity: 0.95;
    margin: 0;
}

/* ========================================
   Testimonials Section
   ======================================== */
.testimonials-section {
    padding: 4rem 1rem;
    background: linear-gradient(to bottom, var(--soft-cream), var(--warm-white));
}

.testimonial-card {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 2px 12px var(--shadow-sm);
    height: 100%;
    transition: transform 0.3s ease;
}

.testimonial-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 20px var(--shadow-md);
}

.testimonial-stars {
    color: var(--accent-gold);
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

.testimonial-text {
    font-size: 1rem;
    color: var(--text-dark);
    line-height: 1.6;
    margin-bottom: 1rem;
    font-style: italic;
}

.testimonial-author {
    font-size: 0.9rem;
    color: var(--text-medium);
    font-weight: 600;
    margin: 0;
}

/* ========================================
   Newsletter Section
   ======================================== */
.newsletter-section {
    padding: 4rem 1rem;
    background: var(--warm-white);
}

.newsletter-card {
    background: var(--gradient-primary);
    padding: 3rem 2rem;
    border-radius: 16px;
    color: white;
}

.newsletter-title {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.newsletter-text {
    font-size: 1rem;
    opacity: 0.95;
    margin: 0;
}

.newsletter-form .form-control {
    padding: 0.875rem 1.25rem;
    border: none;
    border-radius: 8px 0 0 8px;
    font-size: 1rem;
}

.newsletter-form .form-control:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.3);
}

.btn-newsletter {
    padding: 0.875rem 2rem;
    background: var(--accent-red);
    color: white;
    border: none;
    border-radius: 0 8px 8px 0;
    font-weight: 600;
    transition: background 0.3s ease;
    white-space: nowrap;
}

.btn-newsletter:hover {
    background: var(--primary-dark);
}

/* ========================================
   About Section
   ======================================== */
.about-section {
    background: linear-gradient(to bottom, var(--soft-cream), var(--warm-white));
    padding: 3rem 1rem;
}

.about-text {
    font-size: 1.1rem;
    color: var(--text-medium);
    line-height: 1.8;
    max-width: 700px;
    margin: 0 auto;
}

/* ========================================
   Footer
   ======================================== */
.footer {
    background: var(--gradient-primary);
    padding: 2rem 1rem;
    margin-top: 3rem;
}

.footer-text {
    color: var(--soft-cream);
    margin: 0;
    font-size: 0.95rem;
}

/* ========================================
   Trending Section
   ======================================== */
.trending-section {
    padding: 3rem 1rem;
    background: linear-gradient(135deg, var(--soft-cream) 0%, var(--warm-white) 100%);
    position: relative;
    overflow: hidden;
}

.trending-section::before {
    content: '🔥';
    position: absolute;
    font-size: 20rem;
    opacity: 0.03;
    top: -5rem;
    right: -5rem;
    pointer-events: none;
}

.trending-header {
    text-align: center;
    margin-bottom: 2rem;
}

.trending-subtitle {
    color: var(--text-medium);
    font-size: 1.1rem;
    margin-top: 0.5rem;
}

.trending-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 16px var(--shadow-sm);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    display: block;
}

.trending-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--accent-red);
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.trending-card:hover::before {
    transform: scaleY(1);
}

.trending-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px var(--shadow-md);
}

.trending-badge {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    background: var(--accent-red);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 700;
}

.trending-icon {
    font-size: 3rem;
    margin-bottom: 0.75rem;
}

.trending-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.trending-stats {
    display: flex;
    gap: 1rem;
    font-size: 0.85rem;
    color: var(--text-medium);
}

.trending-stat {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

/* ========================================
   Gift Recommendation Engine
   ======================================== */
.recommendation-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 2000;
    justify-content: center;
    align-items: center;
    padding: 1rem;
    backdrop-filter: blur(4px);
}

.recommendation-modal.active {
    display: flex;
}

.recommendation-content {
    background: white;
    border-radius: 16px;
    max-width: 900px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.recommendation-header {
    background: var(--gradient-primary);
    color: white;
    padding: 2rem;
    border-radius: 16px 16px 0 0;
    position: relative;
}

.recommendation-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.5rem;
    line-height: 1;
    transition: background 0.2s ease;
}

.recommendation-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

.recommendation-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.recommendation-subtitle {
    opacity: 0.95;
    font-size: 1rem;
}

.recommendation-body {
    padding: 2rem;
}

.recommendation-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.recommendation-item {
    background: var(--warm-white);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.recommendation-item:hover {
    border-color: var(--primary-color);
    transform: scale(1.05);
}

.recommendation-item-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.recommendation-item-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.recommendation-item-desc {
    font-size: 0.9rem;
    color: var(--text-medium);
    margin-bottom: 1rem;
}

.recommendation-item-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-color);
}

.recommendation-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.btn-recommendation {
    padding: 0.875rem 2rem;
    border-radius: 8px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-recommendation-primary {
    background: var(--primary-color);
    color: white;
}

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

.btn-recommendation-secondary {
    background: white;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-recommendation-secondary:hover {
    background: var(--primary-color);
    color: white;
}

/* ========================================
   Price Drop Alerts
   ======================================== */
.price-alert-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: white;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

.price-alert-btn:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

.price-alert-btn.active {
    background: var(--accent-green);
    border-color: var(--accent-green);
    color: white;
}

.price-alert-icon {
    font-size: 1.2rem;
}

.price-alert-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 2000;
    justify-content: center;
    align-items: center;
    padding: 1rem;
    backdrop-filter: blur(4px);
}

.price-alert-modal.active {
    display: flex;
}

.price-alert-content {
    background: white;
    border-radius: 16px;
    max-width: 500px;
    width: 100%;
    padding: 2rem;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.price-alert-content h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.price-alert-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.price-alert-form input {
    padding: 0.875rem;
    border: 2px solid var(--soft-cream);
    border-radius: 8px;
    font-size: 1rem;
}

.price-alert-form input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.price-alert-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.btn-price-alert {
    flex: 1;
    padding: 0.875rem;
    border-radius: 8px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-price-alert-submit {
    background: var(--primary-color);
    color: white;
}

.btn-price-alert-submit:hover {
    background: var(--primary-dark);
}

.btn-price-alert-cancel {
    background: var(--soft-cream);
    color: var(--text-dark);
}

.btn-price-alert-cancel:hover {
    background: var(--warm-white);
}

/* ========================================
   Responsive Design - Mobile First
   ======================================== */

/* Small devices (landscape phones, 576px and up) */
@media (min-width: 576px) {
    .hero-title {
        font-size: 3rem;
    }

    .hero-subtitle {
        font-size: 1.35rem;
    }

    .category-card {
        padding: 1.75rem 1rem;
    }

    .finder-title {
        font-size: 2rem;
    }

    .guide-card {
        height: 240px;
    }
}

/* Medium devices (tablets, 768px and up) */
@media (min-width: 768px) {
    .hero {
        padding: 4rem 1rem;
    }

    .hero-title {
        font-size: 3.5rem;
    }

    .categories-section {
        padding: 4rem 1rem;
    }

    .category-card {
        min-height: 140px;
    }

    .category-icon {
        font-size: 3rem;
    }

    .category-name {
        font-size: 1rem;
    }

    .stat-number {
        font-size: 2.5rem;
    }

    .guide-card {
        height: 260px;
    }

    .newsletter-card {
        padding: 3rem;
    }
}

/* Large devices (desktops, 992px and up) */
@media (min-width: 992px) {
    .hero {
        padding: 5rem 1rem;
    }

    .hero-title {
        font-size: 4rem;
    }

    .category-card {
        min-height: 150px;
        padding: 2rem 1rem;
    }

    .finder-card {
        padding: 3rem;
    }

    .newsletter-title {
        font-size: 2rem;
    }
}

/* Extra large devices (large desktops, 1200px and up) */
@media (min-width: 1200px) {
    .container {
        max-width: 1200px;
    }
}

/* ========================================
   Accessibility & Interactions
   ======================================== */
.category-card:focus {
    outline: 3px solid var(--accent-gold);
    outline-offset: 2px;
}

.nav-link:focus {
    outline: 2px solid var(--accent-gold);
    outline-offset: 4px;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ========================================
   Loading & Performance Optimizations
   ======================================== */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Prevent layout shift */
.category-icon {
    width: 3rem;
    height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
}
