/* ==========================================================
   ev-style.css — Evaly-style header + product cards
   Scoped prefixes: ev-* (header), evc-* (card)
   Load AFTER style.css
   ========================================================== */

/* ===================== HEADER ===================== */
.ev-header { background: #fff; }

/* --- Row 1 --- */
.ev-top {
    display: flex;
    align-items: center;
    gap: 20px;
    height: 72px;
}
.ev-header .logo { flex: 0 0 auto; }
.ev-header .logo img { height: 34px; display: block; }

.ev-search {
    flex: 1;
    max-width: 620px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    background: #f4f5f7;
    border-radius: 999px;
    height: 44px;
    padding: 4px 4px 4px 16px;
    gap: 10px;
}
.ev-search-all {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: #333;
    padding-right: 12px;
    border-right: 1px solid #ddd;
    white-space: nowrap;
    flex: 0 0 auto;
}
.ev-search input[type="search"] {
    flex: 1;
    min-width: 0;
    border: 0;
    background: transparent;
    outline: none;
    font-size: 14px;
    color: #222;
    height: 100%;
    box-shadow: none;
}
.ev-search-btn {
    height: 38px;
    padding: 0 22px;
    border-radius: 999px;
    background: #1b2430;
    color: #fff;
    border: 0;
    font-size: 13.5px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    flex: 0 0 auto;
}
.ev-search-btn:hover { background: #0f1722; }

.ev-actions {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-left: auto;
    flex: 0 0 auto;
}
.ev-action {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    color: #222;
    font-size: 11.5px;
    font-weight: 500;
    text-decoration: none;
    line-height: 1;
}
.ev-action i { font-size: 19px; }
.ev-action:hover { color: #ff6a00; }

/* Cart — icon + red badge + label */
.ev-header .cart-btn {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    color: #222;
    font-size: 11.5px;
    font-weight: 500;
    background: transparent;
    border: 0;
    box-shadow: none;
    padding: 2px 6px;
    text-decoration: none;
}
.ev-header .cart-btn i { font-size: 19px; }
.ev-header .cart-btn .cart-count {
    position: absolute;
    top: -7px;
    right: -4px;
    background: #e5322d;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    min-width: 17px;
    height: 17px;
    line-height: 17px;
    border-radius: 50%;
    text-align: center;
    padding: 0 2px;
}
.ev-header .cart-btn .cart-amount { display: none; }

/* Cart dropdown — position under row 1, right aligned */
.ev-header .cart-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    z-index: 90;
}

/* --- Row 2 : category bar --- */
.ev-catbar {
    border-top: 1px solid #f0f0f2;
    background: #fff;
}
.ev-catbar-inner {
    display: flex;
    align-items: center;
    gap: 22px;
    height: 56px;
    overflow-x: auto;
    scrollbar-width: none;
}
.ev-catbar-inner::-webkit-scrollbar { display: none; }

.ev-allcats {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    flex: 0 0 auto;
    background: #1b2430;
    color: #fff;
    border: 0;
    border-radius: 999px;
    padding: 10px 20px;
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
}
.ev-allcats:hover { background: #0f1722; }

.ev-catlink {
    color: #333;
    font-size: 13.5px;
    font-weight: 500;
    text-decoration: none;
    white-space: nowrap;
    flex: 0 0 auto;
    transition: color .15s;
}
.ev-catlink:hover, .ev-catlink.active { color: #ff6a00; }
.ev-catlink--flash { color: #e5322d; font-weight: 600; }
.ev-catlink--flash:hover { color: #c2201b; }

/* ===================== PRODUCT CARD ===================== */
.evc-card {
    position: relative;
    background: #fff;
    border: 1px solid #ececec;
    border-radius: 10px;
    box-shadow: 0 1px 5px rgba(0, 0, 0, .05);
    display: flex;
    flex-direction: column;
    overflow: visible;
    margin-top: 10px;
    transition: box-shadow .2s ease;
}
.evc-card:hover { box-shadow: 0 8px 22px rgba(0, 0, 0, .13); }

.evc-ago {
    position: absolute;
    top: -9px; left: 10px;
    z-index: 5;
    background: #e5f7ec;
    color: #0f9950;
    font-size: 10.5px;
    font-weight: 600;
    padding: 2px 10px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
}
.evc-ago i { width: 5px; height: 5px; border-radius: 50%; background: #0f9950; }

.evc-imgwrap {
    position: relative;
    border-radius: 10px 10px 0 0;
    overflow: hidden;
    background: #f7f7f8;
    aspect-ratio: 1 / 1;
}
.evc-imglink { display: block; width: 100%; height: 100%; }
.evc-img { width: 100%; height: 100%; object-fit: cover; display: block; }

.evc-badge {
    position: absolute; top: 8px; left: 8px; z-index: 3;
    background: #e5322d; color: #fff;
    font-size: 11px; font-weight: 700;
    padding: 3px 8px; border-radius: 6px;
}
.evc-stockout {
    position: absolute; top: 8px; left: 8px; z-index: 3;
    background: #6b7280; color: #fff;
    font-size: 11px; font-weight: 700;
    padding: 3px 8px; border-radius: 6px;
}
.evc-wish {
    position: absolute; top: 8px; right: 8px; z-index: 3;
    width: 30px; height: 30px; border-radius: 50%;
    background: #fff; border: 1px solid #e5e5e5;
    display: flex; align-items: center; justify-content: center;
    color: #555; font-size: 13px;
}

.evc-hover {
    position: absolute;
    left: 8px; right: 8px; bottom: 8px;
    z-index: 4;
    display: flex; gap: 6px;
    opacity: 0; transform: translateY(8px);
    transition: opacity .22s ease, transform .22s ease;
}
.evc-card:hover .evc-hover,
.evc-card:focus-within .evc-hover { opacity: 1; transform: translateY(0); }
.evc-add {
    flex: 1; height: 34px;
    border: 0; border-radius: 8px;
    background: #1b2430; color: #fff;
    font-size: 12.5px; font-weight: 600;
    display: flex; align-items: center; justify-content: center; gap: 7px;
    cursor: pointer; font-family: inherit; text-decoration: none;
}
.evc-add:hover { background: #0f1722; color: #fff; }
.evc-add:disabled { opacity: .6; cursor: not-allowed; }
.evc-addform { flex: 1; display: flex; margin: 0; }
.evc-eye {
    width: 34px; height: 34px; border-radius: 8px;
    background: #fff; border: 1px solid #e3e3e3;
    display: flex; align-items: center; justify-content: center;
    color: #333; font-size: 13px; flex: 0 0 auto;
}
.evc-eye:hover { color: #ff6a00; border-color: #ff6a00; }

.evc-body { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.evc-brand {
    display: flex; align-items: center; gap: 5px;
    font-size: 11.5px; color: #1f6feb;
    white-space: nowrap; overflow: hidden;
}
.evc-brand i { color: #7c8aa0; }
.evc-brand-name { overflow: hidden; text-overflow: ellipsis; }
.evc-vrf { color: #8a9bb0; font-size: 11px; flex: 0 0 auto; }

.evc-title {
    margin: 0;
    font-size: 13.5px; font-weight: 500; line-height: 1.35; color: #222;
    min-height: 2.7em;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.evc-title a { color: inherit; text-decoration: none; }
.evc-title a:hover { color: var(--ox, #ff6a00); }

.evc-pricerow { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; }
.evc-new { color: #111; font-size: 16px; font-weight: 800; }
.evc-old { color: #9a9aa5; font-size: 12px; text-decoration: line-through; }
.evc-off {
    background: #fdeaea; color: #e5322d;
    font-size: 10.5px; font-weight: 700;
    border-radius: 6px; padding: 2px 6px;
}

.evc-ratingrow {
    display: flex; align-items: center; gap: 8px;
    font-size: 11.5px; min-height: 18px;
}
.evc-stars { color: #ff9f1a; font-size: 11px; display: inline-flex; gap: 1px; }
.evc-ratingnum { color: #555; font-weight: 600; }
.evc-sold { color: #8a8a96; margin-left: auto; }

.evc-progress {
    height: 6px; border-radius: 6px;
    background: #ffe3cf; overflow: hidden;
}
.evc-progress-bar {
    height: 100%; border-radius: 6px;
    background: var(--ox, #ff6a00);
}
.evc-flashsold {
    font-size: 11.5px; color: #8a8a96;
    display: flex; align-items: center; gap: 4px;
}
.evc-flashsold i { color: #ff6a00; }

.evc-meta {
    display: flex; align-items: center; justify-content: space-between;
    font-size: 11.5px; min-height: 18px;
}
.evc-tagnew {
    background: #e5f7ec; color: #0a9d58;
    font-weight: 700; border-radius: 6px;
    padding: 2px 8px; font-size: 11px;
}

.evc-foot {
    border-top: 1px solid #f0f0f0;
    margin-top: auto; padding-top: 8px;
    display: flex; align-items: center; justify-content: space-between;
    font-size: 11.5px;
}
.evc-cod { color: #0a9d58; font-weight: 600; display: flex; gap: 5px; align-items: center; }
.evc-eta { color: #8a8a96; }

/* ===================== RESPONSIVE ===================== */
@media (max-width: 991px) {
    .ev-top { gap: 12px; height: 60px; }
    .ev-search { height: 40px; }
    .ev-search-btn { padding: 0 14px; }
    .ev-actions { gap: 16px; }
    .ev-action span, .ev-cart-label { display: none; }
    .ev-action, .ev-header .cart-btn { font-size: 0; gap: 0; }
    .ev-catbar-inner { height: 48px; gap: 14px; }
    .ev-allcats { padding: 8px 14px; font-size: 12.5px; }
}

@media (max-width: 575px) {
    .ev-top { height: 56px; gap: 10px; }
    .ev-header .logo img { height: 28px; }
    .ev-search { height: 38px; padding-left: 12px; }
    .ev-search-all { display: none; }
    .ev-search-btn { height: 32px; padding: 0 12px; font-size: 12px; }
    .ev-actions { gap: 14px; }
    .ev-action i, .ev-header .cart-btn i { font-size: 17px; }
    .ev-catbar-inner { height: 44px; }
    .evc-title { font-size: 12.5px; }
    .evc-new { font-size: 14px; }
}

/* ==========================================================
   ADDED: Mega menu + sticky-header gap fix + Hot Categories
   ========================================================== */

/* ---------- Sticky header gap FIX ----------
   Header ekhon catbar shoho ekta wrapper hisebe sticky —
   upore kono content dekhabe na. Ticker thakle ticker-i top-e thakbe. */
.site-header.ev-header {
    position: sticky;
    top: 0;
    z-index: 500;
}
/* Ticker on/off hoye gele header nicher content er sathe atke thakbe na */
.site-header.ev-header + .nav-overlay { z-index: 400; }

/* ---------- Simple category dropdown (All Categories click) ---------- */
.ev-catbar { position: relative; }

.ev-drop {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 280px;
    z-index: 600;                    /* sticky header (500) er upore */
    background: #fff;
    border: 1px solid #ececec;
    border-radius: 0 0 14px 14px;
    box-shadow: 0 18px 40px rgba(17, 29, 74, .16);
    padding: 8px;
}
.ev-drop.is-open { display: block; }

.ev-drop-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 14px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    color: #222;
    text-decoration: none;
    transition: background .15s;
}
.ev-drop-item:hover { background: #f6f7fb; color: #ff6a00; }
.ev-drop-ic {
    width: 26px; height: 26px;
    object-fit: contain;
    border-radius: 6px;
    background: #f4f5f7;
    flex: 0 0 auto;
}
.ev-drop-item > span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ev-drop-arrow { color: #b9bcc6; font-size: 11px; }
.ev-drop-item--flash { color: #e5322d; }
.ev-drop-item--flash:hover { color: #c2201b; background: #fdf0ef; }

@media (max-width: 991px) {
    .ev-drop { display: none !important; }   /* mobile e drawer */
}

/* ---------- Hot Categories head (orange bar + All Categories link) ---------- */
.hc-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
}
.hc-title {
    margin: 0;
    font-size: 20px;
    font-weight: 800;
    color: #111d4a;
    border-left: 4px solid #ff6a00;
    padding-left: 12px;
    line-height: 1.2;
}
.hc-all {
    font-size: 13px;
    font-weight: 700;
    color: #ff6a00;
    text-decoration: none;
    white-space: nowrap;
}
.hc-all i { font-size: 10px; margin-left: 3px; }
.hc-all:hover { color: #d94f02; }

/* ---------- Hot Categories cards (restore — mega remove hoye gechilo) ---------- */
.hc-section { padding: 26px 0 10px; }
.hc-grid { display: grid; grid-template-columns: repeat(8, minmax(0,1fr)); gap: 14px; }
.hc-card {
    display: flex; flex-direction: column; background: #fff;
    border: 1px solid #ececec; border-radius: 10px; overflow: hidden;
    text-decoration: none; box-shadow: 0 1px 5px rgba(0,0,0,.05);
    transition: box-shadow .2s ease, transform .2s ease;
}
.hc-card:hover { box-shadow: 0 8px 22px rgba(0,0,0,.12); transform: translateY(-3px); }
.hc-img { display: block; background: #f7f7f8; aspect-ratio: 1/1; overflow: hidden; }
.hc-img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s ease; }
.hc-card:hover .hc-img img { transform: scale(1.06); }
.hc-info { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 3px; }
.hc-name {
    font-size: 13px; font-weight: 700; color: #111d4a; line-height: 1.3;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.hc-meta { display: flex; align-items: center; justify-content: space-between; font-size: 11.5px; color: #8a8a96; }
.hc-meta .fa-arrow-right { color: #ff6a00; font-size: 11px; }
.hc-count { color: #8a8a96; }

/* Mobile hamburger (drawer trigger) — desktop e hide */
.ev-mobile-menu {
    display: none; width: 40px; height: 40px; border: 0; border-radius: 10px;
    background: #1b2430; color: #fff; font-size: 16px; cursor: pointer; flex: 0 0 auto;
}
@media (max-width: 991px) {
    .hc-grid { grid-template-columns: repeat(4, minmax(0,1fr)); gap: 10px; }
    .ev-mobile-menu { display: inline-flex; align-items: center; justify-content: center; }
    .ev-allcats { display: none; }
}
@media (max-width: 575px) {
    .hc-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
    .hc-section { padding: 18px 0 6px; }
}

/* ==========================================================
   ADDED: 6 products per row (desktop) — responsive down
   ========================================================== */
.product-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
    gap: 14px !important;
}
/* shop/category page gulo ager 4-column e thakbe */
.product-grid--shop,
.product-grid--category {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
}

/* 6 column-e card guti fit hoy — ektoo choto typography/padding */
.evc-body { padding: 8px 10px 10px; gap: 5px; }
.evc-title { font-size: 12.5px; min-height: 2.5em; }
.evc-new { font-size: 14.5px; }
.evc-old { font-size: 11px; }
.evc-off { font-size: 10px; padding: 1px 5px; }
.evc-brand { font-size: 10.5px; }
.evc-vrf { font-size: 10px; }
.evc-foot { font-size: 10.5px; padding-top: 6px; }
.evc-meta { font-size: 11px; }
.evc-tagnew { font-size: 10px; padding: 1px 7px; }
.evc-add { height: 30px; font-size: 11.5px; }
.evc-eye { width: 30px; height: 30px; font-size: 12px; }
.evc-wish { width: 26px; height: 26px; font-size: 12px; }

@media (max-width: 1199px) {
    .product-grid { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; }
    .product-grid--shop, .product-grid--category { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
}
@media (max-width: 767px) {
    .product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; gap: 10px !important; }
    .product-grid--shop, .product-grid--category { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
}
@media (max-width: 575px) {
    .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 8px !important; }
    .product-grid--shop, .product-grid--category { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
}
