/**
 * Hellobd Main Theme Stylesheet
 * Author: IFTIKHAR AREFIN
 */

/* ==========================================================================
   Header & Top Bar
   ========================================================================== */
.hbd-topbar {
    background-color: #0b1120;
    color: #94a3b8;
    font-size: 12px;
    padding: 8px 0;
    border-bottom: 1px solid #1e293b;
}

.hbd-topbar .hbd-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.hbd-topbar-links {
    display: flex;
    align-items: center;
    gap: 18px;
}

.hbd-topbar-links a {
    color: #999;
}

.hbd-topbar-links a:hover {
    color: #fff;
}

.hbd-topbar-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.hbd-hotline {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #e5e5e5;
    font-weight: 500;
}

.hbd-hotline svg {
    width: 14px;
    height: 14px;
    fill: var(--hbd-primary);
}

/* Main Header */
.hbd-header-main {
    background-color: #0f172a;
    padding: 18px 0;
    position: relative;
    z-index: 100;
    border-bottom: 1px solid #1e293b;
}

.hbd-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
}

.hbd-logo {
    display: flex;
    align-items: center;
}

.hbd-logo a {
    display: inline-block;
    color: #fff;
    font-size: 26px;
    font-weight: 800;
    letter-spacing: -0.5px;
    font-family: 'Inter', serif;
}

.hbd-logo img {
    max-height: 44px;
    width: auto;
    object-fit: contain;
}

/* Search Bar */
.hbd-search-wrapper {
    flex: 1;
    max-width: 680px;
    position: relative;
}

.hbd-search-form {
    display: flex;
    position: relative;
    background: #1e293b;
    border-radius: var(--hbd-radius-full);
    border: 1px solid #334155;
    overflow: hidden;
    transition: var(--hbd-transition);
}

.hbd-search-form:focus-within {
    border-color: var(--hbd-primary);
    box-shadow: 0 0 0 2px rgba(15, 118, 110, 0.35);
}

.hbd-search-category-select {
    display: none; /* Desktop optional */
    background: transparent;
    color: #ccc;
    border: none;
    border-right: 1px solid #333;
    padding: 0 12px;
    font-size: 13px;
    cursor: pointer;
}

.hbd-search-input {
    flex: 1;
    background: transparent;
    border: none;
    padding: 11px 18px;
    color: #fff;
    font-size: 14px;
}

.hbd-search-input::placeholder {
    color: #888;
}

.hbd-search-btn {
    background: var(--hbd-primary);
    border: none;
    color: #ffffff;
    padding: 0 22px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--hbd-transition);
}

.hbd-search-btn:hover {
    background: var(--hbd-primary-hover);
    color: #ffffff;
}

.hbd-search-btn svg {
    width: 18px;
    height: 18px;
}

/* AJAX Search Results Dropdown */
.hbd-ajax-search-results {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    background: #1e1e1e;
    border: 1px solid #333;
    border-radius: var(--hbd-radius);
    box-shadow: var(--hbd-shadow-lg);
    z-index: 1000;
    display: none;
    max-height: 420px;
    overflow-y: auto;
}

.hbd-ajax-search-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px 14px;
    border-bottom: 1px solid #282828;
    color: #fff;
    transition: var(--hbd-transition);
}

.hbd-ajax-search-item:hover {
    background: #2a2a2a;
}

.hbd-ajax-search-item:last-child {
    border-bottom: none;
}

.hbd-ajax-item-thumb {
    width: 48px;
    height: 48px;
    border-radius: var(--hbd-radius-sm);
    object-fit: cover;
    background: #2b2b2b;
}

.hbd-ajax-item-info {
    flex: 1;
}

.hbd-ajax-item-title {
    font-size: 13px;
    font-weight: 500;
    color: #f1f1f1;
    margin-bottom: 4px;
}

.hbd-ajax-item-price {
    font-size: 13px;
    font-weight: 700;
    color: var(--hbd-primary);
}

.hbd-ajax-item-price del {
    color: #777;
    font-weight: normal;
    margin-right: 6px;
}

/* Header User Actions */
.hbd-header-actions {
    display: flex;
    align-items: center;
    gap: 22px;
}

.hbd-action-item {
    position: relative;
    display: flex;
    align-items: center;
    color: #e5e5e5;
    transition: var(--hbd-transition);
}

.hbd-action-item:hover {
    color: var(--hbd-primary);
}

.hbd-action-item svg {
    width: 22px;
    height: 22px;
}

.hbd-badge-count {
    position: absolute;
    top: -8px;
    right: -10px;
    background: var(--hbd-primary);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    min-width: 17px;
    height: 17px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
}

/* Navigation Bar */
.hbd-nav-bar {
    background-color: #1e293b;
    border-bottom: 1px solid #334155;
}

.hbd-nav-inner {
    display: flex;
    align-items: center;
    position: relative;
}

.hbd-category-menu-toggle {
    background-color: var(--hbd-primary);
    color: #fff;
    font-weight: 700;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 13px 22px;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    border: none;
    transition: var(--hbd-transition);
}

.hbd-category-menu-toggle:hover {
    background-color: var(--hbd-primary-hover);
}

.hbd-category-menu-toggle svg {
    width: 16px;
    height: 16px;
}

/* Category Dropdown Navigation */
.hbd-category-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    width: 260px;
    background: #0f172a;
    border: 1px solid #334155;
    border-radius: 0 0 var(--hbd-radius) var(--hbd-radius);
    box-shadow: var(--hbd-shadow-lg);
    z-index: 99;
    display: none;
}

.hbd-category-dropdown.is-active,
.hbd-category-menu-wrapper:hover .hbd-category-dropdown {
    display: block;
}

.hbd-cat-item {
    position: relative;
}

.hbd-cat-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 11px 18px;
    color: #ddd;
    font-size: 13.5px;
    font-weight: 500;
    border-bottom: 1px solid #222;
    transition: var(--hbd-transition);
}

.hbd-cat-link:hover {
    background: #222;
    color: var(--hbd-primary);
    padding-left: 22px;
}

/* Primary Horizontal Menu */
.hbd-primary-menu {
    display: flex;
    align-items: center;
    margin-left: 12px;
    flex-wrap: wrap;
}

.hbd-primary-menu > li {
    position: relative;
}

.hbd-primary-menu > li > a {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 13px 14px;
    color: #e0e0e0;
    font-size: 13px;
    font-weight: 500;
    transition: var(--hbd-transition);
}

.hbd-primary-menu > li > a:hover,
.hbd-primary-menu > li.current-menu-item > a {
    color: var(--hbd-primary);
}

/* Submenu */
.hbd-primary-menu ul.sub-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: #181818;
    min-width: 200px;
    border: 1px solid #2d2d2d;
    box-shadow: var(--hbd-shadow);
    padding: 8px 0;
    display: none;
    z-index: 100;
}

.hbd-primary-menu li:hover > ul.sub-menu {
    display: block;
}

.hbd-primary-menu ul.sub-menu li a {
    display: block;
    padding: 8px 18px;
    color: #ccc;
    font-size: 13px;
}

.hbd-primary-menu ul.sub-menu li a:hover {
    background: #252525;
    color: var(--hbd-primary);
}

/* ==========================================================================
   Homepage Blocks & Layout
   ========================================================================== */
.hbd-section {
    padding: 30px 0;
}

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

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

.hbd-section-title {
    font-size: 20px;
    font-weight: 800;
    color: #111;
    margin: 0;
    position: relative;
}

body.dark-mode .hbd-section-title {
    color: #fff;
}

.hbd-view-all-btn {
    font-size: 13px;
    font-weight: 600;
    color: var(--hbd-primary);
    border: 1px solid var(--hbd-primary);
    padding: 5px 14px;
    border-radius: var(--hbd-radius-sm);
    transition: var(--hbd-transition);
}

.hbd-view-all-btn:hover {
    background: var(--hbd-primary);
    color: #fff;
}

/* Flash Sale Countdown Timer */
.hbd-countdown {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #222;
    color: #fff;
    padding: 4px 12px;
    border-radius: var(--hbd-radius-sm);
    font-size: 12px;
    font-weight: 700;
}

.hbd-countdown-item {
    display: inline-flex;
    align-items: center;
    gap: 2px;
}

.hbd-countdown-num {
    background: #333;
    padding: 2px 6px;
    border-radius: 3px;
    color: #fca311;
}

/* Category Grid & Slider */
.hbd-category-slider-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 14px;
}

.hbd-cat-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 18px 12px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: var(--hbd-transition);
}

body.dark-mode .hbd-cat-card {
    background: #1c1c1c;
    border-color: #2b2b2b;
}

.hbd-cat-card:hover {
    border-color: var(--hbd-primary);
    transform: translateY(-3px);
    box-shadow: var(--hbd-shadow);
}

.hbd-cat-card-img {
    width: 60px;
    height: 60px;
    object-fit: contain;
    border-radius: 50%;
    margin-bottom: 4px;
}

.hbd-cat-card-title {
    font-size: 12.5px;
    font-weight: 600;
    color: #222;
    margin: 0;
    line-height: 1.2;
}

body.dark-mode .hbd-cat-card-title {
    color: #eee;
}

/* Product Card - Hellobd V2 (4-Column Spacious Grid) */
.hbd-product-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.hbd-product-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    position: relative;
    transition: var(--hbd-transition);
}

body.dark-mode .hbd-product-card {
    background: #1a1a1a;
    border-color: #282828;
}

.hbd-product-card:hover {
    box-shadow: 0 10px 20px rgba(0,0,0,0.08);
    border-color: #ddd;
    transform: translateY(-2px);
}

body.dark-mode .hbd-product-card:hover {
    box-shadow: 0 10px 20px rgba(0,0,0,0.4);
    border-color: #383838;
}

.hbd-product-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #ef4444;
    color: #fff;
    font-size: 10.5px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 3px;
    z-index: 2;
}

.hbd-product-wishlist {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    cursor: pointer;
    transition: var(--hbd-transition);
    border: none;
    z-index: 2;
}

body.dark-mode .hbd-product-wishlist {
    background: #292929;
    color: #aaa;
}

.hbd-product-wishlist:hover {
    background: #fee2e2;
    color: #ef4444;
}

.hbd-product-thumb {
    position: relative;
    padding-top: 85%;
    margin-bottom: 12px;
    overflow: hidden;
    background: #fbfbfb;
    border-radius: var(--hbd-radius-sm);
}

body.dark-mode .hbd-product-thumb {
    background: #141414;
}

.hbd-product-thumb img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 8px;
    transition: transform 0.3s ease;
}

.hbd-product-card:hover .hbd-product-thumb img {
    transform: scale(1.05);
}

.hbd-product-card-title {
    font-size: 13.5px;
    font-weight: 600;
    line-height: 1.35;
    color: #1f2937;
    margin: 0 0 8px 0;
    height: 36px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

body.dark-mode .hbd-product-card-title {
    color: #f3f4f6;
}

.hbd-product-card-title a:hover {
    color: var(--hbd-primary);
}

.hbd-product-price {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 12px;
}

.hbd-price-sale {
    font-size: 15px;
    font-weight: 700;
    color: var(--hbd-primary);
}

.hbd-price-regular {
    font-size: 12.5px;
    color: #888;
    text-decoration: line-through;
}

.hbd-card-actions {
    display: flex;
    gap: 6px;
    margin-top: auto;
}

.hbd-btn-add-to-cart {
    flex: 1;
    background-color: var(--hbd-primary);
    color: #ffffff;
    font-size: 12.5px;
    font-weight: 600;
    padding: 9px 14px;
    border-radius: var(--hbd-radius-full);
    text-align: center;
    border: none;
    cursor: pointer;
    transition: var(--hbd-transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.hbd-btn-add-to-cart:hover {
    background-color: var(--hbd-primary-hover);
    color: #fff;
}

.hbd-btn-quick-view {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #f1f5f9;
    color: #475569;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--hbd-transition);
}

body.dark-mode .hbd-btn-quick-view {
    background: #2b2b2b;
    color: #aaa;
}

.hbd-btn-quick-view:hover {
    background: var(--hbd-primary);
    color: #fff;
}

/* Hero Showcase Banners - V2 Asymmetric Layout (Promo Left + Main Right) */
.hbd-hero-grid {
    display: grid;
    grid-template-columns: 1fr 2.1fr;
    gap: 18px;
    margin-top: 18px;
}

.hbd-hero-banner-main {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    background: #0f172a;
    min-height: 340px;
    box-shadow: var(--hbd-shadow);
}

.hbd-hero-banner-sub {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.hbd-hero-sub-item {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    background: #0f172a;
    flex: 1;
    min-height: 160px;
    box-shadow: var(--hbd-shadow);
}

.hbd-hero-banner-link {
    display: block;
    width: 100%;
    height: 100%;
}

.hbd-hero-banner-link img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Brands Showcase */
.hbd-brands-grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 12px;
}

.hbd-brand-item {
    background: #ffffff;
    border: 1px solid #eaeaea;
    border-radius: var(--hbd-radius-sm);
    padding: 12px 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--hbd-transition);
}

body.dark-mode .hbd-brand-item {
    background: #1f1f1f;
    border-color: #2b2b2b;
}

.hbd-brand-item:hover {
    border-color: var(--hbd-primary);
    box-shadow: var(--hbd-shadow-sm);
}

.hbd-brand-item img {
    max-height: 28px;
    width: auto;
    filter: grayscale(100%);
    opacity: 0.7;
    transition: var(--hbd-transition);
}

.hbd-brand-item:hover img {
    filter: grayscale(0%);
    opacity: 1;
}

/* Value Props / Features Bar */
.hbd-features-bar {
    background: #ffffff;
    border: 1px solid #eaeaea;
    border-radius: var(--hbd-radius);
    padding: 24px 20px;
    margin: 30px 0;
}

body.dark-mode .hbd-features-bar {
    background: #181818;
    border-color: #262626;
}

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

.hbd-feature-box {
    display: flex;
    align-items: center;
    gap: 14px;
}

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

body.dark-mode .hbd-feature-icon {
    background: #2b1f15;
}

.hbd-feature-title {
    font-size: 14px;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 3px 0;
}

body.dark-mode .hbd-feature-title {
    color: #fff;
}

.hbd-feature-desc {
    font-size: 12px;
    color: #6b7280;
    margin: 0;
}

/* ==========================================================================
   Footer & Bangladeshi Payment Badges
   ========================================================================== */
.hbd-footer {
    background-color: #0f172a;
    color: #94a3b8;
    padding-top: 50px;
    border-top: 1px solid #1e293b;
}

.hbd-footer-top {
    padding-bottom: 40px;
}

.hbd-footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 36px;
}

.hbd-footer-col h4 {
    color: #ffffff;
    font-size: 15px;
    font-weight: 700;
    margin: 0 0 18px 0;
    letter-spacing: 0.3px;
}

.hbd-footer-about {
    font-size: 13.5px;
    line-height: 1.6;
    margin-bottom: 18px;
    color: #8c8c8c;
}

.hbd-footer-contact-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    margin-bottom: 10px;
    color: #a0a0a0;
}

.hbd-footer-contact-item svg {
    width: 15px;
    height: 15px;
    color: var(--hbd-primary);
}

.hbd-footer-links li {
    margin-bottom: 10px;
}

.hbd-footer-links a {
    color: #949494;
    font-size: 13px;
}

.hbd-footer-links a:hover {
    color: var(--hbd-primary);
    padding-left: 4px;
}

/* Social & Payment */
.hbd-social-links {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.hbd-social-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #222;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ccc;
    font-size: 13px;
    transition: var(--hbd-transition);
}

.hbd-social-btn:hover {
    background: var(--hbd-primary);
    color: #fff;
}

.hbd-payment-title {
    font-size: 13px;
    font-weight: 600;
    color: #ddd;
    margin-bottom: 10px;
}

.hbd-payment-badges-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}

.hbd-payment-badge-pill {
    background: #ffffff;
    border-radius: 4px;
    padding: 3px 7px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    color: #111;
    height: 24px;
}

.hbd-payment-badge-pill.bkash {
    background: #e2136e;
    color: #fff;
}

.hbd-payment-badge-pill.nagad {
    background: #f7941d;
    color: #fff;
}

.hbd-payment-badge-pill.rocket {
    background: #8c3494;
    color: #fff;
}

.hbd-payment-badge-pill.upay {
    background: #004b9b;
    color: #fff;
}

.hbd-payment-badge-pill.cod {
    background: #1e3a8a;
    color: #fff;
}

/* Bottom Copyright Bar */
.hbd-footer-bottom {
    background: #090e1a;
    border-top: 1px solid #1e293b;
    padding: 16px 0;
    font-size: 12.5px;
    color: #64748b;
}

.hbd-footer-bottom .hbd-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.hbd-designer-credit a {
    color: var(--hbd-primary);
    font-weight: 600;
}
