:root {
  --catalog-red: #bf111d;
  --catalog-ink: #3c241d;
  --catalog-green: #4d742c;
  --catalog-gold: #dd941c;
  --catalog-paper: #fffaf0;
}

.catalog-page {
  min-height: 100vh;
  color: var(--catalog-ink);
  background-color: #fff9ec;
  background-image: radial-gradient(rgba(166, 103, 31, 0.08) 0.7px, transparent 0.7px);
  background-size: 9px 9px;
}

.catalog-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  min-height: clamp(390px, 34vw, 490px);
  flex-direction: column;
  justify-content: center;
  padding: 64px max(24px, calc((100% - 1180px) / 2));
  background-color: #fff4d7;
  background-image: url("../assets/images/banner/produk-hero-watercolor.webp");
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  border-bottom: 1px solid rgba(190, 116, 24, 0.25);
}

.catalog-hero::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  background: linear-gradient(
    90deg,
    rgba(255, 249, 233, 0.96) 0%,
    rgba(255, 249, 233, 0.9) 34%,
    rgba(255, 249, 233, 0.34) 52%,
    rgba(255, 249, 233, 0) 68%
  );
  pointer-events: none;
}

.catalog-hero::after {
  content: none;
}

.catalog-eyebrow {
  margin: 0 0 10px;
  color: var(--catalog-red);
  font-family: Inter, "Segoe UI", sans-serif;
  font-weight: 800;
  text-transform: uppercase;
}

.catalog-hero h1 {
  max-width: 570px;
  margin: 0;
  font-family: Inter, "Segoe UI", sans-serif;
  font-size: clamp(2.4rem, 5vw, 4.8rem);
  font-weight: 850;
  letter-spacing: 0;
  line-height: 1.06;
  color: var(--catalog-red);
}

.catalog-hero-copy {
  max-width: 520px;
  margin: 18px 0 0;
  font-family: Inter, "Segoe UI", sans-serif;
  font-size: 1.08rem;
  line-height: 1.7;
}

.catalog-content {
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
  padding: 42px 0 76px;
}

.catalog-toolbar {
  display: grid;
  grid-template-columns: minmax(240px, 360px) 1fr auto;
  gap: 18px;
  align-items: center;
  margin-bottom: 30px;
}

.catalog-search {
  width: 100%;
  height: 48px;
  padding: 0 16px;
  border: 1px solid rgba(105, 63, 23, 0.24);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.86);
  color: var(--catalog-ink);
  font: inherit;
}

.catalog-search:focus {
  outline: 3px solid rgba(221, 148, 28, 0.25);
  border-color: var(--catalog-gold);
}

.catalog-filters {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: thin;
}

.catalog-filters button {
  flex: 0 0 auto;
  min-height: 42px;
  padding: 0 15px;
  border: 1px solid rgba(105, 63, 23, 0.2);
  border-radius: 999px;
  background: #fffdf7;
  color: var(--catalog-ink);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.catalog-filters button.is-active {
  border-color: var(--catalog-red);
  background: var(--catalog-red);
  color: #fff;
}

.catalog-count {
  white-space: nowrap;
  color: #765b48;
  font-weight: 700;
}

.catalog-sync-status {
  grid-column: 1 / -1;
  margin: -6px 0 0;
  color: #765b48;
  font-size: 0.82rem;
}

.catalog-sync-status[data-state="synced"] { color: var(--catalog-green); }
.catalog-sync-status[data-state="fallback"] { color: #8b5a22; }

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

.catalog-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(182, 112, 26, 0.28);
  border-radius: 8px;
  background: rgba(255, 253, 247, 0.96);
  box-shadow: 0 14px 30px rgba(95, 53, 18, 0.1);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.catalog-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 38px rgba(95, 53, 18, 0.16);
}

.catalog-card.is-featured {
  border-color: rgba(191, 17, 29, 0.58);
}

.catalog-card-media {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #fff7e8;
}

.catalog-card-media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  transition: transform 240ms ease;
}

.catalog-card:hover .catalog-card-media img { transform: scale(1.035); }

.catalog-card-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  padding: 7px 10px;
  border-radius: 4px;
  background: var(--catalog-red);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.catalog-card-body {
  display: flex;
  flex-direction: column;
  min-height: 260px;
  padding: 22px;
}

.catalog-card-category {
  color: var(--catalog-green);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.catalog-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.catalog-stock {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 8px;
  border: 1px solid currentColor;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 800;
  white-space: nowrap;
}

.catalog-stock.is-available { color: #3f7029; background: #f0f8e9; }
.catalog-stock.is-low { color: #9a6500; background: #fff5d7; }
.catalog-stock.is-preorder { color: #a51b25; background: #fff0f1; }
.catalog-stock.is-unknown { color: #765b48; background: #f7f1e8; }

.catalog-card h2 {
  margin: 7px 0 9px;
  font-size: 1.4rem;
  line-height: 1.2;
}

.catalog-card p {
  margin: 0;
  color: #6d5546;
  line-height: 1.55;
}

.catalog-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: auto;
  padding-top: 20px;
}

.catalog-card-footer strong {
  max-width: 132px;
  color: #8a6b55;
  font-size: 0.8rem;
  line-height: 1.25;
}

.catalog-detail-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 15px;
  border: 0;
  border-radius: 6px;
  background: var(--catalog-gold);
  color: #2c1c12;
  font: inherit;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.catalog-detail-button:hover { background: #efaa2f; }

.catalog-empty {
  padding: 48px 20px;
  text-align: center;
  color: #765b48;
}

.catalog-dialog {
  width: min(850px, calc(100% - 32px));
  padding: 0;
  border: 0;
  border-radius: 8px;
  color: var(--catalog-ink);
  background: var(--catalog-paper);
  box-shadow: 0 28px 80px rgba(50, 28, 11, 0.34);
}

.catalog-dialog::backdrop { background: rgba(49, 31, 20, 0.62); }

.catalog-dialog-inner {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
}

.catalog-dialog-media {
  min-height: 390px;
  background: #fff5df;
}

.catalog-dialog-media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.catalog-dialog-copy {
  position: relative;
  padding: 46px 34px 34px;
}

.catalog-dialog-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: rgba(191, 17, 29, 0.1);
  color: var(--catalog-red);
  font-size: 1.5rem;
  cursor: pointer;
}

.catalog-dialog-copy h2 { margin: 8px 0 14px; font-size: 2rem; }
.catalog-dialog-copy p { color: #6d5546; line-height: 1.65; }
.catalog-dialog-price { display: block; margin-top: 24px; color: #8a6b55; }
.catalog-dialog-stock { margin: 8px 0 0; color: var(--catalog-green); font-weight: 800; }
.catalog-dialog-note { margin-top: 24px; padding: 14px; border-left: 3px solid var(--catalog-gold); background: #fff3d6; font-size: 0.88rem; }

@media (max-width: 900px) {
  .catalog-hero {
    min-height: 440px;
    background-position: 58% center;
  }
  .catalog-hero::before {
    background: linear-gradient(
      90deg,
      rgba(255, 249, 233, 0.96) 0%,
      rgba(255, 249, 233, 0.84) 42%,
      rgba(255, 249, 233, 0.2) 72%,
      rgba(255, 249, 233, 0) 100%
    );
  }
  .catalog-hero h1 { max-width: 50%; }
  .catalog-hero-copy { max-width: 48%; }
  .catalog-toolbar { grid-template-columns: 1fr auto; }
  .catalog-filters { grid-column: 1 / -1; grid-row: 2; }
  .catalog-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 600px) {
  .catalog-hero {
    min-height: 620px;
    justify-content: flex-start;
    padding: 38px 22px;
    background-position: 68% center;
  }
  .catalog-hero::before {
    background: linear-gradient(
      180deg,
      rgba(255, 249, 233, 0.97) 0%,
      rgba(255, 249, 233, 0.88) 26%,
      rgba(255, 249, 233, 0.16) 52%,
      rgba(255, 249, 233, 0) 74%
    );
  }
  .catalog-hero h1 { max-width: 100%; }
  .catalog-hero-copy { max-width: 100%; margin-top: 12px; }
  .catalog-content { width: min(100% - 28px, 1180px); padding-top: 28px; }
  .catalog-toolbar { grid-template-columns: 1fr; gap: 12px; }
  .catalog-filters { grid-column: auto; grid-row: auto; }
  .catalog-count { justify-self: start; }
  .catalog-grid { grid-template-columns: 1fr; gap: 18px; }
  .catalog-card-body { min-height: 230px; padding: 18px; }
  .catalog-dialog-inner { grid-template-columns: 1fr; }
  .catalog-dialog-media { min-height: 240px; }
  .catalog-dialog-copy { padding: 34px 22px 24px; }
}
