:root {
  color-scheme: light;
  --bg: #ffffff;
  --ink: #111111;
  --muted: #666666;
  --soft: #8a8a8a;
  --line: #e5e5e5;
  --surface: #ffffff;
  --surface-soft: #f6f6f6;
  --surface-tint: #f1f5f7;
  --accent: #111111;
  --sale: #c9002b;
  --sale-soft: #fff1f4;
  --ok: #087a4b;
  --focus: rgba(17, 17, 17, 0.16);
  --shadow: 0 12px 28px rgba(0, 0, 0, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

button,
input,
select {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

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

.catalog-shell {
  width: min(1500px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 52px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(360px, 0.85fr) minmax(360px, 1fr) 168px;
  gap: 18px;
  min-height: 420px;
  align-items: stretch;
  border-bottom: 1px solid var(--ink);
  padding: 12px 0 22px;
  background: var(--surface);
}

.hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-width: 0;
  padding: 18px 0;
}

.kicker,
.section-kicker,
.promotion-eyebrow {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1 {
  max-width: 780px;
  margin-bottom: 18px;
  font-size: clamp(2.25rem, 5.2vw, 5.9rem);
  font-weight: 560;
  line-height: 0.96;
  letter-spacing: 0;
}

.summary {
  max-width: 600px;
  margin-bottom: 22px;
  color: #343434;
  font-size: 1rem;
  line-height: 1.65;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-tags span {
  min-height: 30px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  padding: 6px 12px;
  background: #fff;
  color: var(--ink);
  font-size: 0.75rem;
  font-weight: 800;
}

.hero-whatsapp {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-height: 46px;
  margin-top: 20px;
  border: 1px solid #0a7c45;
  padding: 0 18px;
  background: #0a7c45;
  color: #fff;
  font-size: 0.92rem;
  font-weight: 900;
  text-decoration: none;
}

.hero-whatsapp:hover {
  background: #086338;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.hero-actions button,
.hero-actions a,
.order-guide-actions a,
.order-guide-actions button,
.marketing-actions button,
.copy-product-post {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border: 1px solid var(--ink);
  border-radius: 0;
  padding: 0 14px;
  background: #fff;
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 900;
  text-decoration: none;
  transition:
    background 140ms ease,
    color 140ms ease,
    border-color 140ms ease;
}

.hero-actions button:hover,
.hero-actions a:hover,
.order-guide-actions a:hover,
.order-guide-actions button:hover,
.marketing-actions button:hover,
.copy-product-post:hover {
  background: var(--ink);
  color: #fff;
}

.hero-lookbook {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  grid-template-rows: 1fr 1fr;
  gap: 8px;
  min-height: 390px;
}

.lookbook-card {
  position: relative;
  overflow: hidden;
  border-radius: 0;
  background: var(--surface-soft);
}

.lookbook-card:first-child {
  grid-row: span 2;
}

.lookbook-card img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.lookbook-card span {
  position: absolute;
  left: 10px;
  bottom: 10px;
  max-width: calc(100% - 20px);
  padding: 5px 8px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
  font-size: 0.68rem;
  font-weight: 850;
  text-transform: uppercase;
}

.hero-side {
  display: grid;
  align-content: end;
  gap: 12px;
  padding-bottom: 18px;
}

.hero-stats {
  display: grid;
  gap: 8px;
}

.hero-stats div {
  min-width: 0;
  border: 1px solid var(--line);
  padding: 13px 10px;
  background: #fff;
}

.hero-stats strong {
  display: block;
  font-size: 1.75rem;
  font-weight: 620;
  line-height: 1;
}

.hero-stats span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.admin-actions {
  display: grid;
  gap: 8px;
}

.order-guide {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) auto;
  gap: 18px;
  align-items: center;
  border-bottom: 1px solid var(--line);
  padding: 20px 0;
}

.order-guide h2 {
  max-width: 780px;
  margin-bottom: 8px;
  font-size: clamp(1.35rem, 2vw, 2rem);
  font-weight: 620;
  line-height: 1.16;
}

.order-guide p {
  max-width: 650px;
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.55;
}

.order-guide-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.order-guide-actions a {
  border-color: #0a7c45;
  background: #0a7c45;
  color: #fff;
}

.order-guide-actions a:hover {
  border-color: #086338;
  background: #086338;
}

.admin-actions button,
.admin-login button,
.file-button,
.filter-bar button {
  min-height: 42px;
  border: 1px solid var(--ink);
  border-radius: 0;
  padding: 0 14px;
  background: var(--accent);
  color: #fff;
  font-weight: 850;
  transition:
    background 140ms ease,
    color 140ms ease,
    border-color 140ms ease;
}

.admin-actions button:hover,
.admin-login button:hover,
.file-button:hover,
.filter-bar button:hover {
  background: #333;
}

.admin-actions #logoutBtn,
.icon-button--light {
  background: #fff;
  color: var(--ink);
}

.admin-actions #logoutBtn:hover,
.icon-button--light:hover {
  background: var(--surface-soft);
}

.admin-panel {
  display: grid;
  gap: 12px;
  margin: 16px 0 0;
  border: 1px solid var(--ink);
  padding: 16px;
  background: #fff;
}

.admin-panel[hidden],
.admin-login[hidden],
.admin-tools[hidden] {
  display: none;
}

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

.admin-login label,
.tool-group label,
.add-bar label,
.filter-bar label {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.admin-login span,
.tool-group span,
.add-bar span,
.filter-bar span {
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 850;
  text-transform: uppercase;
}

.admin-login input,
.add-bar input,
.add-bar select,
.filter-bar input,
.filter-bar select {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 0;
  padding: 0 11px;
  background: #fff;
  color: var(--ink);
  outline: 0;
}

.admin-login input:focus,
.add-bar input:focus,
.add-bar select:focus,
.filter-bar input:focus,
.filter-bar select:focus {
  border-color: var(--ink);
  box-shadow: 0 0 0 3px var(--focus);
}

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

.tool-group,
.add-bar {
  border: 1px solid var(--line);
  padding: 14px;
  background: var(--surface-soft);
}

.tool-group {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto auto;
  gap: 14px;
  align-items: center;
}

.tool-group h2 {
  margin-bottom: 4px;
  font-size: 1rem;
}

.tool-group p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.5;
}

.toggle-line {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  font-weight: 850;
  white-space: nowrap;
}

.toggle-line input {
  width: 18px;
  height: 18px;
  accent-color: var(--ink);
}

.add-bar {
  display: grid;
  grid-template-columns: minmax(180px, 1.2fr) repeat(5, minmax(130px, 1fr)) auto;
  gap: 12px;
  align-items: end;
  margin-bottom: 0;
}

.file-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  overflow: hidden;
  cursor: pointer;
}

.file-button input[type="file"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.import-notice {
  min-height: 1.2em;
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 750;
}

.filter-bar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: grid;
  grid-template-columns: minmax(320px, 1.05fr) minmax(380px, 0.95fr) 210px auto auto auto;
  gap: 10px;
  align-items: end;
  margin: 0 0 22px;
  border-bottom: 1px solid var(--line);
  padding: 14px 0;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(14px);
}

.search-box {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto auto;
  gap: 8px;
  align-items: end;
}

.category-group {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.category-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 42px;
  align-items: stretch;
}

.filter-bar .category-tab {
  min-height: 42px;
  border-color: var(--line);
  padding: 0 10px;
  background: #fff;
  color: var(--ink);
}

.filter-bar .category-tab:hover,
.filter-bar .category-tab.is-active {
  border-color: var(--ink);
  background: var(--ink);
  color: #fff;
}

.filter-bar .special-filter-btn {
  border-color: var(--sale);
  background: #fff;
  color: var(--sale);
}

.filter-bar .special-filter-btn:hover,
.filter-bar .special-filter-btn.is-active {
  border-color: var(--sale);
  background: var(--sale);
  color: #fff;
}

.filter-bar button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.icon-button {
  white-space: nowrap;
}

.result-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin: 24px 0 14px;
}

.result-head h2 {
  margin-bottom: 5px;
  font-size: 1.35rem;
  font-weight: 600;
}

.result-head p {
  margin-bottom: 0;
  color: var(--muted);
}

.marketing-kit {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) auto;
  gap: 14px 20px;
  align-items: end;
  margin: 0 0 20px;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--line);
  padding: 18px 0;
}

.marketing-kit h2 {
  margin-bottom: 6px;
  font-size: 1.2rem;
  font-weight: 650;
}

.marketing-kit p {
  margin-bottom: 0;
  color: var(--muted);
}

.marketing-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.marketing-actions button:first-child {
  background: var(--ink);
  color: #fff;
}

.marketing-actions button:first-child:hover {
  background: #333;
}

.marketing-notice {
  grid-column: 1 / -1;
  min-height: 1.2em;
  margin: 0;
  color: var(--ok);
  font-size: 0.84rem;
  font-weight: 850;
}

.gallery-wrap {
  min-height: 520px;
}

.promotion-section {
  margin: 0 0 26px;
  border: 1px solid var(--sale);
  padding: 16px;
  background: var(--sale-soft);
}

.promotion-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.promotion-heading h2 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 650;
  line-height: 1.2;
}

.promotion-eyebrow {
  color: var(--sale);
}

.promotion-count,
.promotion-tag {
  display: inline-flex;
  align-items: center;
  min-height: 23px;
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
  white-space: nowrap;
}

.promotion-count {
  border: 1px solid var(--sale);
  padding: 0 9px;
  color: var(--sale);
  background: #fff;
}

.promotion-grid,
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 18px 12px;
}

.product-card {
  overflow: hidden;
  border: 1px solid transparent;
  border-radius: 0;
  background: var(--surface);
  transition:
    border-color 140ms ease,
    box-shadow 140ms ease,
    transform 140ms ease;
}

.product-card:hover {
  border-color: var(--ink);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.product-card--promotion {
  border-color: rgba(201, 0, 43, 0.34);
}

.image-frame {
  position: relative;
  display: grid;
  aspect-ratio: 4 / 5;
  place-items: center;
  background: var(--surface-soft);
}

.product-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.image-placeholder {
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
  color: var(--muted);
  font-weight: 850;
}

.image-placeholder[hidden],
.product-image[hidden],
.stock-pill[hidden] {
  display: none;
}

.stock-pill {
  position: absolute;
  right: 8px;
  bottom: 8px;
  padding: 5px 8px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--ok);
  font-size: 0.68rem;
  font-weight: 900;
  text-transform: uppercase;
}

.product-body {
  display: grid;
  gap: 9px;
  padding: 10px 0 4px;
}

.code-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  justify-content: space-between;
}

.product-code,
.gender-tag,
.promotion-tag {
  padding: 3px 0;
  font-size: 0.7rem;
  font-weight: 900;
  text-transform: uppercase;
}

.product-code {
  color: var(--ink);
}

.gender-tag {
  color: var(--muted);
}

.promotion-tag {
  color: var(--sale);
}

.product-name {
  min-height: 2.5em;
  margin: 0;
  font-size: 0.95rem;
  font-weight: 560;
  line-height: 1.28;
}

.fabric-line {
  display: grid;
  min-height: 3.1em;
  gap: 3px;
  margin: 0;
}

.fabric-line span,
.price-label,
.meta-list dt {
  color: var(--soft);
  font-size: 0.66rem;
  font-weight: 900;
  text-transform: uppercase;
}

.fabric {
  display: -webkit-box;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.38;
  font-weight: 650;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.price-block {
  display: grid;
  gap: 3px;
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.price {
  color: var(--ink);
  font-size: 1.18rem;
  font-weight: 720;
  line-height: 1;
}

.meta-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
}

.meta-list div {
  min-width: 0;
}

.meta-list dt {
  margin-bottom: 3px;
}

.meta-list dd {
  margin: 0;
  overflow: hidden;
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 760;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.whatsapp-order {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  border: 1px solid #0a7c45;
  padding: 0 10px;
  background: #0a7c45;
  color: #fff;
  font-size: 0.78rem;
  font-weight: 900;
  text-decoration: none;
}

.whatsapp-order:hover {
  background: #086338;
}

.copy-product-post {
  min-height: 36px;
  font-size: 0.76rem;
}

.floating-whatsapp {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 20;
  display: grid;
  gap: 2px;
  min-width: 210px;
  border: 1px solid #0a7c45;
  padding: 12px 14px;
  background: #0a7c45;
  color: #fff;
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.18);
  text-decoration: none;
}

.floating-whatsapp span {
  font-size: 0.72rem;
  font-weight: 850;
  text-transform: uppercase;
}

.floating-whatsapp strong {
  font-size: 0.98rem;
  line-height: 1.1;
}

.floating-whatsapp:hover {
  background: #086338;
}

.empty-state {
  display: grid;
  min-height: 420px;
  place-items: center;
  align-content: center;
  gap: 8px;
  border: 1px dashed var(--line);
  background: var(--surface-soft);
  text-align: center;
}

.empty-state[hidden] {
  display: none;
}

.empty-state h2 {
  margin-bottom: 0;
  font-weight: 620;
}

.empty-state p {
  margin-bottom: 0;
  color: var(--muted);
}

@media (max-width: 1180px) {
  .hero {
    grid-template-columns: 1fr minmax(300px, 0.8fr);
  }

  .hero-side {
    grid-column: 1 / -1;
    grid-template-columns: 1fr auto;
    align-items: end;
    padding-bottom: 0;
  }

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

  .filter-bar {
    grid-template-columns: 1fr 1fr;
  }

  .filter-bar > button {
    width: 100%;
  }
}

@media (max-width: 860px) {
  .catalog-shell {
    width: min(100% - 20px, 760px);
    padding-top: 10px;
  }

  .hero,
  .hero-side,
  .admin-login,
  .tool-group,
  .add-bar,
  .filter-bar {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: 0;
    padding-bottom: 16px;
  }

  .hero-copy {
    padding: 0;
  }

  .hero-lookbook {
    min-height: 290px;
  }

  .admin-actions,
  .search-box,
  .order-guide,
  .marketing-kit {
    grid-template-columns: 1fr;
  }

  .admin-actions button,
  .file-button,
  .admin-login button,
  .filter-bar button,
  .hero-actions button,
  .hero-actions a,
  .order-guide-actions a,
  .order-guide-actions button,
  .marketing-actions button {
    width: 100%;
  }

  .order-guide-actions,
  .marketing-actions {
    justify-content: stretch;
  }

  .filter-bar {
    position: static;
    margin-top: 0;
  }

  .promotion-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .hero-whatsapp,
  .floating-whatsapp {
    width: 100%;
  }

  .floating-whatsapp {
    right: 10px;
    bottom: 10px;
    left: 10px;
    min-width: 0;
    text-align: center;
  }
}

@media (max-width: 520px) {
  h1 {
    font-size: 2.55rem;
  }

  .hero-lookbook {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-template-rows: 136px;
  }

  .lookbook-card:first-child {
    grid-row: auto;
  }

  .lookbook-card span {
    left: 6px;
    bottom: 6px;
    max-width: calc(100% - 12px);
    padding: 4px 6px;
    font-size: 0.6rem;
  }

  .promotion-grid,
  .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px 10px;
  }

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

  .hero-stats div {
    padding: 10px 8px;
  }

  .hero-stats strong {
    font-size: 1.25rem;
  }

  .hero-stats span {
    font-size: 0.62rem;
  }

  .product-body {
    gap: 7px;
  }

  .product-name {
    font-size: 0.86rem;
  }

  .price {
    font-size: 1.02rem;
  }

  .meta-list {
    grid-template-columns: 1fr;
    gap: 5px;
  }
}
