/* EMBER NEST HOME LLC - Design System */
/* Warm Ember/Fire-Inspired Theme */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;600;700&family=Inter:wght@300;400;500;600;700&display=swap');

/* ===== CSS VARIABLES ===== */
:root {
    /* Ember Color Palette */
    --primary: #E67E22;
    /* Ember Orange */
    --primary-light: #F39C12;
    /* Bright Flame */
    --primary-dark: #D35400;
    /* Burnt Sienna */

    --secondary: #C0392B;
    /* Deep Red */
    --secondary-light: #E74C3C;
    /* Bright Red */
    --secondary-dark: #922B21;
    /* Dark Red */

    --accent: #D35400;
    /* Burnt Sienna */
    --neutral: #F5E6D3;
    /* Warm Cream */
    --surface: #FFFFFF;
    /* White */
    --dark: #2C3E50;
    /* Charcoal */

    /* Text Colors */
    --text-primary: #2C3E50;
    --text-secondary: #5D6D7E;
    --text-light: #95A5A6;

    /* Gradients */
    --gradient-ember: linear-gradient(135deg, #E67E22 0%, #C0392B 100%);
    --gradient-warm: linear-gradient(135deg, #F39C12 0%, #E67E22 50%, #D35400 100%);
    --gradient-fire: linear-gradient(180deg, #F39C12 0%, #E67E22 50%, #C0392B 100%);

    /* Spacing */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;

    /* Typography */
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Inter', sans-serif;

    --fs-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
    --fs-sm: clamp(0.875rem, 0.8rem + 0.375vw, 1rem);
    --fs-base: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
    --fs-lg: clamp(1.125rem, 1.05rem + 0.375vw, 1.25rem);
    --fs-xl: clamp(1.25rem, 1.15rem + 0.5vw, 1.5rem);
    --fs-2xl: clamp(1.5rem, 1.35rem + 0.75vw, 2rem);
    --fs-3xl: clamp(2rem, 1.75rem + 1.25vw, 3rem);
    --fs-4xl: clamp(2.5rem, 2rem + 2.5vw, 4rem);

    /* Border Radius */
    --radius-sm: 0.25rem;
    --radius-md: 0.5rem;
    --radius-lg: 1rem;
    --radius-xl: 1.5rem;
    --radius-full: 9999px;

    /* Shadows */
    --shadow: rgba(230, 126, 34, 0.1);
    --shadow-md: 0 4px 6px rgba(230, 126, 34, 0.1);
    --shadow-lg: 0 10px 15px rgba(230, 126, 34, 0.15);
    --shadow-xl: 0 20px 25px rgba(230, 126, 34, 0.2);

    /* Transitions */
    --transition-base: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.15s ease;
}

/* ===== RESET & BASE STYLES ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    font-size: var(--fs-base);
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--surface);
    overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    color: var(--dark);
    margin-bottom: var(--space-md);
}

h1 {
    font-size: var(--fs-4xl);
}

h2 {
    font-size: var(--fs-3xl);
}

h3 {
    font-size: var(--fs-2xl);
}

h4 {
    font-size: var(--fs-xl);
}

h5 {
    font-size: var(--fs-lg);
}

h6 {
    font-size: var(--fs-base);
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-base);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ===== LAYOUT ===== */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

.section {
    padding: var(--space-3xl) 0;
}

.section-sm {
    padding: var(--space-2xl) 0;
}

/* ===== HEADER ===== */
.header {
    background: var(--surface);
    box-shadow: 0 2px 8px var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: var(--transition-base);
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-lg) 0;
}

.logo {
    font-family: var(--font-heading);
    font-size: var(--fs-xl);
    font-weight: 700;
    background: var(--gradient-ember);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.logo span {
    font-size: var(--fs-2xl);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: var(--space-xl);
}

.nav-link {
    font-weight: 500;
    color: var(--text-primary);
    position: relative;
    padding: var(--space-sm) 0;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-ember);
    transition: var(--transition-base);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.nav-icons {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
}

.cart-icon {
    position: relative;
    font-size: var(--fs-xl);
    cursor: pointer;
    transition: var(--transition-base);
}

.cart-icon:hover {
    transform: scale(1.1);
}

.cart-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--gradient-ember);
    color: white;
    font-size: var(--fs-xs);
    font-weight: 700;
    padding: 2px 6px;
    border-radius: var(--radius-full);
    min-width: 20px;
    text-align: center;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: var(--fs-2xl);
    cursor: pointer;
    color: var(--primary);
}

/* ===== HERO ===== */
.hero {
    background: var(--gradient-warm);
    color: white;
    text-align: center;
    padding: var(--space-3xl) 0;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 120"><path fill="%23ffffff" fill-opacity="0.1" d="M0,0 L1200,0 L1200,60 Q900,90 600,60 T0,60 Z"/></svg>') bottom repeat-x;
    opacity: 0.3;
}

.hero-title {
    font-size: var(--fs-4xl);
    margin-bottom: var(--space-md);
    position: relative;
    z-index: 1;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.hero-subtitle {
    font-size: var(--fs-lg);
    margin-bottom: var(--space-xl);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    position: relative;
    z-index: 1;
    opacity: 0.95;
}

/* ===== BUTTONS ===== */
.btn {
    display: inline-block;
    padding: var(--space-md) var(--space-xl);
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: var(--fs-base);
    text-align: center;
    cursor: pointer;
    border: none;
    transition: var(--transition-base);
    font-family: var(--font-body);
}

.btn-primary {
    background: var(--gradient-ember);
    color: white;
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: var(--secondary);
    color: white;
}

.btn-secondary:hover {
    background: var(--secondary-dark);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: white;
}

.btn-ghost {
    background: transparent;
    color: var(--primary);
}

.btn-ghost:hover {
    background: var(--neutral);
}

.btn-sm {
    padding: var(--space-sm) var(--space-lg);
    font-size: var(--fs-sm);
}

.btn-lg {
    padding: var(--space-lg) var(--space-2xl);
    font-size: var(--fs-lg);
}

/* ===== CARDS ===== */
.card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: var(--transition-base);
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

.card-img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: var(--transition-base);
}

.card:hover .card-img {
    transform: scale(1.05);
}

.card-body {
    padding: var(--space-lg);
}

.card-title {
    font-size: var(--fs-xl);
    margin-bottom: var(--space-sm);
    color: var(--dark);
}

.card-text {
    color: var(--text-secondary);
    margin-bottom: var(--space-md);
}

.card-price {
    font-size: var(--fs-xl);
    font-weight: 700;
    background: var(--gradient-ember);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ===== GRID ===== */
.grid {
    display: grid;
    gap: var(--space-xl);
}

.grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

/* ===== FORMS ===== */
.form-group {
    margin-bottom: var(--space-lg);
}

.form-label {
    display: block;
    margin-bottom: var(--space-sm);
    font-weight: 600;
    color: var(--dark);
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: var(--space-md);
    border: 2px solid #E0E0E0;
    border-radius: var(--radius-md);
    font-family: var(--font-body);
    font-size: var(--fs-base);
    transition: var(--transition-base);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(230, 126, 34, 0.1);
}

.form-textarea {
    min-height: 120px;
    resize: vertical;
}

/* ===== FOOTER ===== */
.footer {
    background: var(--dark);
    color: white;
    padding: var(--space-3xl) 0 var(--space-lg);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-2xl);
    margin-bottom: var(--space-2xl);
}

.footer-title {
    color: white;
    margin-bottom: var(--space-lg);
    font-size: var(--fs-lg);
}

.footer-links {
    list-style: none;
}

.footer-link {
    color: var(--neutral);
    display: block;
    padding: var(--space-sm) 0;
    transition: var(--transition-base);
}

.footer-link:hover {
    color: var(--primary-light);
    padding-left: var(--space-sm);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: var(--space-lg);
    text-align: center;
    color: var(--neutral);
}

/* ===== UTILITIES ===== */
.text-center {
    text-align: center;
}

.flex {
    display: flex;
}

.flex-center {
    display: flex;
    justify-content: center;
    align-items: center;
}

.flex-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.mb-xs {
    margin-bottom: var(--space-xs);
}

.mb-sm {
    margin-bottom: var(--space-sm);
}

.mb-md {
    margin-bottom: var(--space-md);
}

.mb-lg {
    margin-bottom: var(--space-lg);
}

.mb-xl {
    margin-bottom: var(--space-xl);
}

.mb-2xl {
    margin-bottom: var(--space-2xl);
}

.mt-xl {
    margin-top: var(--space-xl);
}

/* ===== ANIMATIONS ===== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.6s ease-out;
}

/* ===== PRODUCT SPECIFIC ===== */
.product-card {
    position: relative;
}

.product-badge {
    position: absolute;
    top: var(--space-md);
    right: var(--space-md);
    background: var(--gradient-ember);
    color: white;
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-full);
    font-size: var(--fs-sm);
    font-weight: 600;
    z-index: 10;
}

.product-actions {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: var(--space-md);
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
    opacity: 0;
    transition: var(--transition-base);
}

.product-card:hover .product-actions {
    opacity: 1;
}

/* ===== CART ITEMS ===== */
.cart-item {
    display: grid;
    grid-template-columns: 100px 1fr auto auto auto;
    gap: var(--space-lg);
    align-items: center;
    padding: var(--space-lg);
    background: var(--surface);
    border-radius: var(--radius-lg);
    margin-bottom: var(--space-md);
    box-shadow: var(--shadow-md);
}

.cart-item-img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: var(--radius-md);
}

.cart-item-details h3 {
    font-size: var(--fs-lg);
    margin-bottom: var(--space-xs);
}

.cart-item-variant {
    color: var(--text-secondary);
    font-size: var(--fs-sm);
}

.cart-item-price {
    font-weight: 700;
    color: var(--primary);
}

.cart-item-quantity {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.qty-btn {
    width: 32px;
    height: 32px;
    border: 2px solid var(--primary);
    background: white;
    color: var(--primary);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-weight: 700;
    transition: var(--transition-base);
}

.qty-btn:hover {
    background: var(--primary);
    color: white;
}

.qty-value {
    min-width: 40px;
    text-align: center;
    font-weight: 600;
}

.cart-item-remove {
    background: none;
    border: none;
    color: var(--secondary);
    cursor: pointer;
    padding: var(--space-sm);
    transition: var(--transition-base);
}

.cart-item-remove:hover {
    color: var(--secondary-dark);
    transform: scale(1.1);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .mobile-menu-btn {
        display: block;
    }

    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }

    .cart-item {
        grid-template-columns: 80px 1fr;
        gap: var(--space-md);
    }

    .cart-item-quantity,
    .cart-item-total {
        grid-column: 2;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: var(--fs-3xl);
    }

    .btn-lg {
        padding: var(--space-md) var(--space-xl);
        font-size: var(--fs-base);
    }
}