
/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

:root {
    --primary: #ff6b00;
    --primary-dark: #e65c00;
    --primary-light: #ff8533;
    --secondary: #ff9800;
    --dark: #333333;
    --light: #fff8f2;
    --gray: #a0a0a0;
    --gray-light: #f5f5f5;
    --section-bg: #faf9f7;
    --success: #27ae60;
    --danger: #e74c3c;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-light: 0 2px 6px rgba(0, 0, 0, 0.05);
}

body {
    color: #333;
    background-color: #f5f5f5;
    line-height: 1.6;
    scroll-behavior: smooth;
}

a {
    text-decoration: none;
    color: inherit;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.btn {
    display: inline-block;
    padding: 10px 20px;
    background-color: var(--primary);
    color: white;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    font-size: 0.95rem;
}

.btn:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.btn-secondary {
    background-color: var(--secondary);
}

.btn-secondary:hover {
    background-color: #e68900;
}

.btn-small {
    padding: 8px 15px;
    font-size: 0.85rem;
}

/* Scroll to Top Button */
.scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background-color: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    cursor: pointer;
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(255, 107, 0, 0.3);
    border: none;
}

.scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.scroll-to-top:hover {
    background-color: var(--primary-dark);
    transform: translateY(-5px);
    box-shadow: 0 6px 16px rgba(255, 107, 0, 0.4);
}


/* Featured Section */
.section-header {
    margin: 10px;
    font-size: 1.8rem;
    color: var(--dark);
    position: relative;
    padding-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.section-header:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 80px;
    height: 3px;
    background-color: var(--primary);
}

.section-header a {
    color: var(--primary);
    font-size: 1rem;
    font-weight: 600;
}

.section-header a:hover {
    text-decoration: underline;
}

.featured-container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
    margin-bottom: 40px;
}

/* Featured Items */
.featured-items {
    display: grid;
    grid-template-rows: 1fr 1fr;
    gap: 20px;
}

.featured-item {
    background-color: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
    display: flex;
    transition: transform 0.3s ease;
}

.featured-item:hover {
    transform: translateY(-5px);
}

.featured-item img {
    width: 120px;
    height: 100%;
    object-fit: cover;
}

.item-content {
    padding: 12px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex-grow: 1;
}

.item-content a{
    align-items: center;
    text-align: center;
}

.item-content h3 {
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: var(--dark);
}

/* Section Background */
.section-with-bg {
    background-color: var(--section-bg);
    padding: 10px;
    border-radius: 15px;
    margin-bottom: 40px;
    box-shadow: var(--shadow-light);
}

/* Top Featured Section */
.top-featured-container {
    margin-bottom: 10px;
}

/* Category Sections */
.category-section {
    margin-bottom: 10px;
}

.category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.category-title {
    font-size: 1.5rem;
    color: var(--dark);
    position: relative;
}

.category-title:after {
    content: '';
    position: absolute;
    bottom: -11px;
    left: 0;
    width: 60px;
    height: 3px;
    background-color: var(--primary);
}


/* Why Us Section */
.why-us-section {
    background-color: white;
    padding: 60px 0;
    margin-bottom: 50px;
}

.why-us-container {
    text-align: center;
}

.why-us-title {
    font-size: 2.2rem;
    color: var(--dark);
    margin-bottom: 50px;
    position: relative;
    display: inline-block;
}

.why-us-title:after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 4px;
    background-color: var(--primary);
    border-radius: 2px;
}

.why-us-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

.why-us-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    transition: transform 0.3s ease;
}

.why-us-item:hover {
    transform: translateY(-10px);
}

.why-us-image {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    overflow: hidden;
    margin-bottom: 20px;
    border: 3px solid var(--primary-light);
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--light);
}

.why-us-image img {
    width: 80%;
    height: 80%;
    object-fit: contain;
}

.why-us-item h3 {
    font-size: 1.3rem;
    color: var(--dark);
    margin-bottom: 10px;
}

.why-us-item p {
    color: var(--gray);
    font-size: 0.95rem;
    line-height: 1.5;
}

/* Browsing History Section */
.browsing-history-section {
    margin-bottom: 60px;
}

.browsing-history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.browsing-history-title {
    font-size: 1.6rem;
    color: var(--dark);
    position: relative;
    padding-bottom: 10px;
}

.browsing-history-title:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background-color: var(--primary);
}

.clear-history-btn {
    background-color: transparent;
    color: var(--gray);
    border: 1px solid var(--gray);
    padding: 8px 15px;
    border-radius: 4px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.clear-history-btn:hover {
    background-color: #ffeded;
    color: var(--danger);
    border-color: var(--danger);
}

.browsing-history-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 15px;
}

.history-item {
    background-color: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow-light);
    transition: transform 0.3s ease;
    cursor: pointer;
}

.history-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
}

.history-img {
    width: 100%;
    height: 120px;
    object-fit: cover;
}

.history-info {
    padding: 12px;
}

.history-title {
    font-size: 0.9rem;
    color: var(--dark);
    margin-bottom: 5px;
    height: 40px;
    overflow: hidden;
}

.history-price {
    color: var(--primary);
    font-weight: 700;
    font-size: 1rem;
}

.viewed-time {
    font-size: 0.75rem;
    color: var(--gray);
    margin-top: 5px;
}

/* Footer */


/* Responsive Styles */
@media (max-width: 992px) {
    .featured-container {
        grid-template-columns: 1fr;
    }
    
    
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .section-with-bg {
        padding: 10px;
    }
    
    .why-us-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
    }
    
    .browsing-history-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .scroll-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
        font-size: 1rem;
    }
}

@media (max-width: 768px) {
    .header-content {
        flex-wrap: wrap;
    }
    
    .search-bar {
        order: 2;
        max-width: 100%;
        margin: 15px 0 0;
    }
    
    .nav-list {
        justify-content: flex-start;
        gap: 10px;
        min-width: 750px;
    }
    
    .add-cart-overlay {
        opacity: 1; /* Keep it visible on mobile */
    }
    
    .section-with-bg {
        padding: 10px;
        margin-left: -10px;
        margin-right: -10px;
        border-radius: 10px;
    }
    
    .why-us-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .browsing-history-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    /* Sticky navigation adjustments for mobile */
    .category-nav.sticky .nav-list {
        justify-content: flex-start;
        gap: 8px;
    }
    
    .category-nav.sticky .nav-item {
        padding: 6px 10px;
    }
    
    .category-nav.sticky .nav-item img {
        width: 40px;
        height: 40px;
        margin-right: 6px;
    }
    
    .category-nav.sticky .nav-item span {
        font-size: 0.75rem;
    }
}

@media (max-width: 576px) {
    
    .footer-content {
        grid-template-columns: 1fr;
    }
    
    .featured-item {
        flex-direction: column;
    }
    
    .featured-item img {
        width: 100%;
        height: 150px;
    }
    
    .carousel {
        height: 300px;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .section-header a {
        margin-top: 10px;
    }
    
    .browsing-history-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .why-us-item {
        padding: 15px;
    }
    
    .why-us-image {
        width: 100px;
        height: 100px;
    }
    
    .scroll-to-top {
        bottom: 15px;
        right: 15px;
        width: 40px;
        height: 40px;
        font-size: 0.9rem;
    }
}

@media (max-width: 400px) {
    .section-with-bg {
        padding: 10px;
        margin-left: -5px;
        margin-right: -5px;
    }
    
    .browsing-history-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .nav-list {
        min-width: 700px;
    }
}