/* Terracottanoon - Compact Smooth Design */
/* Smaller, smoother, nicer - no arrows */

/* Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Colors - Light Mode (Default) */
:root {
    --primary: #8B4513;
    --secondary: #FAF9F6;
    --text-dark: #2C1810;
    --text-light: #6B5B47;
    --background: #FEFCF8;
    --surface: #FFFFFF;
    --border: #E8DCC6;
    --hover-bg: rgba(139, 69, 19, 0.08);
    --shadow: rgba(0, 0, 0, 0.1);
    --card-bg: #FFFFFF;
}

/* Colors - Dark Mode */
[data-theme="dark"] {
    --primary: #D4A574;
    --secondary: #2C2C2C;
    --text-dark: #E8E8E8;
    --text-light: #B8B8B8;
    --background: #1A1A1A;
    --surface: #2C2C2C;
    --border: #404040;
    --hover-bg: rgba(212, 165, 116, 0.15);
    --shadow: rgba(0, 0, 0, 0.5);
    --card-bg: #2C2C2C;
}

/* Body */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--background);
    color: var(--text-dark);
    line-height: 1.6;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Georgia', serif;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

h1 { font-size: 2.2rem; }
h2 { font-size: 1.8rem; }
h3 { font-size: 1.4rem; }

p {
    margin-bottom: 1rem;
    color: var(--text-light);
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Compact Navigation */
.navbar {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
}

.logo {
    font-family: 'Georgia', serif;
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary);
    text-decoration: none;
}

/* Compact Menu */
.nav-menu {
    display: flex;
    list-style: none;
    gap: 1.5rem;
    align-items: center;
}

.nav-menu li {
    position: relative;
}

.nav-menu a {
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    transition: all 0.2s ease;
    display: block;
    font-size: 0.9rem;
}

.nav-menu a:hover {
    color: var(--primary);
    background: var(--hover-bg);
}

/* Make top-level Categories appear non-clickable */
.categories-dropdown > a {
    cursor: default;
}

/* Smooth Dropdown */
.dropdown-content {
    display: none;
    position: absolute;
    background: var(--surface);
    min-width: 180px;
    box-shadow: 0 6px 25px rgba(0,0,0,0.12);
    border-radius: 10px;
    top: calc(100% + 6px);
    left: 0;
    border: 1px solid var(--border);
    padding: 0.5rem;
    z-index: 1000;
    opacity: 0;
    transform: translateY(-5px);
    transition: all 0.2s ease;
}

.nav-menu li:hover .dropdown-content {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.dropdown-content a {
    color: var(--text-dark);
    padding: 0.5rem 0.75rem;
    text-decoration: none;
    display: flex;
    align-items: center;
    border-radius: 6px;
    margin: 0.15rem 0;
    transition: all 0.2s ease;
    font-size: 0.85rem;
}

.dropdown-content a:hover {
    background: var(--hover-bg);
    color: var(--primary);
    transform: translateX(3px);
}

.dropdown-content a i {
    margin-right: 0.5rem;
    width: 14px;
    text-align: center;
    opacity: 0.7;
    font-size: 0.8rem;
}

.user-account-dropdown .dropdown-content {
    right: 0;
    left: auto;
    top: calc(100% + 2px);
}

/* Compact Cart Counter */
.cart-counter {
    background: var(--primary);
    color: var(--surface);
    padding: 0.2rem 0.4rem;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: bold;
    margin-left: 0.4rem;
    min-width: 18px;
    text-align: center;
}

/* Compact Buttons */
.btn {
    display: inline-block;
    padding: 0.6rem 1.2rem;
    background: var(--primary);
    color: var(--surface);
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
}

.btn:hover {
    background: #A0522D;
    transform: translateY(-1px);
}

.btn-secondary {
    background: var(--surface);
    color: var(--primary);
    border: 1px solid var(--primary);
}

.btn-secondary:hover {
    background: var(--primary);
    color: var(--surface);
}

/* Compact Cards */
.card {
    background: var(--surface);
    border-radius: 10px;
    box-shadow: 0 3px 15px rgba(0,0,0,0.08);
    padding: 1.2rem;
    transition: all 0.2s ease;
    border: 1px solid var(--border);
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(0,0,0,0.12);
}

/* Grid */
.grid {
    display: grid;
    gap: 1.2rem;
}

.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* Compact Hero Section */
.hero {
    background: linear-gradient(135deg, var(--background) 0%, var(--secondary) 100%);
    padding: 3rem 0;
    text-align: center;
}

.hero-content {
    max-width: 700px;
    margin: 0 auto;
    padding: 0 1rem;
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero p {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
}

.hero-actions {
    display: flex;
    gap: 0.8rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Compact Product Cards */
.product-image {
    width: 100%;
    height: 220px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 0.8rem;
}

.product-info {
    text-align: center;
}

.product-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.4rem;
    line-height: 1.3;
}

.product-price {
    font-size: 1.3rem;
    font-weight: bold;
    color: var(--primary);
    margin-bottom: 0.2rem;
}

.product-category {
    font-size: 0.8rem;
    color: var(--text-light);
    font-style: italic;
}

/* Smooth Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in-up {
    animation: fadeInUp 0.4s ease-out;
}

/* Utility Classes */
.text-center { text-align: center; }
.mb-sm { margin-bottom: 0.4rem; }
.mb-md { margin-bottom: 0.8rem; }
.mb-lg { margin-bottom: 1.2rem; }
.mb-xl { margin-bottom: 1.6rem; }

/* Compact Loading */
.loading {
    text-align: center;
    padding: 1.5rem;
    color: var(--text-light);
    font-style: italic;
    font-size: 0.9rem;
}

/* Compact Error */
.error {
    text-align: center;
    padding: 0.8rem;
    color: #dc3545;
    background: rgba(220, 53, 69, 0.1);
    border-radius: 6px;
    border: 1px solid rgba(220, 53, 69, 0.2);
    font-size: 0.9rem;
}

/* Dark Mode Toggle Button */
.dark-mode-toggle {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-dark);
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 36px;
}

.dark-mode-toggle:hover {
    background: var(--hover-bg);
    color: var(--primary);
    border-color: var(--primary);
}

.dark-mode-toggle i {
    transition: transform 0.3s ease;
}

[data-theme="dark"] .dark-mode-toggle {
    border-color: var(--border);
}

[data-theme="dark"] .dark-mode-toggle:hover {
    background: var(--hover-bg);
    color: var(--primary);
}

/* Responsive */
@media (max-width: 768px) {
    .navbar-content {
        flex-direction: column;
        gap: 0.8rem;
        padding: 0.8rem;
    }
    
    .nav-menu {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.8rem;
    }
    
    .nav-menu a {
        padding: 0.4rem 0.6rem;
        font-size: 0.85rem;
    }
    
    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .hero-actions .btn {
        width: 180px;
    }
    
    .dropdown-content {
        position: static;
        display: block;
        box-shadow: none;
        border: none;
        background: transparent;
        margin-top: 0.4rem;
        opacity: 1;
        transform: none;
    }
    
    .dropdown-content a {
        padding: 0.4rem 0;
        margin: 0;
        border-radius: 0;
    }
    
    .dropdown-content a:hover {
        transform: none;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 2rem 0;
    }
    
    .hero h1 {
        font-size: 1.6rem;
    }
    
    .product-image {
        height: 180px;
    }
    
    .card {
        padding: 1rem;
    }
}
