:root {
  --bg: #f4f6f8;
  --surface: #ffffff;
  --surface-soft: #f9fafb;
  --ink: #111827;
  --muted: #5f6b7a;
  --line: #dce2ea;
  --accent: #087f5b;
  --accent-strong: #066247;
  --blue: #1d4ed8;
  --gold: #f2b84b;
  --danger: #c24135;
  --shadow: 0 18px 45px rgba(17, 24, 39, 0.13);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

button,
a {
  -webkit-tap-highlight-color: transparent;
}

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

svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 74px;
  padding: 14px clamp(18px, 5vw, 64px);
  background: rgba(255, 255, 255, 0.88);
  border-bottom: 1px solid rgba(220, 226, 234, 0.82);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: max-content;
}

.brand-mark {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  background: linear-gradient(135deg, var(--ink), #263244);
  color: #ffffff;
  border-radius: 8px;
  font-weight: 900;
  letter-spacing: 0;
}

.brand-logo {
  display: block;
  width: 96px;
  height: 44px;
  object-fit: contain;
}

.brand strong,
.brand small {
  display: block;
}

.brand small {
  color: var(--muted);
  font-size: 0.78rem;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 18px;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 700;
}

.nav-links a:hover,
.nav-size-button:hover {
  color: var(--ink);
}

.nav-size-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  font-weight: 700;
}

.nav-size-button svg {
  width: 18px;
  height: 18px;
}

.hero {
  position: relative;
  display: grid;
  min-height: calc(100svh - 74px);
  align-items: end;
  overflow: hidden;
  padding: clamp(46px, 7vw, 96px) clamp(18px, 5vw, 64px);
  color: #ffffff;
}

.hero::after {
  position: absolute;
  inset: 0;
  content: "";
  background:
    linear-gradient(90deg, rgba(10, 14, 22, 0.9), rgba(10, 14, 22, 0.56), rgba(10, 14, 22, 0.14)),
    linear-gradient(0deg, rgba(10, 14, 22, 0.72), transparent 52%);
}

.hero-media,
.hero-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-media img {
  object-fit: cover;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 820px;
  padding-bottom: clamp(18px, 4vw, 42px);
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--accent);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero .eyebrow {
  color: var(--gold);
}

h1 {
  max-width: 860px;
  margin-bottom: 18px;
  font-size: clamp(2.5rem, 6vw, 6rem);
  line-height: 0.96;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 10px;
  font-size: clamp(1.45rem, 3vw, 2.35rem);
  line-height: 1.08;
  letter-spacing: 0;
}

.hero p,
.feature-copy p,
.checkout-band p {
  max-width: 660px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 1.06rem;
  line-height: 1.65;
}

.hero-actions,
.checkout-actions,
.dialog-actions,
.manager-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.button,
.cart-button,
.icon-button,
.chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 850;
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    background 0.18s ease,
    border-color 0.18s ease;
}

.button:hover,
.cart-button:hover,
.icon-button:hover,
.chip:hover {
  transform: translateY(-1px);
}

.button:disabled {
  cursor: wait;
  opacity: 0.66;
  transform: none;
}

.button {
  padding: 0 18px;
}

.button.primary {
  background: var(--accent);
  color: #ffffff;
  box-shadow: 0 12px 28px rgba(8, 127, 91, 0.27);
}

.button.primary:hover {
  background: var(--accent-strong);
}

.button.primary svg {
  margin-right: 8px;
}

.button.ghost {
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.36);
}

.button.ghost-dark {
  background: #eef2f6;
  color: var(--ink);
}

.button.danger {
  background: #fff0ed;
  color: var(--danger);
}

.icon-button {
  width: 44px;
  padding: 0;
  background: #eef2f6;
  color: var(--ink);
}

.cart-button {
  gap: 8px;
  padding: 0 14px;
  background: var(--ink);
  color: #ffffff;
}

.cart-button span {
  display: grid;
  min-width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 999px;
  background: var(--gold);
  color: var(--ink);
  font-size: 0.8rem;
}

.toolbar-section {
  padding: 22px clamp(18px, 5vw, 64px) 0;
}

.toolbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  max-width: 1220px;
  margin: 0 auto;
}

.search-field {
  display: flex;
  align-items: center;
  flex: 1;
  min-width: 240px;
  max-width: 500px;
  min-height: 50px;
  padding: 0 14px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 10px 26px rgba(17, 24, 39, 0.04);
}

.search-field input {
  width: 100%;
  border: 0;
  outline: 0;
  padding: 0 8px;
  background: transparent;
}

.filter-group {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.filter-select select,
.color-select select {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 34px 0 12px;
  background:
    linear-gradient(45deg, transparent 50%, var(--muted) 50%) calc(100% - 18px) 50% / 6px 6px no-repeat,
    linear-gradient(135deg, var(--muted) 50%, transparent 50%) calc(100% - 13px) 50% / 6px 6px no-repeat,
    #ffffff;
  color: var(--muted);
  cursor: pointer;
  font-weight: 850;
  appearance: none;
}

.chip {
  min-height: 40px;
  padding: 0 13px;
  background: #ffffff;
  color: var(--muted);
  border: 1px solid var(--line);
}

.chip.is-active {
  background: var(--ink);
  color: #ffffff;
  border-color: var(--ink);
}

.section {
  max-width: 1220px;
  margin: 0 auto;
  padding: 52px clamp(18px, 5vw, 24px);
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

.section-heading p:last-child {
  color: var(--muted);
  font-weight: 800;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
  gap: 18px;
}

.product-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 10px 26px rgba(17, 24, 39, 0.06);
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    border-color 0.2s ease;
}

.product-card:hover {
  transform: translateY(-4px);
  border-color: rgba(8, 127, 91, 0.35);
  box-shadow: 0 20px 46px rgba(17, 24, 39, 0.14);
}

.product-image {
  position: relative;
  aspect-ratio: 4 / 3;
  background: #dfe5ec;
}

.image-open {
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
}

.product-image img,
.image-open img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.32s ease, filter 0.32s ease;
}

.product-card:hover .image-open img {
  transform: scale(1.04);
  filter: saturate(1.08) contrast(1.03);
}

.gallery-dots {
  position: absolute;
  right: 10px;
  bottom: 10px;
  left: 10px;
  z-index: 3;
  display: flex;
  gap: 7px;
  justify-content: center;
  overflow-x: auto;
  padding: 2px 0;
}

.gallery-dots button {
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  overflow: hidden;
  padding: 0;
  border: 2px solid rgba(255, 255, 255, 0.78);
  border-radius: 8px;
  background: #ffffff;
  cursor: pointer;
  opacity: 0.86;
  box-shadow: 0 8px 18px rgba(17, 24, 39, 0.25);
}

.gallery-dots button:hover,
.gallery-dots button.is-active {
  opacity: 1;
  transform: translateY(-1px);
  border-color: var(--gold);
}

.gallery-dots img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-tag,
.photo-color-badge {
  position: absolute;
  z-index: 2;
  padding: 7px 10px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 900;
  text-transform: uppercase;
}

.product-tag {
  top: 12px;
  left: 12px;
  max-width: calc(100% - 24px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  background: rgba(17, 24, 39, 0.88);
  color: #ffffff;
}

.photo-color-badge {
  top: 12px;
  right: 12px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
}

.product-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
}

.product-title-row {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

.product-title-row h3 {
  margin: 0;
  font-size: 1.04rem;
  line-height: 1.28;
}

.price {
  min-width: max-content;
  color: var(--accent-strong);
  font-size: 1.04rem;
  font-weight: 950;
}

.product-body p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.sizes,
.color-options {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.sizes {
  min-height: 34px;
}

.color-options {
  min-height: 75px;
  align-content: flex-start;
}

.size-option,
.color-option {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  cursor: pointer;
  font-weight: 850;
}

.size-option {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 38px;
  height: 34px;
  padding: 0 10px;
}

.size-option::before {
  width: 8px;
  height: 8px;
  border: 2px solid currentColor;
  border-radius: 3px;
  content: "";
  opacity: 0.55;
}

.color-option {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  padding: 0 10px;
  color: var(--muted);
  font-size: 0.86rem;
}

.color-option span {
  width: 16px;
  height: 16px;
  border: 1px solid rgba(17, 24, 39, 0.2);
  border-radius: 999px;
}

.color-select {
  flex: 1 1 132px;
}

.color-select select {
  width: 100%;
  min-height: 34px;
  padding-left: 10px;
  font-size: 0.86rem;
}

.size-option.is-selected,
.color-option.is-selected {
  border-color: var(--accent);
  background: #e7f6f1;
  color: var(--accent-strong);
}

.size-guide-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  color: var(--ink);
  cursor: pointer;
  font-weight: 850;
}

.size-guide-link:hover {
  border-color: rgba(8, 127, 91, 0.35);
  background: #e7f6f1;
  color: var(--accent-strong);
}

.add-button {
  gap: 8px;
  width: 100%;
  margin-top: auto;
}

.feature-band {
  display: grid;
  grid-template-columns: minmax(260px, 0.72fr) minmax(320px, 1.28fr);
  gap: clamp(18px, 4vw, 44px);
  align-items: center;
  padding: clamp(38px, 6vw, 70px) clamp(18px, 5vw, 64px);
  background: #121922;
  color: #ffffff;
}

.feature-copy p {
  color: rgba(255, 255, 255, 0.76);
}

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

.feature-grid article {
  min-height: 220px;
  padding: 22px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
}

.feature-grid span {
  display: grid;
  width: 48px;
  height: 48px;
  margin-bottom: 18px;
  place-items: center;
  background: var(--gold);
  color: var(--ink);
  border-radius: 8px;
}

.feature-grid h3 {
  margin: 0 0 8px;
  font-size: 1.05rem;
}

.feature-grid p {
  margin: 0;
  color: rgba(255, 255, 255, 0.72);
  line-height: 1.55;
}

.checkout-band {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 48px clamp(18px, 5vw, 64px);
  background: #ffffff;
}

.checkout-band p {
  color: var(--muted);
}

.drawer {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: none;
  justify-content: end;
  background: rgba(17, 24, 39, 0.52);
}

.drawer.is-open {
  display: flex;
}

.drawer-panel {
  width: min(520px, 100%);
  height: 100%;
  overflow: auto;
  padding: 22px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.drawer-header,
.dialog-header,
.admin-card-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
}

.cart-items,
.manager-list {
  display: grid;
  gap: 10px;
}

.cart-empty {
  padding: 22px;
  color: var(--muted);
  background: var(--surface-soft);
  border: 1px dashed var(--line);
  border-radius: 8px;
  text-align: center;
}

.cart-item,
.manager-row,
.order-row {
  display: grid;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

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

.manager-row {
  grid-template-columns: 64px 1fr auto;
}

.order-row {
  grid-template-columns: 240px 1fr auto;
}

.cart-item img,
.manager-row img {
  width: 68px;
  height: 68px;
  object-fit: cover;
  border-radius: 8px;
}

.manager-row img {
  width: 64px;
  height: 64px;
}

.cart-item h3,
.manager-row h3 {
  margin: 0 0 4px;
  font-size: 0.95rem;
}

.cart-item p,
.manager-row p,
.order-row p,
.order-row span {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.qty-controls,
.row-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.qty-controls button,
.row-actions button,
.current-image button {
  min-height: 34px;
  border: 0;
  border-radius: 8px;
  background: #eef2f6;
  color: var(--ink);
  cursor: pointer;
  font-weight: 850;
}

.qty-controls button {
  width: 30px;
}

.row-actions button,
.current-image button {
  padding: 0 11px;
}

.checkout-form,
.manager-form,
.settings-form,
.login-form {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.checkout-form label,
.manager-form label,
.settings-form label,
.login-form label,
.current-image label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 850;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  color: var(--ink);
  background: #ffffff;
  outline: 0;
}

input[type="file"] {
  padding: 10px;
  background: #f8fafc;
}

input[type="file"]::file-selector-button {
  min-height: 36px;
  margin-right: 10px;
  padding: 0 12px;
  border: 0;
  border-radius: 8px;
  background: var(--ink);
  color: #ffffff;
  cursor: pointer;
  font-weight: 850;
}

.field-hint {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 650;
  line-height: 1.45;
}

textarea {
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(8, 127, 91, 0.12);
}

.cart-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  font-size: 1.1rem;
}

dialog {
  width: min(760px, calc(100vw - 28px));
  max-height: min(92vh, 920px);
  overflow: auto;
  border: 0;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

dialog::backdrop {
  background: rgba(17, 24, 39, 0.62);
}

.order-dialog textarea {
  min-height: 220px;
}

.photo-dialog {
  width: min(980px, calc(100vw - 28px));
}

.photo-viewer {
  position: relative;
  display: grid;
  place-items: center;
  background: #111827;
  border-radius: 8px;
}

.photo-dialog img {
  display: block;
  width: 100%;
  max-height: 76vh;
  object-fit: contain;
  border-radius: 8px;
  background: #111827;
}

.photo-arrow {
  position: absolute;
  top: 50%;
  z-index: 2;
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  transform: translateY(-50%);
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
  cursor: pointer;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.22);
}

.photo-prev {
  left: 14px;
}

.photo-next {
  right: 14px;
}

.message-dialog p {
  color: var(--muted);
  font-weight: 700;
  line-height: 1.55;
}

.size-dialog {
  width: min(1060px, calc(100vw - 28px));
}

.size-guide-intro {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin-bottom: 16px;
  color: var(--muted);
  font-weight: 750;
}

.size-guide-intro strong {
  color: var(--ink);
}

.size-guide {
  display: grid;
  gap: 16px;
}

.size-table-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.size-table-card h3 {
  margin: 0;
  padding: 12px 14px;
  background: var(--ink);
  color: #ffffff;
  font-size: 0.98rem;
  letter-spacing: 0;
  text-transform: uppercase;
}

.size-table-wrap {
  overflow-x: auto;
}

.size-table-card table {
  width: 100%;
  min-width: 620px;
  border-collapse: collapse;
}

.size-table-card th,
.size-table-card td {
  padding: 11px 12px;
  border: 1px solid var(--line);
  text-align: center;
  white-space: nowrap;
}

.size-table-card thead th {
  background: #f2f5f8;
  color: var(--ink);
  font-weight: 950;
}

.size-table-card tbody th {
  background: #f8fafc;
  color: var(--muted);
  font-size: 0.82rem;
  text-align: left;
  text-transform: uppercase;
}

.size-table-card td {
  font-weight: 900;
}

.floating-whatsapp {
  position: fixed;
  right: 18px;
  bottom: 84px;
  z-index: 35;
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  background: #25d366;
  color: #ffffff;
  border-radius: 999px;
  box-shadow: 0 16px 34px rgba(37, 211, 102, 0.36);
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 30px clamp(18px, 5vw, 64px);
  background: var(--ink);
  color: #ffffff;
}

.site-footer strong {
  display: block;
  margin-bottom: 6px;
  font-size: 1.1rem;
}

.site-footer p {
  margin: 0;
  color: rgba(255, 255, 255, 0.72);
}

.footer-socials {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
}

.social-icon {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  transition:
    transform 0.18s ease,
    background 0.18s ease;
}

.social-icon:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.14);
}

.social-icon.whatsapp-link {
  background: #25d366;
  border-color: #25d366;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 60;
  transform: translateY(20px);
  opacity: 0;
  max-width: 360px;
  padding: 12px 14px;
  background: var(--ink);
  color: #ffffff;
  border-radius: 8px;
  box-shadow: var(--shadow);
  pointer-events: none;
  transition:
    opacity 0.2s ease,
    transform 0.2s ease;
}

.toast.is-visible {
  transform: translateY(0);
  opacity: 1;
}

.admin-page {
  background: #eef2f6;
}

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

.admin-sidebar {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  gap: 18px;
  height: 100svh;
  padding: 22px;
  background: #ffffff;
  border-right: 1px solid var(--line);
}

.admin-nav {
  display: grid;
  gap: 6px;
  margin: 12px 0 auto;
}

.admin-nav a {
  padding: 12px;
  color: var(--muted);
  border-radius: 8px;
  font-weight: 850;
}

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

.admin-nav a.is-active {
  background: var(--ink);
  color: #ffffff;
}

.admin-main {
  min-width: 0;
  padding: 28px clamp(18px, 4vw, 42px);
}

.admin-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}

.admin-topbar h1,
.login-panel h1 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1;
}

.admin-section {
  display: grid;
  gap: 18px;
  margin-bottom: 24px;
}

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

.admin-card,
.login-panel {
  padding: 22px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 12px 30px rgba(17, 24, 39, 0.05);
}

.login-panel {
  max-width: 460px;
  margin: 10vh auto 0;
}

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

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.28fr) minmax(320px, 0.72fr);
  gap: 18px;
}

.metric-card {
  display: grid;
  gap: 10px;
  padding: 18px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.metric-card span {
  color: var(--muted);
  font-weight: 850;
}

.metric-card strong {
  font-size: clamp(1.4rem, 3vw, 2.1rem);
  line-height: 1;
}

.category-bars {
  display: grid;
  gap: 10px;
}

.bar-row {
  display: grid;
  grid-template-columns: 180px 1fr 42px;
  gap: 12px;
  align-items: center;
}

.bar-row span,
.bar-row strong {
  font-weight: 850;
}

.bar-row div {
  height: 12px;
  overflow: hidden;
  background: #e8edf3;
  border-radius: 999px;
}

.bar-row i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--blue));
  border-radius: inherit;
}

.revenue-chart {
  display: flex;
  align-items: end;
  gap: 12px;
  min-height: 260px;
  padding: 10px 0 0;
}

.revenue-bar {
  display: grid;
  grid-template-rows: 22px minmax(120px, 1fr) auto;
  flex: 1;
  gap: 8px;
  min-width: 58px;
  height: 240px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 850;
  text-align: center;
}

.revenue-bar i {
  align-self: end;
  display: block;
  height: var(--height);
  min-height: 8px;
  background: linear-gradient(180deg, var(--blue), var(--accent));
  border-radius: 8px 8px 3px 3px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.revenue-bar strong {
  color: var(--ink);
  font-size: 0.74rem;
  line-height: 1.2;
}

.catalog-chart {
  display: grid;
  grid-template-columns: 170px 1fr;
  gap: 18px;
  align-items: center;
}

.donut-chart {
  position: relative;
  display: grid;
  width: 170px;
  height: 170px;
  place-items: center;
  border-radius: 999px;
}

.donut-chart::after {
  position: absolute;
  inset: 24px;
  content: "";
  background: #ffffff;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px var(--line);
}

.donut-chart span {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 3px;
  text-align: center;
  font-size: 2rem;
  font-weight: 950;
}

.donut-chart small {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 850;
  text-transform: uppercase;
}

.donut-legend,
.mini-orders {
  display: grid;
  gap: 9px;
}

.donut-legend span,
.mini-orders article {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 9px;
  align-items: center;
  color: var(--muted);
  font-weight: 850;
}

.donut-legend i {
  width: 10px;
  height: 10px;
  border-radius: 999px;
}

.donut-legend strong,
.mini-orders b {
  color: var(--ink);
}

.mini-orders article {
  grid-template-columns: 1fr auto;
  padding: 10px;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.mini-orders span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.78rem;
}

.manager-form,
.settings-form {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.manager-form .full,
.settings-form .full,
.manager-actions,
.manager-list,
.current-images,
.upload-preview,
.category-checks {
  grid-column: 1 / -1;
}

.category-form {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(160px, 0.8fr) auto;
  gap: 12px;
  align-items: end;
}

.category-form-actions {
  display: flex;
  gap: 8px;
  align-items: end;
}

.category-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 850;
}

#categorySelect {
  min-height: 150px;
  background: #f8fafc;
}

#categorySelect option {
  padding: 8px 10px;
  border-radius: 6px;
}

.category-admin-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
}

.category-admin-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px 10px;
  align-items: center;
  padding: 10px;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.category-admin-item span {
  font-weight: 850;
}

.category-admin-item code {
  grid-column: 1;
  color: var(--muted);
  font-size: 0.78rem;
}

.category-item-actions {
  grid-row: 1 / 3;
  grid-column: 2;
  display: flex;
  gap: 6px;
}

.category-admin-item button {
  min-height: 34px;
  border: 0;
  border-radius: 8px;
  background: #eef2f6;
  color: var(--ink);
  cursor: pointer;
  font-weight: 850;
}

.category-admin-item [data-delete-category] {
  background: #fff0ed;
  color: var(--danger);
}

.current-images,
.upload-preview {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.current-image,
.upload-preview-item {
  display: grid;
  gap: 8px;
  padding: 10px;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.current-image img,
.upload-preview-item img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 8px;
}

.upload-preview-item span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 10px;
  color: var(--accent-strong);
  background: #e7f6f1;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 900;
}

.form-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 750;
}

.form-note.is-error {
  color: var(--danger);
}

.orders-table {
  display: grid;
  gap: 10px;
}

@media (max-width: 980px) {
  .toolbar,
  .section-heading,
  .checkout-band,
  .admin-topbar {
    align-items: stretch;
    flex-direction: column;
  }

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

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

  .feature-grid,
  .metric-grid,
  .dashboard-grid,
  .current-images,
  .upload-preview,
  .category-admin-list {
    grid-template-columns: 1fr;
  }

  .category-form {
    grid-template-columns: 1fr;
  }

  .catalog-chart {
    grid-template-columns: 1fr;
    justify-items: center;
  }

  .admin-sidebar {
    position: static;
    height: auto;
  }

  .admin-nav {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-bottom: 0;
  }
}

@media (max-width: 680px) {
  body {
    background: #ffffff;
  }

  .site-header {
    min-height: 64px;
    padding: 10px 12px;
  }

  .brand small,
  .nav-links {
    display: none;
  }

  .cart-button {
    font-size: 0;
    padding: 0 10px;
  }

  .cart-button span {
    font-size: 0.8rem;
  }

  .hero {
    min-height: calc(100svh - 64px);
    padding: 32px 16px 76px;
  }

  h1 {
    font-size: clamp(2.25rem, 14vw, 3.6rem);
  }

  .toolbar-section,
  .section {
    padding-inline: 12px;
  }

  .product-grid,
  .manager-form,
  .settings-form,
  .feature-grid {
    grid-template-columns: 1fr;
  }

  .product-image {
    aspect-ratio: 1 / 1;
  }

  .feature-band,
  .checkout-band,
  .site-footer,
  .admin-main {
    padding-inline: 16px;
  }

  .revenue-chart {
    overflow-x: auto;
    align-items: end;
  }

  .revenue-bar {
    flex: 0 0 64px;
  }

  .cart-item,
  .manager-row,
  .order-row {
    grid-template-columns: 56px 1fr;
  }

  .order-row p,
  .order-row > strong,
  .qty-controls,
  .row-actions {
    grid-column: 2;
  }

  .bar-row {
    grid-template-columns: 1fr 38px;
  }

  .bar-row div {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .admin-nav {
    display: flex;
    overflow: auto;
  }

  .site-footer {
    align-items: stretch;
    flex-direction: column;
    padding-bottom: 110px;
  }

  .footer-socials {
    justify-content: center;
    width: 100%;
  }

  .floating-whatsapp {
    right: 16px;
    bottom: 18px;
  }
}
