/**
 * Bangladesh Ecommerce - Homepage Styles
 */

/* =============================================
   HERO SECTION
============================================= */
.hero-section {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #e8f5ee 0%, #f0f9f4 60%, #fff9e6 100%);
}

.hero-slider { position: relative; }

.slide {
    display: none;
    padding: 50px 0 40px;
}

.slide.active { display: block; }

.slide-content-wrap {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 40px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
    min-height: 420px;
}

.slide-text {
    position: relative;
    z-index: 2;
}

.bd-flag { font-size: 20px; display: block; margin-bottom: 12px; }

.hero-title {
    font-size: 44px;
    font-weight: 900;
    color: var(--primary-dark);
    line-height: 1.15;
    margin-bottom: 6px;
}

.hero-subtitle {
    font-size: 44px;
    font-weight: 900;
    color: var(--primary);
    line-height: 1.15;
    margin-bottom: 16px;
}

.hero-desc {
    font-size: 16px;
    color: var(--text-medium);
    line-height: 1.8;
    margin-bottom: 28px;
    max-width: 420px;
}

.hero-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--primary);
    color: white;
    padding: 14px 30px;
    border-radius: var(--radius);
    font-size: 15px;
    font-weight: 700;
    font-family: var(--font-bangla);
    transition: var(--transition);
    border: none;
    cursor: pointer;
}

.hero-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(26,122,60,.3);
    color: white;
}

.slide-image {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slide-image img {
    max-height: 380px;
    object-fit: contain;
    border-radius: var(--radius-lg);
    filter: drop-shadow(0 20px 40px rgba(0,0,0,.12));
    animation: heroFloat 3s ease-in-out infinite;
}

@keyframes heroFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.hero-placeholder {
    text-align: center;
    padding: 40px;
    background: rgba(26,122,60,.06);
    border-radius: var(--radius-lg);
    color: var(--text-light);
    min-height: 280px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* Slider Dots */
.slider-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    padding: 16px 0 20px;
}

.slider-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--border);
    cursor: pointer;
    transition: var(--transition);
}

.slider-dot.active {
    background: var(--primary);
    width: 24px;
    border-radius: 5px;
}

/* =============================================
   FEATURES BAR
============================================= */
.features-section {
    padding: 24px 0;
    background: white;
    box-shadow: var(--shadow);
    position: relative;
    z-index: 2;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 24px;
    border-right: 1px solid var(--border);
    transition: var(--transition);
}

.feature-item:last-child { border-right: none; }
.feature-item:hover { background: var(--primary-light); }

.feature-icon {
    width: 48px;
    height: 48px;
    background: var(--primary-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 20px;
    flex-shrink: 0;
    transition: var(--transition);
}

.feature-item:hover .feature-icon {
    background: var(--primary);
    color: white;
}

.feature-text {
    display: flex;
    flex-direction: column;
}

.feature-text strong {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 2px;
}

.feature-text span {
    font-size: 12px;
    color: var(--text-light);
}

/* =============================================
   SECTION HEADER
============================================= */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    gap: 12px;
}

.section-title-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
}

.flash-sale-section,
.categories-section,
.cat-products-section,
.all-products-section,
.banners-section {
    padding: 36px 0;
}

.flash-sale-section { background: white; }
.categories-section { background: #fafafa; }
.cat-products-section { background: white; }
.banners-section { background: #fafafa; }
.all-products-section { background: white; }

/* =============================================
   FLASH SALE TIMER
============================================= */
.flash-icon { font-size: 22px; }

.flash-timer-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #fff3cd;
    border: 1.5px solid var(--secondary);
    border-radius: 20px;
    padding: 4px 14px;
}

.timer-label {
    font-size: 12px;
    color: var(--text-medium);
    font-weight: 600;
}

.countdown-timer {
    display: flex;
    align-items: center;
    gap: 4px;
    font-family: monospace;
}

.cd-box {
    background: var(--primary-dark);
    color: white;
    border-radius: 4px;
    padding: 2px 6px;
    font-size: 14px;
    font-weight: 700;
    min-width: 28px;
    text-align: center;
}

.cd-sep { color: var(--accent-red); font-weight: 700; font-size: 14px; }

/* =============================================
   PRODUCTS ROW / GRID
============================================= */
.products-row {
    display: grid;
    grid-template-columns: repeat(var(--cols, 4), 1fr);
    gap: 16px;
}

/* =============================================
   PRODUCT CARD
============================================= */
.product-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: var(--transition);
    position: relative;
}

.product-card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-4px);
    border-color: var(--primary-light);
}

.product-img-wrap {
    position: relative;
    padding-top: 100%;
    background: var(--bg-light);
    overflow: hidden;
}

.product-thumb,
.product-img-wrap img {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.product-card:hover .product-thumb,
.product-card:hover .product-img-wrap img { transform: scale(1.06); }

.product-demo-img {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f0f9f4, #e8f5ee);
}

.badge-sale,
.badge-new {
    position: absolute;
    top: 8px; left: 8px;
    font-size: 11px;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: 4px;
    z-index: 2;
    color: white;
}

.badge-sale { background: var(--accent-red); }
.badge-new  { background: var(--primary); }

.wishlist-btn {
    position: absolute;
    top: 8px; right: 8px;
    width: 32px; height: 32px;
    background: white;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 14px;
    color: var(--text-light);
    box-shadow: 0 2px 8px rgba(0,0,0,.12);
    z-index: 2;
    transition: var(--transition);
}

.wishlist-btn:hover, .wishlist-btn.active { color: var(--accent-red); }

.product-info { padding: 12px; }

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

.product-rating {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: var(--text-light);
    margin-bottom: 6px;
}

.product-rating i { color: var(--secondary); font-size: 11px; }

.product-price {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.price-current {
    font-size: 16px;
    font-weight: 800;
    color: var(--primary);
}

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

.product-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
}

.btn-cart, .btn-buy {
    padding: 8px 6px;
    border-radius: var(--radius-sm);
    font-family: var(--font-bangla);
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    white-space: nowrap;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.btn-cart {
    background: white;
    color: var(--primary);
    border: 1.5px solid var(--primary);
}

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

.btn-buy {
    background: var(--primary);
    color: white;
}

.btn-buy:hover { background: var(--primary-dark); }

/* =============================================
   CATEGORY ROW
============================================= */
.categories-scroll-wrap {
    position: relative;
}

.categories-row {
    display: flex;
    gap: 0;
    justify-content: space-between;
    padding-bottom: 8px;
    overflow-x: auto;
    scroll-behavior: smooth;
    scrollbar-width: none;
}

.categories-row::-webkit-scrollbar { display: none; }

/* Remove the has-many override block */

.category-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    flex: 1 1 0;
    min-width: 80px;
    max-width: 120px;
    cursor: pointer;
    text-decoration: none;
    transition: var(--transition);
    padding: 4px;
}

.category-card:hover { transform: translateY(-4px); }

.cat-img-wrap {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid var(--border);
    transition: var(--transition);
    background: var(--bg-light);
}

.category-card:hover .cat-img-wrap {
    border-color: var(--primary);
    box-shadow: 0 4px 16px rgba(26,122,60,.2);
}

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

.cat-placeholder {
    width: 100%; height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: var(--primary);
    background: var(--primary-light);
}

.cat-name {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-dark);
    text-align: center;
    max-width: 90px;
    line-height: 1.3;
}

.cats-next-btn {
    position: absolute;
    right: -8px;
    top: 50%;
    transform: translateY(-50%);
    width: 36px; height: 36px;
    background: white;
    border: 1px solid var(--border);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-medium);
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.cats-next-btn:hover { background: var(--primary); color: white; border-color: var(--primary); }

/* =============================================
   CAT TABS
============================================= */
.cat-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.cat-tab {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    border: 1.5px solid var(--border);
    border-radius: 24px;
    background: white;
    font-family: var(--font-bangla);
    font-size: 13px;
    font-weight: 600;
    color: var(--text-medium);
    cursor: pointer;
    transition: var(--transition);
}

.cat-tab img {
    width: 20px; height: 20px;
    border-radius: 50%;
    object-fit: cover;
}

.cat-tab i { font-size: 14px; }

.cat-tab:hover, .cat-tab.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.all-prod-tabs {
    display: flex;
    gap: 4px;
    background: var(--bg-light);
    border-radius: 24px;
    padding: 4px;
}

.all-tab {
    padding: 6px 16px;
    border: none;
    border-radius: 20px;
    font-family: var(--font-bangla);
    font-size: 12px;
    font-weight: 600;
    color: var(--text-medium);
    cursor: pointer;
    background: transparent;
    transition: var(--transition);
}

.all-tab.active, .all-tab:hover {
    background: var(--primary);
    color: white;
}

/* =============================================
   BANNERS
============================================= */
.banners-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.banner-card {
    border-radius: var(--radius-lg);
    padding: 28px 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    text-decoration: none;
    overflow: hidden;
    position: relative;
    transition: var(--transition);
    min-height: 140px;
}

.banner-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); }

.banner-green {
    background: linear-gradient(135deg, #e8f5ee 0%, #c8e6c9 100%);
    border: 1px solid #a5d6a7;
}

.banner-yellow {
    background: linear-gradient(135deg, #fff9e6 0%, #fff3cd 100%);
    border: 1px solid #ffe082;
}

.banner-text p { font-size: 13px; color: var(--text-medium); margin-bottom: 4px; }
.banner-text h3 { font-size: 22px; font-weight: 800; color: var(--text-dark); margin-bottom: 12px; }

.banner-btn {
    display: inline-block;
    background: var(--primary);
    color: white;
    padding: 8px 18px;
    border-radius: var(--radius);
    font-size: 13px;
    font-weight: 700;
    font-family: var(--font-bangla);
}

.banner-img-icon { font-size: 60px; opacity: .7; }

.banner-badge-big {
    font-size: 32px;
    font-weight: 900;
    color: var(--accent-red);
    text-align: center;
    line-height: 1.1;
    opacity: .8;
}

/* =============================================
   RESPONSIVE
============================================= */
@media (max-width: 1100px) {
    .products-row { grid-template-columns: repeat(3, 1fr); }
    .slide-content-wrap { padding: 0 24px; }
    .hero-title, .hero-subtitle { font-size: 36px; }
    .category-card { min-width: 72px; max-width: 100px; }
}

@media (max-width: 991px) {
    .slide-content-wrap { grid-template-columns: 1fr; text-align: center; gap: 20px; padding: 30px 20px; min-height: auto; }
    .hero-desc { margin: 0 auto 24px; }
    .features-grid { grid-template-columns: repeat(2, 1fr); }
    .feature-item:nth-child(2) { border-right: none; }
    .feature-item:nth-child(3) { border-top: 1px solid var(--border); border-right: 1px solid var(--border); }
    .feature-item:nth-child(4) { border-top: 1px solid var(--border); }
    .products-row { grid-template-columns: repeat(2, 1fr); }
    .banners-grid { grid-template-columns: 1fr; }
    .hero-title, .hero-subtitle { font-size: 28px; }
}

@media (max-width: 600px) {
    .hero-title, .hero-subtitle { font-size: 24px; }
    .features-grid { grid-template-columns: repeat(2, 1fr); gap: 0; }
    .feature-item { padding: 12px; }
    .feature-icon { width: 38px; height: 38px; font-size: 16px; }
    .products-row { gap: 10px; }
    .product-actions { grid-template-columns: 1fr 1fr; }
    .btn-cart, .btn-buy { font-size: 10px; padding: 7px 4px; }
    .categories-row { justify-content: flex-start; gap: 8px; }
    .category-card { min-width: 76px; max-width: 90px; flex: 0 0 auto; }
    .cat-tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
    .cat-img-wrap { width: 70px; height: 70px; }
    .all-prod-tabs { display: none; }
    .section-title { font-size: 18px; }
}
