/* =========================================================
   PRODUCT PAGE
========================================================= */

body {
  margin: 0;
  padding: 0;
}

.product-page {
  display: flex;
  flex-wrap: nowrap;
  justify-content: space-between;
  align-items: flex-start;
  background: #fafafa;
  color: #222;
  font-family: 'Roboto', sans-serif;
  padding: 28px 0 0;
}

/* Hidden gallery — images fed to the slider via JS */
.pd-hidden-gallery {
  display: none;
}

/* ── Gallery info (short desc / bullets under slider, desktop only) ── */
.pd-gallery-info {
  display: none;
}

@media (min-width: 1400px) {
  .product-gallery {
    padding-left: 24px;
  }

  .pd-gallery-info {
    display: block;
    max-width: 650px;
    padding: 20px 8px 0;
  }

  .pd-bullets {
    list-style: none;
    margin: 0;
    padding: 0;
  }

  .pd-bullets li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid #edf4f4;
    font-size: 0.95rem;
    color: #333;
    line-height: 1.5;
  }

  .pd-bullets li::before {
    content: '✓';
    color: #0b6b6a;
    font-weight: 700;
    flex-shrink: 0;
    margin-top: 1px;
  }

  .pd-gallery-short {
    font-size: 0.95rem;
    color: #444;
    line-height: 1.6;
    margin: 0;
  }
}

/* =========================================================
   PRODUCT INFO COLUMN
========================================================= */

.product-info {
  flex: 1 1 45%;
  max-width: 600px;
  padding: 40px 40px 48px 56px;
}

.product-title {
  font-size: 2.2rem;
  font-weight: 700;
  margin: 10px 0 6px;
  color: #0b6b6a;
  line-height: 1.2;
}

.product-category {
  color: #999;
  font-size: 0.88rem;
  margin: 0;
  letter-spacing: 0.2px;
}

/* ── Divider ─────────────────────────────────────────────── */

.pd-divider {
  border: none;
  border-top: 1px solid #e6eeee;
  margin: 18px 0;
}

/* ── Price row ───────────────────────────────────────────── */

.pd-price-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.product-price {
  font-size: 1.8rem;
  font-weight: 700;
  color: #0b6b6a;
  line-height: 1;
}

.product-compare-price {
  font-size: 1rem;
  color: #bbb;
  text-decoration: line-through;
}

.pd-stock-badge {
  display: none;
  font-size: 0.76rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
  line-height: 1.5;
}

.pd-stock-badge.low {
  display: inline-block;
  background: #fff3e0;
  color: #e07b00;
  border: 1px solid #f5c472;
}

.pd-stock-badge.critical {
  display: inline-block;
  background: #ffe5e5;
  color: #cc0000;
  border: 1px solid #ffaaaa;
}

/* ── Descriptions ─────────────────────────────────────────── */

.product-short-desc {
  font-size: 1rem;
  font-weight: 500;
  color: #333;
  line-height: 1.55;
  margin: 0 0 12px;
}

.pd-desc-wrap {
  position: relative;
}

.product-desc {
  font-size: 0.95rem;
  line-height: 1.7;
  color: #555;
  margin: 0;
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
}

.pd-desc-wrap.expanded .product-desc {
  -webkit-line-clamp: unset;
  display: block;
}

.pd-read-more {
  background: none;
  border: none;
  color: #0b6b6a;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  padding: 6px 0 0;
  display: none;
  touch-action: manipulation;
}

.pd-read-more:hover {
  text-decoration: underline;
}

/* ── Shipping note ───────────────────────────────────────── */

.pd-shipping-note {
  display: none;
  font-size: 0.82rem;
  color: #6b7280;
  margin: 4px 0 0;
}

/* ── Seller strip ─────────────────────────────────────────── */

.pd-seller-strip {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 0;
}

.pd-seller-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #0b6b6a;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 17px;
  font-weight: 700;
  flex-shrink: 0;
}

.pd-seller-info {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.pd-seller-label {
  font-size: 0.75rem;
  color: #aaa;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.pd-seller-name-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.pd-seller-name {
  font-size: 0.92rem;
  font-weight: 700;
  color: #222;
}

.pd-verified-badge {
  display: none;
  align-items: center;
  font-size: 0.7rem;
  font-weight: 700;
  color: #0b6b6a;
  background: #e8f5f5;
  border: 1px solid #b8dede;
  border-radius: 20px;
  padding: 2px 9px;
  white-space: nowrap;
  letter-spacing: 0.2px;
}

.pd-verified-badge.show {
  display: inline-flex;
}

.pd-seller-link {
  font-size: 0.82rem;
  color: #0b6b6a;
  text-decoration: none;
  font-weight: 500;
}

.pd-seller-link:hover {
  text-decoration: underline;
}

/* ── Quantity stepper ─────────────────────────────────────── */

.pd-qty-wrap {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}

.pd-qty-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: #444;
}

.pd-qty-stepper {
  display: flex;
  align-items: stretch;
  border: 1.5px solid #0b6b6a;
  border-radius: 8px;
  overflow: hidden;
}

.pd-qty-btn {
  width: 44px;
  height: 44px;
  background: none;
  border: none;
  font-size: 1.3rem;
  color: #0b6b6a;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
  touch-action: manipulation;
}

.pd-qty-btn:hover {
  background: #eaf5f5;
}

.pd-qty-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.pd-qty-val {
  min-width: 48px;
  text-align: center;
  font-size: 1rem;
  font-weight: 700;
  color: #222;
  border-left: 1.5px solid #0b6b6a;
  border-right: 1.5px solid #0b6b6a;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ── Action buttons ───────────────────────────────────────── */

.product-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}

.product-actions button {
  width: 100%;
  padding: 13px 0;
  font-size: 1.05rem;
  cursor: pointer;
  border-radius: 8px;
  transition: all 0.2s ease;
  font-weight: 600;
  text-align: center;
  touch-action: manipulation;
}

.btn-add {
  background: #fff;
  border: 1.5px solid #0b6b6a;
  color: #0b6b6a;
}

.btn-add:hover {
  background: #0b6b6a;
  color: #fff;
}

.btn-buy {
  background: #ff7f32;
  border: 1.5px solid #ff7f32;
  color: #fff;
}

.btn-buy:hover {
  background: #e86c22;
  border-color: #e86c22;
}

.product-actions button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  filter: grayscale(60%);
}

/* ── Coming Soon state ────────────────────────────────── */
.btn-coming-soon {
  background: #f3f4f6 !important;
  border-color: #d1d5db !important;
  color: #6b7280 !important;
  opacity: 1 !important;
  filter: none !important;
  cursor: not-allowed !important;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.pd-coming-soon-banner {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 12px 0;
  padding: 10px 16px;
  background: #fef3c7;
  border: 1.5px solid #f59e0b;
  border-radius: 8px;
  color: #92400e;
  font-size: 0.9rem;
  line-height: 1.4;
}

/* =========================================================
   RELATED PRODUCTS
========================================================= */

.pd-related {
  display: none;
  padding: 52px 5%;
  background: #f0f8f8;
  border-top: 1px solid #ddeaea;
}

.pd-related-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: #0b6b6a;
  margin: 0 0 24px;
}

.pd-related-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.pd-rel-card {
  text-decoration: none;
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid #e0eeee;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.2s, transform 0.2s;
}

.pd-rel-card:hover {
  box-shadow: 0 6px 20px rgba(11, 107, 106, 0.13);
  transform: translateY(-3px);
}

.pd-rel-img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  background: #f3f3f3;
  display: block;
}

.pd-rel-info {
  padding: 12px 14px 14px;
}

.pd-rel-name {
  font-size: 0.9rem;
  font-weight: 600;
  color: #222;
  margin: 0 0 5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pd-rel-price {
  font-size: 0.95rem;
  font-weight: 700;
  color: #0b6b6a;
  margin: 0;
}

/* =========================================================
   RESPONSIVE
========================================================= */

@media (max-width: 1400px) {
  .product-page {
    flex-direction: column;
    align-items: center;
    margin-top: 20px;
  }

  .product-info {
    width: 100%;
    max-width: 100%;
    padding: 28px 24px 36px;
  }

  .pd-related-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 900px) {
  .pd-related-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .product-title {
    font-size: 1.7rem;
  }

  .product-info {
    padding: 20px 14px 28px;
  }

  .pd-price-row {
    flex-wrap: wrap;
    gap: 6px;
  }

  .pd-qty-btn {
    width: 48px;
    height: 48px;
  }

  .pd-qty-val {
    min-width: 44px;
  }

  .pd-seller-strip {
    flex-wrap: wrap;
  }

  .pd-related {
    padding: 32px 14px;
  }

  .pd-related-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .pd-rel-name {
    font-size: 0.82rem;
  }

  /* iOS zoom prevention */
  .product-actions button {
    font-size: 1rem;
    padding: 14px 0;
  }
}

/* =========================================================
   TABLET LANDSCAPE — tighten product info below full-width gallery
========================================================= */
@media (min-width: 768px) and (max-width: 1399px) and (orientation: landscape) {
  .product-info {
    max-width: 860px;
    margin: 0 auto;
    padding: 20px 40px 32px;
  }

  .product-title {
    font-size: 1.7rem;
  }
}

/* =========================================================
   MOBILE LANDSCAPE — compact product info below full-width gallery
========================================================= */
@media (max-width: 767px) and (orientation: landscape) {
  .product-info {
    padding: 14px 18px 24px;
  }

  .product-title {
    font-size: 1.2rem;
    margin: 4px 0;
  }

  .product-price {
    font-size: 1.3rem;
  }

  .pd-divider {
    margin: 10px 0;
  }

  .product-short-desc {
    font-size: 0.88rem;
  }

  .product-desc {
    font-size: 0.85rem;
  }

  .pd-qty-wrap {
    margin-bottom: 8px;
  }

  .product-actions button {
    padding: 10px 0;
  }
}

/* ================================
   VARIANT SELECTORS
================================ */

#pd-variants {
  margin-bottom: 4px;
}

.pd-variant-group {
  margin-bottom: 14px;
}

.pd-variant-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: #374151;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}

.pd-variant-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pd-variant-pill {
  padding: 7px 16px;
  border: 1.5px solid #d1d5db;
  border-radius: 6px;
  background: #fff;
  color: #374151;
  font-size: 0.875rem;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}

.pd-variant-pill:hover {
  border-color: #0b6b6a;
  color: #0b6b6a;
}

.pd-variant-pill.selected {
  border-color: #0b6b6a;
  background: #0b6b6a;
  color: #fff;
}

.pd-variant-pill.oos {
  opacity: 0.4;
  cursor: not-allowed;
  text-decoration: line-through;
}

/* ================================
   ADD-ONS / EXTRAS
================================ */

#pd-addons {
  margin-bottom: 4px;
}

.pd-addons-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: #374151;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 10px;
}

.pd-addon-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1.5px solid #e5e7eb;
  border-radius: 8px;
  margin-bottom: 8px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  -webkit-user-select: none;
  user-select: none;
}

.pd-addon-item:hover {
  border-color: #0b6b6a;
}

.pd-addon-item.selected {
  border-color: #0b6b6a;
  background: #f0fafa;
}

.pd-addon-item input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: #0b6b6a;
  cursor: pointer;
  flex-shrink: 0;
}

.pd-addon-info {
  flex: 1;
}

.pd-addon-name {
  font-size: 0.9rem;
  font-weight: 500;
  color: #111827;
}

.pd-addon-desc {
  font-size: 0.78rem;
  color: #6b7280;
  margin-top: 1px;
}

.pd-addon-price {
  font-size: 0.9rem;
  font-weight: 600;
  color: #0b6b6a;
  white-space: nowrap;
}

.pd-addon-thumb {
  width: 56px;
  height: 56px;
  object-fit: cover;
  border-radius: 6px;
  flex-shrink: 0;
  border: 1px solid #e5e7eb;
}

/* ── Colour swatches ── */

.pd-color-swatch {
  display: inline-block;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid #e5e7eb;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
  -webkit-appearance: none;
  appearance: none;
  overflow: hidden;
  transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s;
}

.pd-color-swatch:hover {
  border-color: #9ca3af;
  transform: scale(1.12);
}

.pd-color-swatch.selected {
  border-color: #0b6b6a;
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px #0b6b6a;
  transform: scale(1.12);
}

.pd-swatch-selected-name {
  font-size: 0.85rem;
  color: #374151;
  margin-left: 8px;
  align-self: center;
}

/* ── Image thumbnail swatches ── */
.pd-img-swatch {
  width: 58px;
  height: 58px;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  padding: 0;
  background: #f9fafb;
  transition: border-color 0.15s, box-shadow 0.15s;
  flex-shrink: 0;
}
.pd-img-swatch img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.pd-img-swatch span {
  font-size: 11px;
  color: #374151;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: 4px;
  text-align: center;
  line-height: 1.2;
}
.pd-img-swatch:hover { border-color: #0b6b6a; }
.pd-img-swatch.selected {
  border-color: #0b6b6a;
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px #0b6b6a;
}
