/* =====================================================================
   Muzein storefront V13 — loaded after style.css
   1. Thin, matching card borders + Shop-by-category hover on product cards
   2. Menus that only show while in use
   3. SEO content blocks, breadcrumbs, accessibility helpers
   ===================================================================== */

:root{
  --card-border:#bfe7f7;
  --card-border-hover:var(--brand-pink,#ed008c);
  --card-shadow-hover:0 14px 30px rgba(7,26,41,.13);
  --card-lift:translateY(-4px);
  --card-ease:cubic-bezier(.2,.8,.2,1);
}

/* ---------- 1. Cards ---------------------------------------------------- */
.product-card,
.category-card,
.improved-category-grid .category-card{
  border:1.5px solid var(--card-border)!important;
  border-width:1.5px!important;
  box-shadow:0 2px 8px rgba(7,26,41,.05)!important;
  transition:transform .22s var(--card-ease),box-shadow .22s var(--card-ease),border-color .22s var(--card-ease)!important;
  will-change:transform;
}
.product-card:hover,
.product-card:focus-within,
.category-card:hover,
.category-card:focus-visible{
  border-color:var(--card-border-hover)!important;
  box-shadow:var(--card-shadow-hover)!important;
  transform:var(--card-lift);
}
.product-card:hover .product-image>a>img{transform:scale(1.04)}
.product-image>a>img{transition:transform .35s var(--card-ease)}
.product-card:hover .product-title,
.category-card:hover b{color:var(--brand-pink-dark,#bd006f)}
.category-card>span{transition:transform .22s var(--card-ease)}
.category-card:hover>span{transform:translateX(4px)}
.product-card .product-image{border-bottom:1px solid #eef5f9}
.product-title-wrap{margin:4px 0 6px;font-size:inherit;line-height:inherit;font-weight:inherit}
.product-title-wrap .product-title{display:block}

/* ---------- 2. Menus: visible only while used --------------------------- */
@keyframes menuIn{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:none}}

/* Top department dropdowns: JavaScript adds .is-open with a short grace period */
.js .top-category-nav-item:hover>.top-category-dropdown{display:none!important}
.js .top-category-nav-item.is-open>.top-category-dropdown{display:block!important;animation:menuIn .16s ease-out}
.top-category-nav-item{position:relative}
.top-category-nav-item.is-open>a,.nav-more.is-open>button{background:var(--brand-pink,#ed008c)!important;color:#fff!important}
/* invisible bridge so the dropdown does not vanish while the pointer travels to it */
.top-category-dropdown::before{content:"";position:absolute;left:0;right:0;top:-12px;height:12px}

/* All Categories (header) */
.category-trigger.menu-open>.category-menu{animation:menuIn .16s ease-out}

/* Homepage department browser: nothing open on page load */
.js .home-category-item:hover>.home-category-flyout{display:none!important}
.js .home-category-item.active>.home-category-flyout{display:block!important;animation:menuIn .16s ease-out}
.js .home-category-item:not(.active):hover>.home-category-link{background:#f7fbfd!important}

/* Nested lists inside open menus */
.deep-category-item>.deep-category-menu{animation:menuIn .14s ease-out}

@media (hover:none),(max-width:900px){
  .js .top-category-nav-item.is-open>.top-category-dropdown{position:absolute;max-width:calc(100vw - 24px)}
}

/* ---------- 3. Header polish ------------------------------------------- */
.main-header{transition:box-shadow .2s ease}
body.is-scrolled .main-header{box-shadow:0 6px 18px rgba(7,26,41,.08)}
.search-box input[type="search"]::-webkit-search-cancel-button{cursor:pointer}
.search-suggestions .search-empty{padding:14px 16px;color:#64748b;font-size:13px}

/* ---------- 4. SEO content blocks --------------------------------------- */
.shop-hero .breadcrumbs,.breadcrumbs{display:flex;flex-wrap:wrap;gap:6px;align-items:center;font-size:12px;color:#64748b}
.shop-hero .breadcrumbs{margin:0 0 8px}
.shop-hero .breadcrumbs a,.breadcrumbs a{color:var(--brand-cyan-dark,#007eae);font-weight:700}
.shop-hero .breadcrumbs a:hover,.breadcrumbs a:hover{color:var(--brand-pink,#ed008c)}
nav.container.breadcrumbs{padding-top:16px}

.seo-intro .seo-intro-card{display:grid;grid-template-columns:minmax(0,1.5fr) minmax(0,1fr);gap:28px;align-items:center;background:#fff;border:1.5px solid var(--card-border);border-radius:16px;padding:28px 30px;box-shadow:0 2px 8px rgba(7,26,41,.05)}
.seo-intro h2{margin:0 0 10px;font-size:24px}
.seo-intro p{margin:0;color:#475569;line-height:1.75}
.seo-intro ul{list-style:none;margin:0;padding:0;display:grid;gap:12px}
.seo-intro li{display:grid;gap:2px;padding:12px 14px;border-left:3px solid var(--brand-cyan,#00a9e8);background:var(--brand-soft,#f4fbfe);border-radius:0 10px 10px 0}
.seo-intro li b{font-size:14px}
.seo-intro li span{font-size:12px;color:#64748b}
@media(max-width:900px){.seo-intro .seo-intro-card{grid-template-columns:1fr;padding:20px}}

/* ---------- 5. Accessibility helpers ----------------------------------- */
.visually-hidden{position:absolute!important;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}
.skip-link{position:absolute;left:12px;top:-60px;z-index:5000;background:#071a29;color:#fff;padding:10px 16px;border-radius:8px;font-weight:800;transition:top .15s}
.skip-link:focus{top:12px}
#main-content{display:block;height:0;outline:none}
a:focus-visible,button:focus-visible,select:focus-visible,input:focus-visible,[tabindex]:focus-visible{outline:3px solid rgba(0,169,232,.45);outline-offset:2px}

@media (prefers-reduced-motion:reduce){
  *,*::before,*::after{animation:none!important;transition:none!important}
  .product-card:hover,.category-card:hover{transform:none}
}

/* ---------- 6. Prices never break "UGX" from the amount ------------------ */
.product-card .price-row{display:flex;flex-wrap:wrap;align-items:baseline;gap:2px 8px}
.product-card .price-row .price,.product-card .price-row .old-price{white-space:nowrap}
.product-card .price{font-size:clamp(16px,1.35vw,21px)!important}
.product-card .card-footer-actions{gap:8px}
.product-card .card-footer-actions .btn{white-space:nowrap;padding-left:10px;padding-right:10px}

/* ---------- 7. Mobile: tidy header + category drawer ------------------- */
.mobile-drawer,.mobile-drawer-overlay{display:none}
@media(max-width:900px){
  .head-main{display:grid!important;grid-template-columns:auto 1fr!important;grid-template-areas:"brand actions" "search search"!important;align-items:center;gap:10px!important}
  .head-main>.brand{grid-area:brand}
  .head-main>.head-actions{grid-area:actions;justify-self:end}
  .head-main>.search-wrap{grid-area:search;width:100%}
  .brand img{height:52px!important;width:auto!important}
  .mobile-bottom{display:grid!important;grid-template-columns:repeat(6,1fr)}
  .mobile-bottom>a,.mobile-bottom>button{font-size:10.5px!important;min-width:0}
  .mobile-bottom>button{background:none;border:0;font:inherit;color:inherit;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;cursor:pointer;font-size:11px}
  .mobile-bottom>button span{font-size:19px;line-height:1}
  .mobile-drawer-overlay{display:block;position:fixed;inset:0;background:rgba(7,26,41,.45);z-index:2990;backdrop-filter:blur(2px)}
  .mobile-drawer-overlay[hidden]{display:none}
  .mobile-drawer{display:flex;flex-direction:column;position:fixed;top:0;bottom:0;left:0;width:min(88vw,360px);background:#fff;z-index:3000;transform:translateX(-102%);transition:transform .25s var(--card-ease);box-shadow:12px 0 40px rgba(7,26,41,.25)}
  .mobile-drawer.open{transform:none}
  body.drawer-open{overflow:hidden}
  .mobile-drawer-head{display:flex;justify-content:space-between;align-items:center;padding:0 16px;height:58px;background:var(--brand-cyan,#00a9e8);color:#fff;font-size:17px}
  .mobile-drawer-head button{background:rgba(255,255,255,.2);border:0;color:#fff;width:36px;height:36px;border-radius:50%;font-size:24px;line-height:1;cursor:pointer}
  .mobile-drawer-body{overflow-y:auto;flex:1;padding:6px 0 90px}
  .mobile-drawer .deep-category-menu{display:block!important;position:static!important;width:auto!important;min-width:0!important;max-height:none!important;box-shadow:none!important;border:0!important;border-radius:0!important;padding:0!important;margin:0!important;background:transparent!important;list-style:none;animation:none}
  .mobile-drawer .deep-category-item{border-bottom:1px solid #eef2f6;position:static}
  .mobile-drawer .deep-category-item>.deep-category-menu{display:none!important;background:#f7fbfd!important;border-left:3px solid var(--brand-cyan,#00a9e8)!important;margin-left:16px!important}
  .mobile-drawer .deep-category-item.open>.deep-category-menu{display:block!important}
  .mobile-drawer .deep-category-link{display:flex!important;align-items:center;justify-content:space-between;gap:10px;min-height:48px;padding:0 16px!important;font-size:14px!important;font-weight:700;color:#111}
  .mobile-drawer .deep-category-item.open>.deep-category-link{color:var(--brand-pink-dark,#bd006f)}
  .mobile-drawer .deep-category-item.open>.deep-category-link>b{transform:rotate(90deg)}
  .mobile-drawer .deep-category-link>b{transition:transform .2s;font-size:18px;color:#94a3b8}
  .mobile-drawer-all{display:block;margin:16px;padding:13px;text-align:center;border-radius:10px;background:var(--brand-navy,#071a29);color:#fff;font-weight:800}
}
