/* ========================================
   Candle Decor - Premium Modern Design
   Sophisticated Luxury Aesthetic
   ======================================== */

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

:root {
    /* Premium Color Palette */
    --bg-primary: #fafaf8;
    --bg-secondary: #f5f3f0;
    --bg-tertiary: #efe9e4;
    --bg-accent: #f9f7f4;
    
    --text-primary: #2a2622;
    --text-secondary: #6b6460;
    --text-tertiary: #9a9289;
    --text-light: #d4cfc8;
    
    --accent-primary: #c99470;
    --accent-secondary: #d4a574;
    --accent-tertiary: #e8c4b0;
    --accent-gold: #b8956a;
    --accent-light: #f5e6d3;
    
    --border-color: rgba(169, 141, 111, 0.12);
    --border-light: rgba(169, 141, 111, 0.06);
    
    --shadow-xs: 0 2px 8px rgba(42, 38, 34, 0.04);
    --shadow-sm: 0 4px 16px rgba(42, 38, 34, 0.08);
    --shadow-md: 0 8px 32px rgba(42, 38, 34, 0.12);
    --shadow-lg: 0 12px 48px rgba(42, 38, 34, 0.15);
    
    --transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

html, body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    overflow-x: hidden;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    letter-spacing: -0.5px;
}

h1 {
    font-size: 3.2rem;
    line-height: 1.2;
    font-weight: 700;
    letter-spacing: -1px;
}

h2 {
    font-size: 2.4rem;
    line-height: 1.3;
    font-weight: 700;
}

h3 {
    font-size: 1.4rem;
    line-height: 1.4;
}

h4 {
    font-size: 1.1rem;
    line-height: 1.5;
}

p {
    font-size: 0.95rem;
    line-height: 1.8;
    color: var(--text-secondary);
}

a {
    color: var(--accent-primary);
    text-decoration: none;
    transition: var(--transition-fast);
}

a:hover {
    color: var(--accent-gold);
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--accent-primary);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-gold);
}

/* ========================================
   HEADER & NAVIGATION
   ======================================== */

header {
    background: var(--bg-primary);
    padding: 1.2rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--border-light);
    box-shadow: var(--shadow-xs);
    transition: var(--transition-fast);
}

header.scrolled {
    padding: 0.8rem 0;
    box-shadow: var(--shadow-sm);
}

nav {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: none;
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    transition: var(--transition-fast);
}

.logo-icon {
    width: 42px;
    height: 42px;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    box-shadow: var(--shadow-xs);
}

.logo:hover {
    color: var(--accent-primary);
}

nav ul {
    display: flex;
    list-style: none;
    gap: 3rem;
    align-items: center;
}

nav a {
    color: var(--text-primary);
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition-fast);
    position: relative;
    letter-spacing: 0.3px;
}

nav a::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-primary);
    transition: width var(--transition-fast);
}

nav a:hover {
    color: var(--accent-primary);
}

nav a:hover::after {
    width: 100%;
}

/* Mobile Menu Toggle */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-primary);
}

@media (max-width: 768px) {
    nav ul {
        gap: 1.5rem;
    }

    nav a {
        font-size: 0.85rem;
    }

    .logo {
        font-size: 1.2rem;
    }

    .logo-icon {
        width: 36px;
        height: 36px;
    }
}

@media (max-width: 480px) {
    nav {
        padding: 0 1rem;
    }

    nav ul {
        gap: 1rem;
    }

    nav a {
        font-size: 0.8rem;
    }
}

/* ========================================
   HERO SECTION
   ======================================== */

.hero {
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    padding: 7rem 2rem;
    min-height: 720px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, var(--accent-light) 0%, transparent 70%);
    opacity: 0.15;
    top: -200px;
    right: -200px;
    border-radius: 50%;
}

.hero::after {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, var(--accent-tertiary) 0%, transparent 70%);
    opacity: 0.1;
    bottom: -150px;
    left: -100px;
    border-radius: 50%;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    text-align: center;
    animation: fadeInUp 0.8s ease-out;
}

.hero h1 {
    color: var(--text-primary);
    margin-bottom: 1.2rem;
    letter-spacing: -1.5px;
    font-weight: 700;
}

.hero-subtitle {
    font-size: 1.15rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    line-height: 1.8;
    font-weight: 400;
}

.hero-divider {
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
    margin: 1.5rem auto 2rem;
    opacity: 0;
    animation: slideInUp 0.6s ease-out 0.2s forwards;
}

.cta-button {
    display: inline-block;
    background: var(--accent-primary);
    color: white;
    padding: 1.1rem 3rem;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
    border: none;
    cursor: pointer;
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
}

.cta-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--accent-gold);
    transition: left var(--transition-fast);
    z-index: -1;
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.cta-button:hover::before {
    left: 0;
}

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

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 768px) {
    .hero {
        padding: 4rem 1.5rem;
        min-height: 500px;
    }

    .hero h1 {
        font-size: 2.2rem;
    }

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

@media (max-width: 480px) {
    .hero {
        padding: 3rem 1rem;
        min-height: 400px;
    }

    .hero h1 {
        font-size: 1.8rem;
    }

    .hero-subtitle {
        font-size: 0.9rem;
        margin-bottom: 1.5rem;
    }

    .cta-button {
        padding: 0.9rem 2rem;
        font-size: 0.85rem;
    }
}

/* ========================================
   SEARCH SECTION
   ======================================== */

.search-section {
    max-width: 700px;
    margin: 3rem auto;
    padding: 0 2rem;
}

.search-input {
    width: 100%;
    padding: 1.1rem 1.8rem;
    background: var(--bg-accent);
    border: 1.5px solid var(--border-color);
    color: var(--text-primary);
    border-radius: 4px;
    font-size: 0.95rem;
    transition: var(--transition-fast);
    font-family: inherit;
}

.search-input:focus {
    outline: none;
    border-color: var(--accent-primary);
    background: var(--bg-primary);
    box-shadow: 0 0 0 3px rgba(201, 148, 112, 0.1);
}

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

/* ========================================
   PRODUCTS SECTION
   ======================================== */

.products-section {
    max-width: 1400px;
    margin: 4rem auto;
    padding: 0 2rem;
}

.section-title {
    font-size: 2.4rem;
    text-align: center;
    margin-bottom: 0.8rem;
    color: var(--text-primary);
    font-weight: 700;
}

.section-subtitle {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 3rem;
    font-size: 1rem;
}

.section-title::after {
    content: '';
    display: block;
    width: 80px;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
    margin: 1.2rem auto 0;
}

.filters {
    display: flex;
    gap: 1rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
}

.filter-btn {
    padding: 0.8rem 1.8rem;
    background: var(--bg-accent);
    border: 1.5px solid var(--border-color);
    color: var(--text-primary);
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: var(--transition-fast);
    font-weight: 500;
    letter-spacing: 0.3px;
}

.filter-btn:hover {
    border-color: var(--accent-primary);
    background: var(--bg-primary);
}

.filter-btn.active {
    background: var(--accent-primary);
    color: white;
    border-color: var(--accent-primary);
    box-shadow: var(--shadow-sm);
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
    gap: 2.5rem;
}

.product-card {
    background: var(--bg-primary);
    border: 1px solid var(--border-light);
    border-radius: 4px;
    overflow: hidden;
    transition: var(--transition);
    cursor: pointer;
    height: 100%;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-xs);
}

.product-card:hover {
    transform: translateY(-8px);
    border-color: var(--accent-primary);
    box-shadow: var(--shadow-md);
}

.product-image {
    width: 100%;
    height: 280px;
    background: linear-gradient(135deg, var(--accent-light) 0%, var(--accent-tertiary) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(169, 141, 111, 0.3);
    font-size: 3rem;
    overflow: hidden;
    position: relative;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

.product-info {
    padding: 1.8rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.product-category {
    font-size: 0.75rem;
    color: var(--accent-primary);
    text-transform: uppercase;
    letter-spacing: 1.2px;
    margin-bottom: 0.8rem;
    font-weight: 600;
}

.product-name {
    font-size: 1.15rem;
    color: var(--text-primary);
    margin-bottom: 0.8rem;
    font-weight: 600;
    line-height: 1.4;
    flex-grow: 1;
}

.product-description {
    font-size: 0.85rem;
    color: var(--text-tertiary);
    margin-bottom: 1.2rem;
    min-height: 40px;
    line-height: 1.6;
}

.product-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--border-light);
    padding-top: 1rem;
}

.product-price {
    font-size: 1.3rem;
    color: var(--accent-primary);
    font-weight: 700;
    letter-spacing: -0.5px;
}

.product-price small {
    font-size: 0.8rem;
    color: var(--text-tertiary);
    display: block;
    margin-top: 0.2rem;
}

.add-to-cart {
    background: var(--accent-primary);
    color: white;
    border: none;
    padding: 0.7rem 1.4rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    transition: var(--transition-fast);
    letter-spacing: 0.3px;
}

.add-to-cart:hover {
    background: var(--accent-gold);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

@media (max-width: 768px) {
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 1.5rem;
    }

    .product-image {
        height: 200px;
    }

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

@media (max-width: 480px) {
    .products-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .product-info {
        padding: 1rem;
    }

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

/* ========================================
   LOADING & PAGINATION
   ======================================== */

.loading {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-secondary);
}

.spinner {
    display: inline-block;
    width: 48px;
    height: 48px;
    border: 3px solid var(--border-color);
    border-top-color: var(--accent-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

.pagination {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin: 3rem 0;
    flex-wrap: wrap;
}

.pagination button {
    padding: 0.8rem 1.5rem;
    background: var(--bg-accent);
    border: 1.5px solid var(--border-color);
    color: var(--text-primary);
    border-radius: 4px;
    cursor: pointer;
    transition: var(--transition-fast);
    font-weight: 500;
    letter-spacing: 0.3px;
}

.pagination button:hover {
    border-color: var(--accent-primary);
    background: var(--bg-primary);
}

.pagination button.active {
    background: var(--accent-primary);
    color: white;
    border-color: var(--accent-primary);
    box-shadow: var(--shadow-sm);
}

#pageInfo {
    color: var(--text-secondary);
    font-weight: 500;
}

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

footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-light);
    margin-top: 5rem;
    padding: 3.5rem 2rem 2rem;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 3rem;
    margin-bottom: 2.5rem;
}

.footer-section h4 {
    color: var(--text-primary);
    margin-bottom: 1.2rem;
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.footer-section ul {
    list-style: none;
}

.footer-section li {
    margin-bottom: 0.7rem;
}

.footer-section a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition-fast);
    font-size: 0.9rem;
}

.footer-section a:hover {
    color: var(--accent-primary);
}

.footer-bottom {
    border-top: 1px solid var(--border-light);
    padding-top: 2rem;
    text-align: center;
    color: var(--text-tertiary);
    font-size: 0.85rem;
    letter-spacing: 0.2px;
}

@media (max-width: 768px) {
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

/* ========================================
   ABOUT SECTION
   ======================================== */

.about-section {
    background: var(--bg-accent);
    padding: 4rem 2rem;
    margin: 3rem 0;
}

.about-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2.5rem;
    max-width: 1400px;
    margin: 0 auto;
}

.about-card {
    background: var(--bg-primary);
    padding: 2rem;
    border-radius: 4px;
    border: 1px solid var(--border-light);
    text-align: center;
    transition: var(--transition);
}

.about-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-sm);
    border-color: var(--accent-primary);
}

.about-card-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.about-card h3 {
    color: var(--accent-primary);
    margin-bottom: 0.8rem;
    font-size: 1.1rem;
}

.about-card p {
    font-size: 0.9rem;
}

/* ========================================
   CONTACT SECTION
   ======================================== */

.contact-section {
    max-width: 600px;
    margin: 3rem auto;
    padding: 0 2rem;
    text-align: center;
}

.contact-card {
    background: var(--bg-accent);
    padding: 2.5rem;
    border-radius: 4px;
    border: 1px solid var(--border-light);
}

.contact-card p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.contact-links {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.contact-links a {
    color: var(--accent-primary);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition-fast);
}

.contact-links a:hover {
    color: var(--accent-gold);
}

.contact-hours {
    color: var(--text-tertiary);
    font-size: 0.85rem;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-light);
}

/* ========================================
   UTILITY CLASSES
   ======================================== */

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

.text-center {
    text-align: center;
}

.mt-2 { margin-top: 2rem; }
.mb-2 { margin-bottom: 2rem; }
.mt-3 { margin-top: 3rem; }
.mb-3 { margin-bottom: 3rem; }
.p-2 { padding: 2rem; }

.hidden {
    display: none !important;
}

.fade-in {
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.scale-up {
    animation: scaleUp 0.3s ease-out;
}

@keyframes scaleUp {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* ========================================
   RESPONSIVE MOBILE MENU
   ======================================== */

@media (max-width: 768px) {
    .container {
        padding: 0 1.5rem;
    }

    .products-grid {
        gap: 1.5rem;
    }

    .footer-content {
        gap: 2rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }

    h1 {
        font-size: 1.8rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    .search-section {
        margin: 2rem auto;
    }

    .about-grid {
        grid-template-columns: 1fr;
    }

    .contact-section {
        padding: 0 1rem;
    }
}
