/* Base Styles & Utility Classes for Ultimate Theme */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --primary-color: #6366f1;
    --secondary-color: #8b5cf6;
    --text-dark: #1e293b;
    --text-light: #64748b;
    --bg-light: #f8fafc;
    --white: #ffffff;
    --spacing-lg: 80px;
    --spacing-md: 40px;

    /* Storefront Loaders Customization */
    --theme-loader-primary: #6366f1;
    --theme-loader-secondary: #8b5cf6;
    --theme-loader-track: rgba(99, 102, 241, 0.15);
    --theme-loader-text-color: #475569;
    --theme-loader-overlay-bg: rgba(255, 255, 255, 0.6);
    --theme-loader-backdrop: blur(5px);
    --top-loader-height: 3px;

    /* Wishlist & Badges Customization */
    --wishlist-icon-active: #ef4444;
    --wishlist-icon-inactive: #94a3b8;
    --wishlist-btn-border-active: #ef4444;
    --wishlist-btn-border-inactive: #e2e8f0;
    --badge-oos-bg: #ef4444;
    --badge-top-rated-bg: #6366f1;
    --discount-badge-bg: #ef4444;

    /* Price Colors */
    --price-color: #6366f1;
    --price-old-color: #94a3b8;

    /* Checkout Selection Customization */
    --checkout-active-border: #10b981;
    --checkout-inactive-border: #e2e8f0;
}

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background: var(--white);
    color: var(--text-dark);
    line-height: 1.6;
}

.section-spacing {
    padding: var(--spacing-lg) 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header h2 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.view-all {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
}

/* --- Topbar --- */
.topbar {
    background: #0f172a;
    color: white;
    padding: 8px 40px;
    font-size: 13px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.topbar-links a {
    color: #94a3b8;
    text-decoration: none;
    margin-left: 20px;
    transition: color 0.3s;
}

.topbar-links a:hover {
    color: white;
}

/* --- Main Header --- */
.main-header {
    padding: 20px 40px;
    background: white;
    border-bottom: 1px solid #f1f5f9;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
}

.logo {
    font-size: 1.8rem;
    font-weight: 800;
    color: #0f172a;
    text-decoration: none;
    letter-spacing: -1px;
}

.header-search {
    flex: 0 1 500px;
    display: flex;
    background: #f1f5f9;
    padding: 5px;
    border-radius: 50px;
}

.header-search input {
    flex: 1;
    background: transparent;
    border: none;
    padding: 10px 20px;
    outline: none;
}

.header-search button {
    background: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

/* --- Category Dropdown in Search Bar --- */
.search-category-selector {
    position: relative;
    flex-shrink: 0;
}

.search-category-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    background: transparent;
    border: none;
    border-right: 1.5px solid #dde3ea;
    padding: 8px 12px 8px 14px;
    cursor: pointer;
    color: #475569;
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    height: 100%;
    border-radius: 50px 0 0 50px;
    transition: background 0.2s ease, color 0.2s ease;
}

.search-category-btn:hover {
    background: rgba(0, 0, 0, 0.04);
    color: #1e293b;
}

.search-category-label {
    max-width: 90px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-category-chevron {
    font-size: 10px;
    opacity: 0.6;
    transition: transform 0.25s ease;
}

.search-category-chevron.open {
    transform: rotate(180deg);
}

.search-category-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    min-width: 200px;
    background: #ffffff;
    border-radius: 14px;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.14), 0 4px 12px rgba(0, 0, 0, 0.06);
    border: 1px solid #f1f5f9;
    z-index: 10002;
    overflow: hidden;
    padding: 6px 0;
    animation: catDropdownFadeIn 0.2s ease;
}

@keyframes catDropdownFadeIn {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
}

.search-category-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    font-size: 13.5px;
    color: #334155;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

.search-category-option:hover {
    background: #f8fafc;
    color: #0f172a;
}

.search-category-option.active {
    background: #f0f4ff;
    color: #3b5bdb;
    font-weight: 600;
}

.header-actions {
    display: flex;
    gap: 25px;
    font-size: 1.2rem;
    align-items: center;
}

.header-actions a {
    color: var(--text-dark);
    text-decoration: none;
    transition: color 0.3s;
}

.header-actions a:hover {
    color: var(--primary-color);
}

.cart-icon {
    position: relative;
    cursor: pointer;
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -12px;
    background: var(--primary-color);
    color: white;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 50%;
}

/* --- Navbar --- */
.main-navbar {
    background: white;
    border-bottom: 1px solid #f1f5f9;
}

.nav-container {
    display: flex;
    justify-content: center;
    gap: 40px;
    padding: 15px 0;
}

.nav-container a {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 600;
    font-size: 0.95rem;
    transition: color 0.3s;
}

.nav-container a:hover {
    color: var(--primary-color);
}

/* --- Footer --- */
.main-footer {
    background: #0f172a;
    color: #94a3b8;
    padding: 80px 40px 40px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 80px;
    max-width: 1200px;
    margin: 0 auto;
}

.footer-shop-info .logo {
    color: white;
    margin-bottom: 20px;
}

.footer-links h4,
.footer-social h4 {
    color: white;
    margin-bottom: 25px;
}

.footer-links a {
    display: block;
    color: #94a3b8;
    text-decoration: none;
    margin-bottom: 12px;
}

.footer-bottom {
    margin-top: 80px;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    font-size: 0.85rem;
}
