:root {
  --brand: #0d63f3;
  --brand-dark: #0b3e8a;
  --surface-bg: #f5f8fd;
  --header-bg: #ffffff;
  --header-text: #1d2a3b;
  --footer-bg: #0f1c2f;
  --footer-text: #d3def0;
  --menu-hover-bg: #e8f0ff;
  --link-color: #0d63f3;
  --link-hover: #0b3e8a;
  --link-active: #0b3e8a;
  --button-bg: #0d63f3;
  --button-border: #0d63f3;
  --button-text: #ffffff;
  --button-hover: #0a4fc2;
  --button-radius: 10px;
  --menu-radius: 999px;
  --sidebar-cat-bg: #ffffff;
  --sidebar-cat-text: #1d2a3b;
  --sidebar-cat-border: #dfe7f3;
  --sidebar-cat-hover-bg: #e8f0ff;
  --sidebar-cat-hover-text: #0f2746;
  --sidebar-cat-active-bg: #0d63f3;
  --sidebar-cat-active-text: #ffffff;
  --product-grid-card-bg: #ffffff;
  --product-grid-border-color: #dfe7f3;
  --product-grid-border-width: 1px;
  --product-grid-radius: 12px;
  --product-grid-title-color: #1d2a3b;
  --product-grid-text-color: #6b7c93;
  --product-grid-price-color: #0f2746;
  --product-grid-add-bg: #ffffff;
  --product-grid-add-text: #1d2a3b;
  --product-grid-add-border: #c9d5e8;
  --product-grid-add-hover-bg: #eaf1fb;
  --product-grid-add-hover-text: #0f2746;
  --product-grid-title-size: 16px;
  --product-grid-title-weight: 600;
  --product-grid-title-line-height: 1.35;
  --product-grid-text-size: 13px;
  --product-grid-text-weight: 400;
  --product-grid-text-line-height: 1.45;
  --product-grid-price-size: 18px;
  --product-grid-price-weight: 700;
  --product-grid-price-line-height: 1.25;
  --product-grid-add-height: 40px;
  --product-grid-add-size: 14px;
  --product-grid-add-weight: 600;
  --product-grid-add-line-height: 1.2;
  --product-grid-add-radius: 12px;
  --product-grid-action-spacing: 10px;
}

body {
  font-family: 'Plus Jakarta Sans', sans-serif;
  background:
    radial-gradient(800px 380px at 92% -8%, #deebff 0%, transparent 60%),
    radial-gradient(700px 320px at -8% 12%, #e5fff5 0%, transparent 56%),
    var(--bg, var(--surface-bg));
}

h1,
h2,
h3,
h4,
h5,
h6,
.navbar-brand {
  font-family: Sora, sans-serif;
}

.text-brand {
  color: var(--brand) !important;
}

.bg-brand {
  background: linear-gradient(130deg, var(--brand) 0%, var(--brand-dark) 100%) !important;
}

a {
  color: var(--link-color);
}

a:hover,
a:focus {
  color: var(--link-hover);
}

a:active,
a.active {
  color: var(--link-active);
}

.btn-brand {
  background-color: var(--button-bg);
  border-color: var(--button-border);
  color: var(--button-text);
  border-radius: var(--button-radius);
}

.btn-brand:hover,
.btn-brand:focus {
  background-color: var(--button-hover);
  border-color: var(--button-hover);
  color: var(--button-text);
}

.btn {
  border-radius: var(--button-radius);
}

.btn-primary {
  background-color: var(--button-bg);
  border-color: var(--button-border);
}

.btn-primary:hover,
.btn-primary:focus {
  background-color: var(--button-hover);
  border-color: var(--button-hover);
  color: var(--button-text);
}

.front-topbar {
  background: var(--topbar-bg);
  color: var(--topbar-text);
}

.cookie-consent {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1080;
  padding: 14px 0;
  background: color-mix(in srgb, var(--footer-bg) 92%, #000000 8%);
  color: var(--footer-text);
  box-shadow: 0 -12px 30px rgba(15, 28, 47, 0.18);
}

.cookie-consent-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.cookie-consent-copy {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.cookie-consent-copy strong,
.cookie-consent-copy span,
.cookie-consent-copy a {
  color: var(--footer-text);
}

.cookie-consent-copy a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.cookie-consent-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

@media (max-width: 767.98px) {
  .cookie-consent-inner {
    flex-direction: column;
    align-items: stretch;
  }

  .cookie-consent-actions {
    justify-content: flex-start;
  }
}

.front-topbar a,
.front-topbar span,
.front-topbar div {
  color: var(--topbar-text);
}

.front-topbar .dropdown-toggle {
  color: var(--topbar-text);
}

.front-topbar .dropdown-toggle:hover,
.front-topbar .dropdown-toggle:focus {
  color: var(--topbar-text);
}

.front-topbar .dropdown-menu {
  background: var(--topbar-bg);
  color: var(--topbar-text);
  border-color: color-mix(in srgb, var(--topbar-text) 25%, var(--topbar-bg) 75%);
}

.front-topbar .dropdown-item {
  color: var(--topbar-text);
}

.front-topbar .dropdown-item:hover,
.front-topbar .dropdown-item:focus,
.front-topbar .dropdown-item.active,
.front-topbar .dropdown-item:active {
  background-color: color-mix(in srgb, var(--topbar-text) 14%, var(--topbar-bg) 86%);
  color: var(--topbar-text);
}

.front-header {
  background-color: var(--header-bg);
  border-bottom: 1px solid color-mix(in srgb, var(--header-text) 15%, #ffffff 85%);
}

.front-announcement-wrap {
  /* background: color-mix(in srgb, var(--bg) 80%, #ffffff 20%);
  border-bottom: 1px solid color-mix(in srgb, var(--header-text) 12%, #ffffff 88%); */
}

.front-announcement {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 10px;
  font-size: 0.92rem;
  line-height: 1.35;
}

.front-announcement-icon {
  width: 22px;
  text-align: center;
  flex: 0 0 auto;
  margin-top: 2px;
}

.front-announcement-content {
  display: block;
  flex: 1 1 auto;
}

.front-announcement .alert-link {
  font-weight: 600;
}

.front-header .navbar-brand,
.front-header .nav-link,
.front-header .btn,
.front-header .form-control {
  color: var(--header-text);
}

.brand-logo {
  max-height: 40px;
  width: auto;
  object-fit: contain;
}

.front-header .header-action-btn {
  background: var(--header-action-bg);
  color: var(--header-action-text);
  border: 1px solid var(--header-action-border);
}

.front-header .header-action-btn:hover,
.front-header .header-action-btn:focus,
.front-header .header-action-btn.show {
  background: var(--header-action-hover-bg);
  color: var(--header-action-hover-text);
  border-color: var(--header-action-border);
}

.front-header .header-action-btn-primary {
  background: var(--header-primary-bg);
  color: var(--header-primary-text);
  border: 1px solid var(--header-primary-bg);
}

.front-header .header-action-btn-primary:hover,
.front-header .header-action-btn-primary:focus {
  background: var(--header-primary-hover-bg);
  color: var(--header-primary-hover-text);
  border-color: var(--header-primary-hover-bg);
}

.front-header .header-action-btn i,
.front-header .header-action-btn-primary i {
  color: inherit;
}

.front-header .header-search-btn {
  background: var(--header-search-bg);
  color: var(--header-search-text);
  border: 1px solid var(--header-search-border);
}

.front-header .header-search-btn:hover,
.front-header .header-search-btn:focus {
  background: var(--header-search-hover-bg);
  color: var(--header-search-hover-text);
  border-color: var(--header-search-border);
}

.front-header .header-search-btn i {
  color: inherit;
}

.ratio-3x4 {
  --bs-aspect-ratio: 133.3333%;
}

.product-grid-card {
  background: var(--product-grid-card-bg);
  border: var(--product-grid-border-width) solid var(--product-grid-border-color) !important;
  border-radius: var(--product-grid-radius) !important;
  overflow: hidden;
}

.product-grid-card-shadow {
  box-shadow: 0 10px 24px rgba(16, 33, 62, 0.08) !important;
}

.product-grid-card-flat {
  box-shadow: none !important;
}

.product-grid-title {
  color: var(--product-grid-title-color);
  font-size: var(--product-grid-title-size);
  font-weight: var(--product-grid-title-weight);
  line-height: var(--product-grid-title-line-height);
}

.product-grid-description {
  color: var(--product-grid-text-color) !important;
  font-size: var(--product-grid-text-size);
  font-weight: var(--product-grid-text-weight);
  line-height: var(--product-grid-text-line-height);
}

.product-grid-price {
  color: var(--product-grid-price-color);
  font-size: var(--product-grid-price-size);
  font-weight: var(--product-grid-price-weight);
  line-height: var(--product-grid-price-line-height);
}

.product-grid-add-btn {
  background: var(--product-grid-add-bg);
  color: var(--product-grid-add-text);
  border: 1px solid var(--product-grid-add-border);
  min-height: var(--product-grid-add-height);
  font-size: var(--product-grid-add-size);
  font-weight: var(--product-grid-add-weight);
  line-height: var(--product-grid-add-line-height);
  border-radius: var(--product-grid-add-radius);
}

.product-grid-actions {
  display: grid;
  gap: var(--product-grid-action-spacing);
  margin-top: var(--product-grid-action-spacing);
}

.product-grid-add-btn:hover,
.product-grid-add-btn:focus {
  background: var(--product-grid-add-hover-bg);
  color: var(--product-grid-add-hover-text);
  border-color: var(--product-grid-add-border);
}

.brand-tile-image {
  max-height: 40px;
  width: auto;
  object-fit: contain;
}

.home-category-chip-image {
  width: 18px;
  height: 18px;
  object-fit: cover;
  border-radius: 50%;
}

.home-category-tile-image {
  width: 70px;
  height: 70px;
  object-fit: cover;
}

.nav-gap {
  gap: 0.35rem;
}

.navbar .nav-link {
  border-radius: var(--menu-radius);
  padding-left: 0.8rem;
  padding-right: 0.8rem;
  color: var(--menu-text);
}

.navbar .nav-link:hover,
.navbar .nav-link:focus {
  background: var(--menu-hover-bg);
  color: var(--menu-hover-text);
}

.navbar .nav-category-trigger:focus:not(:hover) {
  background: transparent;
  color: var(--menu-text);
}

.navbar .nav-link.active,
.navbar .show > .nav-link {
  background: var(--menu-active-bg);
  color: var(--menu-active-text);
}

.navbar .nav-category-trigger.show,
.navbar .nav-category-trigger[aria-expanded="true"],
.navbar .nav-category-dropdown.show > .nav-category-trigger,
.navbar .nav-category-dropdown:has(.dropdown-menu.show) > .nav-category-trigger {
  background: var(--menu-active-bg);
  color: var(--menu-active-text);
}

.nav-category-dropdown {
  position: relative;
}

.nav-category-menu {
  width: min(840px, 92vw);
  padding: 0;
  border-radius: 1.1rem;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 28px 70px rgba(15, 23, 42, 0.16);
  overflow: hidden;
  backdrop-filter: blur(14px);
}

.nav-category-scroll {
  max-height: min(60vh, 520px);
  overflow: auto;
  padding: 1rem;
  display: grid;
  gap: 1rem;
}

.nav-category-item {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  border-radius: 0.72rem;
  border: 1px solid transparent;
  color: var(--menu-text);
  font-size: 0.86rem;
  font-weight: 500;
  line-height: 1.2;
  margin-left: calc(var(--cat-depth, 0) * 0.62rem);
  padding: 0.5rem 0.62rem;
}

.nav-category-item strong {
  font-weight: 700;
}

.nav-category-item:hover,
.nav-category-item:focus {
  color: var(--menu-hover-text);
  background: var(--menu-hover-bg);
  border-color: color-mix(in srgb, var(--menu-active-bg) 72%, #ffffff 28%);
}

.nav-category-item.is-top-level {
  margin-top: 0.18rem;
  background: color-mix(in srgb, var(--menu-active-bg) 38%, #ffffff 62%);
  border-color: color-mix(in srgb, var(--menu-active-bg) 64%, #ffffff 36%);
}

.nav-category-item-root {
  margin-left: 0;
  min-height: 48px;
  color: #0f172a;
  background:
    linear-gradient(135deg, rgba(13, 99, 243, 0.1), rgba(13, 99, 243, 0.03)),
    #f8fafc;
  border-color: rgba(13, 99, 243, 0.16);
  border-radius: 0.85rem;
  font-weight: 800;
}

.nav-category-item-root:hover,
.nav-category-item-root:focus {
  color: var(--brand);
  background: #ffffff;
  border-color: rgba(13, 99, 243, 0.28);
}

.nav-category-badge {
  width: 1.4rem;
  height: 1.4rem;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.64rem;
  flex: 0 0 auto;
  color: var(--sidebar-cat-active-text);
  background: linear-gradient(145deg, var(--sidebar-cat-active-bg) 0%, color-mix(in srgb, var(--sidebar-cat-active-bg) 68%, #000000 32%) 100%);
}

.nav-category-item-root .nav-category-badge {
  color: #ffffff;
  background: var(--brand);
}

.nav-category-sections {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.35rem 1.6rem;
}

.nav-category-section {
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

.nav-category-section-title {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
  margin-bottom: 0.42rem;
  padding: 0 0 0.55rem;
  border-bottom: 1px solid rgba(15, 23, 42, 0.07);
  color: #0f172a;
  text-decoration: none;
  line-height: 1.2;
}

.nav-category-section-title::after {
  content: "\f054";
  font-family: "Font Awesome 5 Free";
  font-size: 0.62rem;
  font-weight: 900;
  color: rgba(15, 23, 42, 0.32);
  transition: transform 0.16s ease, color 0.16s ease;
}

.nav-category-section-title strong {
  min-width: 0;
  font-size: 0.84rem;
  font-weight: 800;
  letter-spacing: 0;
}

.nav-category-section-title:hover,
.nav-category-section-title:focus {
  color: var(--brand);
}

.nav-category-section-title:hover::after,
.nav-category-section-title:focus::after {
  color: var(--brand);
  transform: translateX(3px);
}

.nav-category-children {
  display: grid;
  gap: 0.08rem;
  padding: 0;
}

.nav-category-child-link {
  display: flex;
  align-items: center;
  min-height: 30px;
  border-radius: 0.52rem;
  padding: 0.34rem 0.48rem;
  color: #64748b;
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  transition: background-color 0.16s ease, color 0.16s ease, transform 0.16s ease;
}

.nav-category-child-link:hover,
.nav-category-child-link:focus {
  color: var(--brand);
  background: rgba(13, 99, 243, 0.07);
  transform: translateX(2px);
}

.dropdown-item {
  white-space: normal;
}

.footer-links a {
  color: var(--footer-link);
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--footer-link-hover);
}

.footer-links a.active,
.front-footer a.active {
  color: var(--footer-link-active);
}

.front-footer {
  background: linear-gradient(180deg, color-mix(in srgb, var(--footer-bg) 95%, #ffffff 5%), var(--footer-bg));
  color: var(--footer-text);
}

.front-footer .text-white,
.front-footer .text-light-emphasis,
.front-footer p,
.front-footer h5,
.front-footer h6 {
  color: var(--footer-text) !important;
}

.front-footer a {
  color: var(--footer-link);
}

.front-footer a:hover {
  color: var(--footer-link-hover);
}

.footer-legal-row {
  border-top: 1px solid var(--footer-border);
}

.footer-logo {
  max-height: 44px;
  width: auto;
  object-fit: contain;
  margin-bottom: 0.75rem;
}

.footer-company {
  color: color-mix(in srgb, var(--footer-text) 92%, #ffffff 8%);
  line-height: 1.45;
}

.lang-switcher {
  display: inline-flex;
  gap: 0.35rem;
}

.lang-switcher a {
  border: 1px solid #3a4f73;
  border-radius: 999px;
  min-width: 34px;
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #d7e3f6;
  text-decoration: none;
  font-size: 0.72rem;
}

.lang-switcher a.active,
.lang-switcher a:hover {
  background: var(--brand-dark);
  border-color: color-mix(in srgb, var(--brand) 55%, #ffffff 45%);
  color: #fff;
}

.promo-yellow {
  background: linear-gradient(130deg, #ffd85f 0%, #ffedb1 100%);
}

.promo-blue {
  background: linear-gradient(130deg, #9ed7ff 0%, #d8f0ff 100%);
}

.promo-coral {
  background: linear-gradient(130deg, #ff9072 0%, #ffc3ac 100%);
}

.week-deal-media {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 90px;
  padding: 8px;
}

.week-deal-media-image {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 90px;
}

.auth-card {
  margin-top: 2rem;
}

.account-address-card {
  min-height: 100%;
}

.cart-thumb {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 0.5rem;
  border: 1px solid #e4e9f2;
}

.checkout-choice {
  border: 1px solid #e7edf8;
  border-radius: 0.65rem;
  padding: 0.65rem 0.8rem;
  margin-bottom: 0.5rem;
  text-decoration: none;
  background: #fff;
}

.checkout-method-image {
  width: auto;
  height: 40px;
  max-width: 180px;
  object-fit: contain;
}

.cart-flash {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 1080;
  background: var(--brand-dark);
  color: #fff;
  border-radius: 0.65rem;
  padding: 0.65rem 0.9rem;
  font-size: 0.9rem;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.18);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.cart-flash.show {
  opacity: 1;
  transform: translateY(0);
}

.cart-flash.is-error {
  background: #8d1f2f;
}

.sidebar-cat .list-group-item {
  background-color: var(--sidebar-cat-bg);
  color: var(--sidebar-cat-text);
  border-color: var(--sidebar-cat-border);
}

.sidebar-cat .list-group-item-action:hover,
.sidebar-cat .list-group-item-action:focus {
  background-color: var(--sidebar-cat-hover-bg);
  color: var(--sidebar-cat-hover-text);
  border-color: var(--sidebar-cat-border);
}

.sidebar-cat .list-group-item.active {
  background-color: var(--sidebar-cat-active-bg);
  color: var(--sidebar-cat-active-text);
  border-color: var(--sidebar-cat-active-bg);
}

.category-panel {
  background:
    radial-gradient(120% 120% at 100% 0%, color-mix(in srgb, var(--sidebar-cat-hover-bg) 70%, #ffffff 30%) 0%, transparent 58%),
    var(--sidebar-cat-bg);
  border: 1px solid color-mix(in srgb, var(--sidebar-cat-border) 82%, #ffffff 18%);
  border-radius: 0.3rem;
  overflow: hidden;
}

.category-panel-head {
  padding: 1rem 1rem 0.8rem;
  border-bottom: 1px solid color-mix(in srgb, var(--sidebar-cat-border) 74%, #ffffff 26%);
  background: color-mix(in srgb, var(--sidebar-cat-hover-bg) 36%, #ffffff 64%);
}

.category-panel-head h3 {
  color: var(--sidebar-cat-text);
}

.category-panel-head p {
  color: color-mix(in srgb, var(--sidebar-cat-text) 72%, #ffffff 28%);
}

.category-groups {
  max-height: 72vh;
  overflow: auto;
  padding: 0.45rem;
  display: grid;
  gap: 0.5rem;
}

.category-group {
  border: 1px solid transparent;
  border-radius: 0.3rem;
  background: color-mix(in srgb, var(--sidebar-cat-bg) 90%, #ffffff 10%);
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.category-group:hover {
  border-color: var(--sidebar-cat-border);
  box-shadow: 0 6px 16px rgba(15, 39, 70, 0.08);
  transform: translateY(-1px);
}

.category-link {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.65rem 0.7rem;
  border-radius: 0.3rem;
  color: var(--sidebar-cat-text);
  text-decoration: none;
  font-weight: 700;
  line-height: 1.2;
}

.category-link:hover,
.category-link:focus {
  color: var(--sidebar-cat-hover-text);
  background: var(--sidebar-cat-hover-bg);
}

.category-link-dot {
  width: 1.65rem;
  height: 1.65rem;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--sidebar-cat-active-text);
  background: linear-gradient(135deg, var(--sidebar-cat-active-bg) 0%, color-mix(in srgb, var(--sidebar-cat-active-bg) 70%, #000000 30%) 100%);
  flex: 0 0 auto;
}

.category-link.is-active {
  background: var(--sidebar-cat-active-bg);
  color: var(--sidebar-cat-active-text);
}

.category-link.is-active .category-link-dot {
  background: color-mix(in srgb, var(--sidebar-cat-active-text) 22%, transparent 78%);
  color: var(--sidebar-cat-active-text);
  border: 1px solid color-mix(in srgb, var(--sidebar-cat-active-text) 50%, transparent 50%);
}

.category-link.is-ancestor {
  color: var(--sidebar-cat-hover-text);
  background: var(--sidebar-cat-hover-bg);
}

.subcategory-tree {
  display: grid;
  gap: 0.38rem;
  padding: 0.2rem 0.7rem 0.7rem;
}

.subcategory-node {
  display: grid;
  gap: 0.25rem;
}

.subcategory-link {
  display: flex;
  align-items: center;
  min-width: 0;
  border: 1px solid var(--sidebar-cat-border);
  background: color-mix(in srgb, var(--sidebar-cat-bg) 94%, #ffffff 6%);
  color: var(--sidebar-cat-text);
  text-decoration: none;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.subcategory-link-level-1 {
  min-height: 30px;
  border-radius: 0.3rem;
  padding: 0.28rem 0.62rem;
  font-size: 0.78rem;
  font-weight: 700;
}

.subcategory-children {
  display: grid;
  gap: 0.2rem;
  padding: 0 0 0 0.62rem;
  border-left: 1px solid color-mix(in srgb, var(--sidebar-cat-border) 72%, #ffffff 28%);
}

.subcategory-child-row {
  display: flex;
  align-items: center;
  gap: 0.28rem;
  min-width: 0;
}

.subcategory-link-level-2 {
  flex: 1 1 auto;
  min-height: 27px;
  border-color: transparent;
  border-radius: 0.3rem;
  padding: 0.25rem 0.5rem;
  background: transparent;
  color: color-mix(in srgb, var(--sidebar-cat-text) 80%, #ffffff 20%);
  font-size: 0.75rem;
  font-weight: 600;
}

.subcategory-link:hover,
.subcategory-link:focus,
.subcategory-link.is-ancestor {
  background: var(--sidebar-cat-hover-bg);
  color: var(--sidebar-cat-hover-text);
  border-color: var(--sidebar-cat-hover-bg);
}

.subcategory-link.is-active {
  background: var(--sidebar-cat-active-bg);
  color: var(--sidebar-cat-active-text);
  border-color: var(--sidebar-cat-active-bg);
}

.subcategory-more {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  min-height: 24px;
  border-radius: 0.3rem;
  background: color-mix(in srgb, var(--sidebar-cat-hover-bg) 72%, #ffffff 28%);
  color: var(--sidebar-cat-hover-text);
  font-size: 0.7rem;
  font-weight: 800;
  line-height: 1;
  text-decoration: none;
}

.subcategory-more:hover,
.subcategory-more:focus,
.subcategory-more.is-ancestor {
  background: var(--sidebar-cat-active-bg);
  color: var(--sidebar-cat-active-text);
}

@media (max-width: 991.98px) {
  .navbar-nav {
    padding: 0.5rem 0 0.8rem;
  }

  .nav-category-menu {
    width: 100%;
  }

  .nav-category-sections {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .nav-category-item {
    margin-left: calc(var(--cat-depth, 0) * 0.42rem);
  }

  .category-groups {
    max-height: none;
    overflow: visible;
  }
}

@media (max-width: 575.98px) {
  .nav-category-sections {
    grid-template-columns: 1fr;
  }
}

.support-chat-shell {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 1090;
}

.support-chat-toggle {
  border: 1px solid var(--button-border);
  background: var(--button-bg);
  color: var(--button-text);
  border-radius: 999px;
  padding: 0.55rem 0.85rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 600;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
}

.support-chat-toggle:hover {
  background: var(--button-hover);
}

.support-chat-proactive {
  position: absolute;
  right: 0;
  bottom: calc(100% + 0.55rem);
  width: min(270px, calc(100vw - 2rem));
  border: 1px solid #d7e0ee;
  border-radius: 12px;
  background: #fff;
  color: #24364d;
  padding: 0.55rem 2rem 0.55rem 0.65rem;
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.2);
  font-size: 0.8rem;
  line-height: 1.35;
  cursor: pointer;
  animation: support-chat-proactive-in 0.22s ease-out;
}

.support-chat-proactive::after {
  content: "";
  position: absolute;
  right: 18px;
  top: 100%;
  width: 0;
  height: 0;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-top: 8px solid #fff;
  filter: drop-shadow(0 1px 0 #d7e0ee);
}

.support-chat-proactive-close {
  position: absolute;
  top: 4px;
  right: 6px;
  border: 0;
  background: transparent;
  color: #7a8ca3;
  font-size: 1.05rem;
  line-height: 1;
  padding: 0;
  width: 20px;
  height: 20px;
}

.support-chat-proactive-close:hover {
  color: #334155;
}

@keyframes support-chat-proactive-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.support-chat-shell.has-alert .support-chat-toggle {
  background: #b91c1c;
  border-color: #b91c1c;
  animation: support-chat-alert-pulse 0.9s ease-in-out infinite;
}

@keyframes support-chat-alert-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(185, 28, 28, 0.5);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(185, 28, 28, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(185, 28, 28, 0);
  }
}

.support-chat-presence-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #ef4444;
  display: inline-block;
}

.support-chat-presence-dot.is-online {
  background: #22c55e;
}

.support-chat-panel {
  width: min(360px, calc(100vw - 2rem));
  height: min(520px, calc(100vh - 2rem));
  background: #fff;
  border: 1px solid #d7e0ee;
  border-radius: 12px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.24);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.support-chat-header {
  padding: 0.7rem 0.85rem;
  background: var(--brand-dark);
  color: #fff;
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.support-chat-status {
  margin-left: auto;
  font-size: 0.75rem;
  opacity: 0.9;
}

.support-chat-minimize {
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: transparent;
  color: #fff;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  line-height: 1;
  padding: 0;
}

.support-chat-minimize:hover {
  background: rgba(255, 255, 255, 0.15);
}

.support-chat-body {
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex: 1 1 auto;
  min-height: 0;
}

.support-chat-meta {
  border: 1px solid #dbe7f7;
  background: #f3f8ff;
  border-radius: 8px;
  font-size: 0.76rem;
  color: #30445f;
  padding: 0.42rem 0.5rem;
}

.support-chat-messages {
  display: grid;
  gap: 0.35rem;
  overflow-y: auto;
  min-height: 0;
  padding-right: 0.15rem;
}

.support-chat-typing {
  font-size: 0.74rem;
  color: #64748b;
  min-height: 1.1rem;
  padding: 0 0.2rem;
}

.support-chat-ticket-offer {
  border: 1px dashed #c9d7ea;
  background: #f7fbff;
  border-radius: 8px;
  padding: 0.5rem;
  display: grid;
  gap: 0.4rem;
}

.support-chat-ticket-offer-text {
  font-size: 0.74rem;
  color: #41556f;
}

.support-chat-review {
  border: 1px solid #ead9ad;
  background: #fff8e7;
  border-radius: 10px;
  padding: 0.65rem;
  display: grid;
  gap: 0.5rem;
}

.support-chat-review-title {
  font-size: 0.84rem;
  font-weight: 700;
  color: #5b4310;
}

.support-chat-review-help,
.support-chat-review-note-label {
  font-size: 0.74rem;
  color: #6a5628;
}

.support-chat-review-stars {
  display: flex;
  gap: 0.15rem;
}

.support-chat-review-star {
  border: 0;
  background: transparent;
  color: #c9b78a;
  font-size: 1.7rem;
  line-height: 1;
  padding: 0;
  width: 32px;
  height: 32px;
}

.support-chat-review-star.is-preview,
.support-chat-review-star.is-selected {
  color: #f59e0b;
}

.support-chat-review-star:focus-visible {
  outline: 2px solid rgba(245, 158, 11, 0.35);
  outline-offset: 2px;
  border-radius: 6px;
}

.support-chat-review-note {
  resize: vertical;
  min-height: 72px;
}

.support-chat-review-error {
  font-size: 0.73rem;
  color: #b91c1c;
}

.support-chat-review-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.45rem;
}

.support-chat-row {
  display: flex;
}

.support-chat-row.is-agent {
  justify-content: flex-start;
}

.support-chat-row.is-customer {
  justify-content: flex-end;
}

.support-chat-row.is-system {
  justify-content: center;
}

.support-chat-bubble {
  max-width: 85%;
  border: 1px solid #dce4f0;
  border-radius: 10px;
  padding: 0.45rem 0.55rem;
  white-space: pre-wrap;
  line-height: 1.35;
  font-size: 0.84rem;
  background: #fff;
}

.support-chat-author {
  font-size: 0.7rem;
  font-weight: 700;
  color: #42556f;
  margin-bottom: 0.18rem;
}

.support-chat-text {
  white-space: pre-wrap;
}

.support-chat-time {
  margin-top: 0.2rem;
  font-size: 0.68rem;
  color: #73859c;
}

.support-chat-delivery {
  margin-top: 0.16rem;
  font-size: 0.66rem;
  color: #74879e;
  text-align: right;
}

.support-chat-delivery.is-read {
  color: #0f766e;
}

.support-chat-row.is-customer .support-chat-bubble {
  background: #e9f2ff;
  border-color: #bfd7ff;
}

.support-chat-row.is-system .support-chat-bubble {
  background: #f8fafc;
  border-color: #d4dee9;
  color: #53647a;
  font-size: 0.75rem;
  font-style: italic;
}

.support-chat-hint {
  font-size: 0.78rem;
  color: #6b7280;
}

.support-chat-send-form {
  padding: 0.65rem 0.75rem 0.75rem;
  border-top: 1px solid #e6edf7;
}

@media (max-width: 576px) {
  .support-chat-shell {
    right: 0.5rem;
    bottom: 0.5rem;
  }

  .support-chat-proactive {
    width: min(260px, calc(100vw - 1rem));
  }
}
