﻿@charset "UTF-8";

@import url("https://fonts.googleapis.com/css2?family=Be+Vietnam+Pro:wght@300;400;500;600;700;800;900&display=swap");

:root {
  --font-vietnamese: "Be Vietnam Pro", sans-serif;
  --page-width: 1180px;
  --page-gutter: 16px;
  --radius: 7px;
  --ink: #17211c;
  --muted: #66746c;
  --line: #d9e1dc;
  --paper: #f8faf8;
  --panel: #ffffff;
  --green: #237a57;
  --green-dark: #185a40;
  --coral: #d95745;
  --gold: #c99023;
  --blue: #2e6f95;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--font-vietnamese);
  line-height: 1.5;
}

body:not(.admin-page) {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  width: min(calc(100% - var(--page-gutter) * 2), var(--page-width));
  margin-inline: auto;
  flex: 1 0 auto;
}

main {
  overflow: hidden;
  border-radius: var(--radius);
}

body:not(.admin-page) main {
  display: grid;
  gap: 10px;
  background: transparent;
}

body[data-page] main {
  gap: 0;
}

body:not(.admin-page) .topbar {
  margin-bottom: 10px;
}

body[data-page] .topbar {
  margin-bottom: 0;
}

.scroll-anchor {
  height: 0;
  overflow: hidden;
}

body:not(.admin-page) main > section {
  background-color: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  padding: 16px max(var(--page-gutter), calc((100% - var(--page-width)) / 2));
  background: rgba(248, 250, 248, 0.92);
  border-bottom: 1px solid var(--line);
  border-radius: var(--radius);
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 800;
}

.brand-mark {
  display: grid;
  width: 45px;
  height: 55px;
  place-items: center;
  color: white;
  background: var(--green);
  border-radius: var(--radius);
  overflow: hidden;
}

.brand-mark.has-image {
  width: 45px;
  min-width: 45px;
  max-width: 45px;
  height: 55px;
  padding: 0;
  background: transparent;
  border-radius: var(--radius);
  overflow: hidden;
}

.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
}

.nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  margin-left: auto;
  justify-content: flex-end;
  gap: 10px;
  color: var(--muted);
  font-weight: 700;
}

.nav a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 8px 10px;
  border-radius: var(--radius);
}

.nav a:hover {
  color: var(--ink);
  background: #e8efeb;
}

.nav-account {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.account-menu-trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 8px 0;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-radius: 0;
  cursor: pointer;
  font-weight: 700;
}

.account-menu-trigger:hover {
  color: var(--green);
}

.account-menu-trigger::after {
  content: "";
  width: 8px;
  height: 8px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translateY(-1px);
}

.account-menu-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 30;
  min-width: 220px;
  display: none;
  padding: 8px;
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.nav-account:hover .account-menu-dropdown,
.nav-account:focus-within .account-menu-dropdown,
.nav-account.open .account-menu-dropdown {
  display: grid;
  gap: 4px;
}

.account-menu-dropdown a,
.account-menu-dropdown button {
  width: 100%;
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 9px 12px;
  color: var(--ink);
  background: white;
  border: 0;
  border-radius: var(--radius);
  text-align: left;
  cursor: pointer;
  font: inherit;
}

.account-menu-dropdown a:hover,
.account-menu-dropdown button:hover {
  background: #eef5f1;
}

.category-menu {
  position: relative;
}

.category-trigger {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 9px 14px;
  color: var(--ink);
  background: white;
  font-weight: 800;
  cursor: pointer;
}

.category-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  display: none;
  min-width: 230px;
  padding: 8px;
  box-sizing: border-box;
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.category-menu:hover .category-dropdown,
.category-menu:focus-within .category-dropdown,
.category-menu.is-open .category-dropdown {
  display: block;
}

.parent-category {
  position: static;
}

.parent-category > button,
.child-category {
  width: 100%;
  border: 0;
  border-radius: var(--radius);
  padding: 10px 12px;
  text-align: left;
  color: var(--ink);
  background: white;
  cursor: pointer;
}

.parent-category > button {
  font-weight: 400;
}

.category-dropdown > .parent-category:hover > button,
.category-dropdown > .parent-category:focus-within > button,
.category-dropdown > .parent-category.is-open > button,
.child-category:hover {
  background: #e8efeb;
}

.child-menu .parent-category > button:hover,
.child-menu .parent-category > button:focus,
.child-menu .parent-category > button:focus-visible {
  background: white;
}

.child-menu {
  position: absolute;
  top: 0;
  bottom: 0;
  left: calc(100% + 8px);
  display: none;
  min-width: 980px;
  padding: 14px 10px;
  box-sizing: border-box;
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  align-content: start;
  grid-auto-flow: row;
  grid-template-columns: repeat(5, minmax(184px, 1fr));
  grid-auto-rows: minmax(108px, auto);
  row-gap: 14px;
  column-gap: 10px;
  align-items: stretch;
  overflow: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.child-menu::-webkit-scrollbar {
  display: none;
}

.child-menu .parent-category {
  display: grid;
}

.child-menu .parent-category > button {
  min-height: 108px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 10px;
  text-align: center;
  line-height: 1.3;
  white-space: normal;
  overflow-wrap: anywhere;
  font-weight: 400;
}

.child-menu .parent-category > button::before {
  content: "";
  width: 60px;
  height: 60px;
  flex: 0 0 auto;
}

.child-menu .parent-category > button:has(img)::before {
  display: none;
}

.child-menu .parent-category > button img {
  width: 60px;
  height: 60px;
  object-fit: contain;
  flex: 0 0 auto;
}

.child-menu .parent-category > button span {
  display: block;
}

.parent-category:hover .child-menu,
.parent-category:focus-within .child-menu,
.parent-category.is-open > .child-menu {
  display: grid;
}

.top-search {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  align-self: center;
  width: min(540px, calc(100vw - 520px));
  min-height: 42px;
  margin-left: 0;
  max-width: 540px;
  min-width: 220px;
  padding-top: 9px;
  padding-bottom: 9px;
}

.top-search-wrap {
  position: absolute;
  left: 50%;
  z-index: 35;
  width: min(540px, calc(100vw - 520px));
  min-width: 220px;
  max-width: 540px;
  transform: translateX(-50%);
}

.top-search-wrap .top-search {
  position: static;
  width: 100%;
  min-width: 0;
  max-width: none;
  transform: none;
}

.product-search-suggestions {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  z-index: 40;
  display: grid;
  gap: 4px;
  max-height: min(420px, calc(100vh - 110px));
  overflow: auto;
  padding: 8px;
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 18px 42px rgba(23, 33, 28, 0.14);
}

.product-search-suggestions[hidden] {
  display: none;
}

.product-search-suggestion {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 8px;
  color: var(--ink);
  border-radius: calc(var(--radius) - 4px);
}

.product-search-suggestion:hover,
.product-search-suggestion:focus {
  background: #eef5f1;
}

.product-search-suggestion img {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: 10px;
  background: #f3f7f4;
}

.product-search-suggestion strong,
.product-search-suggestion span {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-search-suggestion span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.hero {
  --banner-image: none;
  min-height: 56vh;
  position: relative;
  display: flex;
  align-items: end;
  padding: clamp(28px, 4.5vw, 56px);
  overflow: hidden;
  background: #0c1812;
}

.hero-slider,
.hero-slide {
  position: absolute;
  inset: 0;
}

.hero-slider {
  overflow: hidden;
  pointer-events: none;
}

.hero-slide {
  --hero-slide-image: var(--banner-image);
  background: var(--hero-slide-image) center/cover;
  transform: translateX(100%);
  will-change: transform;
}

#heroSlideCurrent {
  transform: translateX(0);
}

.hero-copy {
  position: relative;
  z-index: 1;
  max-width: 690px;
  color: white;
  padding-bottom: 2vh;
}

.hero-slider-controls {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: clamp(16px, 3vw, 28px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 180ms ease, visibility 180ms ease;
}

.hero:hover .hero-slider-controls,
.hero:focus-within .hero-slider-controls {
  opacity: 1;
  visibility: visible;
}

.hero-slider-button {
  width: 44px;
  height: 44px;
  display: inline-grid;
  place-items: center;
  color: #111111;
  background: rgba(12, 24, 18, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  line-height: 1;
  opacity: 0.92;
  pointer-events: auto;
}

.hero-slider-button svg,
.product-detail-thumb-nav svg,
.product-detail-slider-button svg,
.product-upload-remove svg,
.product-brand-remove svg,
.admin-filter-trigger svg,
.icon-button svg {
  width: 15px;
  height: 15px;
  color: #111111;
  fill: currentColor;
}

.hero h1,
.admin-hero h1 {
  margin: 0;
  font-size: clamp(38px, 6vw, 78px);
  line-height: 1.02;
  letter-spacing: 0;
}

.hero p {
  max-width: 580px;
  font-size: 18px;
}

.brand-strip {
  margin: 18px 0 8px;
  padding: 18px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.home-category-strip {
  background: white;
  padding: 0;
}

.brand-strip-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  align-items: center;
}

.brand-strip-item {
  display: grid;
  width: 100%;
  aspect-ratio: 700 / 450;
  place-items: center;
  padding: 12px;
}

.brand-strip-item img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

#brandStrip .brand-strip-row {
  grid-template-columns: repeat(auto-fit, minmax(267px, 267px));
  gap: 8px;
  justify-content: center;
}

#brandStrip .brand-strip-item {
  width: 267px;
  max-width: 100%;
  aspect-ratio: auto;
  height: 92px;
  padding: 6px;
}

#brandStrip .brand-strip-item img {
  width: auto;
  height: auto;
  max-width: 80%;
  max-height: 80%;
}

.carousel-controls {
  display: flex;
  gap: 8px;
}

.home-category-row {
  display: grid;
  grid-template-columns: repeat(var(--home-category-strip-columns, 6), minmax(0, 1fr));
  gap: 10px;
}

.home-category-card {
  display: grid;
  grid-template-rows: 1fr auto;
  align-items: center;
  justify-items: center;
  gap: 6px;
  padding: 6px;
  min-height: 132px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-align: center;
}

.home-category-card img {
  width: 120px;
  height: 120px;
  max-width: 100%;
  object-fit: cover;
  background: white;
  border-radius: var(--radius);
}

.home-category-card strong {
  font-size: 16px;
  line-height: 1.25;
}

.home-category-sections {
  display: grid;
  gap: 24px;
  background: transparent;
  border-radius: 0;
}

.featured-product-grid {
  display: grid;
  grid-template-columns: repeat(var(--home-category-columns, 6), minmax(0, 1fr));
  gap: 12px;
}

.featured-product-grid .featured-category-product h3 {
  display: -webkit-box;
  min-height: 38px;
  overflow: hidden;
  line-height: 1.25;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
}

.featured-product-head {
  justify-content: flex-start;
}

.home-category-section {
  display: grid;
  gap: 18px;
  padding: clamp(18px, 3vw, 28px);
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 10px 28px rgba(23, 33, 28, 0.08);
  overflow: hidden;
}

.home-category-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.home-category-title-block {
  flex: 1 1 auto;
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 8px 12px;
  align-items: center;
  min-width: 0;
  max-width: calc(100% - 96px);
}

.home-category-section-head h3 {
  margin: 0;
  font-size: clamp(24px, 3vw, 36px);
  line-height: 1.1;
}

.home-category-section-head > .button.ghost {
  flex: 0 0 auto;
  min-height: 32px;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 400;
  white-space: nowrap;
}

.home-subcategory-list {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.home-subcategory-list::-webkit-scrollbar {
  display: none;
}

.home-subcategory-strip {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 4px;
  min-width: 0;
  max-width: calc(100% - 8px);
}

.home-subcategory-list a,
.home-subcategory-list button {
  padding: 0;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  cursor: pointer;
  font: inherit;
  white-space: nowrap;
  flex: 0 0 auto;
}

.home-subcategory-list a:hover,
.home-subcategory-list button:hover,
.home-subcategory-list button.active {
  color: var(--ink);
  background: transparent;
}

.home-subcategory-scroll {
  width: 24px;
  height: 24px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
}

.home-subcategory-scroll[hidden] {
  display: none !important;
}

.home-category-product-grid {
  display: grid;
  grid-template-columns: repeat(var(--home-category-columns, 6), minmax(0, 1fr));
  gap: 12px;
}

.home-category-product {
  display: grid;
  gap: 10px;
  min-width: 0;
  justify-items: center;
}

.home-category-product > div {
  width: 100%;
  display: grid;
  align-content: start;
  grid-template-rows: minmax(24px, auto) minmax(38px, auto) minmax(17px, auto) minmax(22px, auto) minmax(34px, auto);
  gap: 6px;
}

.home-category-product img {
  width: 200px;
  aspect-ratio: 1 / 1;
  height: auto;
  max-width: 100%;
  object-fit: cover;
  background: #eef5f1;
  border-bottom: 1px solid var(--line);
  border-radius: var(--radius);
}

.home-category-product-placeholder {
  visibility: hidden;
  pointer-events: none;
}

.home-category-product-placeholder-media {
  width: 200px;
  aspect-ratio: 1 / 1;
  max-width: 100%;
}

.home-category-product h3 {
  margin: 0;
  display: -webkit-box;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.25;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
}

.product-action-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  min-height: 34px;
  margin-top: 0;
}

.product-action-row.is-empty {
  visibility: hidden;
}

.product-action-button {
  min-width: 0;
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 6px;
  color: var(--ink);
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  cursor: pointer;
  font: inherit;
  font-size: 10px;
  font-weight: 400;
  line-height: 1.15;
  text-transform: uppercase;
}

.product-action-button.buy {
  color: white;
  background: var(--green);
  border-color: var(--green);
}

.product-action-button span {
  overflow-wrap: anywhere;
  text-align: center;
}

.product-model {
  min-height: 17px;
  margin: 0;
  color: var(--ink);
  font-size: 12px;
  font-weight: 400;
  line-height: 1.25;
}

.product-model.is-empty {
  visibility: hidden;
}

.product-price-row {
  min-height: 22px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin: 0;
}

.product-price-row .price {
  min-width: 0;
  font-size: 16px;
  line-height: 1.2;
}

.home-category-product .product-price-row .price {
  font-size: 12px;
  font-weight: 400;
}

.product-price-row .old-price {
  flex: 0 0 auto;
  color: var(--ink);
  font-size: 12px;
  line-height: 1.2;
}

.product-stock {
  color: var(--muted);
  font-size: 13px;
}

.page-hero {
  --page-hero-image: none;
  min-height: 280px;
  display: grid;
  align-items: end;
  color: white;
  background:
    linear-gradient(90deg, rgba(12, 24, 18, 0.84), rgba(12, 24, 18, 0.28)),
    var(--page-hero-image) center/cover;
}

.page-hero h1 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(34px, 5vw, 62px);
  line-height: 1.04;
}

.page-hero p {
  max-width: 620px;
  margin-bottom: 0;
  font-size: 18px;
}

.category-page-hero {
  --page-hero-image: none;
}

.products-page-hero {
  --page-hero-image: none;
}

.customers-page-hero {
  --page-hero-image: none;
}

body[data-page="customers"] .customers-page-hero,
body[data-page="customers"] .customer-dashboard {
  background: transparent;
}

.checkout-page-hero {
  --page-hero-image: none;
}

.cart-page-hero {
  --page-hero-image: none;
}

body[data-page] .page-hero,
body[data-page] .auth-hero,
body[data-page] .commerce-hero {
  display: none;
}

body[data-page="customers"] .auth-hero {
  display: grid;
}

body[data-page="customers"].is-account-signed-in .auth-hero,
body[data-page="customers"] .customer-dashboard[hidden] {
  display: none;
}

.auth-hero,
.commerce-hero {
  min-height: 420px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 440px);
  gap: clamp(24px, 5vw, 52px);
  align-items: center;
  color: white;
  background:
    radial-gradient(circle at 10% 20%, rgba(255, 212, 74, 0.28), transparent 30%),
    linear-gradient(90deg, rgba(12, 24, 18, 0.9), rgba(12, 24, 18, 0.38)),
    var(--page-hero-image) center/cover;
}

.auth-hero-copy h1,
.commerce-hero h1 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(38px, 5vw, 68px);
  line-height: 1.02;
}

.auth-hero-copy p,
.commerce-hero > div > p {
  max-width: 620px;
  font-size: 18px;
}

.auth-card,
.commerce-hero-card,
.checkout-steps {
  padding: 22px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: calc(var(--radius) + 8px);
  box-shadow: 0 24px 70px rgba(10, 22, 16, 0.28);
  backdrop-filter: blur(12px);
}

.auth-card {
  display: grid;
  gap: 14px;
}

.account-auth-card {
  gap: 18px;
}

.auth-card h2,
.commerce-hero-card strong {
  margin: 0;
  font-size: 28px;
  line-height: 1.1;
}

.auth-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 5px;
  background: #eef5f1;
  border-radius: 999px;
}

.auth-tab {
  min-height: 38px;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 999px;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.auth-tab.active {
  color: white;
  background: var(--green);
  box-shadow: 0 8px 18px rgba(35, 122, 87, 0.18);
}

.auth-form {
  display: grid;
  gap: 14px;
}

.auth-form[hidden] {
  display: none;
}

.google-login-button {
  gap: 10px;
}

.google-mark {
  width: 24px;
  height: 24px;
  display: inline-grid;
  place-items: center;
  background: white;
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
}

.google-mark svg {
  width: 18px;
  height: 18px;
  display: block;
}

.auth-current-user {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  color: var(--muted);
  background: #f7faf8;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.auth-current-user[hidden] {
  display: none;
}

.auth-current-user strong {
  color: var(--ink);
}

.commerce-hero-card,
.checkout-steps {
  display: grid;
  gap: 12px;
}

.commerce-hero-card span,
.checkout-steps span {
  display: inline-flex;
  width: max-content;
  padding: 7px 10px;
  color: var(--green-dark);
  background: #e8f7ee;
  border-radius: 999px;
  font-weight: 800;
}

.customer-dashboard {
  display: grid;
  grid-template-columns: minmax(260px, 320px) minmax(0, 1fr);
  gap: 28px;
  align-items: start;
  background:
    linear-gradient(135deg, rgba(24, 130, 93, 0.08), rgba(217, 167, 73, 0.08)),
    #f7faf8;
}

.customer-account-sidebar {
  position: sticky;
  top: 96px;
  display: grid;
  gap: 20px;
  padding: 24px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 18px 45px rgba(23, 33, 28, 0.09);
}

.customer-account-profile {
  display: grid;
  gap: 8px;
}

.customer-account-avatar {
  width: 74px;
  height: 74px;
  display: grid;
  place-items: center;
  color: white;
  background: linear-gradient(135deg, var(--green), #d9a749);
  border-radius: 20px;
  font-size: 24px;
  font-weight: 900;
  box-shadow: 0 14px 30px rgba(24, 130, 93, 0.2);
}

.customer-account-sidebar h2 {
  margin: 0;
  font-size: 28px;
}

.customer-login-name {
  margin: -2px 0 0;
  color: var(--muted);
  font-weight: 700;
}

.customer-login-name strong {
  color: var(--ink);
}

.customer-account-nav {
  display: grid;
  gap: 10px;
}

.customer-account-nav button {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  color: var(--muted);
  background: #f6f8f7;
  border: 1px solid var(--line);
  border-radius: 12px;
  font: inherit;
  font-weight: 800;
  text-align: left;
  cursor: pointer;
}

.customer-account-nav button.active,
.customer-account-nav button:hover {
  color: white;
  background: var(--green);
  border-color: var(--green);
}

.customer-sidebar-logout {
  width: 100%;
  min-height: 44px;
  padding: 10px 14px;
  color: #b42318;
  background: #fff4f2;
  border: 1px solid rgba(180, 35, 24, 0.18);
  border-radius: 12px;
  font: inherit;
  font-weight: 800;
  text-align: left;
  cursor: pointer;
}

.customer-sidebar-logout:hover {
  color: white;
  background: #b42318;
  border-color: #b42318;
}

.customer-account-summary {
  display: grid;
  gap: 6px;
  padding: 16px;
  background: #fff8e8;
  border: 1px solid rgba(217, 167, 73, 0.26);
  border-radius: 14px;
}

.customer-account-summary span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.customer-account-summary strong {
  color: var(--ink);
  font-size: 34px;
  line-height: 1;
}

.customer-account-detail {
  min-width: 0;
  padding: clamp(20px, 3vw, 30px);
  border-radius: 18px;
  box-shadow: 0 18px 45px rgba(23, 33, 28, 0.08);
}

.customer-account-panel {
  display: grid;
  gap: 14px;
}

.customer-account-panel[hidden] {
  display: none;
}

.customer-edit-button {
  min-height: 36px;
  padding: 8px 14px;
  white-space: nowrap;
}

.customer-info-head h3 {
  margin: 10px 0 4px;
  font-size: 26px;
}

.customer-info-head p {
  margin: 0;
  color: var(--muted);
  font-weight: 700;
}

.customer-info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
}

.customer-info-grid div {
  padding: 14px;
  background: #f8fbf9;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.customer-info-grid dt {
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.customer-info-grid dd {
  margin: 0;
  color: var(--ink);
  font-weight: 800;
  overflow-wrap: anywhere;
}

.customer-order-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
}

.customer-info-editor-form {
  display: grid;
  gap: 14px;
}

.customer-address-editor-field textarea {
  min-height: 96px;
}

.customer-address-card {
  grid-template-columns: 1fr;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--gold);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.section {
  padding: clamp(34px, 6vw, 78px) clamp(18px, 5vw, 72px);
}

.section.home-category-strip {
  padding: 10px 16px;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 24px;
}

.section-head.compact {
  align-items: center;
}

h2 {
  margin: 0;
  font-size: clamp(26px, 4vw, 42px);
  line-height: 1.12;
}

.tools {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.page-tools {
  min-width: min(100%, 520px);
}

.page-tools.search-only {
  min-width: min(100%, 360px);
}

.page-tools input,
.page-tools select {
  flex: 1 1 220px;
}

.page-tools.search-only input {
  flex-basis: 100%;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 13px;
  color: var(--ink);
  background: white;
  outline: none;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(35, 122, 87, 0.14);
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 18px;
}

.product-list-layout {
  display: grid;
  grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}

.product-list-layout:not(.has-filter) {
  display: block;
}

.product-filter-panel {
  position: sticky;
  top: 92px;
  display: grid;
  gap: 14px;
  padding: 18px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 10px 28px rgba(23, 33, 28, 0.08);
}

.product-filter-panel[hidden] {
  display: none;
}

.product-filter-panel h3 {
  margin: 0;
  font-size: 22px;
}

.product-filter-panel label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-weight: 700;
}

.product-filter-check {
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
}

.product-filter-check input {
  width: auto;
}

.product-dynamic-filter-fields,
.product-filter-info-fields {
  display: grid;
  gap: 12px;
}

.product-filter-info-custom {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: end;
}

.product-card,
.cart-item,
.order-card,
.checkout-panel,
.admin-form,
.stat-card,
.empty-state,
.table-wrap {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 10px 28px rgba(23, 33, 28, 0.08);
}

.product-card {
  overflow: hidden;
}

.product-card img {
  width: 200px;
  aspect-ratio: 1 / 1;
  height: auto;
  max-width: 100%;
  margin: 0 auto;
  object-fit: cover;
  background: #e8efeb;
  border-bottom: 1px solid var(--line);
  border-radius: var(--radius);
}

.product-body {
  display: grid;
  gap: 10px;
  padding: 16px;
}

.product-body h3,
.cart-item h3,
.order-card h3 {
  margin: 0;
  font-size: 19px;
  font-weight: 700;
}

.product-name-link {
  color: inherit;
}

.product-name-link:hover {
  color: var(--green-dark);
}

.product-body p,
.cart-item p,
.order-card p {
  margin: 0;
  color: var(--muted);
}

.meta-row,
.summary-row,
.cart-actions,
.button-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.price {
  color: var(--green-dark);
  font-size: 20px;
  font-weight: 800;
}

.old-price {
  color: var(--muted);
  text-decoration: line-through;
}

.badge {
  display: inline-flex;
  width: max-content;
  padding: 5px 9px;
  color: var(--blue);
  background: #e5f0f3;
  border-radius: var(--radius);
  font-size: 12px;
  font-weight: 400;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  padding: 10px 15px;
  font-weight: 800;
  cursor: pointer;
}

.button.primary {
  color: white;
  background: var(--green);
}

.button.primary:hover {
  background: var(--green-dark);
}

.button.ghost {
  color: var(--ink);
  background: white;
  border-color: var(--line);
}

.button.danger {
  color: white;
  background: var(--coral);
}

.button.full {
  width: 100%;
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.checkout-layout,
.cart-page-layout,
.commerce-layout,
.admin-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 430px);
  gap: 24px;
  align-items: start;
}

.commerce-main-card {
  padding: 22px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbf9 100%);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 6px);
  box-shadow: 0 18px 48px rgba(23, 33, 28, 0.09);
}

#layoutAdmin {
  display: block;
}

.cart-list,
.order-list {
  display: grid;
  gap: 14px;
  margin-top: 22px;
}

.cart-item {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 16px;
  padding: 14px;
  background: white;
}

.cart-item img {
  width: 112px;
  height: 112px;
  border-radius: var(--radius);
  object-fit: cover;
  background: #eef5f1;
}

.qty-control {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.qty-control button {
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: white;
  cursor: pointer;
  font-weight: 900;
}

.checkout-panel,
.admin-form {
  position: sticky;
  top: 92px;
  display: grid;
  gap: 14px;
  padding: 20px;
}

.commerce-summary,
.checkout-form-panel {
  border-radius: calc(var(--radius) + 6px);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(247, 250, 248, 0.98)),
    radial-gradient(circle at top right, rgba(255, 212, 74, 0.22), transparent 42%);
}

.cart-summary-panel {
  align-content: start;
}

form label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-weight: 700;
}

.summary-row {
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-size: 18px;
}

.summary-row.total {
  color: var(--ink);
  font-size: 20px;
}

.summary-row.total strong {
  color: #e53935;
}

.form-note {
  min-height: 22px;
  margin: 0;
  color: var(--green-dark);
  font-weight: 700;
}

.form-note.is-info,
.form-note.is-success,
.form-note.is-error {
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid transparent;
}

.form-note.is-info {
  color: #24537a;
  background: #eef7ff;
  border-color: #c9e4ff;
}

.form-note.is-success {
  color: #166534;
  background: #ecfdf3;
  border-color: #bbf7d0;
}

.form-note.is-error {
  color: #b42318;
  background: #fff1f0;
  border-color: #fecaca;
}

.footer {
  flex-shrink: 0;
  width: 100%;
  margin-top: 24px;
  padding: 26px max(var(--page-gutter), calc((100% - var(--page-width)) / 2));
  color: var(--muted);
  background: rgba(248, 250, 248, 0.92);
  border-top: 1px solid var(--line);
  border-radius: var(--radius) var(--radius) 0 0;
}

.admin-main {
  min-height: 100vh;
  padding: 24px 28px 32px;
}

.admin-page {
  background:
    linear-gradient(180deg, #f4f7f5 0%, #eef4f1 100%);
}

.admin-page .admin-main {
  width: 100%;
  min-width: 0;
  margin: 0;
  overflow: visible;
  border-radius: 0;
}

.admin-shell {
  display: grid;
  grid-template-columns: 264px minmax(0, 1fr);
  min-height: 100vh;
}

.admin-login-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.admin-login-card {
  width: min(420px, 100%);
}

.admin-login-card h1 {
  margin: 0;
  font-size: 30px;
  line-height: 1.1;
}

.admin-login-card label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-weight: 700;
}

.admin-locked .admin-shell {
  display: none;
}

.admin-page:not(.admin-locked) .admin-login-screen {
  display: none;
}

.admin-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 24px 18px;
  color: white;
  background:
    linear-gradient(180deg, #17211c 0%, #1e2c25 100%);
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0;
}

.admin-sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 8px 16px;
  color: white;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.admin-sidebar-nav {
  display: grid;
  gap: 6px;
}

.admin-sidebar-logout {
  margin-top: auto;
  min-height: 44px;
  padding: 10px 12px;
  color: rgba(255, 255, 255, 0.9);
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
  font: inherit;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
  transition: background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.admin-sidebar-logout:hover {
  color: white;
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.18);
}

.admin-sidebar-nav a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 10px 12px;
  color: rgba(255, 255, 255, 0.78);
  font-weight: 700;
  border-radius: var(--radius);
  transition: background-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.admin-sidebar-nav a:hover {
  color: white;
  background: rgba(255, 255, 255, 0.08);
}

.admin-sidebar-nav a.active {
  color: white;
  background: rgba(35, 122, 87, 0.95);
  box-shadow: inset 3px 0 0 #f3c96b;
}

.admin-view[hidden] {
  display: none;
}

.admin-view {
  display: grid;
  gap: 24px;
}

.admin-card {
  margin: 0;
  padding: 24px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 16px 42px rgba(23, 33, 28, 0.08);
}

.admin-dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}

.admin-dashboard-link {
  display: grid;
  gap: 10px;
  min-height: 148px;
  align-content: start;
  padding: 20px;
  background: linear-gradient(180deg, #ffffff 0%, #f4f8f6 100%);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 10px 24px rgba(23, 33, 28, 0.06);
}

.admin-dashboard-link span {
  color: var(--green);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.admin-dashboard-link strong {
  font-size: 20px;
  line-height: 1.2;
}

.admin-dashboard-link:hover {
  background: #eef6f2;
  transform: translateY(-1px);
}

.admin-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 600px);
  gap: 24px;
  align-items: end;
  background:
    linear-gradient(90deg, rgba(248, 250, 248, 0.98), rgba(248, 250, 248, 0.78)),
    url("https://images.unsplash.com/photo-1556742044-3c52d6e88c62?auto=format&fit=crop&w=1600&q=80") center/cover;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.stat-card {
  padding: 18px 20px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--line);
  box-shadow: 0 10px 24px rgba(23, 33, 28, 0.05);
}

.stat-card span {
  color: var(--muted);
  font-weight: 700;
}

.stat-card strong {
  display: block;
  margin-top: 8px;
  color: var(--green-dark);
  font-size: 28px;
}

.table-wrap {
  overflow-x: auto;
  background: white;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
}

th,
td {
  padding: 13px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

th {
  color: var(--muted);
  font-size: 13px;
  text-transform: uppercase;
}

td img {
  width: 56px;
  height: 56px;
  border-radius: var(--radius);
  object-fit: cover;
}

.row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.order-card {
  padding: 18px;
  background: linear-gradient(180deg, #ffffff 0%, #f7faf8 100%);
}

.category-page-grid,
.customer-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}

.category-page-card,
.customer-card {
  display: grid;
  gap: 16px;
  padding: 18px;
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 10px 28px rgba(23, 33, 28, 0.08);
}

.category-page-card {
  align-content: start;
  min-height: 260px;
  grid-template-rows: auto auto 1fr auto;
}

.category-page-card h3,
.customer-card h3 {
  margin: 8px 0 0;
  font-size: 22px;
}

.category-page-card p,
.customer-card p {
  margin: 0;
  color: var(--muted);
}

.category-page-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.category-page-meta {
  font-size: 13px;
  color: var(--muted);
  white-space: nowrap;
}

.category-page-card-body {
  display: grid;
  gap: 8px;
}

.category-page-summary {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.category-page-avatar-stack {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 6px;
}

.category-page-avatar,
.category-page-child-avatar {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  object-fit: cover;
  border: 1px solid var(--line);
  background: #f3f7f4;
  flex: 0 0 auto;
}

.category-page-avatar-fallback,
.category-page-avatar-more,
.category-page-child-avatar-fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
}

.category-page-child-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}

.category-page-child-link {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: #f8fbf9;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--ink);
}

.category-page-child-link:hover {
  background: #eef5f1;
}

.category-page-child-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.category-page-child-copy > span {
  min-width: 0;
  line-height: 1.3;
}

.category-page-child-copy strong {
  font-size: 12px;
  font-weight: 400;
  color: var(--muted);
}

.product-parent-category-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 20px;
}

body.parent-category-view #productListSection {
  min-height: 640px;
}

body.parent-category-view #productListLayout {
  min-height: 420px;
}

body.parent-category-view .product-parent-category-grid {
  align-content: start;
}

.product-parent-category-card {
  display: grid;
  gap: 12px;
  align-content: start;
  color: var(--ink);
}

.product-parent-category-image {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 18px;
  background: #f3f7f4;
  border: 1px solid var(--line);
}

.product-parent-category-image-fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  font-weight: 700;
}

.product-parent-category-title {
  display: block;
  text-align: center;
  font-size: 18px;
  line-height: 1.35;
  font-weight: 600;
}

@media (max-width: 1200px) {
  .product-parent-category-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .product-list-layout {
    grid-template-columns: 1fr;
  }

  .product-filter-panel {
    position: static;
  }

  .product-parent-category-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .product-parent-category-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }

  .product-parent-category-title {
    font-size: 16px;
  }
}

.interface-links {
  background: #eef5f1;
}

.article-section {
  background: white;
}

.article-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.article-card {
  display: grid;
  justify-items: center;
  overflow: hidden;
  background: #eef5f1;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.article-card img {
  width: 250px;
  height: 250px;
  max-width: 100%;
  object-fit: cover;
}

.article-card div {
  display: grid;
  gap: 7px;
  padding: 10px;
}

.article-card h3,
.article-card p {
  margin: 0;
}

.article-card h3 {
  font-size: 17px;
  line-height: 1.2;
}

.article-card p {
  color: var(--muted);
  font-size: 14px;
}

.interface-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.interface-column {
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 18px;
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 10px 28px rgba(23, 33, 28, 0.08);
}

.interface-column h3 {
  margin: 0;
  font-size: 18px;
}

.interface-column a {
  color: var(--muted);
}

.interface-column a:hover {
  color: var(--green-dark);
}

.company-footer {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
  align-items: start;
  color: #111;
}

.company-footer > div {
  display: grid;
  gap: 4px;
}

.company-footer h2 {
  margin: 0;
  font-size: 15px;
  line-height: 1.2;
  color: #111;
}

.company-footer p {
  margin: 0;
  font-size: 0.67rem;
  line-height: 1.4;
  color: #111;
}

.company-contact {
  display: grid;
  gap: 4px;
  color: #111;
}

.company-contact p {
  margin: 0;
  font-size: 0.67rem;
  line-height: 1.4;
}

.contact-chat-widget {
  position: fixed;
  right: max(16px, calc((100vw - var(--page-width)) / 2 + 16px));
  bottom: 20px;
  z-index: 38;
  width: 58px;
  pointer-events: none;
}

.contact-chat-panel {
  display: block;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  pointer-events: auto;
}

.contact-chat-actions {
  display: grid;
  gap: 10px;
}

.contact-chat-link {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  padding: 0;
  color: white;
  border: 3px solid #fff;
  border-radius: 999px;
  box-shadow: 0 14px 34px rgba(23, 33, 28, 0.22);
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.contact-chat-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 42px rgba(23, 33, 28, 0.26);
}

.contact-chat-logo {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  border-radius: inherit;
}

.zalo-logo {
  color: #ffffff;
  background: #0068ff;
  font-size: 17px;
  font-weight: 900;
  letter-spacing: 0;
}

.messenger-logo {
  background: #7b3ff2;
}

.messenger-logo svg {
  width: 34px;
  height: 34px;
  fill: currentColor;
}

.contact-chat-link.zalo {
  background: #0068ff;
}

.contact-chat-link.messenger {
  background: #7b3ff2;
}

.product-detail-section {
  padding: clamp(20px, 3vw, 28px);
}

body.product-detail-view .products-page-hero,
body.product-detail-view #productListSection {
  display: none;
}

.product-detail-layout {
  display: grid;
  gap: 24px;
  align-items: start;
}

.product-detail-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--muted);
}

body[data-page] main > .product-detail-breadcrumb {
  margin: 10px 0;
  padding: 0 4px;
}

body[data-page] main > .product-detail-breadcrumb + .section {
  margin-top: 0;
}

body[data-page] main > .product-detail-breadcrumb + .auth-hero,
body[data-page] main > .product-detail-breadcrumb + .commerce-hero,
body[data-page] main > .product-detail-breadcrumb + .customer-dashboard {
  margin-top: 0;
}

.product-detail-breadcrumb a:hover {
  color: var(--green-dark);
}

.product-detail-overview {
  display: grid;
  grid-template-columns: minmax(320px, 540px) minmax(320px, 1fr);
  gap: 28px;
  align-items: stretch;
  padding: 20px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 10px 28px rgba(23, 33, 28, 0.08);
}

.product-detail-gallery,
.product-detail-content,
.product-detail-tabs {
  display: grid;
  gap: 16px;
}

.product-detail-content {
  height: 100%;
  align-content: start;
  grid-template-rows: max-content max-content max-content max-content 1fr;
  min-width: 0;
}

.product-detail-slider {
  position: relative;
}

.product-detail-slider-viewport {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #eef5f1;
}

.product-detail-slider-track {
  display: flex;
  transition: transform 320ms ease;
  will-change: transform;
}

.product-detail-pricing {
  display: grid;
  grid-template-columns: repeat(2, max-content);
  align-items: start;
  gap: 28px;
  margin-top: 12px;
}

.product-detail-price-block {
  display: grid;
  grid-template-rows: 18px 36px;
  gap: 4px;
  align-content: start;
}

.product-detail-price-block.sale {
  color: #e53935;
}

.product-detail-price-block.sale .price {
  color: #e53935;
}

.product-detail-price-label {
  display: flex;
  align-items: center;
  font-size: 13px;
  font-weight: 700;
  line-height: 18px;
  color: var(--muted);
}

.product-detail-price-block .price {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  font-size: clamp(14px, 1.5vw, 18px);
  font-weight: 400;
  line-height: 1.05;
}

.product-detail-price-block .old-price {
  font-size: clamp(14px, 1.5vw, 18px);
  line-height: 1.1;
  color: #17211c;
  text-decoration: line-through;
}

.product-detail-list-price-row {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  min-height: 36px;
}

.product-detail-discount {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 4px 12px;
  color: #e53935;
  background: #fff1ef;
  border: 1px solid rgba(229, 57, 53, 0.16);
  border-radius: 999px;
  font-size: 14px;
  font-weight: 800;
}

.product-detail-main-image {
  width: 100%;
  min-width: 100%;
  aspect-ratio: 1 / 1;
  padding: 12px;
  object-fit: contain;
  background: #eef5f1;
}

.product-detail-thumb-strip {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}

.product-detail-thumb-viewport {
  overflow: hidden;
}

.product-detail-thumb-row {
  display: flex;
  flex-wrap: nowrap;
  gap: 10px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.product-detail-thumb-row::-webkit-scrollbar {
  display: none;
}

.product-detail-thumb-nav {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  padding: 0;
  color: #111111;
  background: white;
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: 0 8px 18px rgba(23, 33, 28, 0.08);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: opacity 180ms ease, visibility 180ms ease;
}

.product-detail-slider-button {
  position: absolute;
  top: 50%;
  z-index: 2;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  padding: 0;
  color: #111111;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(23, 33, 28, 0.08);
  border-radius: 999px;
  box-shadow: 0 10px 24px rgba(23, 33, 28, 0.14);
  cursor: pointer;
  transform: translateY(-50%);
  opacity: 0;
  visibility: hidden;
  transition: opacity 180ms ease, visibility 180ms ease;
}

.product-detail-slider:hover .product-detail-slider-button,
.product-detail-slider:focus-within .product-detail-slider-button,
.product-detail-thumb-strip:hover .product-detail-thumb-nav,
.product-detail-thumb-strip:focus-within .product-detail-thumb-nav {
  opacity: 1;
  visibility: visible;
}

.product-detail-slider-button.prev {
  left: 14px;
}

.product-detail-slider-button.next {
  right: 14px;
}

.product-detail-thumb {
  flex: 0 0 auto;
  width: 72px;
  height: 72px;
  padding: 0;
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
}

.product-detail-thumb.active {
  border-color: var(--green);
  box-shadow: 0 0 0 2px rgba(35, 122, 87, 0.12);
}

.product-detail-thumb img {
  width: 100%;
  height: 100%;
  padding: 6px;
  object-fit: contain;
  background: #eef5f1;
}

.product-detail-content h2,
.product-detail-summary-block h3,
.product-detail-body h3 {
  margin: 0;
}

.product-detail-content h2 {
  font-size: clamp(28px, 3vw, 38px);
  line-height: 1.1;
}

.product-detail-model {
  margin: -6px 0 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.product-detail-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
}

.product-detail-summary-block {
  display: grid;
  gap: 8px;
}

.product-detail-summary-block h3 {
  color: #17211c;
  font-size: 16px;
  line-height: 1.25;
}

.product-detail-summary,
.product-detail-body p {
  margin: 0;
  color: var(--muted);
}

.product-detail-summary {
  color: #17211c;
  max-height: 12em;
  line-height: 1.5;
  overflow: hidden;
  white-space: pre-line;
}

.product-detail-highlight-list {
  display: grid;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
  white-space: normal;
}

.product-detail-highlight-list li {
  position: relative;
  padding-left: 18px;
}

.product-detail-highlight-list li::before {
  content: "";
  position: absolute;
  top: 0.7em;
  left: 0;
  width: 7px;
  height: 7px;
  background: #17211c;
  border-radius: 999px;
  transform: translateY(-50%);
}

.product-detail-actions .button {
  flex: 1 1 220px;
}

.product-detail-tabs {
  padding: 20px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 10px 28px rgba(23, 33, 28, 0.08);
}

.product-detail-tab-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}

.product-detail-tab {
  min-height: 42px;
  padding: 10px 16px;
  color: var(--muted);
  background: white;
  border: 1px solid var(--line);
  border-radius: 999px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.product-detail-tab.active {
  color: white;
  background: var(--green);
  border-color: var(--green);
}

.product-detail-panel {
  display: block;
}

.product-detail-panel[hidden] {
  display: none;
}

.product-detail-body {
  display: grid;
  gap: 14px;
}

.product-detail-body > * {
  max-width: 100%;
}

.product-detail-body img {
  max-width: 100%;
  height: auto !important;
  border-radius: calc(var(--radius) - 6px);
}

.product-detail-specs table {
  width: 100%;
}

.category-admin-list {
  display: grid;
  gap: 6px;
}

.product-admin-list {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 14px;
}

.admin-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 16px;
  color: var(--muted);
  font-weight: 800;
}

.admin-pagination:empty {
  display: none;
}

.category-tree-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 5px 8px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.category-tree-item strong {
  display: block;
  font-size: 13px;
  line-height: 1.2;
}

.category-tree-item.parent {
  background: #f8fbf9;
}

.category-tree-item.child {
  margin-left: var(--category-indent, 0);
}

.category-tree-avatar {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  object-fit: cover;
  background: #eef5f1;
  border: 1px solid var(--line);
  flex: 0 0 auto;
}

.category-tree-item.child strong {
  font-weight: 400;
}

.category-tree-content {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.category-tree-count {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.row-actions.end {
  justify-content: flex-end;
}

.category-tree-item .button {
  min-height: 26px;
  font-size: 13px;
}

.product-admin-item {
  display: grid;
  align-content: start;
  gap: 0;
  padding: 0;
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(23, 33, 28, 0.06);
}

.product-admin-bulkbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  padding: 10px 12px;
  background: #f8fbf9;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.product-admin-select-all {
  display: inline-flex;
  align-items: center;
  color: var(--ink);
  font-weight: 800;
}

.product-admin-select-all input {
  width: 16px;
  height: 16px;
  accent-color: var(--green);
}

#selectedProductsCount {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.product-admin-media {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: linear-gradient(180deg, #95d9e7 0%, #d4f2f7 100%);
  border-bottom: 1px solid var(--line);
}

.product-admin-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.product-admin-check,
.product-admin-brand,
.product-admin-discount {
  position: absolute;
  z-index: 1;
}

.product-admin-check {
  top: 10px;
  left: 10px;
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.product-admin-check input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.product-admin-check span {
  display: block;
  width: 18px;
  height: 18px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(23, 33, 28, 0.18);
  border-radius: 4px;
}

.product-admin-check input:checked + span {
  background: var(--green);
  border-color: var(--green);
}

.product-admin-check input:checked + span::after {
  content: "";
  position: absolute;
  left: 6px;
  top: 3px;
  width: 5px;
  height: 9px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.product-admin-brand {
  top: 8px;
  left: 38px;
  max-width: calc(100% - 90px);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.18);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.product-admin-discount {
  top: 0;
  right: 0;
  padding: 5px 7px;
  color: #ff5b1f;
  background: #ffd44a;
  border-bottom-left-radius: 7px;
  font-size: 11px;
  font-weight: 800;
}

.product-admin-body {
  display: grid;
  gap: 10px;
  padding: 10px 10px 8px;
}

.product-admin-name {
  display: -webkit-box;
  font-size: 14px;
  line-height: 1.35;
  min-height: 38px;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
}

.product-admin-name-button {
  width: 100%;
  padding: 0;
  color: var(--ink);
  background: transparent;
  border: 0;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  text-align: left;
}

.product-admin-name-button:hover {
  color: var(--green-dark);
  text-decoration: underline;
}

.product-admin-price-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px;
}

.product-admin-price {
  color: #ff5b1f;
  font-size: 14px;
  font-weight: 700;
}

.product-admin-price.no-price {
  color: var(--muted);
}

.product-admin-price-row .old-price {
  font-size: 12px;
}

.product-admin-stock {
  margin: 0;
  color: #4b4f4d;
  font-size: 13px;
}

.product-admin-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  color: #9b9f9d;
  font-size: 12px;
}

.product-admin-stats span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
}

.product-admin-stats svg {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  color: #111111;
  fill: currentColor;
}

.product-admin-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 8px;
  border-top: 1px solid #edf1ef;
}

.product-admin-category {
  min-width: 0;
  color: #9b9f9d;
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.product-admin-footer .row-actions.end {
  gap: 10px;
}

.product-admin-footer .icon-button {
  width: 18px;
  min-width: 18px;
  color: #111111;
}

.product-admin-footer .icon-button svg {
  width: 15px;
  height: 15px;
}

.product-admin-footer .icon-button:hover {
  color: #111111;
}

.customer-admin-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 14px 0 18px;
}

.customer-admin-stat,
.customer-admin-card {
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 8px 20px rgba(23, 33, 28, 0.06);
}

.customer-admin-stat {
  display: grid;
  gap: 6px;
  padding: 14px;
}

.customer-admin-stat span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.customer-admin-stat strong {
  font-size: 28px;
  line-height: 1;
}

.customer-admin-list {
  display: grid;
  gap: 12px;
}

.customer-admin-card {
  display: grid;
  grid-template-columns: minmax(220px, 0.7fr) minmax(0, 1fr);
  gap: 16px;
  padding: 16px;
}

.customer-admin-card h3 {
  margin: 8px 0 4px;
  font-size: 20px;
}

.customer-admin-card p,
.customer-admin-meta span {
  margin: 0;
  color: var(--muted);
}

.customer-admin-meta {
  display: grid;
  align-content: center;
  gap: 6px;
}

.product-editor-form {
  display: grid;
  gap: 18px;
}

.product-editor-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 360px);
  gap: 20px;
  align-items: start;
  padding-top: 10px;
}

.product-editor-main,
.product-editor-side {
  display: grid;
  gap: 16px;
}

.product-editor-panel {
  display: grid;
  gap: 14px;
  padding: 18px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbf9 100%);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.product-editor-panel-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

.product-editor-panel-head h3,
.product-editor-field span {
  margin: 0;
  color: var(--ink);
  font-weight: 800;
}

.product-editor-panel-head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.product-editor-field {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-weight: 700;
}

.product-summary-input {
  min-height: 160px;
  line-height: 1.5;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  tab-size: 2;
}

.product-detail-editor {
  min-height: 160px;
  max-height: 320px;
  padding: 12px 13px;
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  font-weight: 400;
  line-height: 1.5;
  outline: none;
  overflow: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  tab-size: 2;
}

.product-detail-editor::-webkit-scrollbar {
  display: none;
}

.product-detail-editor:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(35, 122, 87, 0.14);
}

.product-detail-editor:empty::before {
  content: attr(data-placeholder);
  color: var(--muted);
}

.product-detail-editor img {
  max-width: min(100%, 320px);
  height: auto;
  margin: 10px 0;
  border-radius: var(--radius);
}

.product-upload-preview {
  min-height: 58px;
  flex-wrap: wrap;
}

.product-upload-preview img {
  width: 72px;
  height: 72px;
}

.product-upload-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
  gap: 12px;
}

.product-upload-gallery.single {
  grid-template-columns: minmax(120px, 180px);
}

#productAvatarPreview.product-upload-gallery.single {
  grid-template-columns: 1fr;
}

.product-upload-item {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: #f7faf8;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.product-upload-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-upload-remove {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  padding: 0;
  color: #111111;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(23, 33, 28, 0.08);
  border-radius: 999px;
  box-shadow: 0 8px 18px rgba(23, 33, 28, 0.14);
  cursor: pointer;
  line-height: 1;
}

.product-upload-empty {
  display: grid;
  place-items: center;
  min-height: 64px;
  padding: 10px;
  color: var(--muted);
  background: linear-gradient(180deg, #ffffff 0%, #f7faf8 100%);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  font-size: 13px;
  line-height: 1.35;
  text-align: center;
}

.product-editor-price-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.product-checklist {
  display: grid;
  gap: 10px;
  max-height: 496px;
  overflow: auto;
  padding-right: 4px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.product-checklist::-webkit-scrollbar {
  display: none;
}

.product-check-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  font-weight: 700;
}

.product-check-item input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--green);
}

.compact-button {
  min-width: 38px;
  min-height: 38px;
  padding: 6px 12px;
  font-size: 20px;
  line-height: 1;
}

.topbar-children-toggle {
  font-size: 14px;
  transition: transform 0.2s ease;
}

.topbar-children-toggle.is-open {
  transform: rotate(180deg);
}

.topbar-children-toggle-row {
  grid-column: 1 / -1;
  justify-self: start;
  min-height: 30px;
  padding: 4px 10px;
  font-size: 12px;
  line-height: 1.2;
}

.topbar-children-toggle-row.is-open {
  transform: none;
}

.topbar-child-list {
  display: grid;
  grid-column: 1 / -1;
  gap: 6px;
  margin-top: 6px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.topbar-child-list[hidden] {
  display: none !important;
}

.topbar-child-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 8px;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  font-size: 12px;
  font-weight: 400;
}

.topbar-child-item span {
  flex: 1;
}

#topbarCategoryPopupFields {
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 10px;
}

#topbarCategoryPopupFields .brand-admin-item {
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  padding: 10px;
  border-radius: 10px;
  cursor: grab;
}

#topbarCategoryPopupFields .brand-admin-item h4 {
  font-size: 14px;
}

#topbarCategoryPopupFields .brand-admin-item.is-dragging {
  opacity: 0.55;
  cursor: grabbing;
}

#topbarCategoryPopupFields .brand-admin-item.is-dragging * {
  pointer-events: none;
}

.topbar-category-card-head {
  grid-column: 1 / -1;
  align-items: start;
}

.topbar-visibility-toggle {
  min-width: 30px;
  min-height: 30px;
  padding: 0;
  border-radius: 8px;
  font-size: 14px;
  line-height: 1;
}

.topbar-visibility-toggle.is-visible {
  color: var(--green);
  border-color: rgba(24, 130, 93, 0.22);
  background: rgba(24, 130, 93, 0.08);
}

.product-brand-manager-list {
  display: grid;
  gap: 10px;
  max-height: 320px;
  overflow: auto;
}

.product-brand-manager-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.product-brand-manager-item .product-check-item {
  min-width: 0;
}

.product-brand-remove {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  padding: 0;
  color: #111111;
  background: white;
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: 0 8px 18px rgba(23, 33, 28, 0.08);
  cursor: pointer;
  line-height: 1;
}

.product-brand-remove:hover {
  color: #111111;
  border-color: rgba(17, 17, 17, 0.18);
  background: #f5f5f5;
}

.featured-product-manual,
.featured-product-picker-body,
.featured-product-selection {
  display: grid;
  gap: 12px;
}

.featured-product-manual {
  margin-top: 4px;
}

.featured-product-manual-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.featured-product-manual-head strong {
  font-size: 14px;
}

.featured-selected-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  background: #f7faf8;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.featured-selected-item strong,
.featured-selected-item span {
  display: block;
}

.featured-selected-item span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.featured-product-picker-list {
  max-height: min(60vh, 520px);
}

.bulk-product-selected-list {
  max-height: 420px;
}

.bulk-product-selected-item {
  display: grid;
  gap: 4px;
  padding: 12px;
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.bulk-product-selected-item strong {
  font-size: 14px;
}

.bulk-product-selected-item span {
  color: var(--muted);
  font-size: 13px;
}

.product-upload-button {
  position: relative;
  overflow: hidden;
  min-height: 34px;
  padding: 7px 12px;
  font-size: 13px;
}

.product-editor-actions {
  justify-content: flex-start;
}

.product-editor-head-actions {
  justify-content: flex-end;
}

.admin-list-toolbar {
  margin-bottom: 8px;
}

.admin-list-toolbar input {
  max-width: 320px;
}

.product-admin-head-tools {
  align-items: center;
  gap: 12px;
}

.product-admin-searchbar {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 0;
}

.product-admin-searchbar input {
  width: 320px;
  max-width: 320px;
}

.admin-filter {
  position: relative;
}

.admin-filter-trigger {
  width: 42px;
  min-width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: none;
}

.admin-filter-trigger svg {
  width: 17px;
  height: 17px;
}

.admin-filter.open .admin-filter-dropdown {
  display: grid;
}

.admin-filter-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 30;
  min-width: 260px;
  display: none;
  gap: 12px;
  padding: 14px;
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 18px 40px rgba(23, 33, 28, 0.14);
}

.admin-filter-dropdown label {
  color: var(--ink);
  font-weight: 700;
}

.admin-filter-dropdown .button-row {
  justify-content: flex-end;
}

.icon-button {
  width: 26px;
  min-width: 26px;
  border: 0;
  background: transparent;
  box-shadow: none;
  padding: 0;
}

.icon-button svg {
  width: 17px;
  height: 17px;
  color: #111111;
  fill: currentColor;
}

.banner-preview {
  --banner-preview-image: none;
  min-height: 260px;
  display: grid;
  align-content: end;
  gap: 10px;
  padding: 24px;
  color: white;
  background:
    linear-gradient(90deg, rgba(12, 24, 18, 0.86), rgba(12, 24, 18, 0.36)),
    var(--banner-preview-image) center/cover;
  border-radius: var(--radius);
  overflow: hidden;
}

.banner-preview h3 {
  max-width: 620px;
  margin: 0;
  font-size: clamp(26px, 4vw, 42px);
  line-height: 1.08;
}

.banner-preview p {
  max-width: 580px;
  margin: 0;
}

.layout-admin-form {
  position: static;
}

.admin-stack {
  display: grid;
  gap: 20px;
}

.admin-layout-head {
  display: grid;
  justify-content: start;
  gap: 6px;
  margin-bottom: 16px;
}

.admin-layout-head h2 {
  margin: 0;
  font-size: 28px;
}

.admin-section-note {
  max-width: 420px;
  margin: 0;
  color: var(--muted);
  text-align: right;
}

.admin-layout-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.95fr);
  gap: 20px;
  align-items: start;
}

.admin-layout-shell.preview-hidden {
  grid-template-columns: minmax(0, 1fr);
}

.admin-layout-editor {
  display: grid;
  gap: 20px;
}

.admin-layout-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.admin-layout-card {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 16px;
  padding: 18px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbf9 100%);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 10px 24px rgba(23, 33, 28, 0.05);
}

.admin-layout-card h3 {
  margin: 0 0 6px;
  font-size: 18px;
}

.admin-layout-card p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.admin-layout-card .button {
  flex: 0 0 auto;
}

.admin-layout-preview-panel {
  position: sticky;
  top: 18px;
}

.admin-preview-card,
.admin-form-card {
  display: grid;
  gap: 18px;
  padding: 18px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbf9 100%);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 10px 24px rgba(23, 33, 28, 0.05);
}

.admin-form-head {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 12px;
}

.admin-form-head h3,
.admin-preview-group h4 {
  margin: 0;
}

.admin-form-head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.admin-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.field-span-2 {
  grid-column: 1 / -1;
}

.admin-preview-group {
  display: grid;
  gap: 10px;
}

.admin-page .admin-form {
  position: static;
  gap: 16px;
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.layout-fields {
  display: grid;
  gap: 24px;
}

.layout-section {
  display: grid;
  gap: 16px;
}

#layoutFields[hidden] {
  display: none !important;
}

.layout-section-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 14px;
}

.layout-section-head h3 {
  margin: 0;
  font-size: 20px;
}

.layout-section-head p,
.layout-group-note {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.layout-group-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
}

.layout-links-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.layout-field-group {
  display: grid;
  gap: 12px;
  padding: 18px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbf9 100%);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 10px 24px rgba(23, 33, 28, 0.05);
}

.layout-field-group h3 {
  margin: 0;
  font-size: 18px;
}

.layout-field-group > .admin-form-grid:first-of-type,
.layout-field-group > .brand-admin-grid:first-of-type {
  margin-top: 2px;
}

.category-avatar-field {
  display: grid;
  gap: 8px;
}

.product-category-block-picker-row {
  align-items: end;
  gap: 10px;
}

.product-category-block-picker-label {
  display: grid;
  gap: 6px;
  flex: 1;
}

.product-category-block-picker-label span {
  font-size: 13px;
  color: var(--muted);
}

.product-category-child-list {
  margin-top: 8px;
}

#productCategoryBlockFields .brand-admin-item {
  cursor: grab;
}

.product-category-remove-button {
  min-width: 48px;
  min-height: 30px;
  padding: 4px 10px;
  font-size: 12px;
}

#productCategoryBlockFields .brand-admin-item.is-dragging {
  opacity: 0.55;
  cursor: grabbing;
}

#productCategoryBlockFields .brand-admin-item.is-dragging * {
  pointer-events: none;
}

.brand-upload-preview {
  min-height: 54px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--muted);
}

.brand-upload-preview img {
  width: 54px;
  height: 54px;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.banner-upload-preview img {
  width: 180px;
  height: 90px;
}

.banner-upload-preview .product-upload-item {
  width: 180px;
  aspect-ratio: 2 / 1;
}

.brand-admin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
}

.brand-admin-item {
  display: grid;
  gap: 10px;
  align-content: start;
  padding: 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 8px 20px rgba(23, 33, 28, 0.04);
}

.brand-admin-item h4 {
  margin: 0;
}

.admin-preview-card .brand-strip-row {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.admin-preview-card .home-category-row {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.admin-preview-card .home-category-card img {
  width: 100%;
  height: 140px;
}

.admin-preview-card .interface-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.admin-preview-card .company-footer {
  grid-template-columns: 1fr;
  gap: 12px;
}

.admin-inline-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.admin-inline-actions {
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.admin-modal-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.category-add-button {
  min-height: 34px;
  padding: 7px 12px;
  font-size: 13px;
}

#categoriesAdmin h2 {
  font-size: 20px;
  line-height: 1.1;
}

.layout-link-row {
  display: grid;
  grid-template-columns: 1fr 1.35fr;
  gap: 10px;
}

.layout-preview {
  margin-bottom: 18px;
}

.banner-preview + .section-head {
  margin-top: 24px;
}

.admin-brand-strip-preview {
  margin-bottom: 24px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px;
}

#brandStripEditorPreview .brand-strip-item {
  aspect-ratio: 700 / 450;
  padding: 8px;
}

#brandStripEditorPreview .brand-strip-item img {
  max-height: 100%;
}

.admin-category-strip-preview {
  margin-bottom: 24px;
}

.admin-footer-preview {
  padding: 18px;
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 10px 28px rgba(23, 33, 28, 0.08);
}

#pagesAdmin .admin-form,
#articlesAdmin .admin-form,
#categoriesAdmin .admin-form,
#productsAdmin .admin-form {
  max-width: 1080px;
}

#ordersAdmin .section-head {
  margin-bottom: 18px;
}

.page-preview-list {
  display: grid;
  gap: 14px;
}

.page-preview-card {
  min-height: 190px;
  display: grid;
  align-content: end;
  gap: 8px;
  padding: 18px;
  color: white;
  background:
    linear-gradient(90deg, rgba(12, 24, 18, 0.84), rgba(12, 24, 18, 0.28)),
    var(--page-preview-image) center/cover;
  border-radius: var(--radius);
  overflow: hidden;
}

.page-preview-card h3,
.page-preview-card p {
  max-width: 620px;
  margin: 0;
}

.category-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.category-chip {
  display: inline-flex;
  padding: 6px 10px;
  color: var(--blue);
  background: #e5f0f3;
  border-radius: var(--radius);
  font-weight: 800;
}

.order-items {
  margin: 12px 0 0;
  padding-left: 18px;
  color: var(--muted);
}

.empty-state {
  padding: 22px;
  color: var(--muted);
  background: linear-gradient(180deg, #ffffff 0%, #f7faf8 100%);
}

.admin-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(18, 24, 21, 0.44);
  backdrop-filter: blur(6px);
}

.admin-modal-backdrop[hidden] {
  display: none;
}

#confirmModal {
  z-index: 70;
}

.admin-modal {
  width: min(100%, 560px);
  padding: 20px;
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 24px 60px rgba(23, 33, 28, 0.18);
}

.admin-modal-wide {
  width: min(100%, 980px);
  max-height: calc(100vh - 40px);
  overflow: auto;
}

.admin-modal .admin-form {
  margin-top: 16px;
}

#categoryModal .admin-inline-head h2 {
  font-size: 22px;
}

.admin-confirm-body {
  margin: 16px 0 20px;
}

.admin-confirm-body p {
  margin: 0;
  color: var(--ink);
  font-size: 16px;
  line-height: 1.5;
}

#productModal .admin-modal {
  width: min(100%, 980px);
}

#productForm > input[type="hidden"] {
  display: none;
}

@media (max-width: 900px) {
  .product-detail-overview {
    grid-template-columns: 1fr;
  }

  .product-detail-pricing {
    gap: 18px;
  }

  .product-detail-thumb-strip {
    grid-template-columns: 30px minmax(0, 1fr) 30px;
    gap: 8px;
  }

  .product-detail-thumb {
    width: 64px;
    height: 64px;
  }

  .admin-layout-card-grid {
    grid-template-columns: 1fr;
  }

  .layout-links-grid {
    grid-template-columns: 1fr;
  }

  .admin-layout-shell {
    grid-template-columns: 1fr;
  }

  .admin-layout-preview-panel {
    position: static;
  }

  .admin-layout-head {
    align-items: start;
    flex-direction: column;
  }

  .admin-section-note {
    max-width: none;
    text-align: left;
  }

  .admin-shell {
    grid-template-columns: 1fr;
  }

  .admin-sidebar {
    position: static;
    height: auto;
    padding: 18px;
    border-radius: 0 0 var(--radius) var(--radius);
  }

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

  .product-admin-list {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .admin-card {
    padding: 18px;
  }

  .checkout-layout,
  .cart-page-layout,
  .commerce-layout,
  .auth-hero,
  .commerce-hero,
  .customer-dashboard,
  .admin-layout,
  .admin-hero {
    grid-template-columns: 1fr;
  }

  .section-head {
    display: grid;
    align-items: start;
  }

  .checkout-panel,
  .customer-account-sidebar,
  .admin-form {
    position: static;
  }

  .auth-card,
  .commerce-hero-card,
  .checkout-steps {
    max-width: 520px;
  }

  .stat-grid {
    grid-template-columns: 1fr;
  }

  .interface-grid,
  .article-grid {
    grid-template-columns: 1fr 1fr;
  }

  .home-category-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .featured-product-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .product-editor-layout,
  .product-editor-price-grid,
  .customer-admin-summary,
  .customer-admin-card,
  .customer-info-grid,
  .customer-order-card {
    grid-template-columns: 1fr;
  }

  .home-category-product-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .admin-layout-card {
    align-items: start;
    flex-direction: column;
  }

  .layout-section-head {
    align-items: start;
    flex-direction: column;
  }

  .admin-form-grid,
  .admin-preview-card .interface-grid,
  .admin-preview-card .brand-strip-row,
  .admin-preview-card .home-category-row {
    grid-template-columns: 1fr;
  }

  .admin-sidebar-nav {
    grid-template-columns: 1fr;
  }

  .admin-main {
    padding: 16px 14px 24px;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .category-dropdown,
  .child-menu {
    position: static;
    box-shadow: none;
  }

  .parent-category:hover .child-menu,
  .parent-category:focus-within .child-menu {
    display: grid;
  }

  .top-search {
    max-width: none;
    min-width: 0;
  }

  .top-search-wrap {
    position: relative;
    left: auto;
    width: 100%;
    max-width: none;
    min-width: 0;
    transform: none;
  }

  .hero {
    min-height: 46vh;
  }

  .auth-hero,
  .commerce-hero {
    min-height: auto;
  }

  .cart-item {
    grid-template-columns: 1fr;
  }

  .interface-grid,
  .company-footer,
  .article-grid,
  .layout-link-row {
    grid-template-columns: 1fr;
  }

  .cart-item img {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
  }

  .meta-row,
  .cart-actions,
  .button-row {
    align-items: stretch;
    flex-direction: column;
  }

  .home-category-section-head {
    align-items: stretch;
    flex-direction: column;
  }

  .product-admin-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .home-category-title-block {
    grid-template-columns: 1fr;
  }

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

  .featured-product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .product-editor-panel-head {
    flex-direction: column;
  }

  .product-editor-head-actions {
    width: 100%;
    justify-content: stretch;
  }

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