:root {
  color-scheme: light;
  --ink: #141414;
  --soft-ink: #77736c;
  --line: #e7e3dd;
  --paper: #fbfaf7;
  --panel: #ffffff;
  --accent: #111111;
  --accent-2: #8a6f3d;
  --ruby: #7d2336;
  --mist: #f3f1ed;
  --shadow: 0 24px 70px rgba(25, 22, 18, 0.11);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--paper);
  color: var(--ink);
  font-family: "Inter", "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
  letter-spacing: 0;
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
  touch-action: manipulation;
}

.app-shell {
  min-height: 100vh;
}

.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 40;
  width: 100vw;
  height: 100vh;
  overflow: auto;
  padding: 34px clamp(28px, 6vw, 88px) 72px;
  border: 0;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: var(--shadow);
  transform: translateY(105%);
  transition: transform 220ms ease;
}

.sidebar.open {
  transform: translateY(0);
}

.admin-toggle {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 8;
  min-width: 70px;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
  font-weight: 700;
  box-shadow: 0 10px 30px rgba(25, 22, 18, 0.09);
}

.admin-close {
  position: fixed;
  top: 22px;
  right: 24px;
  z-index: 45;
}

.brand-block {
  padding-bottom: 24px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--accent-2);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
}

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

h1 {
  margin-bottom: 12px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.8rem;
  line-height: 1;
  font-weight: 500;
}

h2 {
  margin-bottom: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.4rem, 5.2vw, 5.7rem);
  line-height: 0.9;
  font-weight: 500;
}

.lead,
.muted {
  color: var(--soft-ink);
  line-height: 1.6;
}

.search-box,
.form-grid label,
.upload-panel label {
  display: grid;
  gap: 8px;
  color: var(--soft-ink);
  font-size: 0.84rem;
}

input,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  outline: none;
}

input {
  min-height: 46px;
  padding: 0 14px;
}

textarea {
  resize: vertical;
  padding: 12px 14px;
  line-height: 1.5;
}

input:focus,
textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(20, 20, 20, 0.08);
}

.filter-block {
  margin: 22px 0;
}

.filter-block p,
.panel-title {
  margin-bottom: 12px;
  font-weight: 700;
}

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

.chip {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  min-height: 44px;
  padding: 9px 14px;
  color: var(--soft-ink);
}

.chip.active {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.upload-panel {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: none;
}

.admin-content {
  display: grid;
  grid-template-columns: minmax(280px, 420px) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
  max-width: 1180px;
}

.form-error {
  min-height: 20px;
  margin: 0;
  color: #9f2538;
  font-size: 0.84rem;
}

.upload-drop {
  display: grid;
  place-items: center;
  min-height: 112px;
  border: 1px dashed #cfc8bd;
  border-radius: 8px;
  background: var(--mist);
  color: var(--soft-ink);
  text-align: center;
}

.upload-drop input {
  display: none;
}

.plus {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  margin-bottom: 8px;
  background: var(--accent);
  color: #fff;
  font-size: 1.4rem;
}

#processedCanvas {
  display: none;
  width: 100%;
  aspect-ratio: 1;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

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

.primary-button,
.secondary-button {
  min-height: 46px;
  border-radius: 8px;
  border: 1px solid transparent;
  padding: 0 16px;
  font-weight: 700;
}

.primary-button {
  background: var(--accent);
  color: #fff;
}

.secondary-button {
  background: #fff;
  color: var(--ink);
  border-color: var(--line);
}

.catalog-area {
  padding: 34px clamp(30px, 6vw, 88px) 72px;
  max-width: 1440px;
  margin: 0 auto;
}

.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
  padding-right: 78px;
}

.customer-controls {
  display: grid;
  grid-template-columns: minmax(240px, 360px) 1fr;
  gap: 20px;
  align-items: end;
  margin-bottom: 28px;
}

.customer-controls .filter-block {
  margin: 0;
}

.view-tools {
  display: flex;
  gap: 8px;
}

.icon-button {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--soft-ink);
  font-size: 1.2rem;
}

.icon-button.active {
  color: #fff;
  background: var(--accent);
  border-color: var(--accent);
}

.stat-strip {
  display: none;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  overflow: hidden;
  border: 0;
  border-radius: 8px;
  margin-bottom: 26px;
  background: transparent;
}

.stat-strip div {
  padding: 0 18px 12px 0;
  background: transparent;
  border-bottom: 1px solid var(--line);
}

.stat-strip span {
  display: block;
  font-size: 1rem;
  font-weight: 700;
}

.stat-strip small {
  color: var(--soft-ink);
}

.catalog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 30px;
}

.catalog-grid.list-view {
  grid-template-columns: 1fr;
}

.watch-card {
  display: grid;
  min-height: 500px;
  border: 1px solid #ece8e1;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 22px 50px rgba(30, 27, 22, 0.08);
  cursor: pointer;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    border-color 180ms ease;
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0.06);
}

.watch-card:hover,
.watch-card:focus-visible {
  border-color: #d8d0c4;
  box-shadow: 0 28px 60px rgba(30, 27, 22, 0.12);
  transform: translateY(-2px);
  outline: none;
}

.watch-card:active {
  transform: scale(0.99);
}

.catalog-grid.list-view .watch-card {
  grid-template-columns: 360px 1fr;
  min-height: 360px;
}

.watch-visual {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 390px;
  background: #f5f3ef;
}

.watch-visual img {
  display: block;
  width: 100%;
  height: 100%;
  max-height: 470px;
  object-fit: cover;
  filter: saturate(1.02) contrast(1.02);
}

.card-gallery,
.detail-gallery {
  overflow: hidden;
}

.gallery-img {
  grid-area: 1 / 1;
  opacity: 0;
  transition:
    opacity 680ms ease,
    transform 1800ms ease;
}

.gallery-img.active {
  opacity: 1;
}

.gallery-img.angle-1 {
  transform: scale(1);
  object-position: center;
}

.gallery-img.angle-2 {
  transform: scale(1.08);
  object-position: 42% 50%;
}

.gallery-img.angle-3 {
  transform: scale(1.14);
  object-position: 58% 46%;
}

.gallery-img.active.angle-2,
.gallery-img.active.angle-3 {
  transform: scale(1.02);
}

.generated-watch {
  width: 160px;
  height: 214px;
  position: relative;
}

.generated-watch::before,
.generated-watch::after {
  content: "";
  position: absolute;
  left: 50%;
  width: 66px;
  height: 56px;
  transform: translateX(-50%);
  background: linear-gradient(90deg, #9c958d, #f9f5ec, #746d66);
  border-radius: 14px;
}

.generated-watch::before {
  top: 0;
}

.generated-watch::after {
  bottom: 0;
}

.case {
  position: absolute;
  inset: 36px 13px;
  border-radius: 50%;
  background: linear-gradient(135deg, #7d756c, #fff5df 45%, #6e675f);
  box-shadow: inset 0 0 0 10px rgba(255, 255, 255, 0.38), 0 22px 35px rgba(0, 0, 0, 0.2);
}

.dial {
  position: absolute;
  inset: 18px;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 42%, var(--dial), #111 76%);
}

.hand {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 4px;
  height: 46px;
  border-radius: 4px;
  background: #f6ead2;
  transform-origin: bottom center;
}

.hand.minute {
  transform: translate(-50%, -100%) rotate(50deg);
}

.hand.hour {
  height: 34px;
  transform: translate(-50%, -100%) rotate(-35deg);
}

.hand.seconds {
  width: 2px;
  height: 52px;
  background: #b14644;
  transform: translate(-50%, -100%) rotate(115deg);
}

.pin {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #fff;
  transform: translate(-50%, -50%);
}

.watch-info {
  display: grid;
  gap: 10px;
  padding: 18px 20px 16px;
  min-height: 148px;
}

.watch-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--soft-ink);
  font-size: 0.78rem;
}

.watch-info h3 {
  margin-bottom: 0;
  font-family: "Inter", "Helvetica Neue", Arial, sans-serif;
  font-size: 1.05rem;
  line-height: 1.1;
  font-weight: 650;
}

.watch-copy {
  color: var(--soft-ink);
  line-height: 1.55;
}

.card-actions {
  display: flex;
  gap: 8px;
  margin-top: auto;
}

.card-actions button {
  flex: 1;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-weight: 700;
}

.detail-drawer {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 30;
  width: 100vw;
  height: 100vh;
  padding: 34px clamp(28px, 6vw, 96px) 72px;
  background: #fff;
  box-shadow: var(--shadow);
  transform: translateY(105%);
  transition: transform 220ms ease;
  overflow: auto;
}

.detail-drawer.open {
  transform: translateY(0);
}

.close-button {
  position: fixed;
  top: 22px;
  right: 24px;
  z-index: 35;
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-size: 1.4rem;
}

.close-button.admin-close {
  z-index: 45;
}

.product-page {
  max-width: 1280px;
  margin: 0 auto;
}

.product-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(320px, 0.82fr);
  gap: clamp(28px, 5vw, 70px);
  align-items: center;
  min-height: calc(100vh - 110px);
  padding: 28px 0 46px;
}

.detail-hero {
  display: grid;
  place-items: center;
  min-height: min(66vh, 680px);
  margin: 0;
  border-radius: 8px;
  overflow: hidden;
  background: var(--mist);
}

.detail-hero img {
  grid-area: 1 / 1;
  width: 100%;
  height: min(66vh, 680px);
  max-height: none;
  object-fit: cover;
}

.product-summary {
  align-self: center;
}

.product-summary h2 {
  font-size: clamp(2.1rem, 5vw, 5rem);
}

.detail-price {
  margin: 12px 0 18px;
  color: var(--accent-2);
  font-weight: 750;
  letter-spacing: 0;
}

.summary-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 26px;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  margin: 26px 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--line);
}

.feature-grid div {
  min-height: 116px;
  padding: 16px;
  background: #fff;
}

.feature-grid span {
  display: block;
  margin-bottom: 10px;
  color: var(--soft-ink);
  font-size: 0.78rem;
}

.feature-grid strong {
  display: block;
  font-size: 0.95rem;
  line-height: 1.35;
}

.detail-section {
  margin-top: 42px;
}

.story-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  overflow: hidden;
  margin-top: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--line);
}

.story-grid > div {
  min-height: 260px;
  padding: clamp(22px, 4vw, 42px);
  background: #fff;
}

.story-grid h3,
.presentation-band h3 {
  margin: 0 0 16px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.45rem, 2.5vw, 2.6rem);
  line-height: 1.05;
  font-weight: 500;
}

.presentation-band {
  padding: clamp(24px, 5vw, 54px);
  border-radius: 8px;
  background: #f4f1ec;
}

.spec-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--line);
}

.spec-list div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 14px;
  background: #fff;
}

.spec-list dt {
  color: var(--soft-ink);
}

.spec-list dd {
  margin: 0;
  text-align: right;
  font-weight: 700;
}

@media (max-width: 980px) {
  .sidebar {
    position: fixed;
    height: 100vh;
  }

  .catalog-grid.list-view .watch-card {
    grid-template-columns: 1fr;
  }

  .catalog-grid {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  }

  .customer-controls {
    grid-template-columns: 1fr;
    gap: 14px;
  }

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

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

  .product-hero,
  .story-grid,
  .spec-list {
    grid-template-columns: 1fr;
  }

  .product-hero {
    min-height: auto;
    padding-top: 56px;
  }
}

@media (max-width: 620px) {
  .catalog-area {
    padding: 20px;
  }

  .sidebar {
    padding: 20px;
  }

  .topbar {
    align-items: stretch;
    flex-direction: column;
    padding-right: 72px;
  }

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

  h2 {
    font-size: clamp(2.4rem, 15vw, 4.5rem);
  }

  .watch-visual {
    min-height: 360px;
  }

  .catalog-grid {
    grid-template-columns: 1fr;
    gap: 22px;
  }

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

  .detail-drawer {
    padding: 22px 20px 56px;
  }

  .summary-actions {
    grid-template-columns: 1fr;
  }

  .detail-hero,
  .detail-hero img {
    min-height: 420px;
    height: 420px;
  }
}
