/* =====================================================
   Shop Theme — Static CSS (cached by browser)
   ===================================================== */

/* ── Variables & Base ── */
:root {
    --bs-primary: #ef5b6e;
    --bs-primary-rgb: 239, 91, 110;
}
body { color: #1a1a1a; }
a { text-decoration: none; }

/* ── Buttons ── */
.btn-primary {
    background: var(--bs-primary);
    border-color: var(--bs-primary);
    font-weight: 500;
}
.btn-primary:hover, .btn-primary:focus {
    background: #d94c5e;
    border-color: #d94c5e;
}
.btn-outline-primary {
    color: var(--bs-primary);
    border-color: var(--bs-primary);
}
.btn-outline-primary:hover { background: var(--bs-primary); border-color: var(--bs-primary); }
.text-primary { color: var(--bs-primary) !important; }
.form-control:focus {
    border-color: var(--bs-primary);
    box-shadow: 0 0 0 0.2rem rgba(239, 91, 110, 0.15);
}

/* ── Promo bar ── */
.promo-bar {
    background: var(--bs-primary);
    color: #fff;
    font-size: 0.85rem;
    padding: 0.5rem 0;
    text-align: center;
}
.promo-bar a { color: #fff; font-weight: 700; text-decoration: underline; text-underline-offset: 2px; }

/* ── Header ── */
.shop-header { background: #fff; border-bottom: 1px solid #eef0f2; z-index: 1030 !important; }
.shop-header .brand-name { font-size: 1.5rem; font-weight: 700; color: #1a1a1a; }
.shop-header .brand-name span { color: var(--bs-primary); }
.shop-header .nav-link { color: #4a4a4a; font-weight: 400; padding: 0.5rem 0.6rem; }
.shop-header .nav-link:hover, .shop-header .nav-link.active { color: var(--bs-primary); }
.shop-header .dropdown-menu { z-index: 1040 !important; }
.nav-icon-badge {
    position: absolute;
    top: 2px; right: 2px;
    transform: translate(50%, -50%);
    min-width: 18px; height: 18px;
    background: var(--bs-primary); color: #fff;
    font-size: 0.65rem; font-weight: 700;
    border-radius: 50px;
    display: flex; align-items: center; justify-content: center;
    padding: 0 4px;
    border: 2px solid #fff;
    line-height: 1;
}

/* ── Cart notification bar ── */
.cart-notify {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1055;
    background: #fff;
    border-bottom: 1px solid #dee2e6;
    box-shadow: 0 4px 16px rgba(0,0,0,.08);
    padding: 0.85rem 0;
    transform: translateY(-110%);
    transition: transform .3s cubic-bezier(.4,0,.2,1);
    will-change: transform;
}
.cart-notify--show { transform: translateY(0); }
.cart-notify-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

/* ── Side Drawer ── */
#mobileDrawer {
    position: fixed; inset: 0; z-index: 1050;
    pointer-events: none;
    contain: layout style;
}
#mobileDrawer.open { pointer-events: all; }

#drawerOverlay {
    position: absolute; inset: 0;
    background: rgba(0,0,0,.45);
    opacity: 0; transition: opacity .28s ease;
    will-change: opacity;
}
#mobileDrawer.open #drawerOverlay { opacity: 1; }

#drawerPanel {
    position: absolute; top: 0; left: 0; bottom: 0;
    width: min(80vw, 300px);
    background: #fff;
    transform: translateX(-100%);
    transition: transform .28s cubic-bezier(.4,0,.2,1);
    display: flex; flex-direction: column;
    overflow-y: auto;
    will-change: transform;
}
#mobileDrawer.open #drawerPanel { transform: translateX(0); }

.drawer-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 18px 20px 14px;
    border-bottom: 1px solid #f0f0f0;
}
.drawer-close {
    background: none; border: none; padding: 4px; line-height: 1;
    font-size: 1.4rem; color: #555; cursor: pointer;
}
.drawer-nav a {
    display: block; padding: 13px 20px;
    font-size: 0.95rem; color: #222; text-decoration: none;
    border-bottom: 1px solid #f5f5f5;
    transition: color .15s, background .15s;
}
.drawer-nav a:hover,
.drawer-nav a.active { color: var(--bs-primary); background: #fff5f6; }
.drawer-nav a .nav-label-sub {
    font-size: 0.78rem; color: #888; display: block; margin-top: 1px;
}
.drawer-footer {
    padding: 16px 20px;
    border-top: 1px solid #f0f0f0;
    margin-top: auto;
}

/* ── Mobile top bar ── */
.mobile-header-bar {
    display: flex; align-items: center;
    padding: 10px 12px;
    background: #fff;
    border-bottom: 1px solid #eef0f2;
    gap: 6px;
}
.mobile-header-bar .mh-brand {
    flex: 1; text-align: center;
    font-size: 1.15rem; font-weight: 700; color: #1a1a1a;
    text-decoration: none;
}
.mobile-header-bar .mh-brand span { color: var(--bs-primary); }
.mh-icon-btn {
    position: relative;
    width: 38px; height: 38px;
    display: inline-flex; align-items: center; justify-content: center;
    background: none; border: none; color: #333; cursor: pointer;
    text-decoration: none; border-radius: 8px;
    transition: background .15s;
}
.mh-icon-btn:hover { background: #f5f5f5; color: #333; }
.mh-badge {
    position: absolute; top: 2px; right: 2px;
    transform: translate(35%, -35%);
    min-width: 17px; height: 17px;
    background: var(--bs-primary); color: #fff;
    font-size: 0.6rem; font-weight: 700;
    border-radius: 50px; display: flex;
    align-items: center; justify-content: center;
    padding: 0 3px; border: 2px solid #fff; line-height: 1;
}
.mh-badge.red { background: #ef5b6e; }

/* ── Mobile search bar ── */
#mobileSearchBar {
    display: none;
    padding: 8px 12px;
    background: #fff;
    border-bottom: 1px solid #eef0f2;
}
#mobileSearchBar.show { display: block; }

/* ── Icon Popup (mini cart + user) ── */
.icon-popup-wrap { position: relative; }
.icon-popup {
    display: none;
    position: absolute; top: calc(100% + 8px); right: 0;
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,.14);
    z-index: 1045;
    min-width: 280px;
    max-width: 320px;
    animation: popIn .18s ease;
    contain: layout;
}
.icon-popup.show { display: block; }
@keyframes popIn {
    from { opacity:0; transform:translateY(-6px) scale(.97); }
    to   { opacity:1; transform:translateY(0) scale(1); }
}
.icon-popup::before {
    content: '';
    position: absolute; top: -7px; right: 14px;
    width: 13px; height: 13px;
    background: #fff;
    border-left: 1px solid #e8e8e8;
    border-top: 1px solid #e8e8e8;
    transform: rotate(45deg);
}

/* ── Mini cart ── */
.mini-cart-item {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 14px;
    border-bottom: 1px solid #f3f3f3;
}
.mini-cart-item img {
    width: 52px; height: 52px; object-fit: cover;
    border-radius: 8px; flex-shrink: 0;
    border: 1px solid #f0f0f0;
}
.mini-cart-item .thumb-placeholder {
    width: 52px; height: 52px; border-radius: 8px;
    background: #f5f5f5; display: flex; align-items: center;
    justify-content: center; color: #ccc; flex-shrink: 0;
    font-size: 1.2rem;
}
.mini-cart-item .item-name {
    font-size: .82rem; font-weight: 500; line-height: 1.35;
    display: -webkit-box; -webkit-line-clamp: 2;
    -webkit-box-orient: vertical; overflow: hidden;
}
.mini-cart-item .item-meta { font-size: .78rem; color: #888; }
.mini-cart-subtotal {
    padding: 10px 14px;
    display: flex; justify-content: space-between; align-items: center;
    font-size: .88rem;
    border-bottom: 1px solid #f3f3f3;
}
.mini-cart-actions {
    display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
    padding: 10px 14px 12px;
}

/* ── Blog mega dropdown ── */
.blog-mega-wrap {
    position: static !important;
    align-self: stretch;
    display: flex !important;
    align-items: center;
}
.blog-mega-panel {
    display: none;
    position: absolute;
    width: min(940px, 96vw);
    left: 50%;
    transform: translateX(-50%);
    top: 100%;
    background: #fff;
    border-top: 3px solid var(--bs-primary);
    box-shadow: 0 12px 40px rgba(0,0,0,.13);
    padding: 20px 24px 14px;
    z-index: 1045;
    contain: layout;
}
.blog-mega-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
}
.blog-mega-card { display: flex; flex-direction: column; }
.blog-mega-thumb {
    position: relative;
    width: 100%; aspect-ratio: 3/2;
    overflow: hidden;
    background: #f0f0f0;
}
.blog-mega-thumb img {
    width: 100%; height: 100%; object-fit: cover;
    transition: transform .3s ease;
}
.blog-mega-card:hover .blog-mega-thumb img { transform: scale(1.05); }
.blog-mega-thumb-ph {
    width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
    color: #ccc; font-size: 1.5rem;
}
.blog-mega-badge {
    position: absolute; bottom: 7px; left: 7px;
    background: rgba(0,0,0,.52);
    color: #fff; font-size: .6rem; font-weight: 700;
    padding: 2px 8px; border-radius: 3px;
    letter-spacing: .3px; text-transform: uppercase;
}
.blog-mega-info { padding-top: 8px; }
.blog-mega-title {
    font-size: .82rem; font-weight: 700; line-height: 1.4;
    color: #111;
    display: -webkit-box; -webkit-line-clamp: 2;
    -webkit-box-orient: vertical; overflow: hidden;
    margin-bottom: 4px;
}
.blog-mega-card:hover .blog-mega-title { color: var(--bs-primary); }
.blog-mega-date { font-size: .72rem; color: #999; }
