:root {
  --paper: #fbfaf7;
  --panel: #ffffff;
  --ink: #171717;
  --muted: #5f6670;
  --line: #dde3e8;
  --accent: #1f6f6b;
  --accent-dark: #164f4c;
  --signal: #bd3f32;
  --gold: #c7a052;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Avenir Next", Avenir, "Segoe UI", Arial, sans-serif;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(31, 111, 107, 0.08), rgba(255, 255, 255, 0) 360px),
    var(--paper);
  min-height: 100vh;
}

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

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

.site-header {
  display: flex;
  position: relative;
  z-index: 1000;
  justify-content: space-between;
  align-items: flex-start;
  padding: 32px 7vw 16px;
  gap: 24px;
  border-bottom: 1px solid var(--line);
  background: rgba(251, 250, 247, 0.9);
  backdrop-filter: blur(10px);
}

.brand h1 {
  font-size: clamp(2rem, 4vw, 3.2rem);
  margin: 0 0 8px;
  letter-spacing: 0;
}

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

.subtitle {
  margin: 0;
  max-width: 420px;
  color: var(--muted);
}

.top-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.top-nav a {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: #263238;
  font-weight: 700;
}

.top-nav a:hover {
  border-color: var(--line);
  background: #fff;
}

.cart-area {
  position: relative;
  z-index: 1001;
}

.cart-toggle-input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.cart-toggle {
  border: 1px solid var(--line);
  background: #fff;
  padding: 10px 18px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.cart-toggle:hover {
  transform: translateY(-2px);
}

.cart-panel {
  position: fixed;
  top: 88px;
  right: 40px;
  width: min(320px, 90vw);
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.18);
  padding: 20px;
  border-radius: 8px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-12px);
  transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: 1002;
}

.cart-area:hover .cart-panel,
.cart-area:focus-within .cart-panel,
.cart-toggle-input:checked ~ .cart-panel {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.cart-area:hover .cart-panel {
  box-shadow: 0 18px 45px rgba(31, 111, 107, 0.16);
  border-color: #b7cfcb;
}

.cart-toggle-input:checked ~ .cart-panel {
  box-shadow: 0 28px 70px rgba(23, 23, 23, 0.22);
  border-color: var(--accent);
}

.cart-toggle-input:checked + .cart-toggle {
  background: #1f1d1b;
  color: #fff;
  border-color: #1f1d1b;
}

.cart-panel h2 {
  margin: 0 0 12px;
  font-size: 1.2rem;
}

.cart-items {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.cart-items li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.cart-items label {
  display: grid;
  gap: 6px;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.cart-items input {
  width: 70px;
  padding: 6px;
  border-radius: 8px;
  border: 1px solid var(--line);
}

.cart-total {
  display: flex;
  justify-content: space-between;
  margin: 14px 0 18px;
  font-weight: 600;
}

.checkout {
  width: 100%;
  padding: 12px;
  border-radius: 8px;
  border: none;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  cursor: pointer;
}

.checkout:hover {
  background: var(--accent-dark);
}

.breadcrumb {
  padding: 12px 7vw 16px;
}

.cover {
  display: grid;
  gap: 28px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  align-items: center;
  background: linear-gradient(120deg, #fffaf4 0%, #efe6dc 100%);
  border-radius: 8px;
  padding: 36px;
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.1);
}

.cover-text {
  max-width: 460px;
  color: #5b524a;
  line-height: 1.6;
}

.cover-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  padding: 12px 20px;
  border-radius: 8px;
  border: 1px solid var(--ink);
  font-weight: 600;
  background: transparent;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.cover-link:hover {
  background: var(--ink);
  color: #fff;
  transform: translateY(-2px);
}

.cover-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.cover-art {
  margin: 0;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #e1d6ca;
}

.breadcrumb ol {
  display: flex;
  gap: 10px;
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 0.85rem;
}

.breadcrumb li::after {
  content: "/";
  margin-left: 10px;
  color: #9d8f83;
}

.breadcrumb li:last-child::after {
  content: "";
}

main {
  padding: 24px 7vw 64px;
}

.home-page {
  padding-top: 0;
}

.home-header {
  align-items: center;
}

.home-hero {
  min-height: min(680px, calc(100vh - 96px));
  display: grid;
  grid-template-columns: minmax(280px, 0.95fr) minmax(320px, 1.05fr);
  gap: 48px;
  align-items: center;
  padding: 44px 0 72px;
}

.hero-art {
  margin: 0;
  overflow: hidden;
  border-radius: 8px;
  box-shadow: 0 24px 70px rgba(23, 23, 23, 0.22);
}

.hero-art img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}

.hero-copy h2 {
  max-width: 760px;
  margin: 0 0 18px;
  font-size: clamp(2.4rem, 5vw, 5.1rem);
  line-height: 1;
  letter-spacing: 0;
}

.hero-copy p {
  max-width: 620px;
  color: var(--muted);
  line-height: 1.7;
  font-size: 1.05rem;
}

.primary-link,
.mini-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 10px 16px;
  border-radius: 8px;
  border: 1px solid var(--ink);
  font-weight: 700;
}

.primary-link {
  margin-top: 12px;
  background: var(--ink);
  color: #fff;
}

.primary-link:hover {
  background: var(--accent);
  border-color: var(--accent);
}

.mini-link {
  min-height: 34px;
  padding: 6px 10px;
  background: #fff;
}

.home-section {
  padding: 42px 0;
}

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

.section-heading h2,
.category-band h2 {
  margin: 0;
  font-size: clamp(1.8rem, 3vw, 2.7rem);
}

.category-band {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: center;
  margin-top: 24px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #172121;
  color: #fff;
}

.category-band .eyebrow {
  color: #8ed1ca;
}

.category-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.category-links a {
  padding: 10px 14px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 8px;
  font-weight: 700;
}

.category-links a:hover {
  background: #fff;
  color: #172121;
}

.catalog-layout {
  display: grid;
  gap: 28px;
  grid-template-columns: minmax(180px, 240px) 1fr;
  align-items: start;
}

.product-list {
  background: #fff;
  border-radius: 8px;
  padding: 20px;
  border: 1px solid var(--line);
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.08);
  position: sticky;
  top: 120px;
}

.product-list h2 {
  margin: 0 0 12px;
  font-size: 1.1rem;
}

.product-list ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 10px;
}

.product-list a {
  display: block;
  padding: 8px 10px;
  border-radius: 8px;
  background: #f3f7f6;
  transition: background 0.2s ease;
}

.product-list a:hover {
  background: #dfecea;
}

.cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 20px;
  border-radius: 8px;
  border: 1px solid var(--ink);
  font-weight: 600;
  background: transparent;
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.cta:hover {
  background: var(--ink);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(23, 23, 23, 0.16);
}

.cta:active {
  transform: translateY(0);
  box-shadow: 0 5px 12px rgba(23, 23, 23, 0.14);
}

.cta:focus-visible,
.addToCart:focus-visible,
.add-to-cart:focus-visible {
  outline: 3px solid rgba(31, 111, 107, 0.32);
  outline-offset: 3px;
}

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

.product-card {
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.08);
  display: grid;
  gap: 12px;
  animation: rise 0.6s ease forwards;
  opacity: 0;
  transform: translateY(20px);
}

.product-card:nth-child(1) {
  animation-delay: 0ms;
}

.product-card:nth-child(2) {
  animation-delay: 90ms;
}

.product-card:nth-child(3) {
  animation-delay: 180ms;
}

.product-card:nth-child(4) {
  animation-delay: 270ms;
}

.product-card figure {
  margin: 0;
  background: #e8eef1;
}

.product-card section {
  padding: 0 18px 18px;
}

.card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
}

.addToCart,
.add-to-cart {
  border: 1px solid var(--ink);
  min-height: 42px;
  padding: 10px 16px;
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(23, 23, 23, 0.1);
  transition: background 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.addToCart:hover,
.add-to-cart:hover {
  background: #f4f8f8;
  transform: translateY(-2px);
  box-shadow: 0 12px 26px rgba(23, 23, 23, 0.16);
}

.addToCart:active,
.add-to-cart:active {
  transform: translateY(0);
  box-shadow: 0 5px 12px rgba(23, 23, 23, 0.12);
}

.product-detail {
  display: grid;
  gap: 32px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  align-items: center;
}

.product-media {
  background: #fff;
  border-radius: 8px;
  padding: 16px;
  border: 1px solid var(--line);
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.1);
}

.main-image {
  margin: 0;
  border-radius: 8px;
  overflow: hidden;
}

.slider-window {
  width: 100%;
  overflow: hidden;
  border-radius: 8px;
  position: relative;
  background: #101616;
}

.slider-track {
  display: flex;
  width: 100%;
  transition: transform 0.35s ease;
}

.slider-slide {
  flex: 0 0 100%;
}

.main-image img,
.main-image video {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  background: #101616;
}

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

.slider-arrow {
  position: absolute;
  top: 50%;
  z-index: 2;
  width: 44px;
  height: 58px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  cursor: pointer;
  font-size: 2rem;
  line-height: 1;
  transform: translateY(-50%);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.18);
  transition: background 0.18s ease, transform 0.18s ease;
}

.slider-arrow-left {
  left: 12px;
}

.slider-arrow-right {
  right: 12px;
}

.slider-arrow:hover {
  background: #fff;
  transform: translateY(-50%) scale(1.04);
}

.slider-dots {
  position: absolute;
  left: 50%;
  bottom: 14px;
  z-index: 2;
  display: flex;
  gap: 8px;
  transform: translateX(-50%);
  padding: 7px 9px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.38);
}

.slider-dot {
  width: 9px;
  height: 9px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.48);
  cursor: pointer;
}

.slider-dot.is-active {
  width: 22px;
  background: #fff;
}

.slider-thumb.is-active {
  border-color: var(--accent);
  background: #e6f2f1;
}

.thumbs {
  list-style: none;
  display: flex;
  gap: 12px;
  padding: 12px 0 0;
  margin: 0;
  overflow-x: auto;
  scroll-snap-type: x proximity;
}

.thumbs li {
  flex: 0 0 82px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--line);
  scroll-snap-align: start;
}

.slider-thumb {
  width: 100%;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  overflow: hidden;
}

.slider-thumb img,
.video-thumb {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

.video-thumb {
  display: grid;
  place-items: center;
  background: #172121;
  color: #fff;
  font-weight: 800;
}

.product-info h2 {
  font-size: clamp(2rem, 3vw, 2.6rem);
  margin: 0 0 12px;
}

.price {
  font-size: 1.5rem;
  font-weight: 600;
  margin: 0 0 16px;
}

.description {
  color: var(--muted);
  line-height: 1.6;
}

.details {
  margin: 20px 0 0;
  display: grid;
  gap: 12px;
}

.details section {
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  padding-bottom: 6px;
}

.site-footer {
  padding: 24px 7vw 40px;
  color: #6b625a;
}

@keyframes rise {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 768px) {
  .site-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .home-hero {
    min-height: auto;
    grid-template-columns: 1fr;
    gap: 28px;
    padding: 28px 0 48px;
  }

  .hero-copy h2 {
    font-size: clamp(2rem, 12vw, 3.2rem);
  }

  .section-heading,
  .category-band {
    align-items: flex-start;
    flex-direction: column;
  }

  .category-links {
    justify-content: flex-start;
  }

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

  .product-list {
    position: static;
  }

  .cart-panel {
    right: 16px;
    top: 140px;
  }
}
.auth-page {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 3rem 1.5rem 4rem;
}

.auth-card {
  width: 100%;
  max-width: 520px;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 2rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
}

.auth-card h2 {
  margin-top: 0;
  margin-bottom: 0.5rem;
}

.auth-subtitle {
  margin-bottom: 1.25rem;
  color: #666;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.auth-form label {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  font-weight: 600;
}

.auth-form input {
  padding: 0.8rem 0.9rem;
  border: 1px solid #ccc;
  border-radius: 8px;
  font: inherit;
}

.auth-form input:focus {
  outline: none;
  border-color: #888;
}

.form-errors {
  margin: 0 0 1rem 0;
  padding: 0.9rem 1.2rem;
  border-radius: 8px;
  background: #fff3f3;
  color: #a12626;
}

.form-success {
  margin: 0 0 1rem;
  padding: 0.9rem 1rem;
  border-radius: 8px;
  background: #e9f6f1;
  color: #146247;
}

.auth-switch {
  margin-top: 1.2rem;
}

.product-grid {
  align-items: stretch;
}

.product-card {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.product-card figure {
  margin: 0;
}

.product-card img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: block;
}

.product-card section {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.product-card p {
  flex-grow: 1;
}

.card-meta {
  margin-top: auto;
}

.admin-page {
  padding: 2rem 1.5rem 4rem;
  display: grid;
  gap: 1.5rem;
}

.admin-card {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 1.5rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
}

.admin-card h2 {
  margin-top: 0;
  margin-bottom: 1rem;
}

.admin-form {
  display: grid;
  gap: 1rem;
}

.admin-form label {
  display: grid;
  gap: 0.4rem;
  font-weight: 600;
}

.admin-form input,
.admin-form textarea,
.admin-form select {
  width: 100%;
  max-width: 100%;
  padding: 0.75rem 0.85rem;
  border: 1px solid #ccc;
  border-radius: 8px;
  font: inherit;
  box-sizing: border-box;
}

.admin-form textarea {
  resize: vertical;
}

.inline-form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}

.inline-form input,
.inline-form select {
  width: auto;
  min-width: 180px;
}

.upload-form {
  max-width: 560px;
}

.drop-zone {
  width: 100%;
  min-height: 180px;
  display: grid;
  place-items: center;
  gap: 8px;
  padding: 18px;
  border: 2px dashed #aebfc4;
  border-radius: 8px;
  background: #f4f8f8;
  cursor: pointer;
  text-align: center;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.drop-zone input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.drop-zone.is-dragging {
  border-color: var(--accent);
  background: #e6f2f1;
}

.drop-title {
  font-weight: 800;
}

.drop-subtitle,
.drop-error {
  color: var(--muted);
  margin: 0;
}

.drop-error {
  color: var(--signal);
  min-height: 1.3em;
}

#image-drop-preview {
  width: min(220px, 100%);
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 8px;
}


.compact-form {
  margin-top: 0.9rem;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 900px;
}

.admin-table th,
.admin-table td {
  border: 1px solid #ddd;
  padding: 0.85rem;
  text-align: left;
  vertical-align: top;
}

.admin-table th {
  background: #f7f7f7;
}

.danger-btn {
  background: #b42318;
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 0.65rem 1rem;
  cursor: pointer;
}

.helper-text {
  color: #666;
  margin-top: 0.75rem;
}

details summary {
  cursor: pointer;
  font-weight: 600;
  margin-bottom: 0.5rem;
}
