/* ==========================================
   DESIGN SYSTEM & VARIABLES
   ========================================== */
:root {
    --primary-orange: #ff6a00;
    --orange-light: #fff3eb;
    --text-dark: #1f1f1f;
    --text-muted: #777777;
    --white: #ffffff;
    --border: #eeeeee;
    --background: #f8f8f8;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    --shadow-hover: 0 6px 16px rgba(255, 106, 0, 0.12);
    --transition: all 0.25s ease-in-out;
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'SolaimanLipi', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--background);
    color: var(--text-dark);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

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

ul {
    list-style: none;
}

/* ==========================================
   HEADER STYLING
   ========================================== */
.site-header {
    background: var(--white);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow);
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.mobile-menu-toggle {
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
}

.header-logo img {
    height: 34px;
    width: auto;
    object-fit: contain;
    display: block;
}

.desktop-nav {
    display: none;
}

.desktop-nav a {
    margin: 0 16px;
    font-weight: 500;
    font-size: 15px;
    color: var(--text-dark);
    transition: var(--transition);
}

.desktop-nav a:hover, .desktop-nav a.active {
    color: var(--primary-orange);
}

.header-cart {
    position: relative;
    display: flex;
    align-items: center;
}

.header-cart a {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
}

.cart-badge {
    position: absolute;
    top: -4px;
    right: -6px;
    background: var(--primary-orange);
    color: var(--white);
    font-size: 10px;
    font-weight: 700;
    height: 18px;
    width: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ==========================================
   MOBILE SIDE DRAWER
   ========================================== */
.drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1100;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.drawer-overlay.active {
    opacity: 1;
    visibility: visible;
}

.mobile-drawer {
    position: fixed;
    top: 0;
    left: -300px;
    width: 280px;
    height: 100%;
    background: var(--white);
    z-index: 1200;
    box-shadow: 4px 0 20px rgba(0,0,0,0.1);
    transition: left 0.3s ease-in-out;
    display: flex;
    flex-direction: column;
}

.mobile-drawer.active {
    left: 0;
}

.drawer-header {
    padding: 16px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.drawer-header img {
    height: 28px;
    object-fit: contain;
}

.drawer-close {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.drawer-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
}

.drawer-section {
    margin-bottom: 20px;
}

.drawer-title {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    margin-bottom: 8px;
    text-transform: uppercase;
}

.drawer-list li a {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-dark);
    border-radius: 6px;
    transition: var(--transition);
}

.drawer-list li a svg {
    margin-right: 12px;
    flex-shrink: 0;
}

.drawer-list li a:hover, .drawer-list li a.active {
    background: var(--orange-light);
    color: var(--primary-orange);
}

/* ==========================================
   MAIN CONTAINER & CARD BOXES
   ========================================== */
.main-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 16px;
}

.card-box {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 16px;
    box-shadow: var(--shadow);
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.section-title {
    font-size: 17px;
    font-weight: 700;
    color: var(--text-dark);
}

.section-action {
    font-size: 13px;
    font-weight: 600;
    color: var(--primary-orange);
    transition: var(--transition);
}

.section-action:hover {
    text-decoration: underline;
}

/* ==========================================
   BANNER CAROUSEL
   ========================================== */
.banner-section {
    margin-bottom: 16px;
}

.banner-carousel {
    position: relative;
    width: 100%;
    aspect-ratio: 981 / 363;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
    background: #eee;
}

.banner-track {
    display: flex;
    height: 100%;
    transition: transform 0.4s ease-in-out;
}

.banner-slide {
    min-width: 100%;
    height: 100%;
}

.banner-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.banner-dots {
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
}

.banner-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    transition: var(--transition);
}

.banner-dot.active {
    background: var(--primary-orange);
    width: 16px;
    border-radius: 3px;
}

/* ==========================================
   OUR COMMUNITY SECTION
   ========================================== */
.community-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.community-card {
    aspect-ratio: 1 / 1;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.community-card:hover {
    border-color: var(--primary-orange);
    background: var(--orange-light);
    transform: translateY(-2px);
}

/* ==========================================
   POPULAR CATEGORIES
   ========================================== */
.category-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.category-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
}

.category-card:hover {
    border-color: var(--primary-orange);
    box-shadow: var(--shadow-hover);
}

.category-img-wrap {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    overflow: hidden;
    margin-bottom: 8px;
    background: var(--background);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
}

.category-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.category-name {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-dark);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.load-more-container {
    text-align: center;
    margin-top: 16px;
}

.btn-load-more {
    background: var(--orange-light);
    color: var(--primary-orange);
    border: 1px solid var(--primary-orange);
    padding: 8px 20px;
    font-size: 13px;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition);
}

.btn-load-more:hover {
    background: var(--primary-orange);
    color: var(--white);
}

/* ==========================================
   POPULAR PRODUCTS (MOBILE 3-COLUMN)
   ========================================== */
.product-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.product-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 6px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    cursor: pointer;
    position: relative;
    transition: var(--transition);
}

.product-card:hover {
    border-color: var(--primary-orange);
    box-shadow: var(--shadow-hover);
}

.product-img-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    background: var(--background);
    overflow: hidden;
}

.product-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: opacity 0.3s ease;
}

.badge-free-delivery {
    position: absolute;
    top: 4px;
    left: 4px;
    background: var(--primary-orange);
    color: var(--white);
    font-size: 9px;
    font-weight: 700;
    padding: 2px 5px;
    border-radius: 3px;
    z-index: 2;
}

.badge-discount {
    position: absolute;
    top: 4px;
    right: 4px;
    background: #e53935;
    color: var(--white);
    font-size: 9px;
    font-weight: 700;
    padding: 2px 5px;
    border-radius: 3px;
    z-index: 2;
}

.product-info {
    padding: 8px;
    display: flex;
    flex-direction: column;
    flex: 1;
    justify-content: space-between;
}

.product-title {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.3;
}

.product-price-box {
    margin-bottom: 6px;
}

.current-price {
    font-size: 12px;
    font-weight: 700;
    color: var(--primary-orange);
    margin-right: 4px;
}

.old-price {
    font-size: 10px;
    color: var(--text-muted);
    text-decoration: line-through;
}

.saving-text {
    font-size: 9px;
    color: #2e7d32;
    margin-bottom: 6px;
    font-weight: 500;
}

.btn-order {
    background: var(--orange-light);
    color: var(--primary-orange);
    border: 1px solid var(--primary-orange);
    width: 100%;
    padding: 5px 0;
    font-size: 11px;
    font-weight: 700;
    border-radius: 4px;
    cursor: pointer;
    text-align: center;
    transition: var(--transition);
}

.btn-order:hover {
    background: var(--primary-orange);
    color: var(--white);
}

/* ==========================================
   YOUTUBE CHANNEL SECTION STYLING
   ========================================== */
.yt-channel-banner-wrap {
    width: 100%;
    aspect-ratio: 981 / 363;
    border-radius: 8px;
    overflow: hidden;
    background: #eee;
    margin-bottom: 12px;
}

.yt-banner-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.yt-channel-profile-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 12px;
}

.yt-channel-info-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.yt-channel-logo {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border);
}

.yt-channel-name {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-dark);
}

.yt-channel-username {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 500;
}

.yt-subscribe-btn {
    background: #ff0000;
    color: var(--white);
    padding: 8px 20px;
    font-size: 14px;
    font-weight: 700;
    border-radius: 20px;
    transition: var(--transition);
    display: inline-block;
}

.yt-subscribe-btn:hover {
    background: #cc0000;
}

.yt-videos-header {
    margin-bottom: 12px;
}

.yt-videos-grid {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 16px;
}

.yt-video-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    transition: var(--transition);
}

.yt-video-card:hover {
    border-color: var(--primary-orange);
    box-shadow: var(--shadow-hover);
}

.yt-video-embed-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
    cursor: pointer;
    overflow: hidden;
}

.yt-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.yt-play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    transition: var(--transition);
}

.yt-video-embed-wrap:hover .yt-play-btn {
    background: var(--white);
    transform: translate(-50%, -50%) scale(1.1);
}

.yt-video-info {
    padding: 10px 12px;
}

.yt-video-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dark);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ==========================================
   SKELETON LOADERS
   ========================================== */
@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.skeleton-card, .skeleton-product {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 6px;
    aspect-ratio: 1 / 1.2;
}

.skeleton-card {
    aspect-ratio: 1 / 1.1;
}

.infinite-loader {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 20px 0;
    font-size: 13px;
    color: var(--text-muted);
}

.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border);
    border-top-color: var(--primary-orange);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ==========================================
   DESKTOP MEDIA QUERY (Responsive)
   ========================================== */
@media (min-width: 768px) {
    .mobile-menu-toggle {
        display: none;
    }
    .desktop-nav {
        display: flex;
    }
    .main-container {
        padding: 24px;
    }
    .card-box {
        padding: 24px;
        margin-bottom: 24px;
    }
    .category-grid {
        grid-template-columns: repeat(6, 1fr);
        gap: 16px;
    }
    .category-img-wrap {
        width: 70px;
        height: 70px;
    }
    .category-name {
        font-size: 13px;
    }
    .product-grid {
        grid-template-columns: repeat(5, 1fr);
        gap: 16px;
    }
    .product-title {
        font-size: 13px;
    }
    .current-price {
        font-size: 14px;
    }
    .old-price {
        font-size: 12px;
    }
    .btn-order {
        padding: 7px 0;
        font-size: 12px;
    }
    .yt-videos-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 16px;
    }
}
