/* Static product page — layout echoing readers.jo OpenCart product view */

body {
  background: #f7f6f3;
}

.product-page {
  padding: var(--section-pad-y-sm, clamp(1.05rem, 2.45vw, 1.85rem)) 0 var(--section-pad-y, clamp(1.35rem, 3.15vw, 2.35rem));
}

.product-page__inner {
  max-width: var(--layout-max, 1320px);
  margin: 0 auto;
  padding: 0 max(var(--layout-gutter, clamp(0.9375rem, 2.85vw, 1.875rem)), env(safe-area-inset-right, 0)) 0
    max(var(--layout-gutter, clamp(0.9375rem, 2.85vw, 1.875rem)), env(safe-area-inset-left, 0));
}

.product-page__missing {
  background: #fff;
  padding: 2rem;
  border: 1px solid #e8e6e1;
  text-align: center;
}

.breadcrumb {
  margin-bottom: 1.25rem;
}

.breadcrumb__list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.65rem;
  font-size: 0.8125rem;
  color: #555;
}

.breadcrumb__list a {
  color: #c41e3a;
  text-decoration: none;
}

.breadcrumb__list a:hover {
  text-decoration: underline;
}

.breadcrumb__list li:not(:last-child)::after {
  content: "›";
  margin-left: 0.65rem;
  color: #999;
}

.product-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: clamp(1.15rem, 3.25vw, 2rem);
  align-items: start;
  background: #fff;
  padding: clamp(1.05rem, 2.65vw, 1.65rem);
  border: 1px solid #e8e6e1;
  margin-bottom: 1.25rem;
}

@media (max-width: 900px) {
  .product-main {
    grid-template-columns: 1fr;
  }
}

.product-main__media {
  background: #faf9f7;
  padding: clamp(1rem, 2vw, 1.5rem);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Single cover: clip + scale on hover (origin follows pointer via --zoom-x / --zoom-y) */
.product-cover-zoom {
  position: relative;
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
  overflow: hidden;
  background: #f0eeeb;
  border-radius: 2px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.07);
}

.product-main__image {
  width: 100%;
  max-width: 420px;
  height: auto;
  display: block;
  transform-origin: var(--zoom-x, 50%) var(--zoom-y, 50%);
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}

@media (hover: hover) and (pointer: fine) {
  .product-cover-zoom--interactive:hover .product-main__image {
    transform: scale(1.7);
  }

  .product-cover-zoom--interactive {
    cursor: zoom-in;
  }
}

@media (prefers-reduced-motion: reduce) {
  .product-main__image {
    transition: none;
    transform: none !important;
  }

  .product-cover-zoom--interactive {
    cursor: default;
  }
}

.product-main__title {
  margin: 0 0 1rem;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(1.65rem, 3.5vw, 2.15rem);
  font-weight: 600;
  line-height: 1.2;
  color: #1a1a1a;
}

.product-meta {
  margin: 0 0 1.25rem;
  padding: 0;
  list-style: none;
  border-top: 1px solid #ece7e1;
}

.product-meta > li {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 0.65rem 0.1rem;
  border-bottom: 1px solid #ece7e1;
  font-size: 0.9rem;
  line-height: 1.45;
  color: #3a3a3a;
}

.product-meta__label {
  flex: 0 0 82px;
  margin: 0;
  padding-top: 0.18rem;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: #a4978c;
}

/* Author value reads as a quiet link */
.product-meta .author-link {
  color: #c41e3a;
  font-weight: 600;
  text-decoration: none;
}
.product-meta .author-link:hover {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.product-meta__cats {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.product-meta__cat-link {
  display: inline-block;
  padding: 0.22rem 0.7rem;
  border: 1.5px solid #e6e0d9;
  border-radius: 999px;
  background: #faf7f4;
  color: #555;
  font-size: 0.78rem;
  font-weight: 600;
  text-decoration: none;
  transition: border-color 0.18s, background 0.18s, color 0.18s;
}

.product-meta__cat-link:hover {
  border-color: #c41e3a;
  background: #fff5f7;
  color: #c41e3a;
}

.product-price {
  margin: 0 0 1rem;
  font-size: 1.25rem;
  font-weight: 700;
  color: #c41e3a;
}

.product-price__label {
  font-weight: 600;
  color: #555;
  margin-right: 0.35rem;
}

.product-facts {
  margin: 0 0 1.5rem;
  padding: 0;
  list-style: none;
  font-size: 0.875rem;
  line-height: 1.65;
  color: #444;
}

.product-facts li span:first-child {
  font-weight: 600;
  color: #333;
  margin-right: 0.35rem;
}

.product-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 0.85rem;
}

.product-qty input {
  width: 3.5rem;
  padding: 0.5rem 0.45rem;
  border: 1px solid #c5c5c5;
  border-radius: 2px;
  font: inherit;
  font-size: 0.875rem;
}

.product-actions__cart {
  padding: 0.6rem 1.35rem;
  border: none;
  border-radius: 2px;
  background: #e31e2f;
  color: #fff;
  font: inherit;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
}

.product-actions__cart:hover {
  background: #c91828;
}

.product-actions__cart--in-cart {
  background: #16a34a;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
}

.product-actions__cart--in-cart:hover {
  background: #15803d;
}

.product-actions__ghost {
  padding: 0.55rem 1rem;
  border: 1px solid #ccc;
  border-radius: 2px;
  background: #fff;
  color: #333;
  font: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
}

.product-actions__ghost:hover {
  border-color: #999;
}

.product-actions__ghost--wishlisted {
  border-color: #c41e3a;
  color: #c41e3a;
}

.product-actions__ghost--wishlisted:hover {
  background: #fff5f6;
  border-color: #a01830;
}

.product-tabs {
  background: #fff;
  border: 1px solid #e8e6e1;
  margin-bottom: 1.5rem;
}

.product-tabs__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  border-bottom: 1px solid #e8e6e1;
}

.product-tabs__tab {
  padding: 0.85rem 1.25rem;
  border: none;
  background: #f4f2ef;
  color: #555;
  font: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  border-right: 1px solid #e8e6e1;
}

.product-tabs__tab.is-active {
  background: #fff;
  color: #1a1a1a;
  margin-bottom: -1px;
  padding-bottom: calc(0.85rem + 1px);
}

.product-tabs__tab:disabled {
  opacity: 0.55;
  cursor: default;
}

.product-tabs__panel {
  padding: clamp(0.85rem, 2.15vw, 1.25rem);
  font-size: 0.9375rem;
  line-height: 1.65;
  color: #333;
  max-width: 85ch;
}

/* ── Reviews ─────────────────────────────────────────── */
.pr-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-bottom: 1.5rem;
}

.pr-item {
  padding: 1rem 0;
  border-bottom: 1px solid #ede9e3;
}

.pr-item:last-child { border-bottom: none; }

.pr-item__header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.35rem;
  flex-wrap: wrap;
}

.pr-item__stars { color: #f5a623; font-size: 0.85rem; letter-spacing: .05em; }

.pr-item__name {
  font-weight: 700;
  font-size: 0.875rem;
  color: #1a1a1a;
}

.pr-item__date {
  font-size: 0.78rem;
  color: #999;
  margin-left: auto;
}

.pr-item__title {
  margin: 0 0 0.25rem;
  font-weight: 700;
  font-size: 0.9rem;
  color: #1a1a1a;
}

.pr-item__body {
  margin: 0;
  font-size: 0.875rem;
  color: #444;
  line-height: 1.6;
}

.pr-form-wrap { margin-top: 1rem; }

.pr-form-title {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.15rem;
  font-weight: 600;
  color: #1a1a1a;
  margin: 0 0 0.85rem;
}

/* Star rating input — CSS-only, RTL trick (highest value first in DOM) */
.pr-stars-input {
  display: flex;
  flex-direction: row-reverse;
  justify-content: flex-end;
  gap: 0.1rem;
  margin-bottom: 0.85rem;
}

.pr-stars-input input[type="radio"] {
  display: none;
}

.pr-stars-input label {
  font-size: 1.5rem;
  color: #ccc;
  cursor: pointer;
  transition: color .15s;
}

.pr-stars-input input:checked ~ label,
.pr-stars-input label:hover,
.pr-stars-input label:hover ~ label {
  color: #f5a623;
}

.pr-input {
  display: block;
  width: 100%;
  padding: 0.55rem 0.75rem;
  border: 1px solid #d8d4cf;
  border-radius: 5px;
  font: inherit;
  font-size: 0.875rem;
  color: #1a1a1a;
  background: #fff;
  margin-bottom: 0.65rem;
  box-sizing: border-box;
}

.pr-input:focus {
  outline: none;
  border-color: #c41e3a;
  box-shadow: 0 0 0 2px rgba(196,30,58,.12);
}

.pr-textarea {
  min-height: 100px;
  resize: vertical;
}

.pr-submit {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.6rem 1.35rem;
  background: #c41e3a;
  color: #fff;
  border: none;
  border-radius: 4px;
  font: inherit;
  font-size: 0.875rem;
  font-weight: 700;
  cursor: pointer;
  transition: background .15s;
}

.pr-submit:hover { background: #a8182f; }

.pr-gate {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.75rem 1rem;
  border-radius: 6px;
  font-size: 0.875rem;
  background: #f4f2ef;
  color: #555;
  border: 1px solid #e8e4de;
  margin-bottom: 1rem;
}

.pr-gate a { color: #c41e3a; font-weight: 600; }

.pr-gate--done {
  background: #f0faf4;
  border-color: #b6e2c8;
  color: #166534;
}

.pr-gate--locked {
  background: #faf7f0;
  border-color: #e5ddc8;
  color: #7a6030;
}

.pr-gate--error {
  background: #fff1f2;
  border-color: #fca5a5;
  color: #991b1b;
}

.pr-field-error {
  font-size: 0.78rem;
  color: #c41e3a;
  margin: -0.4rem 0 0.6rem;
}

.related-wrap {
  background: #fff;
  border: 1px solid #e8e6e1;
  padding: clamp(1.05rem, 2.65vw, 1.45rem);
}

.related-wrap__title {
  margin: 0 0 1rem;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.35rem;
  font-weight: 600;
  color: #1a1a1a;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: clamp(0.6rem, 1.65vw, 1.05rem);
}

@media (max-width: 1000px) {
  .related-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  .related-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.related-card {
  text-decoration: none;
  color: inherit;
  display: block;
}

.related-card img {
  width: 100%;
  height: auto;
  aspect-ratio: 600 / 770;
  object-fit: cover;
  background: #f0eeeb;
  margin-bottom: 0.5rem;
}

.related-card__title {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.35;
  color: #1a1a1a;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.related-card__price {
  margin: 0.35rem 0 0;
  font-size: 0.8125rem;
  font-weight: 700;
  color: #c41e3a;
}

.related-card:hover .related-card__title {
  color: #c41e3a;
}

.product-page__main-col {
  min-width: 0;
}


/* ── Feature pills on the product page ────────────────────── */
.product-feature-pills { display: inline-flex; flex-wrap: wrap; gap: .4rem; vertical-align: middle; }
.product-feature-pill {
  display: inline-flex; align-items: center; gap: .3rem;
  font-size: .8rem; font-weight: 600; color: #3a342b;
  background: #f7f3e9; border: 1px solid #e6dcc4; border-radius: 999px;
  padding: .2rem .6rem; text-decoration: none;
}
.product-feature-pill:hover { border-color: #c9a227; }
.product-feature-pill img { width: 1rem; height: 1rem; border-radius: 50%; object-fit: cover; }

/* Coming-soon / pre-order expected-availability note */
.product-availability-note {
  display: flex;
  align-items: center;
  gap: .8rem;
  margin: 0 0 1.25rem;
  padding: .8rem 1rem;
  background: linear-gradient(135deg, #fff6f8 0%, #fdecef 100%);
  border: 1px solid #f3d4da;
  border-left: 4px solid #c41e3a;
  border-radius: 12px;
}
.product-availability-note__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.4rem;
  height: 2.4rem;
  flex-shrink: 0;
  background: linear-gradient(135deg, #c41e3a, #9d1830);
  color: #fff;
  border-radius: 50%;
  font-size: 1rem;
  box-shadow: 0 2px 6px rgba(196, 30, 58, .3);
}
.product-availability-note__body {
  display: flex;
  flex-direction: column;
  gap: .15rem;
  min-width: 0;
}
.product-availability-note__label {
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: #c41e3a;
}
.product-availability-note__date {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .4rem;
  font-size: .95rem;
  font-weight: 600;
  color: #2e2326;
}
.product-availability-note__pill {
  font-size: .76rem;
  font-weight: 700;
  color: #c41e3a;
  background: #fff;
  padding: .12rem .55rem;
  border-radius: 99px;
  border: 1px solid #f3d4da;
  white-space: nowrap;
}
