/* NovaStore 4 Alpha 0.2.0 — storefront foundation for OpenCart 4.1.0.4 */
:root {
  --ns-primary: #2563eb;
  --ns-accent: #f59e0b;
  --ns-buy: #111827;
  --ns-sale: #dc2626;
  --ns-body-bg: #f6f8fb;
  --ns-surface: #ffffff;
  --ns-text: #111827;
  --ns-muted: #64748b;
  --ns-border: #e5e7eb;
  --ns-header-bg: #ffffff;
  --ns-menu-bg: #2563eb;
  --ns-footer-bg: #101827;
  --ns-footer-text: #b7c1d0;
  --ns-radius: 14px;
  --ns-shadow-sm: 0 8px 26px rgba(15, 23, 42, .06);
  --ns-shadow: 0 18px 44px rgba(15, 23, 42, .11);
}

html[data-ns-theme="dark"] {
  --ns-body-bg: #0b1220;
  --ns-surface: #111827;
  --ns-text: #e5e7eb;
  --ns-muted: #94a3b8;
  --ns-border: #2a374a;
  --ns-header-bg: #111827;
  --ns-buy: #2563eb;
  color-scheme: dark;
}

body.ns-theme {
  background: var(--ns-body-bg);
  color: var(--ns-text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
body.ns-theme a { color: var(--ns-primary); }
body.ns-theme a:hover { opacity: .92; }
body.ns-theme main { min-height: 50vh; }

.ns-topbar {
  background: color-mix(in srgb, var(--ns-header-bg) 94%, var(--ns-body-bg));
  border-bottom: 1px solid var(--ns-border);
  color: var(--ns-muted);
  font-size: 13px;
  padding: 8px 0;
}
.ns-topbar a, .ns-topbar .dropdown-toggle { color: var(--ns-muted) !important; text-decoration: none; }
.ns-topbar a:hover, .ns-topbar .dropdown-toggle:hover { color: var(--ns-primary) !important; }

.ns-header {
  background: var(--ns-header-bg);
  border-bottom: 1px solid var(--ns-border);
  padding: 18px 0;
  transition: box-shadow .18s ease, padding .18s ease;
}
.ns-sticky-header .ns-header { position: sticky; top: 0; z-index: 1025; box-shadow: 0 8px 28px rgba(15, 23, 42, .07); }
.ns-logo img { max-height: 60px; width: auto; }
.ns-logo h1 { margin: 0; font-size: 28px; font-weight: 800; }
.ns-logo h1 a { color: var(--ns-text); text-decoration: none; }

.ns-search-form { margin: 0; }
.ns-search-wrap #search, .ns-search-wrap #search form { max-width: 100%; margin-bottom: 0 !important; }
.ns-search-wrap #search .form-control,
.ns-search-form .form-control {
  min-height: 50px;
  background: var(--ns-body-bg);
  border: 1px solid var(--ns-border);
  color: var(--ns-text);
  border-radius: var(--ns-radius) 0 0 var(--ns-radius);
  box-shadow: none;
}
.ns-search-wrap #search .btn,
.ns-search-form .btn {
  min-width: 54px;
  border-radius: 0 var(--ns-radius) var(--ns-radius) 0;
  border-color: var(--ns-primary);
  background: var(--ns-primary);
  color: #fff;
}

.ns-cart-button {
  min-height: 50px;
  border-radius: var(--ns-radius);
  border: 1px solid var(--ns-border);
  background: var(--ns-surface);
  color: var(--ns-text);
  box-shadow: none;
}
.ns-cart-button:hover, .ns-cart-button:focus { border-color: var(--ns-primary); color: var(--ns-primary); background: var(--ns-surface); }
.ns-mini-cart { width: min(420px, 92vw); margin-top: 10px !important; border: 1px solid var(--ns-border); border-radius: var(--ns-radius); background: var(--ns-surface); box-shadow: var(--ns-shadow); overflow: hidden; }
.ns-mini-cart__items { max-height: 48vh; overflow: auto; }
.ns-mini-cart__item { display: grid; grid-template-columns: 72px minmax(0, 1fr) auto; gap: 12px; align-items: start; padding: 12px 0; border-bottom: 1px solid var(--ns-border); }
.ns-mini-cart__image { width: 72px; aspect-ratio: 1; border: 1px solid var(--ns-border); border-radius: 10px; background: #fff; overflow: hidden; }
.ns-mini-cart__image img { width: 100%; height: 100%; object-fit: contain; }
.ns-mini-cart__name { color: var(--ns-text) !important; font-weight: 700; text-decoration: none; display: block; line-height: 1.3; }
.ns-mini-cart__price { display: flex; gap: 6px; align-items: baseline; margin-top: 6px; }
.ns-mini-cart__remove .btn { width: 32px; height: 32px; padding: 0; border-radius: 50%; }
.ns-mini-cart__totals { display: grid; gap: 8px; padding-top: 14px; color: var(--ns-text); }

.ns-menu-wrap { margin-top: 14px; margin-bottom: 24px; }
.ns-menu { background: var(--ns-menu-bg) !important; border: 0 !important; border-radius: var(--ns-radius); padding: 0 10px; box-shadow: var(--ns-shadow-sm); }
.ns-menu .navbar-nav .nav-link, .ns-menu #category, .ns-menu .navbar-toggler { color: #fff !important; }
.ns-menu .navbar-nav .nav-link { padding: 14px 15px; font-weight: 700; border-radius: 10px; }
.ns-menu .navbar-nav .nav-link:hover, .ns-menu .navbar-nav .nav-link:focus { background: rgba(255,255,255,.13); }
.ns-menu__dropdown { border: 1px solid var(--ns-border); border-radius: var(--ns-radius); box-shadow: var(--ns-shadow); background: var(--ns-surface); padding: 12px; }
.ns-menu__dropdown .dropdown-item { color: var(--ns-text); border-radius: 8px; }
.ns-menu__dropdown .dropdown-item:hover { color: var(--ns-primary); background: var(--ns-body-bg); }

.ns-theme .breadcrumb { background: transparent; padding: 0; margin: 4px 0 18px; font-size: 13px; }
.ns-theme .breadcrumb a { text-decoration: none; color: var(--ns-muted); }
.ns-theme .form-control, .ns-theme .form-select { background-color: var(--ns-surface); border-color: var(--ns-border); color: var(--ns-text); border-radius: calc(var(--ns-radius) - 2px); }
.ns-theme .btn { border-radius: calc(var(--ns-radius) - 2px); font-weight: 700; }
.ns-theme .btn-primary { background: var(--ns-primary); border-color: var(--ns-primary); }
.ns-theme .btn-light { background: var(--ns-surface); border-color: var(--ns-border); color: var(--ns-text); }
.ns-theme .card, .ns-theme .list-group-item, .ns-theme .dropdown-menu, .ns-theme .modal-content, .ns-theme .offcanvas, .ns-theme .table { background-color: var(--ns-surface); color: var(--ns-text); border-color: var(--ns-border); }

/* Home */
.ns-home #content > * { margin-bottom: 28px; }
.ns-home .swiper, .ns-home .carousel { border-radius: var(--ns-radius); overflow: hidden; }

/* Category */
.ns-page-heading h1 { font-size: clamp(28px, 3vw, 42px); font-weight: 800; letter-spacing: -.035em; margin: 0 0 20px; }
.ns-category-intro { display: grid; grid-template-columns: minmax(150px, 240px) 1fr; gap: 24px; align-items: start; background: var(--ns-surface); border: 1px solid var(--ns-border); border-radius: var(--ns-radius); padding: 18px; margin-bottom: 24px; }
.ns-category-intro__image { border-radius: calc(var(--ns-radius) - 4px); overflow: hidden; background: #fff; }
.ns-category-intro__text { color: var(--ns-muted); line-height: 1.65; }
.ns-subcategories { margin: 8px 0 28px; }
.ns-subcategories h3 { font-weight: 800; margin-bottom: 14px; }
.ns-subcategories__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; }
.ns-subcategory { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 13px 14px; background: var(--ns-surface); border: 1px solid var(--ns-border); border-radius: 12px; color: var(--ns-text) !important; text-decoration: none; font-weight: 700; transition: .16s ease; }
.ns-subcategory:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--ns-primary) 45%, var(--ns-border)); box-shadow: var(--ns-shadow-sm); }
.ns-subcategory i { color: var(--ns-primary); }
.ns-catalog-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 16px; background: var(--ns-surface); border: 1px solid var(--ns-border); border-radius: var(--ns-radius); padding: 12px; margin-bottom: 20px; }
.ns-catalog-toolbar__left { display: flex; gap: 10px; align-items: center; }
.ns-catalog-toolbar__controls { display: flex; gap: 10px; align-items: center; margin-left: auto; }
.ns-catalog-toolbar__controls .input-group { width: auto; }
.ns-empty-state { text-align: center; padding: 64px 20px; background: var(--ns-surface); border: 1px solid var(--ns-border); border-radius: var(--ns-radius); }
.ns-empty-state i { font-size: 48px; color: var(--ns-muted); margin-bottom: 16px; }

/* Product cards */
.ns-product-card { position: relative; height: 100%; background: var(--ns-surface); border: 1px solid var(--ns-border); border-radius: var(--ns-radius); overflow: hidden; display: flex; flex-direction: column; transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
.ns-product-card:hover { transform: translateY(-4px); border-color: color-mix(in srgb, var(--ns-primary) 36%, var(--ns-border)); box-shadow: var(--ns-shadow); }
.ns-product-card__image { position: relative; aspect-ratio: 1 / 1; background: #fff; overflow: hidden; display: grid; place-items: center; }
.ns-product-card__image > a { display: block; width: 100%; height: 100%; }
.ns-product-card__image img { width: 100%; height: 100%; object-fit: contain; padding: 12px; }
.ns-badge { position: absolute; z-index: 3; top: 12px; left: 12px; padding: 6px 9px; border-radius: 999px; font-size: 11px; line-height: 1; font-weight: 800; letter-spacing: .04em; color: #fff; box-shadow: 0 5px 18px rgba(0,0,0,.12); }
.ns-badge--sale { background: var(--ns-sale); }
.ns-product-card__quick-actions { position: absolute; z-index: 4; top: 12px; right: 12px; display: grid; gap: 8px; opacity: 0; transform: translateX(6px); transition: .18s ease; }
.ns-product-card:hover .ns-product-card__quick-actions { opacity: 1; transform: translateX(0); }
.ns-icon-btn { width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--ns-border); background: var(--ns-surface); color: var(--ns-text); box-shadow: var(--ns-shadow-sm); }
.ns-icon-btn:hover { background: var(--ns-primary); color: #fff; border-color: var(--ns-primary); }
.ns-product-card__content { padding: 16px; display: flex; flex-direction: column; flex: 1; }
.ns-product-card__description { flex: 1; }
.ns-product-card__rating { color: var(--ns-accent); font-size: 12px; min-height: 18px; margin-bottom: 7px; }
.ns-product-card__title { font-size: 16px; line-height: 1.35; margin: 0 0 8px; }
.ns-product-card__title a { color: var(--ns-text) !important; text-decoration: none; }
.ns-product-card__title a:hover { color: var(--ns-primary) !important; }
.ns-product-card__excerpt { color: var(--ns-muted); font-size: 13px; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 38px; }
.ns-product-card__price { margin-top: 12px; display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.ns-product-card__price .price-new { font-size: 20px; font-weight: 850; color: var(--ns-text); }
.ns-product-card__price--sale .price-new { color: var(--ns-sale); }
.ns-product-card__price .price-old { color: var(--ns-muted); text-decoration: line-through; }
.ns-product-card__price .price-tax { width: 100%; font-size: 11px; color: var(--ns-muted); }
.ns-product-card__buy-form { margin-top: 15px; }
.ns-buy-btn { width: 100%; min-height: 44px; display: flex; align-items: center; justify-content: center; gap: 9px; background: var(--ns-buy); border: 1px solid var(--ns-buy); color: #fff !important; }
.ns-buy-btn:hover { filter: brightness(1.12); }

/* Product page: keep core markup, style it rather than replace business logic in this Alpha */
#product-info #content > .row.mb-3 { gap: 12px; }
#product-info .image.magnific-popup { background: var(--ns-surface); border: 1px solid var(--ns-border); border-radius: var(--ns-radius); padding: 16px; }
#product-info .image.magnific-popup > a > img { width: 100%; border: 0 !important; border-radius: calc(var(--ns-radius) - 4px); }
#product-info .image.magnific-popup > div { display: flex; gap: 8px; flex-wrap: wrap; }
#product-info .image.magnific-popup > div img { width: 76px; height: 76px; object-fit: contain; background: #fff; border-radius: 10px; }
#product-info h1 { font-size: clamp(28px, 3vw, 42px); font-weight: 850; letter-spacing: -.035em; }
#product-info .price-new { font-size: 30px; font-weight: 850; color: var(--ns-text); }
#product-info .price-old { color: var(--ns-muted); text-decoration: line-through; }
#product-info #product { margin-top: 18px; padding: 18px; background: var(--ns-surface); border: 1px solid var(--ns-border); border-radius: var(--ns-radius); }
#product-info #button-cart { background: var(--ns-buy); border-color: var(--ns-buy); min-height: 48px; }
#product-info .nav-tabs { border-bottom-color: var(--ns-border); margin-top: 28px; gap: 6px; }
#product-info .nav-tabs .nav-link { border-radius: 10px 10px 0 0; color: var(--ns-muted); font-weight: 750; }
#product-info .nav-tabs .nav-link.active { color: var(--ns-primary); background: var(--ns-surface); border-color: var(--ns-border) var(--ns-border) var(--ns-surface); }
#product-info .tab-content { background: var(--ns-surface); border: 1px solid var(--ns-border); border-top: 0; border-radius: 0 0 var(--ns-radius) var(--ns-radius); padding: 20px; }

.ns-mobile-buy { display: none; }

.ns-footer { margin-top: 56px; padding: 46px 0 18px; background: var(--ns-footer-bg); color: var(--ns-footer-text); }
.ns-footer h5 { color: #fff; font-weight: 800; margin-bottom: 14px; }
.ns-footer a { color: var(--ns-footer-text) !important; text-decoration: none; }
.ns-footer a:hover { color: #fff !important; }
.ns-footer li { margin-bottom: 8px; }
.ns-footer__bottom { border-top: 1px solid rgba(255,255,255,.10); margin-top: 28px; padding-top: 18px; }

.ns-theme-toggle { position: fixed; right: 18px; bottom: 18px; z-index: 1080; width: 46px; height: 46px; border: 1px solid var(--ns-border); border-radius: 50%; background: var(--ns-surface); color: var(--ns-text); box-shadow: var(--ns-shadow); display: grid; place-items: center; }
.ns-mobile-nav { display: none; }

@media (max-width: 1199.98px) {
  .ns-catalog-toolbar { align-items: stretch; }
  .ns-catalog-toolbar__controls { flex: 1; }
  .ns-catalog-toolbar__controls .input-group { flex: 1; }
}

@media (max-width: 991.98px) {
  .ns-menu { padding: 8px 12px; }
  .ns-menu #category { font-weight: 700; }
  .ns-menu .navbar-toggler { border-color: rgba(255,255,255,.25); }
  .ns-menu .navbar-nav .nav-link { padding: 10px 6px; }
  .ns-category-intro { grid-template-columns: 160px 1fr; }
  .ns-catalog-toolbar { flex-direction: column; }
  .ns-catalog-toolbar__controls { width: 100%; }
}

@media (max-width: 767.98px) {
  body.ns-theme.ns-has-mobile-nav { padding-bottom: 72px; }
  .ns-topbar { display: none; }
  .ns-header { padding: 10px 0 12px; }
  .ns-logo img { max-height: 44px; }
  .ns-header__row { --bs-gutter-y: .65rem; }
  .ns-menu-wrap { margin-top: 10px; margin-bottom: 15px; }
  .ns-cart-button__text { display: none; }
  .ns-cart-button { min-height: 44px; min-width: 50px; }
  .ns-category-intro { grid-template-columns: 1fr; padding: 12px; }
  .ns-category-intro__image { max-width: 180px; }
  .ns-catalog-toolbar__controls { display: grid; grid-template-columns: 1fr; }
  .ns-product-card:hover { transform: none; box-shadow: none; }
  .ns-product-card__quick-actions { opacity: 1; transform: none; }
  .ns-product-card__excerpt { display: none; }
  .ns-product-card__content { padding: 12px; }
  .ns-product-card__title { font-size: 14px; }
  .ns-product-card__price .price-new { font-size: 17px; }
  .ns-buy-btn span { display: none; }

  .ns-mobile-nav { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 1070; min-height: 64px; background: var(--ns-surface); border-top: 1px solid var(--ns-border); box-shadow: 0 -10px 28px rgba(15,23,42,.10); padding-bottom: env(safe-area-inset-bottom); }
  .ns-mobile-nav__item { color: var(--ns-muted) !important; text-decoration: none; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 4px; font-size: 10px; min-width: 0; }
  .ns-mobile-nav__item i { font-size: 18px; }
  .ns-mobile-nav__item:hover { color: var(--ns-primary) !important; }
  .ns-theme-toggle { bottom: 18px; right: 14px; }
  body.ns-has-mobile-nav .ns-theme-toggle { bottom: 78px; }

  .ns-mobile-buy { display: flex; align-items: center; gap: 10px; position: fixed; left: 10px; right: 10px; bottom: 14px; z-index: 1065; padding: 10px; background: var(--ns-surface); border: 1px solid var(--ns-border); border-radius: 14px; box-shadow: var(--ns-shadow); }
  body.ns-has-mobile-nav .ns-mobile-buy { bottom: 74px; }
  .ns-mobile-buy__price { flex: 1; min-width: 0; font-size: 18px; font-weight: 850; color: var(--ns-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .ns-mobile-buy__button { min-width: 128px; background: var(--ns-buy); border-color: var(--ns-buy); color: #fff; }
}

@media (max-width: 420px) {
  .ns-subcategories__grid { grid-template-columns: 1fr 1fr; }
  .ns-subcategory { font-size: 12px; padding: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  .ns-theme *, .ns-theme *::before, .ns-theme *::after { transition-duration: .001ms !important; animation-duration: .001ms !important; }
}

/* NovaStore 0.3: Header controls, Mega Menu, AJAX Search, Offcanvas Cart */
.ns-header-actions { display: flex; align-items: center; gap: 8px; }
.ns-header-action { width: 44px; height: 44px; align-items: center; justify-content: center; border-radius: 12px; border: 1px solid var(--ns-border); background: var(--ns-surface); color: var(--ns-text) !important; text-decoration: none; transition: .16s ease; }
.ns-header-action:hover { color: #fff !important; background: var(--ns-primary); border-color: var(--ns-primary); transform: translateY(-1px); }
.ns-header-cart { min-width: 0; }
.ns-header-style--compact .ns-topbar { display: none; }
.ns-header-style--compact .ns-header { padding-top: 9px; padding-bottom: 9px; }
.ns-header-style--compact .ns-logo img { max-height: 42px; }
.ns-header-style--compact .ns-menu-wrap { margin-top: 8px; }

/* Mega Menu v1 */
@media (min-width: 992px) {
  .ns-menu--mega .navbar-collapse,
  .ns-menu--mega .ns-menu__list { position: static; }
  .ns-menu--mega .ns-mega-parent { position: static; }
  .ns-mega-dropdown { left: 0 !important; right: 0 !important; width: 100%; margin-top: 0 !important; padding: 0; border: 1px solid var(--ns-border); border-top: 0; border-radius: 0 0 var(--ns-radius) var(--ns-radius); background: var(--ns-surface); box-shadow: var(--ns-shadow); overflow: hidden; }
  .ns-mega-dropdown__head { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 18px 22px; border-bottom: 1px solid var(--ns-border); background: color-mix(in srgb, var(--ns-primary) 5%, var(--ns-surface)); }
  .ns-mega-dropdown__title { font-size: 19px; font-weight: 850; color: var(--ns-text) !important; text-decoration: none; }
  .ns-mega-dropdown__all { display: inline-flex; gap: 8px; align-items: center; color: var(--ns-primary) !important; text-decoration: none; font-weight: 750; }
  .ns-mega-grid { display: grid; grid-template-columns: repeat(var(--ns-mega-cols, 4), minmax(0, 1fr)); gap: 0; padding: 12px; }
  .ns-mega-link { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 48px; padding: 10px 12px; border-radius: 10px; color: var(--ns-text) !important; text-decoration: none; font-weight: 650; }
  .ns-mega-link i { font-size: 11px; color: var(--ns-muted); transition: transform .15s ease; }
  .ns-mega-link:hover { background: color-mix(in srgb, var(--ns-primary) 9%, var(--ns-surface)); color: var(--ns-primary) !important; }
  .ns-mega-link:hover i { color: var(--ns-primary); transform: translateX(2px); }
}

/* AJAX Search */
.ns-search { position: relative; z-index: 1055; }
.ns-search-form { position: relative; z-index: 2; }
.ns-search-form .form-control { border-radius: 14px 0 0 14px; border-color: var(--ns-border); background: var(--ns-surface); color: var(--ns-text); }
.ns-search-form .btn { border-radius: 0 14px 14px 0; min-width: 58px; }
.ns-search.is-loading .ns-search-form::after { content: ''; position: absolute; right: 72px; top: 50%; width: 16px; height: 16px; margin-top: -8px; border: 2px solid var(--ns-border); border-top-color: var(--ns-primary); border-radius: 50%; animation: ns-spin .75s linear infinite; z-index: 4; }
@keyframes ns-spin { to { transform: rotate(360deg); } }
.ns-search-results { position: absolute; top: calc(100% + 8px); left: 0; right: 0; max-height: min(70vh, 620px); overflow: auto; background: var(--ns-surface); border: 1px solid var(--ns-border); border-radius: 16px; box-shadow: 0 22px 60px rgba(15,23,42,.18); z-index: 1056; }
.ns-search-results[hidden] { display: none !important; }
.ns-search-results__body { padding: 10px; }
.ns-search-results__heading { display: flex; align-items: center; gap: 7px; padding: 9px 10px 7px; font-size: 11px; letter-spacing: .07em; text-transform: uppercase; font-weight: 850; color: var(--ns-muted); }
.ns-search-products { display: grid; gap: 4px; }
.ns-search-product { display: grid; grid-template-columns: 56px minmax(0,1fr) auto; align-items: center; gap: 12px; min-height: 68px; padding: 6px 9px; border-radius: 11px; text-decoration: none; color: var(--ns-text) !important; }
.ns-search-product:hover { background: color-mix(in srgb, var(--ns-primary) 8%, var(--ns-surface)); }
.ns-search-product__image { width: 56px; height: 56px; object-fit: contain; border: 1px solid var(--ns-border); border-radius: 9px; background: #fff; }
.ns-search-product__meta { min-width: 0; display: grid; gap: 3px; }
.ns-search-product__name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 750; }
.ns-search-product__model { color: var(--ns-muted); font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ns-search-product__price { display: grid; justify-items: end; gap: 2px; white-space: nowrap; }
.ns-search-product__price strong { color: var(--ns-text); }
.ns-search-product__price del { color: var(--ns-muted); font-size: 11px; }
.ns-search-links { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 4px; }
.ns-search-link { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px; border-radius: 10px; color: var(--ns-text) !important; text-decoration: none; }
.ns-search-link:hover { background: color-mix(in srgb, var(--ns-primary) 8%, var(--ns-surface)); color: var(--ns-primary) !important; }
.ns-search-link i { font-size: 10px; color: var(--ns-muted); }
.ns-search-chips { display: flex; flex-wrap: wrap; gap: 7px; padding: 4px 8px 8px; }
.ns-search-chip { padding: 7px 10px; border: 1px solid var(--ns-border); border-radius: 999px; color: var(--ns-text) !important; text-decoration: none; font-size: 12px; }
.ns-search-chip:hover { background: var(--ns-primary); border-color: var(--ns-primary); color: #fff !important; }
.ns-search-all { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 8px; padding: 13px 12px; border-top: 1px solid var(--ns-border); color: var(--ns-primary) !important; text-decoration: none; font-weight: 800; }

/* Cart drawer */
.ns-cart-widget { min-width: 0; }
.ns-cart-button { min-height: 46px; border-radius: 12px; border: 1px solid var(--ns-border); background: var(--ns-surface); color: var(--ns-text); display: inline-flex; align-items: center; justify-content: center; gap: 9px; white-space: nowrap; }
.ns-cart-button:hover { background: var(--ns-primary); border-color: var(--ns-primary); color: #fff; }
.ns-cart-drawer { --bs-offcanvas-width: min(440px, 94vw); background: var(--ns-surface); color: var(--ns-text); }
.ns-cart-drawer__header { border-bottom: 1px solid var(--ns-border); padding: 18px 20px; }
.ns-cart-drawer__eyebrow { color: var(--ns-primary); font-size: 11px; font-weight: 850; letter-spacing: .09em; text-transform: uppercase; }
.ns-cart-drawer__body { padding: 0; display: flex; flex-direction: column; }
.ns-cart-drawer__items { padding: 10px 18px; display: grid; gap: 2px; overflow: auto; }
.ns-cart-drawer__item { position: relative; display: grid; grid-template-columns: 76px minmax(0,1fr) 32px; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--ns-border); }
.ns-cart-drawer__image { width: 76px; height: 76px; border: 1px solid var(--ns-border); border-radius: 12px; background: #fff; overflow: hidden; }
.ns-cart-drawer__image img { width: 100%; height: 100%; object-fit: contain; }
.ns-cart-drawer__meta { min-width: 0; }
.ns-cart-drawer__name { display: block; color: var(--ns-text) !important; text-decoration: none; font-weight: 780; margin: 0 0 4px; }
.ns-cart-drawer__name:hover { color: var(--ns-primary) !important; }
.ns-cart-drawer__line { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 10px; }
.ns-cart-drawer__price { white-space: nowrap; }
.ns-cart-remove__button { width: 30px; height: 30px; border-radius: 50%; padding: 0; }
.ns-cart-qty { display: inline-grid; grid-template-columns: 30px 38px 30px; align-items: center; border: 1px solid var(--ns-border); border-radius: 10px; overflow: hidden; background: var(--ns-surface); transition: opacity .15s ease; }
.ns-cart-qty.is-loading { opacity: .5; pointer-events: none; }
.ns-cart-qty__btn { width: 30px; height: 30px; padding: 0; border: 0; background: transparent; color: var(--ns-text); font-weight: 800; }
.ns-cart-qty__btn:hover { background: color-mix(in srgb, var(--ns-primary) 10%, var(--ns-surface)); color: var(--ns-primary); }
.ns-cart-qty__input { width: 38px; height: 30px; padding: 0; border: 0; border-left: 1px solid var(--ns-border); border-right: 1px solid var(--ns-border); background: transparent; color: var(--ns-text); text-align: center; -moz-appearance: textfield; }
.ns-cart-qty__input::-webkit-outer-spin-button, .ns-cart-qty__input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.ns-cart-drawer__footer { margin-top: auto; border-top: 1px solid var(--ns-border); padding: 18px 20px 20px; background: color-mix(in srgb, var(--ns-body-bg) 55%, var(--ns-surface)); }
.ns-cart-drawer__totals { display: grid; gap: 7px; }
.ns-cart-empty { min-height: 55vh; display: grid; place-items: center; align-content: center; text-align: center; padding: 30px; }
.ns-cart-empty__icon { width: 74px; height: 74px; border-radius: 50%; display: grid; place-items: center; margin-bottom: 15px; background: color-mix(in srgb, var(--ns-primary) 10%, var(--ns-surface)); color: var(--ns-primary); font-size: 28px; }

[data-ns-theme="dark"] .ns-search-results,
[data-ns-theme="dark"] .ns-cart-drawer { color-scheme: dark; }
[data-ns-theme="dark"] .btn-close { filter: invert(1) grayscale(100%) brightness(200%); }

@media (max-width: 991.98px) {
  .ns-mega-dropdown { border: 0; box-shadow: none; padding: 0 8px 10px; background: transparent; }
  .ns-mega-dropdown__head { display: none; }
  .ns-mega-grid { display: grid; grid-template-columns: 1fr; gap: 2px; }
  .ns-mega-link { display: flex; justify-content: space-between; align-items: center; padding: 9px 10px; color: rgba(255,255,255,.9) !important; text-decoration: none; }
  .ns-mega-link i { font-size: 9px; }
}

@media (max-width: 767.98px) {
  .ns-header-actions { gap: 5px; }
  .ns-header-cart { flex: 0 0 auto; }
  .ns-search-results { position: fixed; left: 10px; right: 10px; top: 116px; max-height: calc(100vh - 150px); }
  .ns-search-links { grid-template-columns: 1fr; }
  .ns-search-product { grid-template-columns: 50px minmax(0,1fr); }
  .ns-search-product__image { width: 50px; height: 50px; }
  .ns-search-product__price { grid-column: 2; justify-items: start; display: flex; gap: 8px; }
  .ns-cart-drawer__item { grid-template-columns: 66px minmax(0,1fr) 30px; }
  .ns-cart-drawer__image { width: 66px; height: 66px; }
}
