/*
  BIG ZAYN — kaftan.css
  Product detail page
*/

/* =============================================
   DETAIL PAGE WRAPPER
   ============================================= */
.detail {
  padding: 148px 40px 20px;
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-sizing: border-box;
}

/* BREADCRUMB */
.detail__breadcrumb {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-body);
  font-size: 10px;
  letter-spacing: 0.22em;
  color: rgba(218, 211, 190, 0.35);
  font-weight: 300;
  margin-bottom: 16px;
  flex-shrink: 0;
}

.detail__breadcrumb a {
  color: rgba(218, 211, 190, 0.35);
  text-decoration: none;
  transition: color 0.2s;
}

.detail__breadcrumb a:hover { color: var(--cream); }

/* =============================================
   MAIN LAYOUT — thumbs | image | info
   ============================================= */
.detail__layout {
  display: grid;
  grid-template-columns: 80px 1fr 360px;
  gap: 24px;
  flex: 1;
  min-height: 0;
}

/* =============================================
   THUMBNAILS
   ============================================= */
.detail__thumbs {
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow-y: auto;
}

.thumb {
  background: none;
  border: 1px solid rgba(218, 211, 190, 0.1);
  cursor: pointer;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  transition: border-color 0.2s;
  overflow: hidden;
  flex-shrink: 0;
}

.thumb img {
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
  display: block;
  opacity: 0.5;
  transition: opacity 0.2s;
}

.thumb span {
  font-family: var(--font-display);
  font-size: 8px;
  letter-spacing: 0.18em;
  color: rgba(218, 211, 190, 0.35);
  padding: 4px 0;
  transition: color 0.2s;
}

.thumb.active { border-color: var(--cream); }
.thumb.active img { opacity: 1; }
.thumb.active span { color: var(--cream); }
.thumb:hover img { opacity: 0.85; }

/* =============================================
   MAIN IMAGE
   ============================================= */
.detail__image-wrap {
  position: relative;
  overflow: hidden;
  background: #ffffff;
  height: 100%;
  min-height: 0;
}

.detail__image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center center;
  display: block;
  transition: opacity 0.4s ease;
}

.detail__sku-stamp {
  position: absolute;
  bottom: 14px;
  left: 14px;
  font-family: var(--font-display);
  font-size: 9px;
  letter-spacing: 0.22em;
  color: rgba(218, 211, 190, 0.3);
}

/* =============================================
   PRODUCT INFO
   ============================================= */
.detail__info {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 4px 0;
  overflow-y: auto;
  min-height: 0;
}

.detail__tag {
  font-family: var(--font-body);
  font-size: 9px;
  letter-spacing: 0.26em;
  color: var(--red);
  font-weight: 300;
  display: block;
  margin-bottom: 10px;
}

.detail__name {
  font-family: var(--font-display);
  font-size: 26px;
  letter-spacing: 0.08em;
  color: var(--cream);
  font-weight: normal;
  line-height: 1.1;
  margin-bottom: 10px;
}

.detail__price {
  font-family: var(--font-body);
  font-size: 28px;
  font-weight: 700;
  color: var(--cream);
  letter-spacing: 0.04em;
}

/* SPECS */
.detail__specs {
  display: flex;
  flex-direction: column;
  border-top: 1px solid rgba(218, 211, 190, 0.1);
  margin-top: 16px;
}

.spec-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid rgba(218, 211, 190, 0.07);
}
.spec-row[hidden] { display: none; }

.spec-label {
  font-family: var(--font-display);
  font-size: 10px;
  letter-spacing: 0.18em;
  color: rgba(218, 211, 190, 0.4);
}

.spec-value {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 300;
  color: var(--cream);
  letter-spacing: 0.04em;
}

/* ACTIONS */
.detail__actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 16px;
}

.qty-wrap {
  display: flex;
  align-items: center;
  border: 1px solid rgba(218, 211, 190, 0.2);
  width: fit-content;
}

.qty-btn {
  background: none;
  border: none;
  color: var(--cream);
  font-family: var(--font-body);
  font-size: 16px;
  width: 36px;
  height: 36px;
  cursor: pointer;
  transition: background 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.qty-btn:hover { background: rgba(218, 211, 190, 0.1); }

.qty-num {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 400;
  color: var(--cream);
  width: 36px;
  text-align: center;
  display: inline-block;
}

.btn-bag {
  background: none;
  border: 1px solid var(--cream);
  color: var(--cream);
  font-family: var(--font-display);
  font-size: 12px;
  letter-spacing: 0.24em;
  padding: 12px 24px;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
  width: 100%;
}

.btn-bag:hover { background: var(--cream); color: var(--green); }

.btn-buy {
  background: var(--cream);
  border: 1px solid var(--cream);
  color: var(--green);
  font-family: var(--font-display);
  font-size: 12px;
  letter-spacing: 0.24em;
  padding: 12px 24px;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
  width: 100%;
}

.btn-buy:hover { background: var(--red); border-color: var(--red); color: var(--cream); }

/* Dual currency display */
.price-usd {
  font-size: 0.75em;
  font-weight: 300;
  color: rgba(218,211,190,0.45);
  letter-spacing: 0.04em;
}

/* DESCRIPTION (admin → product → DESCRIPTION) */
.detail__desc { margin-top: 18px; color: var(--cream); }
.detail__desc[hidden] { display: none; }
.detail__desc-title { font-family: var(--font-display); font-size: 10px; letter-spacing: .18em; color: rgba(218, 211, 190, .4); font-weight: 400; margin: 0 0 10px; }
.detail__desc p { font-family: var(--font-body); font-size: 14px; font-weight: 300; line-height: 1.7; margin: 0 0 12px; color: rgba(218, 211, 190, .85); }
.detail__desc p:last-child { margin-bottom: 0; }
.detail__desc-more {
  background: none; border: 0; padding: 6px 0 0; cursor: pointer;
  font-family: var(--font-display); font-size: 9px; letter-spacing: .18em; color: var(--cream);
}
.detail__desc-more:hover { opacity: .7; }
.detail__desc-more[hidden] { display: none; }
/* Desktop only: 3 lines, fading out, until READ MORE */
@media (min-width: 769px) {
  .detail__desc.is-short .detail__desc-text {
    max-height: calc(14px * 1.7 * 3); overflow: hidden;
    -webkit-mask-image: linear-gradient(#000 60%, transparent); mask-image: linear-gradient(#000 60%, transparent);
  }
  .detail__desc { margin-top: 14px; }
}

/* Desktop: everything fits beside the photo, ADD TO BAG and BUY NOW included, on laptop screens too.
   Specs in two columns (3 rows, not 6); quantity sits beside ADD TO BAG. */
@media (min-width: 769px) {
  .detail__specs { display: grid; grid-template-columns: 1fr 1fr; }
  .detail__specs .spec-row {
    flex-direction: column; align-items: flex-start; justify-content: flex-start; gap: 3px;
    padding-top: 9px; padding-bottom: 9px;
  }
  .detail__specs .spec-row:nth-child(odd) { padding-right: 12px; }
  .detail__specs .spec-row:nth-last-child(-n+2) { border-bottom: 0; }
  .detail__actions { display: grid; grid-template-columns: auto 1fr; align-items: stretch; }
  .detail__actions > :not(.qty-wrap):not(.btn-bag) { grid-column: 1 / -1; }
}

/* OTHER COLOURS (same design) — round dots cut from each piece's photo */
.detail__colours { margin-top: 16px; }
.detail__colours[hidden] { display: none; }
.detail__colours-title { font-family: var(--font-display); font-size: 10px; letter-spacing: .18em; color: rgba(218, 211, 190, .4); margin: 0 0 10px; }
.detail__colours-title span { font-family: var(--font-body); font-size: 13px; letter-spacing: .04em; color: var(--cream); margin-left: 8px; text-transform: none; }
.detail__swatches { display: flex; flex-wrap: wrap; gap: 10px; }
.swatch {
  width: 34px; height: 34px; border-radius: 50%; flex: none;
  background-color: rgba(218, 211, 190, .1);
  background-size: 700%; background-position: 46% 44%; background-repeat: no-repeat;
  box-shadow: 0 0 0 2px var(--green, #254336), 0 0 0 3px rgba(218, 211, 190, .18);
  transition: box-shadow .2s, transform .2s;
}
.swatch:hover { transform: scale(1.08); }
.swatch.is-on { box-shadow: 0 0 0 2px var(--green, #254336), 0 0 0 4px var(--cream); }
