* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #ff6b6b;
    --secondary-color: #4ecdc4;
    --dark-color: #2c3e50;
    --light-color: #f8f9fa;
    --border-radius: 8px;
    --box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background: #f5f5f5;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.container-fluid {
    max-width: 100%;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    gap: 2rem;
}

/* ============= TOP INFO BAR ============= */
.top-bar {
    background: linear-gradient(90deg, rgba(255,107,107,0.1), rgba(78,205,196,0.08));
    border-bottom: 1px solid rgba(0,0,0,0.08);
    font-size: 0.85rem;
    color: #333;
}

.top-bar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
}

.top-bar-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.top-bar-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.top-bar-link {
    cursor: pointer;
    color: #333;
    opacity: 0.8;
    transition: opacity 0.2s ease;
}

.top-bar-link:hover {
    opacity: 1;
}

.top-bar-divider {
    color: rgba(0,0,0,0.4);
}

/* ============= TOP HEADER WITH SEARCH ============= */
.top-header {
    background: white;
    padding: 1.2rem 0;
    box-shadow: var(--box-shadow);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 2px solid #f0f0f0;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ============= CATEGORIES LIST ============= */
.category-list {
    width: 280px;
    background: #fff;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-height: calc(100vh - 240px);
    overflow-y: auto;
}

.category-list-header {
    border-bottom: 1px solid rgba(0,0,0,0.08);
    padding-bottom: 0.75rem;
    margin-bottom: 0.75rem;
}

.category-list-header h3 {
    font-size: 1.1rem;
    margin: 0;
    font-weight: 700;
}

.category-items {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.category-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.75rem;
    border-radius: 12px;
    border: 1px solid rgba(0,0,0,0.08);
    background: #fdfdfd;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
    font-weight: 600;
    color: #222;
}

.category-item i {
    font-size: 1.2rem;
}

.category-item:hover {
    background: rgba(255, 107, 107, 0.08);
    border-color: rgba(255, 107, 107, 0.25);
}

/* ============= HERO SEARCH SECTION ============= */
.hero-search {
    background: linear-gradient(90deg, rgba(255,107,107,0.12), rgba(78,205,196,0.1));
    padding: 2.5rem 0 2rem;
}

/* ============= WELCOME BANNER ============= */
.welcome-banner {
    background: white;
    padding: 2.5rem 0;
    border-bottom: 1px solid rgba(0,0,0,0.08);
}

.welcome-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

#welcomeTitle {
    font-size: 2.4rem;
    font-weight: 800;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
}

#welcomeSubtitle {
    font-size: 1.1rem;
    color: rgba(0,0,0,0.65);
}

.hero-search-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.hero-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.hero-nav-left {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.hero-logo {
    font-size: 1.6rem;
    font-weight: 900;
    color: var(--primary-color);
    letter-spacing: 0.05rem;
    margin-right: 1rem;
}

.hero-tab {
    font-weight: 700;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    cursor: pointer;
    color: rgba(0,0,0,0.75);
    transition: all 0.2s ease;
}

.hero-tab:hover {
    background: rgba(255, 107, 107, 0.12);
}

.hero-tab.active {
    background: rgba(255, 107, 107, 0.2);
    color: var(--primary-color);
}

.hero-nav-right {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.hero-nav-link {
    font-size: 0.9rem;
    color: rgba(0,0,0,0.65);
    cursor: pointer;
    padding: 0.35rem 0.6rem;
    border-radius: 999px;
    transition: background 0.2s ease;
}

.hero-nav-link:hover {
    background: rgba(0,0,0,0.06);
}

.hero-search-box {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    align-items: center;
}

.hero-search-input {
    flex: 1 1 600px;
    display: flex;
    border: 2px solid rgba(255, 107, 107, 0.6);
    border-radius: 50px;
    overflow: hidden;
    background: white;
}

.hero-search-input input {
    flex: 1;
    border: none;
    padding: 1rem 1.2rem;
    font-size: 1.05rem;
    outline: none;
}

.hero-search-input button {
    background: var(--primary-color);
    border: none;
    padding: 0 1.5rem;
    color: white;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s ease;
}

.hero-search-input button:hover {
    background: #ff5252;
}

.image-search-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: white;
    border: 1px solid rgba(0,0,0,0.12);
    border-radius: 50px;
    padding: 0.8rem 1.1rem;
    cursor: pointer;
    font-weight: 700;
    color: #333;
    transition: all 0.2s ease;
}

.image-search-btn:hover {
    background: rgba(255,255,255,0.9);
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

.logo {
    display: flex;
    flex-direction: column;
    min-width: 150px;
}

.logo h1 {
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-bottom: 0.2rem;
    font-weight: 700;
}

.logo p {
    font-size: 0.75rem;
    color: #999;
}

.search-bar {
    flex: 1;
    max-width: 600px;
    display: flex;
    background: #f0f0f0;
    border-radius: var(--border-radius);
    overflow: hidden;
}

.search-bar input {
    flex: 1;
    border: none;
    padding: 0.8rem 1rem;
    background: transparent;
    font-size: 1rem;
}

.search-bar input::placeholder {
    color: #999;
}

.search-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.search-btn:hover {
    background: #ff5252;
}

.header-icons {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.icon-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    position: relative;
    cursor: pointer;
    font-size: 0.85rem;
    color: #333;
}

.icon-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #333;
    position: relative;
    transition: color 0.3s ease;
}

.icon-btn:hover {
    color: var(--primary-color);
}

.badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
}

.btn-primary-small {
    background: var(--primary-color);
    color: white;
    padding: 0.6rem 1rem;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-size: 0.9rem;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary-small:hover {
    background: #ff5252;
}

/* Responsive layout adjustment */
@media (max-width: 960px) {
    .container-fluid {
        flex-direction: column;
    }

    .category-list {
        width: 100%;
        max-height: none;
    }

    .products-section {
        width: 100%;
    }
}

/* Account Menu */
.account-menu {
    position: relative;
}

.account-btn {
    background: none;
    border: none;
    color: #333;
    cursor: pointer;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: color 0.3s ease;
}

.account-btn:hover {
    color: var(--primary-color);
}

.account-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    min-width: 180px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    display: none;
}

/* Show dropdown on hover (desktop) */
.account-menu:hover .account-dropdown {
    display: block;
}

.account-dropdown.show {
    display: block;
}

.dropdown-item {
    display: block;
    padding: 0.75rem 1rem;
    color: #333;
    text-decoration: none;
    border-bottom: 1px solid #f0f0f0;
    transition: all 0.3s ease;
}

.dropdown-item:last-child {
    border-bottom: none;
}

.dropdown-item:hover {
    background: #f5f5f5;
    color: var(--primary-color);
}

.dropdown-item i {
    margin-right: 0.5rem;
}

/* ============= CATEGORY NAVIGATION ============= */
.category-nav {
    background: white;
    border-bottom: 1px solid #f0f0f0;
    padding: 0.5rem 0;
    position: sticky;
    top: 80px;
    z-index: 99;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        max-height: 0;
        overflow: hidden;
    }
    to {
        opacity: 1;
        max-height: 100px;
        overflow: visible;
    }
}

.categories {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.categories::-webkit-scrollbar {
    height: 4px;
}

.categories::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.categories::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.category-btn {
    background: none;
    border: none;
    padding: 0.8rem 1.5rem;
    cursor: pointer;
    font-size: 0.95rem;
    white-space: nowrap;
    color: #666;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
}

.category-btn:hover,
.category-btn.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.category-btn i {
    margin-right: 0.5rem;
}

/* ============= HERO CAROUSEL ============= */
.hero-carousel {
    background: white;
    margin-bottom: 2rem;
}

.carousel-container {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    height: 300px;
    overflow: hidden;
    border-radius: var(--border-radius);
}

.carousel-slides {
    display: flex;
    height: 100%;
    animation: slide 4s infinite;
}

@keyframes slide {
    0% { transform: translateX(0); }
    90% { transform: translateX(0); }
    100% { transform: translateX(-100%); }
}

.carousel-slide {
    min-width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--dark-color), #34495e);
    color: white;
    text-align: center;
    padding: 2rem;
}

.carousel-slide h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.carousel-slide p {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 107, 107, 0.8);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
}

.carousel-btn:hover {
    background: var(--primary-color);
    transform: translateY(-50%) scale(1.1);
}

.carousel-btn.prev {
    left: 10px;
}

.carousel-btn.next {
    right: 10px;
}

.carousel-dots {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.5rem;
    z-index: 10;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
}

.dot.active {
    background: white;
    width: 30px;
    border-radius: 6px;
}

/* ============= MAIN CONTENT ============= */
.main-content {
    background: #f5f5f5;
    padding: 2rem 0;
    min-height: 600px;
}

/* ============= SIDEBAR FILTERS ============= */
.sidebar-filters {
    width: 250px;
    background: white;
    padding: 1.5rem;
    border-radius: var(--border-radius);
    height: fit-content;
    position: sticky;
    top: 150px;
}

.filter-section {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #f0f0f0;
}

.filter-section:last-child {
    border-bottom: none;
}

.filter-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.filter-subtitle {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #333;
}

.price-filter {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.price-slider {
    width: 100%;
    cursor: pointer;
}

.price-display {
    font-size: 0.9rem;
    color: #666;
    text-align: center;
}

.rating-filter {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.filter-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.9rem;
}

.filter-label input {
    cursor: pointer;
}

/* ============= PRODUCTS SECTION ============= */
.products-section {
    flex: 1;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.section-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
}

.sort-options {
    display: flex;
    gap: 0.5rem;
}

#sortBy {
    padding: 0.6rem 1rem;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    background: white;
    cursor: pointer;
    font-size: 0.9rem;
}

.products-grid-wrapper {
    position: relative;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
    max-height: 72vh;
    overflow: auto;
    padding-right: 0.5rem;
}

.products-grid::-webkit-scrollbar {
    width: 10px;
}

.products-grid::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.15);
    border-radius: 10px;
}

.products-grid-controls {
    position: absolute;
    top: 10px;
    right: 10px;
    display: grid;
    grid-template-columns: repeat(2, 36px);
    grid-template-rows: repeat(2, 36px);
    gap: 8px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
    pointer-events: none;
}

/* Show navigation buttons only when hovering over the product grid wrapper */
.products-grid-wrapper:hover .products-grid-controls {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.grid-nav-btn {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    border: 1px solid rgba(0,0,0,0.12);
    background: rgba(255,255,255,0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    pointer-events: auto;
    transition: all 0.2s ease;
}

.grid-nav-btn:hover {
    background: rgba(255,255,255,1);
    box-shadow: 0 3px 12px rgba(0,0,0,0.12);
}

.grid-nav-btn i {
    font-size: 0.9rem;
    color: var(--dark-color);
}

.product-card {
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
}

/* Highlight effect for product when opened in category view */
.product-highlight {
    animation: highlightPulse 1s ease-in-out 0s 3;
    box-shadow: 0 8px 30px rgba(255, 107, 107, 0.25) !important;
    border: 2px solid rgba(255, 107, 107, 0.15);
}

@keyframes highlightPulse {
    0% { transform: translateY(-3px) scale(1.01); }
    50% { transform: translateY(-6px) scale(1.02); }
    100% { transform: translateY(-3px) scale(1.01); }
}

.product-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: #f0f0f0;
}

.product-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.product-info {
    padding: 1rem;
}

.product-category {
    font-size: 0.8rem;
    color: var(--primary-color);
    font-weight: 600;
    text-transform: uppercase;
}

.product-name {
    font-size: 1rem;
    font-weight: 600;
    margin: 0.5rem 0;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.product-description {
    font-size: 0.85rem;
    color: #666;
    margin: 0.5rem 0;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
}

.product-price {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin: 0.8rem 0;
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    margin-bottom: 0.8rem;
}

.product-rating .stars {
    color: #ffc107;
}

.product-card-header {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 10;
}

.favorite-icon-btn {
    background: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    transition: all 0.3s ease;
    font-size: 1.2rem;
    color: #666;
}

.favorite-icon-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.favorite-icon-btn.active {
    color: #ff6b6b;
}

.favorite-icon-btn.active i {
    animation: heartBeat 0.5s ease;
}

@keyframes heartBeat {
    0%, 100% { transform: scale(1); }
    25% { transform: scale(1.3); }
    50% { transform: scale(1.1); }
}

.product-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

.btn-cart {
    background: var(--secondary-color);
    color: white;
    border: none;
    padding: 0.7rem 1rem;
    border-radius: var(--border-radius);
    cursor: pointer;
    flex: 1;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-cart:hover {
    background: #3db8af;
    transform: translateY(-2px);
}

.btn-view {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.7rem 1rem;
    border-radius: var(--border-radius);
    cursor: pointer;
    flex: 1;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-view:hover {
    background: #ff5252;
    transform: translateY(-2px);
}

.load-more-container {
    text-align: center;
    margin-top: 2rem;
    margin-bottom: 2rem;
}

.btn-secondary {
    background: var(--secondary-color);
    color: white;
    padding: 0.8rem 2rem;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: #3db8b0;
}

/* ============= BUTTONS ============= */
.btn {
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: #ff5252;
}

/* ============= PRODUCT MODAL ============= */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: white;
    border-radius: var(--border-radius);
    width: 90%;
    max-width: 900px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid #f0f0f0;
}

.back-button {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    color: #333;
    transition: color 0.3s ease;
}

.back-button:hover {
    color: var(--primary-color);
}

.close-modal {
    font-size: 2rem;
    cursor: pointer;
    color: #999;
    transition: color 0.3s ease;
}

.close-modal:hover {
    color: #333;
}

.modal-body {
    padding: 2rem;
    display: flex;
    gap: 2rem;
}

.modal-image {
    flex: 1;
    min-width: 300px;
}

.modal-image img {
    width: 100%;
    height: auto;
    border-radius: var(--border-radius);
}

.modal-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.modal-info h2 {
    font-size: 1.5rem;
    font-weight: 700;
}

.modal-rating {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.modal-info .price {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-color);
}

.modal-actions {
    display: flex;
    gap: 1rem;
}

.modal-actions input {
    width: 80px;
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
}

.modal-actions .btn {
    flex: 1;
}

.modal-footer {
    display: flex;
    gap: 1rem;
    padding: 1.5rem;
    border-top: 1px solid #f0f0f0;
    background: #f9f9f9;
    flex-wrap: wrap;
}

.modal-footer-btn {
    flex: 1;
    min-width: 150px;
    padding: 0.8rem 1rem;
    border: 2px solid #ddd;
    background: white;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.modal-footer-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.modal-footer-btn.favorite-btn:hover,
.modal-footer-btn.favorite-btn.active {
    border-color: #e74c3c;
    color: #e74c3c;
}

.modal-footer-btn.favorite-btn.active {
    background: #ffe6e6;
}

/* ============= CART & FAVORITES PANELS ============= */
.cart-panel,
.favorites-panel {
    position: fixed;
    right: -400px;
    top: 0;
    width: 400px;
    height: 100vh;
    background: white;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
    z-index: 1001;
    display: flex;
    flex-direction: column;
    transition: right 0.3s ease;
    overflow-y: auto;
}

/* ============= CATEGORY SIDEBAR ============= */
.category-sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: 280px;
    background: #fff;
    box-shadow: 2px 0 12px rgba(0,0,0,0.08);
    z-index: 1002;
    padding: 1.2rem;
    overflow-y: auto;
    transform: translateX(-100%);
    transition: transform 0.28s ease;
}

.category-sidebar.show {
    transform: translateX(0);
}

.close-sidebar-btn {
    background: none;
    border: none;
    font-size: 1.6rem;
    float: right;
    cursor: pointer;
    color: #999;
}

.category-sidebar h3 {
    margin-top: 0.4rem;
    margin-bottom: 0.8rem;
    color: var(--dark-color);
}

.sidebar-categories {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.sidebar-categories li {
    padding: 0.8rem 0.6rem;
    border-radius: 6px;
    cursor: pointer;
    color: #333;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.sidebar-categories li:hover {
    background: #f5f5f5;
    color: var(--primary-color);
}

.sidebar-overlay {
    position: fixed;
    left: 0;
    top: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.35);
    z-index: 1001;
}

.cart-panel.active,
.favorites-panel.active {
    right: 0;
}

.cart-header,
.favorites-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid #f0f0f0;
}

.close-panel-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #999;
    transition: color 0.3s ease;
}

.close-panel-btn:hover {
    color: #333;
}

.cart-items,
.favorites-items {
    flex: 1;
    padding: 1rem;
    overflow-y: auto;
}

.empty-message {
    text-align: center;
    color: #999;
    padding: 2rem 1rem;
}

.cart-footer {
    padding: 1.5rem;
    border-top: 1px solid #f0f0f0;
}

/* ============= FOOTER ============= */
.footer {
    background: var(--dark-color);
    color: white;
    padding: 3rem 0 1rem;
    margin-top: 3rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h4 {
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: #bbb;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: var(--primary-color);
}

.footer-bottom {
    border-top: 1px solid #444;
    padding-top: 1rem;
    text-align: center;
    color: #999;
}

/* ============= RESPONSIVE ============= */
@media (max-width: 1024px) {
    .container-fluid {
        flex-direction: column;
    }

    .sidebar-filters {
        width: 100%;
        position: relative;
        top: auto;
    }

    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    }

    .modal-body {
        flex-direction: column;
    }

    .carousel-container {
        height: 250px;
    }

    .carousel-slide h2 {
        font-size: 2rem;
    }
}

@media (max-width: 768px) {
    .header-content {
        gap: 1rem;
        flex-wrap: wrap;
    }

    .search-bar {
        max-width: 100%;
        flex: 1;
        min-width: 100%;
    }

    .header-icons {
        gap: 1rem;
        order: 3;
        width: 100%;
        justify-content: space-around;
    }

    .logo {
        min-width: auto;
    }

    .logo h1 {
        font-size: 1.4rem;
    }

    .categories {
        padding: 0 10px;
    }

    .category-btn {
        padding: 0.6rem 1rem;
        font-size: 0.85rem;
    }

    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 1rem;
    }

    .modal-body {
        padding: 1rem;
    }

    .modal-footer {
        flex-direction: column;
    }

    .modal-footer-btn {
        width: 100%;
    }

    .carousel-container {
        height: 200px;
    }

    .carousel-slide h2 {
        font-size: 1.5rem;
    }

    .carousel-slide p {
        font-size: 1rem;
    }

    .cart-panel,
    .favorites-panel {
        width: 100%;
        right: -100%;
    }
}

@media (max-width: 600px) {
    .logo h1 {
        font-size: 1.2rem;
    }

    .logo p {
        display: none;
    }

    .search-bar input {
        padding: 0.6rem 0.8rem;
        font-size: 0.9rem;
    }

    .search-btn {
        padding: 0.6rem 1rem;
    }

    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 0.8rem;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
    }

    #sortBy {
        width: 100%;
    }

    .modal-image {
        min-width: auto;
    }

    .modal-actions {
        flex-direction: column;
    }

    .modal-actions input {
        width: 100%;
    }

    .carousel-container {
        height: 150px;
    }

    .carousel-slide h2 {
        font-size: 1.2rem;
    }

    .carousel-slide p {
        display: none;
    }
}
