/* =============================================
   DARBAAR HOME PAGE — PREMIUM SECTIONS
   ============================================= */

/* Section wrapper */
.dm-section {
    padding: 20px 0;
    position: relative;
    overflow-x: hidden; /* Fix horizontal swipe/empty space on mobile */
}
/* Section header row */
.dm-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    padding: 0 4px;
}
.dm-section-header h2 {
    font-size: 20px;
    font-weight: 800;
    color: var(--text-main);
    margin: 0;
    letter-spacing: -0.3px;
}
.dm-section-header .dm-see-all {
    font-size: 13px;
    font-weight: 600;
    color: #1a9c3e;
    text-decoration: none;
    padding: 5px 12px;
    border: 1.5px solid #1a9c3e;
    border-radius: 20px;
    transition: all 0.2s;
    white-space: nowrap;
}
.dm-section-header .dm-see-all:hover {
    background: #1a9c3e;
    color: #fff;
}

/* Horizontal scroll row */
.dm-h-scroll {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 10px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.dm-h-scroll::-webkit-scrollbar { display: none; }
.dm-h-scroll .dm-product-card {
    flex: 0 0 160px;
    width: 160px;
}

/* Scroll Arrows for dm-h-scroll */
.dm-scroll-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    color: var(--text-main);
    transition: all 0.2s;
    outline: none;
}
.dm-scroll-btn:hover {
    background: #1a9c3e;
    color: #fff;
    border-color: #1a9c3e;
}
.dm-scroll-left { left: -18px; }
.dm-scroll-right { right: -18px; }
html[data-theme='dark'] .dm-scroll-btn {
    background: #2a2a2a;
    border-color: #444;
    color: #fff;
}
html[data-theme='dark'] .dm-scroll-btn:hover {
    background: #1a9c3e;
}
@media (max-width: 768px) {
    .dm-scroll-btn { display: none !important; }
}

/* =============================================
   UNIFIED PRODUCT CARD  (dm-product-card)
   ============================================= */
.dm-product-card {
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background: var(--bg-card);
    width: 100%;
    max-width: 200px; /* Standardize max size */
    margin: 0 auto;  /* Center in grid cells if they grow */
    overflow: hidden;
    display: flex;
    flex-direction: column;
    scroll-snap-align: start;
    transition: box-shadow 0.2s, transform 0.2s;
}
.dm-product-card:hover {
    box-shadow: 0 6px 20px rgba(0,0,0,0.08);
    transform: translateY(-3px);
}
.dm-card-img {
    position: relative;
    height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    background: var(--bg-card);
}
.dm-card-img img {
    max-height: 120px;
    max-width: 100%;
    object-fit: contain;
}
.dm-card-img .dm-badge {
    position: absolute;
    top: 8px; left: 8px;
    background: #ff3f6c;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    border-radius: 4px;
    padding: 2px 6px;
    line-height: 1.4;
}
.dm-card-img .dm-wish {
    position: absolute;
    top: 8px; right: 8px;
    width: 28px; height: 28px;
    background: var(--bg-card);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    cursor: pointer;
    border: none;
    outline: none;
}
.dm-card-img .dm-wish i { font-size: 12px; color: #ccc; }
.dm-card-img .dm-wish.dm-wished i { color: #ff3f6c; }
.dm-card-body {
    padding: 10px;
    border-top: 1px solid var(--border-color);
    flex: 1;
    display: flex;
    flex-direction: column;
}
.dm-card-price {
    margin-bottom: 4px;
}
.dm-price-badge {
    display: inline-block;
    background: #1a9c3e;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    border-radius: 5px;
    padding: 1px 7px;
}
.dm-mrp {
    font-size: 11px;
    color: var(--text-muted);
    text-decoration: line-through;
    margin-left: 4px;
}
.dm-discount {
    font-size: 11px;
    color: #1a9c3e;
    font-weight: 600;
    margin-left: 3px;
}
.dm-card-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-main);
    line-height: 1.3;
    height: 34px;
    overflow: hidden;
    margin-bottom: 2px;
    display: block;
    text-decoration: none !important;
}
.dm-card-name:hover { color: #1a9c3e; }
.dm-card-unit {
    font-size: 11px;
    color: var(--text-muted);
    margin-bottom: 8px;
    display: block;
}
/* Zepto-style Compact Add Button over Image */
.dm-cart-btn-wrapper {
    position: absolute;
    right: 8px;
    bottom: -16px; /* overlap with the card body */
    z-index: 5;
    background: #fff;
    border-radius: 6px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}
.dm-add-btn {
    width: 100%;
    padding: 6px 16px;
    font-size: 13px;
    font-weight: 800;
    color: #ff3269;
    background: #fff;
    border: 1px solid #ff3269;
    border-radius: 6px;
    cursor: pointer;
    text-transform: uppercase;
    transition: all 0.2s;
}
.dm-add-btn.out-of-stock {
    color: #888;
    border-color: #ddd;
}
.dm-add-btn:hover:not(.out-of-stock) {
    background: #fff0f4;
}
.dm-qty-row {
    display: flex;
    align-items: center;
    background: #ff3269;
    color: #fff;
    border-radius: 6px;
    height: 32px;
}
.dm-qty-row button {
    background: transparent;
    color: #fff;
    border: none;
    width: 28px;
    font-size: 18px;
    line-height: 1;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}
.dm-qty-row input {
    width: 24px;
    background: transparent;
    border: none;
    color: #fff;
    text-align: center;
    font-weight: 700;
    font-size: 14px;
    padding: 0;
}

/* =============================================
   SHOP BY CATEGORY  (icon grid)
   ============================================= */
.dm-cat-grid {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 8px;
    scrollbar-width: none;
}
.dm-cat-grid::-webkit-scrollbar { display: none; }
.dm-cat-item {
    flex: 0 0 90px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    text-decoration: none !important;
    scroll-snap-align: start;
}
.dm-cat-item:hover .dm-cat-thumb { border-color: #1a9c3e; }
.dm-cat-thumb {
    width: 72px; height: 72px;
    border-radius: 50%;
    border: 2px solid var(--border-color);
    background: var(--bg-body);
    display: flex; align-items: center; justify-content: center;
    overflow: hidden;
    transition: border-color 0.2s;
}
.dm-cat-thumb img {
    width: 56px; height: 56px;
    object-fit: cover;
    border-radius: 50%;
}
.dm-cat-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-main);
    text-align: center;
    max-width: 80px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
}

/* =============================================
   PROMO AD BANNERS
   ============================================= */
.dm-ads-row {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.dm-ad-card {
    display: block;
    border-radius: 14px;
    overflow: hidden;
    height: 160px;
    width: 100%;
}
.dm-ad-card img {
    width: 100%; height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s;
}
.dm-ad-card:hover img { transform: scale(1.02); }

/* =============================================
   INFO BAR
   ============================================= */
.dm-info-bar {
    background: linear-gradient(135deg, #f0fdf4, #dcfce7);
    border: 1px solid #bbf7d0;
    border-radius: 12px;
    padding: 12px 18px;
    font-size: 13px;
    color: #166534;
    margin-bottom: 6px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}
.dm-info-bar strong { font-weight: 700; }
html[data-theme='dark'] .dm-info-bar {
    background: #1a2e1a;
    border-color: #2d5a2d;
    color: #86efac;
}

/* Membership banner — same ratio as main slider banners */
.dm-membership-banner {
    border-radius: 16px;
    overflow: hidden;
    width: 100%;
}
.dm-membership-banner img { width: 100%; display: block; height: 300px; object-fit: cover; }
@media (max-width: 768px) {
    .dm-membership-banner img { height: 200px; }
}

/* Divider line between sections */
.dm-divider {
    height: 6px;
    background: var(--bg-body);
    margin: 8px 0;
    border-radius: 3px;
}

/* Full-width ad card (injected between carousels) */
.dm-ad-full {
    display: block;
    border-radius: 16px;
    overflow: hidden;
    height: 160px;
    width: 100%;
}
.dm-ad-full img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.3s; }
.dm-ad-full:hover img { transform: scale(1.02); }

/* =============================================
   BRAND ICON GRID
   ============================================= */
.dm-brand-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
    gap: 12px;
}
.dm-brand-tile {
    display: flex; flex-direction: column; align-items: center;
    gap: 8px; text-decoration: none !important;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 14px; padding: 14px 8px;
    transition: all 0.2s; cursor: pointer;
    box-shadow: 0 2px 6px rgba(0,0,0,0.03);
}
.dm-brand-tile:hover {
    border-color: #1a9c3e;
    box-shadow: 0 4px 14px rgba(26,156,62,0.12);
    transform: translateY(-2px);
}
.dm-brand-tile img {
    height: 42px; width: auto; max-width: 72px;
    object-fit: contain;
    filter: var(--brand-logo-filter, none);
}
.dm-brand-initials {
    width: 48px; height: 48px; border-radius: 50%;
    background: linear-gradient(135deg, #1a9c3e, #0f6628);
    color: #fff; font-size: 16px; font-weight: 800;
    display: flex; align-items: center; justify-content: center;
}
.dm-brand-label {
    font-size: 11px; font-weight: 600; color: var(--text-main);
    text-align: center; line-height: 1.2;
    max-width: 80px; overflow: hidden;
    text-overflow: ellipsis; white-space: nowrap;
}
.dm-brand-hidden { display: none; }

/* Show More button */
.dm-show-more-btn {
    background: var(--bg-card); border: 1.5px solid var(--border-color);
    color: var(--text-main); font-size: 13px; font-weight: 700;
    border-radius: 20px; padding: 8px 22px; cursor: pointer;
    transition: all 0.2s; display: inline-flex; align-items: center; gap: 6px;
}
.dm-show-more-btn:hover { border-color: #1a9c3e; color: #1a9c3e; }
.dm-show-more-btn i { transition: transform 0.3s; }
.dm-show-more-btn.expanded i { transform: rotate(180deg); }

/* Carousel Navigation Buttons */
.dm-carousel-wrapper {
    position: relative;
    width: 100%;
}
.dm-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #fff;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    color: var(--text-main);
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.2s;
    opacity: 0;
    visibility: hidden;
}
.dm-carousel-wrapper:hover .dm-nav-btn {
    opacity: 1;
    visibility: visible;
}
.dm-nav-prev { left: -16px; }
.dm-nav-next { right: -16px; }
.dm-nav-btn:hover {
    background: #1a9c3e;
    color: #fff;
    border-color: #1a9c3e;
}
@media (max-width: 768px) {
    .dm-nav-btn { display: none; } /* Hide on touch devices as swipe is natural */
}

/* =============================================
   BRAND LOGO HORIZONTAL CAROUSEL
   ============================================= */
.dm-brand-logo-carousel {
    display: flex;
    gap: 14px;
    overflow-x: auto;
    padding: 8px 2px 14px;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.dm-brand-logo-carousel::-webkit-scrollbar { display: none; }
.dm-brand-logo-tile {
    display: flex; flex-direction: column; align-items: center;
    gap: 8px; text-decoration: none !important; flex-shrink: 0;
    cursor: pointer;
}
.dm-brand-logo-img {
    width: 110px; height: 110px;
    border-radius: 20px;
    background: var(--bg-card);
    border: 1.5px solid var(--border-color);
    display: flex; align-items: center; justify-content: center;
    overflow: hidden;
    transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    padding: 10px;
}
.dm-brand-logo-tile:hover .dm-brand-logo-img {
    border-color: #1a9c3e;
    box-shadow: 0 6px 18px rgba(26,156,62,0.15);
    transform: translateY(-3px);
}
.dm-brand-logo-img img {
    width: 100%; height: 100%;
    object-fit: contain;
}
.dm-brand-logo-initials {
    font-size: 26px; font-weight: 800; color: #fff;
    background: linear-gradient(135deg, #1a9c3e, #0f6628);
}
.dm-brand-logo-label {
    font-size: 13px; font-weight: 700; color: var(--text-main);
    text-align: center; max-width: 110px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
@media (max-width: 576px) {
    .dm-brand-logo-img { width: 85px; height: 85px; border-radius: 16px; }
    .dm-brand-logo-label { font-size: 11px; max-width: 85px; }
}


@media (max-width: 576px) {
    .dm-section-header h2 { font-size: 17px; }
    .dm-product-card { flex: 0 0 140px; width: 140px; }
    .dm-card-img { height: 120px; }
    .dm-ad-card { flex: 0 0 240px; height: 110px; }
    .dm-cat-thumb { width: 60px; height: 60px; }
    .dm-cat-thumb img { width: 46px; height: 46px; }
}

/* =============================================
   PREMIUM SIDEBAR ACCORDION
   ============================================= */
.browse-categories {
    background: var(--bg-card);
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.04);
    padding: 20px;
    margin-bottom: 24px;
    border: 1px solid var(--border-color);
}
.left_navtab h2 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-main);
    margin-top: 0;
    margin-bottom: 18px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.left_navtab h2::before {
    content: "\f009";
    font-family: FontAwesome;
    color: #9333ea;
}
.mainNav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.mainNav ul li {
    margin-bottom: 4px;
}
.mainNav ul li a {
    display: flex;
    align-items: center;
    padding: 10px 14px;
    color: var(--text-main);
    font-weight: 500;
    font-size: 14px;
    border-radius: 10px;
    transition: all 0.2s ease;
    text-decoration: none !important;
    position: relative;
    border: 1px solid transparent;
}
.mainNav ul li a img {
    width: 24px !important;
    height: 24px !important;
    border-radius: 6px;
    margin-right: 12px;
    object-fit: cover;
    flex-shrink: 0;
    background: #f8f9fa;
    padding: 2px;
    border: 1px solid #eee;
}
html[data-theme='dark'] .mainNav ul li a img {
    background: #2a2a2a;
    border-color: #444;
}
.mainNav ul li a:hover, 
.mainNav ul li a.selected {
    background: rgba(147,51,234,0.08) !important;
    color: #9333ea !important;
    border-color: rgba(147,51,234,0.2);
}
.mainNav ul li.active > a {
    background: rgba(147,51,234,0.12) !important;
    color: #9333ea !important;
    border-color: rgba(147,51,234,0.3);
    font-weight: 600;
}
.top-picks-link {
    display: flex !important;
    align-items: center !important;
    padding: 10px 14px !important;
    color: #9333ea !important;
    font-weight: 700 !important;
    font-size: 14px !important;
    border-radius: 10px !important;
    background: rgba(147,51,234,0.08) !important;
    border: 1.5px solid rgba(147,51,234,0.2) !important;
    margin-bottom: 12px !important;
    text-decoration: none !important;
    transition: background 0.2s;
}
.top-picks-link:hover { background: rgba(147,51,234,0.15) !important; }
.top-picks-link i { margin-right: 12px; font-size: 16px; }

.mainNav ul ul {
    padding-left: 28px;
    margin-top: 4px;
    border-left: 2px solid rgba(147,51,234,0.15);
    margin-left: 22px;
    margin-bottom: 8px;
}
.mainNav ul ul li {
    position: relative;
}
.mainNav ul ul li::before {
    content: '';
    position: absolute;
    left: -28px;
    top: 18px;
    width: 12px;
    height: 2px;
    background: rgba(147,51,234,0.15);
}
.mainNav ul ul li a {
    font-size: 13px;
    padding: 8px 12px;
}
.mainNav ul ul li a img {
    width: 20px !important;
    height: 20px !important;
}
