/* SomaScents Main Stylesheet */

/* Basic Reset & Font */
body {
    margin: 0;
    font-family: 'Inter', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    background: #ffffff;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    color: #333;
    line-height: 1.6;
}

/* Container */
.container {
    max-width: 1600px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 2rem;
    padding-right: 2rem;
}

/* Header */
header {
    background-color: #ffffff;
    color: #333;
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid #f0f0f0;
    backdrop-filter: blur(10px);
    background-color: rgba(255, 255, 255, 0.95);
}

header .flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

/* Logo - Left side */
header .logo {
    flex-shrink: 0;
}

header h1 {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    margin: 0;
    color: #333;
}

header h1 span {
    color: #d97706;
}

/* Navigation - Center */
header nav {
    flex: 1;
    display: flex;
    justify-content: center;
    margin: 0 2rem;
}

header nav ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 1.5rem;
    align-items: center;
}

header nav a {
    color: #333;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    font-weight: 500;
    font-size: 0.95rem;
    padding: 0.5rem 0.75rem;
    border-radius: 0.375rem;
    position: relative;
}

header nav a:hover {
    color: #d97706;
    background-color: rgba(217, 119, 6, 0.1);
}

/* Active navigation state */
header nav a.active {
    color: #d97706;
    font-weight: 600;
    transition: all 0.2s ease;
}

header nav a.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 2px;
    background-color: #d97706;
    border-radius: 1px;
    transition: all 0.2s ease;
}

header nav a {
    transition: all 0.2s ease;
}

/* Right side features */
header .nav-features {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-shrink: 0;
}

/* Search container */
.search-container {
    position: relative;
    display: flex;
    align-items: center;
    margin-right: 10px;
}

.search-icon {
    position: absolute;
    left: 15px;
    width: 18px;
    height: 18px;
    color: #6b7280;
    z-index: 11;
    pointer-events: none;
}

.search-input {
    padding: 0.75rem 1rem;
    padding-left: 2.8rem;
    border: 1px solid #d1d5db;
    border-radius: 50px;
    font-size: 0.9rem;
    width: 240px;
    background: #ffffff;
    color: #333;
    /* Removed outline: none to keep default browser outline */
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    position: relative;
    z-index: 10;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.08);
}

/* Removed focus styles to keep browser default */

.search-input::placeholder {
    color: #9ca3af;
}

/* Search suggestions dropdown */
.search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    width: 300px;
    max-height: 400px;
    overflow-y: auto;
    background-color: white;
    border: 1px solid #ddd;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    margin-top: 8px;
    scrollbar-width: thin;
    scrollbar-color: #d1d5db transparent;
}

/* Custom scrollbar for WebKit browsers */
.search-suggestions::-webkit-scrollbar {
    width: 6px;
}

.search-suggestions::-webkit-scrollbar-track {
    background: transparent;
}

.search-suggestions::-webkit-scrollbar-thumb {
    background-color: #d1d5db;
    border-radius: 6px;
}

.search-suggestion-item {
    display: flex;
    align-items: center;
    padding: 10px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.2s ease;
}

.search-suggestion-item:last-child {
    border-bottom: none;
}

.search-suggestion-item:hover {
    background-color: #f9f9f9;
}

.suggestion-image {
    width: 50px;
    height: 50px;
    margin-right: 12px;
    border-radius: 4px;
    overflow: hidden;
    flex-shrink: 0;
}

.suggestion-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.suggestion-details {
    flex: 1;
}

.suggestion-name {
    font-weight: 500;
    margin-bottom: 4px;
    color: #333;
}

.suggestion-price {
    font-size: 0.9rem;
    color: #d97706;
    font-weight: 500;
}

.no-search-results {
    padding: 15px;
    text-align: center;
    color: #666;
    font-style: italic;
}

/* Highlight effect for selected candle */
.highlight-candle {
    animation: highlight-pulse 2s ease-in-out;
    box-shadow: 0 0 0 2px #d97706;
}

@keyframes highlight-pulse {
    0% { box-shadow: 0 0 0 2px rgba(217, 119, 6, 0.3); }
    50% { box-shadow: 0 0 0 4px rgba(217, 119, 6, 0.6); }
    100% { box-shadow: 0 0 0 2px rgba(217, 119, 6, 0.3); }
}

/* Nav buttons */
header .nav-features button {
    background: none;
    border: none;
    color: #333;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 0.375rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

header .nav-features button:hover {
    background-color: rgba(217, 119, 6, 0.1);
    color: #d97706;
    transform: translateY(-1px);
}

header .nav-features svg {
    width: 1.5rem;
    height: 1.5rem;
}

/* Hide mobile menu button by default (desktop), shown only in mobile media query */
.mobile-menu-btn {
    display: none;
}

/* Mobile responsive navbar */
@media (max-width: 768px) {
    header .flex {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        padding: 1rem 0;
    }
    
    /* Category Grid Styles */
    .category-grid {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 2rem;
        margin-top: 2rem;
    }
    
    .category-card {
        background: #ffffff;
        border-radius: 1rem;
        overflow: hidden;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
        transition: all 0.3s ease;
        cursor: pointer;
    }
    
    .category-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
    }
    
    .category-image {
        height: 200px;
        overflow: hidden;
    }
    
    .category-image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: transform 0.5s ease;
    }
    
    .category-card:hover .category-image img {
        transform: scale(1.05);
    }
    
    .category-info {
        padding: 1.5rem;
        text-align: center;
    }
    
    .category-info h3 {
        margin: 0 0 0.5rem 0;
        font-size: 1.25rem;
        color: #333;
    }
    
    .category-info p {
        margin: 0 0 1rem 0;
        color: #666;
        font-size: 0.9rem;
    }
    
    .category-link {
        display: inline-block;
        padding: 0.5rem 1.5rem;
        background: linear-gradient(135deg, #d97706 0%, #92400e 100%);
        color: white;
        text-decoration: none;
        border-radius: 0.5rem;
        font-weight: 600;
        transition: all 0.3s ease;
    }
    
    .category-link:hover {
        background: linear-gradient(135deg, #b45309 0%, #78350f 100%);
        transform: translateY(-2px);
    }
    
    /* Candle Detail Modal */
    .candle-detail-modal {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.7);
        display: flex;
        align-items: center;
        justify-content: center;
        z-index: 1000;
        padding: 20px;
        overflow-y: auto;
    }
    
    .candle-detail-content {
        position: relative;
        background-color: #fff;
        border-radius: 8px;
        max-width: 900px;
        width: 100%;
        max-height: 90vh;
        overflow-y: auto;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
        animation: modalFadeIn 0.3s ease;
    }
    
    @keyframes modalFadeIn {
        from {
            opacity: 0;
            transform: translateY(-20px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
    
    .close-detail-btn {
        position: absolute;
        top: 15px;
        right: 15px;
        background: none;
        border: none;
        font-size: 24px;
        color: #333;
        cursor: pointer;
        z-index: 10;
        width: 30px;
        height: 30px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 50%;
        background-color: rgba(255, 255, 255, 0.8);
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    }
    
    .close-detail-btn:hover {
        background-color: #f0f0f0;
    }
    
    .candle-detail-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 30px;
        padding: 30px;
    }
    
    .candle-detail-image {
        position: relative;
        border-radius: 8px;
        overflow: hidden;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    }
    
    .candle-detail-image img {
        width: 100%;
        height: auto;
        display: block;
        object-fit: cover;
    }
    
    .candle-detail-info {
        display: flex;
        flex-direction: column;
        gap: 15px;
    }
    
    .candle-detail-info h2 {
        margin: 0;
        font-size: 1.8rem;
        color: #333;
    }
    
    .candle-detail-description {
        margin: 0;
        font-size: 1rem;
        color: #555;
        line-height: 1.6;
    }
    
    .candle-detail-scent {
        margin: 0;
        font-size: 1rem;
        color: #555;
    }
    
    .candle-detail-price {
        display: flex;
        align-items: center;
        gap: 10px;
        margin-top: 5px;
    }
    
    .candle-detail-price .original-price {
        text-decoration: line-through;
        color: #999;
        font-size: 1.1rem;
    }
    
    .candle-detail-price .current-price {
        font-size: 1.5rem;
        font-weight: 600;
        color: #333;
    }
    
    .candle-detail-quantity {
        display: flex;
        flex-direction: column;
        gap: 8px;
        margin-top: 10px;
    }
    
    .candle-detail-quantity label {
        font-size: 1rem;
        color: #555;
    }
    
    .quantity-controls {
        display: flex;
        align-items: center;
        max-width: 150px;
    }
    
    .quantity-btn {
        width: 36px;
        height: 36px;
        background-color: #f0f0f0;
        border: 1px solid #ddd;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1.2rem;
        cursor: pointer;
        transition: background-color 0.2s ease;
    }
    
    .quantity-btn:hover {
        background-color: #e0e0e0;
    }
    
    .quantity-btn.decrease {
        border-radius: 4px 0 0 4px;
    }
    
    .quantity-btn.increase {
        border-radius: 0 4px 4px 0;
    }
    
    #quantity {
        width: 50px;
        height: 36px;
        border: 1px solid #ddd;
        border-left: none;
        border-right: none;
        text-align: center;
        font-size: 1rem;
        padding: 0;
    }
    
    .candle-detail-actions {
        display: flex;
        gap: 15px;
        margin-top: 20px;
    }
    
    .add-to-cart-detail-btn,
    .add-to-favorites-detail-btn {
        padding: 12px 20px;
        border: none;
        border-radius: 4px;
        font-size: 1rem;
        font-weight: 500;
        cursor: pointer;
        display: flex;
        align-items: center;
        gap: 8px;
        transition: all 0.2s ease;
    }
    
    .add-to-cart-detail-btn {
        background-color: #d97706;
        color: white;
        flex: 2;
    }
    
    .add-to-cart-detail-btn:hover {
        background-color: #b45309;
    }
    
    .add-to-cart-detail-btn.added-to-cart {
        background-color: #92400e;
    }
    
    .add-to-favorites-detail-btn {
        background-color: #f0f0f0;
        color: #333;
        flex: 1;
    }
    
    .add-to-favorites-detail-btn:hover {
        background-color: #e0e0e0;
    }
    
    .add-to-favorites-detail-btn.added-to-favorites {
        background-color: #ffebee;
        color: #e57373;
    }
    
    .candle-detail-features {
        display: flex;
        gap: 20px;
        margin-top: 25px;
        padding-top: 20px;
        border-top: 1px solid #eee;
    }
    
    .feature {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 8px;
    }
    
    .feature svg {
        color: #d97706;
    }
    
    .feature span {
        font-size: 0.9rem;
        color: #555;
    }
    
    @media (max-width: 768px) {
        .candle-detail-grid {
            grid-template-columns: 1fr;
            gap: 20px;
            padding: 20px;
        }
        
        .candle-detail-content {
            max-width: 95%;
        }
        
        .candle-detail-actions {
            flex-direction: column;
        }
        
        .add-to-cart-detail-btn,
        .add-to-favorites-detail-btn {
            width: 100%;
        }
    }

    header nav {
        display: none;
    }

    header .nav-features {
        gap: 1rem;
    }

    header .nav-features button {
        padding: 0.4rem;
    }

    header .nav-features svg {
        width: 1.3rem;
        height: 1.3rem;
    }

    header h1 {
        font-size: 1.5rem;
    }

    /* Mobile menu button */
    .mobile-menu-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        background: none;
        border: none;
        color: #333;
        cursor: pointer;
        padding: 0.5rem;
        border-radius: 0.375rem;
        transition: all 0.3s ease;
    }

    .mobile-menu-btn:hover {
        background-color: rgba(217, 119, 6, 0.1);
        color: #d97706;
    }

    .mobile-menu-btn svg {
        width: 1.5rem;
        height: 1.5rem;
    }

    /* Mobile sidebar */
    .mobile-sidebar {
        position: fixed;
        top: 0;
        left: -100%;
        width: 280px;
        height: 100vh;
        background: #ffffff;
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
        z-index: 2000;
        transition: left 0.3s ease;
        overflow-y: auto;
    }

    .mobile-sidebar.open {
        left: 0;
    }

    .mobile-sidebar-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 1.5rem;
        border-bottom: 1px solid #e5e7eb;
    }

    .mobile-sidebar-header h2 {
        font-size: 1.5rem;
        font-weight: 700;
        color: #333;
        margin: 0;
    }

    .mobile-sidebar-header h2 span {
        color: #d97706;
    }

    .mobile-close-btn {
        background: none;
        border: none;
        color: #666;
        cursor: pointer;
        padding: 0.5rem;
        border-radius: 0.375rem;
        transition: all 0.3s ease;
    }

    .mobile-close-btn:hover {
        background-color: rgba(0, 0, 0, 0.1);
        color: #333;
    }

    .mobile-close-btn svg {
        width: 1.5rem;
        height: 1.5rem;
    }

    .mobile-nav {
        padding: 1rem 0;
    }

    .mobile-nav ul {
        list-style: none;
        margin: 0;
        padding: 0;
    }

    .mobile-nav li {
        border-bottom: 1px solid #f3f4f6;
    }

    .mobile-nav a {
        display: block;
        padding: 1rem 1.5rem;
        color: #333;
        text-decoration: none;
        font-weight: 500;
        transition: all 0.3s ease;
    }

    .mobile-nav a:hover {
        background-color: rgba(217, 119, 6, 0.1);
        color: #d97706;
    }

    .mobile-nav a.active {
        background-color: rgba(217, 119, 6, 0.1);
        color: #d97706;
        border-left: 3px solid #d97706;
    }

    /* Mobile dropdown */
    .mobile-dropdown {
        position: relative;
    }

    .mobile-dropdown-toggle {
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
        background: none;
        border: none;
        padding: 1rem 1.5rem;
        color: #333;
        font-weight: 500;
        cursor: pointer;
        transition: all 0.3s ease;
    }

    .mobile-dropdown-toggle:hover {
        background-color: rgba(217, 119, 6, 0.1);
        color: #d97706;
    }

    .mobile-dropdown-menu {
        display: none;
        background: #f9fafb;
        border-top: 1px solid #e5e7eb;
    }

    .mobile-dropdown-menu.open {
        display: block;
    }

    .mobile-dropdown-menu a {
        padding: 0.75rem 2rem;
        color: #666;
        font-size: 0.9rem;
    }
}