/* ============================================================
   WHIEDA Marketplace — CSS страницы товара
   ============================================================ */

/* ---------- Product Detail Layout ---------- */
.pdp {
  display: grid; gap: 30px;
  grid-template-columns: 1fr;
  margin-bottom: 40px;
}
@media (min-width: 900px) {
  .pdp {
    grid-template-columns: minmax(0, 500px) minmax(0, 1fr);
    align-items: start;
  }
}

/* ---------- Gallery ---------- */
.pdp-gallery {
  position: sticky;
  top: 90px;
}
.pdp-main-photo {
  aspect-ratio: 3/4;
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--paper);
  box-shadow: var(--sh-md);
  position: relative;
}
.pdp-main-photo img {
  width: 100%; height: 100%;
  object-fit: cover;
}
.pdp-badge {
  position: absolute; top: 16px; left: 16px;
  padding: 6px 14px;
  border-radius: var(--r-full);
  font-size: 12px; font-weight: 800; text-transform: uppercase;
  letter-spacing: 0.06em;
  background: var(--warm); color: #8B6914;
  box-shadow: var(--sh);
}

/* ---------- Product Info ---------- */
.pdp-info {
  display: flex; flex-direction: column; gap: 20px;
}
.pdp-brand {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--acc-2); font-weight: 700; font-size: 13px;
  text-transform: uppercase; letter-spacing: 0.05em;
}
.pdp-h1 {
  font-size: clamp(24px, 3.4vw, 36px);
  line-height: 1.15;
  margin: 4px 0 0;
}
.pdp-meta {
  display: flex; flex-wrap: wrap; gap: 16px;
  font-size: 13.5px; color: var(--mut);
  padding: 12px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.pdp-meta > div {
  display: flex; align-items: center; gap: 6px;
}
.pdp-meta b { color: var(--ink-2); font-weight: 700; }
.pdp-meta svg { color: var(--acc); flex: 0 0 auto; }

/* Rating stars */
.pdp-rating {
  display: flex; align-items: center; gap: 10px;
  font-size: 14px;
}
.pdp-stars {
  display: inline-flex; gap: 2px;
  color: #F5A623;
}
.pdp-stars svg { width: 18px; height: 18px; }

/* ---------- Price block ---------- */
.pdp-price-block {
  padding: 22px 24px;
  border-radius: var(--r-md);
}
.pdp-price-row {
  display: flex; align-items: baseline; gap: 12px;
  flex-wrap: wrap;
}
.pdp-price {
  font-size: 42px; font-weight: 800;
  color: var(--acc-2);
  letter-spacing: -0.03em; line-height: 1;
}
.pdp-price-old {
  font-size: 20px; font-weight: 500;
  color: var(--mut);
  text-decoration: line-through;
}
.pdp-delivery {
  display: flex; align-items: center; gap: 8px;
  margin-top: 10px;
  font-size: 13.5px; color: var(--mut);
}
.pdp-delivery b { color: var(--ink-2); font-weight: 700; }
.pdp-delivery svg { color: var(--acc); flex: 0 0 auto; }

/* CTA */
.pdp-cta {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 20px;
}
.pdp-btn-buy {
  padding: 16px 24px;
  border-radius: var(--r);
  background: var(--acc); color: var(--white);
  font-size: 15px; font-weight: 800;
  box-shadow: var(--sh-acc);
  transition: var(--tr);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
}
.pdp-btn-buy:hover { background: var(--acc-2); transform: translateY(-1px); }
.pdp-btn-cart {
  padding: 16px 20px;
  border-radius: var(--r);
  background: var(--white); color: var(--ink);
  border: 1.5px solid var(--bd);
  font-size: 15px; font-weight: 700;
  transition: var(--tr);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
}
.pdp-btn-cart:hover { background: var(--ink); color: var(--white); border-color: var(--ink); }

/* Trust signals */
.pdp-signals {
  display: grid; gap: 10px;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}
.pdp-signal {
  display: flex; align-items: center; gap: 10px;
  font-size: 13.5px; color: var(--ink);
}
.pdp-signal svg {
  color: var(--acc-2);
  flex: 0 0 auto;
}
.pdp-signal b { font-weight: 700; }

/* ---------- Tabs ---------- */
.pdp-tabs {
  margin-top: 40px;
}
.pdp-tabs-nav {
  display: flex; flex-wrap: wrap; gap: 4px;
  padding: 4px;
  border-radius: var(--r);
  background: var(--glass);
  border: 1px solid var(--bd);
  backdrop-filter: var(--glass-blur);
  margin-bottom: 20px;
}
.pdp-tab-btn {
  padding: 10px 16px;
  border-radius: var(--r-sm);
  font-weight: 600; font-size: 14px;
  color: var(--mut);
  cursor: pointer;
  transition: var(--tr);
}
.pdp-tab-btn:hover { color: var(--ink); background: rgba(255,255,255,0.6); }
.pdp-tab-btn.is-on {
  background: var(--ink); color: var(--white);
}
.pdp-tab {
  display: none;
  padding: 24px;
  border-radius: var(--r-md);
  animation: fadeIn 0.3s ease;
}
.pdp-tab.is-on { display: block; }
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}
.pdp-tab h3 {
  font-size: 20px; font-weight: 800;
  margin: 0 0 12px;
}
.pdp-tab p, .pdp-tab li {
  font-size: 15px; line-height: 1.65;
  color: var(--ink);
}
.pdp-tab ul {
  padding-left: 20px;
  margin: 0 0 12px;
}
.pdp-tab li { margin-bottom: 6px; }
.pdp-tab .ingredient {
  padding: 14px 16px;
  border-radius: var(--r-sm);
  background: var(--acc-soft);
  margin-bottom: 10px;
}
.pdp-tab .ingredient h4 {
  font-size: 15px; font-weight: 800;
  margin: 0 0 4px;
  color: var(--acc-2);
}
.pdp-tab .ingredient p {
  font-size: 14px;
  margin: 0;
}

/* ---------- Reviews ---------- */
.pdp-reviews {
  margin-top: 48px;
}
.pdp-reviews-hdr {
  display: flex; align-items: center; justify-content: space-between;
  gap: 20px; flex-wrap: wrap;
  margin-bottom: 20px;
}
.pdp-reviews-hdr h2 {
  margin: 0;
  font-size: 26px;
}
.pdp-reviews-summary {
  display: flex; align-items: center; gap: 14px;
}
.pdp-rating-big {
  font-size: 40px; font-weight: 800;
  color: var(--ink);
  line-height: 1;
}
.pdp-rating-info {
  font-size: 13px; color: var(--mut);
}
.pdp-rating-info .pdp-stars { margin-bottom: 2px; }
.pdp-reviews-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}
@media (min-width: 800px) {
  .pdp-reviews-grid { grid-template-columns: 1fr 1fr; }
}
.pdp-review {
  padding: 20px 22px;
  border-radius: var(--r-md);
}
.pdp-review-hdr {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.pdp-review-author {
  font-weight: 800;
  color: var(--ink);
}
.pdp-review-date {
  font-size: 12px; color: var(--mut);
}
.pdp-review-stars {
  color: #F5A623;
  margin-bottom: 8px;
}
.pdp-review-stars svg { width: 14px; height: 14px; }
.pdp-review-text {
  font-size: 14.5px; line-height: 1.55;
  color: var(--ink);
  margin: 0;
}

/* ---------- Related products ---------- */
.pdp-related {
  margin-top: 48px;
}
.pdp-related h2 {
  margin-bottom: 20px;
  font-size: 26px;
}
.pdp-related-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
@media (min-width: 640px) { .pdp-related-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 900px) { .pdp-related-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* ---------- Sticky mobile buy bar ---------- */
.pdp-sticky-bar {
  display: none;
  position: fixed; left: 0; right: 0; bottom: 0;
  z-index: 60;
  padding: 12px 16px;
  background: var(--white);
  border-top: 1px solid var(--bd);
  box-shadow: 0 -6px 20px rgba(15,93,75,0.08);
  gap: 10px;
  align-items: center;
}
.pdp-sticky-bar .price-mini {
  flex: 1 1 auto;
  font-size: 18px; font-weight: 800;
  color: var(--acc-2);
}
.pdp-sticky-bar button {
  padding: 12px 20px;
  border-radius: var(--r-sm);
  font-weight: 700; font-size: 14px;
}
.pdp-sticky-bar .buy {
  background: var(--acc); color: var(--white);
}
@media (max-width: 899px) {
  .pdp-sticky-bar { display: flex; }
  body.has-sticky-bar { padding-bottom: 70px; }
  .pdp-gallery { position: static; }
}

/* ---------- Mobile improvements ---------- */
@media (max-width: 640px) {
  .pdp-price { font-size: 32px; }
  .pdp-cta { grid-template-columns: 1fr 1fr; }
  .pdp-tabs-nav { overflow-x: auto; flex-wrap: nowrap; }
  .pdp-tab-btn { white-space: nowrap; }
  .pdp-tab { padding: 18px; }
  .pdp-reviews-hdr h2 { font-size: 22px; }
}
