/* ============================================================
   PRODUCT DETAIL PAGE — product.css
   ============================================================ */

/* Reuse breadcrumb from category.css */
.cat-breadcrumb { background: #f0f1f7; border-bottom: 1px solid #e4e5ee; padding: .6rem 0; }
.breadcrumb { display: flex; align-items: center; gap: .4rem; font-size: .8rem; flex-wrap: wrap; }
.breadcrumb a { color: var(--text-muted); transition: color var(--transition); }
.breadcrumb a:hover { color: #4169e1; }
.breadcrumb__sep { color: #bbb; }
.breadcrumb__current { color: var(--text); font-weight: 600; }

.pd-page { background: #f7f8fc; min-height: 100vh; }

/* ============================================================
   MAIN PRODUCT GRID  (3 columns: gallery | info | buy-card)
   ============================================================ */
.pd-main { padding: 2rem 0; }
.pd-main__grid {
  display: grid;
grid-template-columns: 1fr 2fr 1fr;
  gap: 2rem;
  align-items: start;
}

/* ---- Gallery ---- */
.pd-gallery { display: flex; flex-direction: column; gap: .75rem; }

.pd-gallery__main {
  position: relative;
  background: #fff;
  border-radius: 12px;
  border: 1px solid #e4e5ee;
  overflow: hidden;
  aspect-ratio: 2/3;
  display: flex;
  align-items: center;
  justify-content: center;
}
.pd-gallery__main img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .3s ease;
}
.pd-gallery__main:hover img { transform: scale(1.03); }

.pd-gallery__zoom {
  position: absolute;
  bottom: .6rem;
  right: .6rem;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(255,255,255,.9);
  border: 1px solid #e4e5ee;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background var(--transition);
}
.pd-gallery__zoom:hover { background: #fff; }
.pd-gallery__zoom svg { width: 16px; height: 16px; stroke: #444; }

.pd-gallery__thumbs { display: flex; gap: .5rem; }
.pd-thumb {
  width: 58px;
  height: 80px;
  border-radius: 8px;
  border: 2px solid #e4e5ee;
  overflow: hidden;
  cursor: pointer;
  padding: 0;
  background: #fff;
  flex-shrink: 0;
  transition: border-color var(--transition);
}
.pd-thumb img { width: 100%; height: 100%; object-fit: cover; }
.pd-thumb.active, .pd-thumb:hover { border-color: #4169e1; }

/* Format tabs */
.pd-format-tabs { display: flex; flex-direction: column; gap: .4rem; }
.pd-format-tab {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .55rem .8rem;
  border-radius: 8px;
  border: 1.5px solid #e4e5ee;
  background: #fff;
  font-size: .8rem;
  font-weight: 600;
  font-family: var(--font);
  color: var(--text);
  cursor: pointer;
  transition: all var(--transition);
  text-align: left;
}
.pd-format-tab svg { width: 16px; height: 16px; stroke: #888; flex-shrink: 0; }
.pd-format-tab span { margin-left: auto; color: #4169e1; font-weight: 700; }
.pd-format-tab.active { border-color: #4169e1; background: #eef0fa; color: #4169e1; }
.pd-format-tab.active svg { stroke: #4169e1; }
.pd-format-tab:hover:not(.active) { border-color: #c5cbee; background: #f5f6fd; }

/* ---- Info ---- */
.pd-info { display: flex; flex-direction: column; gap: 1rem; }

.pd-info__badges { display: flex; gap: .5rem; flex-wrap: wrap; }
.pd-badge {
  font-size: .7rem;
  font-weight: 700;
  padding: .2rem .6rem;
  border-radius: 9999px;
}
.pd-badge--bestseller { background: #fff3e0; color: #e65100; border: 1px solid #ffcc80; }
.pd-badge--discount { background: #ffeaea; color: #e63946; border: 1px solid #ffb3b3; }
.pd-badge--new { background: #e8f0fe; color: #4169e1; border: 1px solid #c5d3f5; }

.pd-info__title {
  font-size: 1.75rem;
  font-weight: 800;
  line-height: 1.2;
  color: var(--text);
  margin: 0;
}

.pd-info__author {
  display: flex;
  align-items: center;
  gap: .75rem;
}
.pd-author-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  object-position: top;
  border: 2px solid #e4e5ee;
}
.pd-author-name {
  display: block;
  font-size: .9rem;
  font-weight: 700;
  color: #4169e1;
  text-decoration: none;
}
.pd-author-name:hover { text-decoration: underline; }
.pd-author-sub { font-size: .75rem; color: var(--text-muted); }

/* Rating row */
.pd-rating-row { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.pd-stars { display: flex; gap: 1px; }
.pd-star { font-size: 1.1rem; color: #ddd; }
.pd-star.filled { color: #f4a261; }
.pd-star.half { color: #f4a261; opacity: .5; }
.pd-rating-score { font-size: 1rem; font-weight: 800; color: var(--text); }
.pd-rating-count { font-size: .82rem; color: #4169e1; text-decoration: none; }
.pd-rating-count:hover { text-decoration: underline; }
.pd-sep { color: #ccc; }
.pd-reads { font-size: .82rem; color: var(--text-muted); }

/* Specs row */
.pd-specs-row {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
  padding: .9rem 1rem;
  background: #f5f6fa;
  border-radius: 10px;
  border: 1px solid #eee;
}
.pd-spec { display: flex; flex-direction: column; gap: .15rem; }
.pd-spec__label { font-size: .68rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: .06em; font-weight: 600; }
.pd-spec__val { font-size: .85rem; font-weight: 700; color: var(--text); }

/* Description */
.pd-desc { font-size: .88rem; line-height: 1.75; color: var(--text); }
.pd-desc p { margin-bottom: .75rem; }
.pd-desc p:last-child { margin-bottom: 0; }
.pd-desc__more { display: none; }
.pd-desc__more.visible { display: block; }

.pd-desc__toggle {
  background: none;
  border: none;
  color: #4169e1;
  font-size: .82rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
  font-family: var(--font);
  margin-top: -.25rem;
}
.pd-desc__toggle:hover { text-decoration: underline; }

/* Tags */
.pd-tags { display: flex; gap: .4rem; flex-wrap: wrap; }
.cat-tag {
  padding: .3rem .85rem;
  border-radius: 9999px;
  font-size: .78rem;
  font-weight: 600;
  background: #f0f1f7;
  color: var(--text);
  border: 1px solid #e4e5ee;
  text-decoration: none;
  transition: all var(--transition);
}
.cat-tag:hover { background: #eef0fa; color: #4169e1; border-color: #c5cbee; }

/* ---- Buy card ---- */
.pd-buy-card {
  background: #fff;
  border: 1px solid #e4e5ee;
  border-radius: 14px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  position: sticky;
  top: calc(var(--header-h) + 12px);
}

.pd-buy-card__price-row { display: flex; align-items: baseline; gap: .5rem; flex-wrap: wrap; }
.pd-buy-card__price { font-size: 2rem; font-weight: 800; color: var(--primary); }
.pd-buy-card__old { font-size: .9rem; color: var(--text-muted); text-decoration: line-through; }
.pd-buy-card__save {
  font-size: .75rem;
  font-weight: 700;
  background: #ffeaea;
  color: #e63946;
  padding: .15rem .5rem;
  border-radius: 9999px;
}

/* Stock */
.pd-stock {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: .82rem;
  font-weight: 600;
}
.pd-stock__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.pd-stock--in .pd-stock__dot { background: #2ecc71; box-shadow: 0 0 0 3px rgba(46,204,113,.2); }
.pd-stock--in { color: #27ae60; }
.pd-stock--out .pd-stock__dot { background: #e63946; }
.pd-stock--out { color: #e63946; }

/* Quantity */
.pd-qty-row { display: flex; align-items: center; gap: .75rem; }
.pd-qty-label { font-size: .82rem; color: var(--text-muted); font-weight: 600; }
.pd-qty {
  display: flex;
  align-items: center;
  gap: 0;
  border: 1.5px solid #e4e5ee;
  border-radius: 8px;
  overflow: hidden;
}
.pd-qty__btn {
  width: 32px;
  height: 32px;
  background: #f5f6fa;
  border: none;
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  color: var(--text);
  transition: background var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.pd-qty__btn:hover { background: #eef0fa; color: #4169e1; }
.pd-qty__val {
  min-width: 36px;
  text-align: center;
  font-size: .9rem;
  font-weight: 700;
  color: var(--text);
  border-left: 1.5px solid #e4e5ee;
  border-right: 1.5px solid #e4e5ee;
  padding: 0 .4rem;
  line-height: 32px;
}

/* CTA buttons */
.pd-cart-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  font-size: .9rem;
}
.pd-cart-btn svg { width: 17px; height: 17px; }

.pd-buy-now-btn {
  font-size: .88rem;
  background: #fff !important;
  color: #4169e1 !important;
  border: 2px solid #4169e1 !important;
}
.pd-buy-now-btn:hover {
  background: #eef0fa !important;
}

/* ---- Review Modal ---- */
.pd-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 900;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.pd-modal-overlay.active { display: flex; }
.pd-modal {
  background: #fff;
  border-radius: 16px;
  width: 100%;
  max-width: 480px;
  box-shadow: 0 20px 60px rgba(0,0,0,.2);
  animation: modalIn .2s ease;
}
@keyframes modalIn {
  from { opacity: 0; transform: translateY(20px) scale(.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.pd-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem 1rem;
  border-bottom: 1px solid #f0f1f7;
}
.pd-modal__header h3 { font-size: 1.05rem; font-weight: 700; }
.pd-modal__close {
  width: 30px; height: 30px;
  border-radius: 50%;
  border: none;
  background: #f0f1f7;
  cursor: pointer;
  font-size: .9rem;
  display: flex; align-items: center; justify-content: center;
  transition: background var(--transition);
}
.pd-modal__close:hover { background: #e4e5ee; }
.pd-modal__body { padding: 1.25rem 1.5rem; display: flex; flex-direction: column; gap: .9rem; }
.pd-modal__star-row { display: flex; gap: .35rem; justify-content: center; }
.pd-modal__star {
  font-size: 2rem;
  color: #ddd;
  cursor: pointer;
  transition: color .15s, transform .15s;
  line-height: 1;
}
.pd-modal__star.active, .pd-modal__star.hover { color: #f4a261; transform: scale(1.15); }
.pd-modal__star-label { text-align: center; font-size: .8rem; color: var(--text-muted); margin-top: -.4rem; }
.pd-modal__input, .pd-modal__textarea {
  width: 100%;
  padding: .65rem .9rem;
  border: 1.5px solid #e4e5ee;
  border-radius: 8px;
  font-size: .88rem;
  font-family: var(--font);
  color: var(--text);
  background: #f7f8fc;
  resize: vertical;
  transition: border-color var(--transition);
  box-sizing: border-box;
}
.pd-modal__input:focus, .pd-modal__textarea:focus { outline: none; border-color: #4169e1; background: #fff; }
.pd-modal__footer {
  display: flex;
  gap: .75rem;
  padding: 1rem 1.5rem 1.25rem;
  border-top: 1px solid #f0f1f7;
  justify-content: flex-end;
}

.pd-wishlist-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  width: 100%;
  background: none;
  border: none;
  font-size: .82rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  font-family: var(--font);
  padding: .3rem 0;
  transition: color var(--transition);
}
.pd-wishlist-btn:hover { color: #e63946; }
.pd-wishlist-btn svg { width: 16px; height: 16px; stroke: currentColor; }
.pd-wishlist-btn.active { color: #e63946; }
.pd-wishlist-btn.active svg { fill: #e63946; stroke: #e63946; }

/* Delivery info */
.pd-delivery-info {
  display: flex;
  flex-direction: column;
  gap: .65rem;
  padding-top: .75rem;
  border-top: 1px solid #f0f1f7;
}
.pd-delivery-row {
  display: flex;
  align-items: flex-start;
  gap: .6rem;
  font-size: .78rem;
}
.pd-delivery-row svg { width: 18px; height: 18px; stroke: #4169e1; flex-shrink: 0; margin-top: .1rem; }
.pd-delivery-row strong { display: block; font-weight: 700; color: var(--text); margin-bottom: .1rem; }
.pd-delivery-row span { color: var(--text-muted); }

/* Share */
.pd-share {
  display: flex;
  align-items: center;
  gap: .45rem;
  padding-top: .5rem;
  border-top: 1px solid #f0f1f7;
  font-size: .78rem;
  color: var(--text-muted);
  font-weight: 600;
}
.pd-share-btn {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .78rem;
  font-weight: 700;
  text-decoration: none;
  color: #fff;
  border: none;
  cursor: pointer;
  transition: opacity var(--transition);
}
.pd-share-btn:hover { opacity: .8; }
.pd-share-btn--fb { background: #1877f2; }
.pd-share-btn--tg { background: #0088cc; }
.pd-share-btn--wa { background: #25d366; }
.pd-share-btn--copy { background: #6c757d; }
.pd-share-btn--copy svg { width: 13px; height: 13px; stroke: #fff; }

/* ============================================================
   TABS SECTION
   ============================================================ */
.pd-tabs-section {
  background: #fff;
  border-top: 1px solid #e4e5ee;
  padding: 2rem 0 3rem;
}

.pd-tabs {
  display: flex;
  gap: 0;
  border-bottom: 2px solid #e4e5ee;
  margin-bottom: 2rem;
}
.pd-tab {
  padding: .75rem 1.5rem;
  background: none;
  border: none;
  font-size: .9rem;
  font-weight: 600;
  font-family: var(--font);
  color: var(--text-muted);
  cursor: pointer;
  position: relative;
  transition: color var(--transition);
  display: flex;
  align-items: center;
  gap: .4rem;
}
.pd-tab::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 2px;
  background: #4169e1;
  transform: scaleX(0);
  transition: transform var(--transition);
}
.pd-tab.active { color: #4169e1; }
.pd-tab.active::after { transform: scaleX(1); }
.pd-tab:hover:not(.active) { color: var(--text); }

.pd-tab-count {
  background: #eef0fa;
  color: #4169e1;
  border-radius: 9999px;
  font-size: .7rem;
  padding: .1rem .45rem;
  font-weight: 700;
}

.pd-tab-panel { display: none; }
.pd-tab-panel.active { display: block; }

/* Details table */
.pd-details-grid {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 2.5rem;
  align-items: start;
}
.pd-details-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .85rem;
}
.pd-details-table tr { border-bottom: 1px solid #f0f1f7; }
.pd-details-table tr:last-child { border-bottom: none; }
.pd-details-table td { padding: .6rem .5rem; vertical-align: top; }
.pd-details-table td:first-child { color: var(--text-muted); font-weight: 600; width: 140px; }
.pd-details-table td:last-child { color: var(--text); font-weight: 500; }

.pd-details-desc h3 { font-size: 1rem; font-weight: 700; margin-bottom: .5rem; margin-top: 1.25rem; }
.pd-details-desc h3:first-child { margin-top: 0; }
.pd-details-desc p { font-size: .87rem; color: var(--text-muted); line-height: 1.7; margin-bottom: .75rem; }

/* Reviews */
.pd-reviews-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 2.5rem;
  align-items: start;
}
.pd-review-summary {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .4rem;
  background: #f7f8fc;
  border-radius: 12px;
  border: 1px solid #e4e5ee;
  padding: 1.5rem 1rem;
  text-align: center;
}
.pd-review-score { font-size: 3rem; font-weight: 800; color: var(--text); line-height: 1; }
.pd-review-stars { font-size: 1.3rem; color: #f4a261; }
.pd-review-total { font-size: .78rem; color: var(--text-muted); margin-bottom: .5rem; }

.pd-review-bars { width: 100%; display: flex; flex-direction: column; gap: .3rem; margin-bottom: .5rem; }
.pd-review-bar { display: flex; align-items: center; gap: .4rem; font-size: .72rem; color: var(--text-muted); }
.pd-bar { flex: 1; height: 6px; background: #e4e5ee; border-radius: 9999px; overflow: hidden; }
.pd-bar__fill { height: 100%; background: #f4a261; border-radius: 9999px; }

.pd-write-review-btn {
    width: 100%;
    font-size: .82rem;
    margin-top: .5rem;
    background-color: #4169e1;
    color: white;
        justify-content: center;
}

.pd-reviews-list { display: flex; flex-direction: column; gap: 1.25rem; }
.pd-review-card {
  background: #f7f8fc;
  border-radius: 10px;
  border: 1px solid #e4e5ee;
  padding: 1.1rem 1.25rem;
}
.pd-review-card__header {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-bottom: .75rem;
}
.pd-review-card__avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #4169e1;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .72rem;
  font-weight: 700;
  flex-shrink: 0;
}
.pd-review-card__meta { flex: 1; }
.pd-review-card__name { display: block; font-size: .85rem; font-weight: 700; color: var(--text); }
.pd-review-card__date { font-size: .72rem; color: var(--text-muted); }
.pd-review-card__stars { font-size: .9rem; color: #f4a261; }
.pd-review-card__text { font-size: .85rem; line-height: 1.65; color: var(--text); margin-bottom: .75rem; }
.pd-review-card__helpful { display: flex; gap: .5rem; }
.pd-helpful-btn {
  background: #fff;
  border: 1px solid #e4e5ee;
  border-radius: 9999px;
  padding: .2rem .65rem;
  font-size: .75rem;
  cursor: pointer;
  font-family: var(--font);
  color: var(--text-muted);
  transition: all var(--transition);
}
.pd-helpful-btn:hover { border-color: #4169e1; color: #4169e1; }

.pd-more-reviews-btn { align-self: flex-start; font-size: .85rem; }

/* Similar grid */
.pd-similar-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1rem;
}

/* ============================================================
   ZOOM OVERLAY
   ============================================================ */
.pd-zoom-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.85);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}
.pd-zoom-overlay.active { display: flex; }
.pd-zoom-overlay img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 8px;
}
.pd-zoom-overlay__close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255,255,255,.15);
  border: 1px solid rgba(255,255,255,.3);
  color: #fff;
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ============================================================
   PRODUCT VARIANTS
   ============================================================ */
.pd-variants { margin-bottom: 1rem; }
.pd-variants__title {
  font-size: .9rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 1rem;
  padding-bottom: .5rem;
  border-bottom: 1px dashed var(--border);
}

.pd-variant-group { margin-bottom: 1.25rem; }
.pd-variant-label {
  display: block;
  font-size: .8rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: .5rem;
  text-transform: uppercase;
  letter-spacing: .03em;
}

/* Format Options */
.pd-format-options {
  display: flex;
  flex-direction: column;
  gap: .5rem;
}
.pd-format-radio {
  display: block;
  cursor: pointer;
}
.pd-format-radio input { display: none; }
.pd-format-radio__content {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .75rem .9rem;
  background: #f8f9fa;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  transition: all .2s ease;
}
.pd-format-radio__content svg {
  width: 22px;
  height: 22px;
  color: var(--text-muted);
  flex-shrink: 0;
}
.pd-format-radio:hover .pd-format-radio__content {
  border-color: var(--primary-light);
}
.pd-format-radio.active .pd-format-radio__content {
  border-color: var(--primary);
  background: #fff;
  box-shadow: 0 2px 8px rgba(230,57,70,.1);
}
.pd-format-radio.active .pd-format-radio__content svg {
  color: var(--primary);
}
.pd-format-price {
  margin-left: auto;
  font-weight: 700;
  color: var(--primary);
  font-size: .9rem;
}

/* Cover Options */
.pd-cover-options {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: .5rem;
}
.pd-cover-radio {
  display: block;
  cursor: pointer;
  position: relative;
}
.pd-cover-radio input { display: none; }
.pd-cover-radio img,
.pd-cover-color {
  width: 100%;
  aspect-ratio: 1;
  border-radius: var(--radius-sm);
  border: 2px solid var(--border);
  transition: all .2s ease;
  object-fit: cover;
}
.pd-cover-color {
  display: block;
}
.pd-cover-radio:hover img,
.pd-cover-radio:hover .pd-cover-color {
  border-color: var(--primary-light);
}
.pd-cover-radio.active img,
.pd-cover-radio.active .pd-cover-color {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(230,57,70,.15);
}
.pd-cover-info {
  display: block;
  margin-top: .35rem;
}
.pd-cover-name {
  display: block;
  font-size: .75rem;
  color: var(--text);
  font-weight: 500;
  line-height: 1.3;
}
.pd-cover-price {
  display: block;
  font-size: .7rem;
  color: var(--success);
  font-weight: 600;
}
.pd-cover-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  width: 20px;
  height: 20px;
  background: var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .7rem;
}

/* Selected Variant Price */
.pd-selected-variant {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .75rem 1rem;
  background: linear-gradient(135deg, rgba(230,57,70,.08) 0%, rgba(230,57,70,.03) 100%);
  border: 1px solid rgba(230,57,70,.2);
  border-radius: var(--radius);
  margin-top: 1rem;
}
.pd-selected-variant > span:first-child {
  font-size: .85rem;
  color: var(--text-muted);
}
.pd-variant-total {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--primary);
}

/* Hide cover/size options for non-physical formats */
.pd-format-radio[data-format="ekitab"].active ~ #coverVariantGroup,
.pd-format-radio[data-format="ekitab"].active ~ #sizeVariantGroup,
.pd-format-radio[data-format="audio"].active ~ #coverVariantGroup,
.pd-format-radio[data-format="audio"].active ~ #sizeVariantGroup {
  display: none;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1100px) {
  .pd-main__grid { grid-template-columns: 220px 1fr 270px; gap: 1.25rem; }
  .pd-similar-grid { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 900px) {
  .pd-main__grid { grid-template-columns: 1fr; }
  .pd-gallery { flex-direction: row; flex-wrap: wrap; align-items: flex-start; }
  .pd-gallery__main { width: 200px; flex-shrink: 0; }
  .pd-gallery__thumbs { flex-direction: column; }
  .pd-gallery__thumbs { width: auto; }
  .pd-format-tabs { flex-direction: row; flex-wrap: wrap; width: 100%; }
  .pd-buy-card { position: static; }
  .pd-details-grid { grid-template-columns: 1fr; gap: 1.5rem; }
  .pd-reviews-layout { grid-template-columns: 1fr; }
  .pd-similar-grid { grid-template-columns: repeat(3, 1fr); }

  /* Variants tablet */
  .pd-cover-options {
    grid-template-columns: repeat(5, 1fr);
  }
  .pd-format-options {
    flex-direction: row;
    flex-wrap: wrap;
  }
  .pd-format-radio {
    flex: 1;
    min-width: 140px;
  }
}

@media (max-width: 600px) {
  .pd-info__title { font-size: 1.35rem; }
  .pd-specs-row { gap: .75rem; }
  .pd-similar-grid { grid-template-columns: repeat(2, 1fr); }
  .pd-tabs { overflow-x: auto; }
  .pd-tab { white-space: nowrap; padding: .65rem 1rem; }

  /* Gallery mobile - more user friendly */
  .pd-gallery {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
  }
  .pd-gallery__main {
    width: 100%;
    max-width: 280px;
    margin: 0 auto;
    aspect-ratio: 2/3;
  }
  .pd-gallery__thumbs {
    flex-direction: row;
    justify-content: center;
    gap: .75rem;
    width: 100%;
  }
  .pd-thumb {
    width: 70px;
    height: 95px;
    border-radius: 10px;
    border-width: 2px;
  }
  .pd-gallery__zoom {
    width: 40px;
    height: 40px;
    bottom: .75rem;
    right: .75rem;
  }
  .pd-gallery__zoom svg {
    width: 20px;
    height: 20px;
  }

  /* Format tabs mobile - touch friendly */
  .pd-format-tabs {
    flex-direction: column;
    gap: .5rem;
  }
  .pd-format-tab {
    padding: .875rem 1rem;
    font-size: .9rem;
    min-height: 48px;
  }
  .pd-format-tab svg {
    width: 20px;
    height: 20px;
  }

  /* Variant selection mobile */
  .pd-variants__title { font-size: .85rem; }
  .pd-format-radio__content {
    padding: .65rem .75rem;
    font-size: .85rem;
  }
  .pd-format-radio__content svg {
    width: 18px;
    height: 18px;
  }
  .pd-cover-options {
    grid-template-columns: repeat(2, 1fr);
  }
  .pd-cover-name { font-size: .7rem; }
  .pd-selected-variant {
    padding: .6rem .8rem;
  }
  .pd-variant-total {
    font-size: 1rem;
  }
}

@media (max-width: 480px) {
  /* Gallery small mobile */
  .pd-gallery__main {
    max-width: 240px;
  }
  .pd-thumb {
    width: 60px;
    height: 82px;
  }
  .pd-format-tab {
    padding: .75rem .875rem;
    font-size: .85rem;
  }
}
