/* ══════════════════════════════════════════
   ElektroGH.wien – Product Detail Styles
   ══════════════════════════════════════════ */

.product-detail {
  max-width: 1280px;
  margin: 0 auto;
  padding: 24px 32px 48px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
}

/* ──────────── GALLERY ──────────── */
.gallery {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.gallery-main {
  background: var(--surface);
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-lg);
  height: 420px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.gallery-main .lucide { width: 120px; height: 120px; color: var(--muted-light); }
.gallery-thumbs {
  display: flex;
  gap: 8px;
}
.gallery-thumb {
  width: 72px; height: 72px;
  background: var(--surface);
  border: 2px solid var(--border-light);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s;
}
.gallery-thumb .lucide { width: 28px; height: 28px; color: var(--muted); }
.gallery-thumb:hover { border-color: var(--yellow); }
.gallery-thumb.active { border-color: var(--yellow); background: var(--yellow-light); }

/* ──────────── PRODUCT INFO ──────────── */
.product-detail-info { display: flex; flex-direction: column; gap: 20px; }

.product-detail-brand {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.product-detail-name {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--black);
  line-height: 1.15;
  letter-spacing: -0.02em;
}
.product-detail-meta {
  font-size: 0.85rem;
  color: var(--muted);
  font-family: 'DM Mono', monospace;
  display: flex;
  align-items: center;
  gap: 12px;
}
.product-avail {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--green);
  font-family: 'Plus Jakarta Sans', sans-serif;
}
.product-avail .dot {
  width: 8px; height: 8px;
  background: var(--green);
  border-radius: 50%;
}

/* ──────────── PRICE BLOCK ──────────── */
.price-block {
  background: var(--yellow-light);
  border: 1.5px solid #ffe08a;
  border-radius: var(--radius);
  padding: 24px;
}
.price-main {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--black);
  letter-spacing: -0.02em;
}
.price-main sub { font-size: 0.75rem; font-weight: 500; color: var(--muted); }
.price-old {
  font-size: 1rem;
  color: var(--muted-light);
  text-decoration: line-through;
  margin-left: 10px;
}
.price-note {
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 4px;
}

.volume-pricing {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.volume-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
  padding: 6px 10px;
  background: rgba(255,255,255,0.7);
  border-radius: 6px;
}
.volume-row .qty { color: var(--muted); }
.volume-row .price { font-weight: 700; color: var(--black); }
.volume-table { width: 100%; border-collapse: collapse; font-size: 0.82rem; }
.volume-table th { text-align: left; padding: 8px 10px; background: var(--bg-warm); font-weight: 700; font-size: 0.78rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.3px; }
.volume-table td { padding: 8px 10px; border-bottom: 1px solid var(--border-light); }
.volume-table tr:last-child td { border-bottom: none; }
.volume-table td:nth-child(3) { color: var(--yellow); font-weight: 700; }

/* ──────────── ADD TO CART WIDGET ──────────── */
.atc-widget {
  display: flex;
  gap: 12px;
  align-items: center;
}
.qty-selector {
  display: flex;
  align-items: center;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--white);
}
.qty-btn {
  width: 40px; height: 44px;
  border: none;
  background: var(--surface);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: var(--text);
  font-size: 1rem;
  transition: background 0.15s;
}
.qty-btn:hover { background: var(--border); }
.qty-btn .lucide { width: 16px; height: 16px; }
.qty-value {
  width: 50px; height: 44px;
  border: none;
  text-align: center;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--black);
  background: var(--white);
  outline: none;
}

.btn-atc {
  flex: 1;
  height: 48px;
  background: var(--yellow);
  color: var(--black);
  border: none;
  border-radius: 12px;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s;
}
.btn-atc .lucide { width: 20px; height: 20px; }
.btn-atc:hover { background: #f5c020; transform: translateY(-1px); }

.btn-wishlist {
  width: 48px; height: 48px;
  border: 1.5px solid var(--border);
  background: var(--white);
  border-radius: 12px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: var(--muted);
  transition: all 0.15s;
}
.btn-wishlist .lucide { width: 20px; height: 20px; }
.btn-wishlist:hover { border-color: var(--red); color: var(--red); }
.btn-wishlist.active { background: #fee; border-color: var(--red); color: var(--red); }

.btn-compare-detail {
  width: 48px; height: 48px; border-radius: 12px;
  border: 2px solid var(--border-light); background: #fff;
  color: var(--muted); cursor: pointer; display: flex;
  align-items: center; justify-content: center; transition: all 0.2s;
}
.btn-compare-detail .lucide { width: 20px; height: 20px; }
.btn-compare-detail:hover { border-color: var(--yellow); color: var(--yellow-dark); }
.btn-compare-detail.active { background: var(--yellow); border-color: var(--yellow); color: var(--black); }

/* ──────────── TAB CONTENT FADE ──────────── */
.tab-content {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.tab-content.active {
  opacity: 1;
  transform: translateY(0);
}

/* ──────────── ADD-TO-CART CONFIRMATION STATE ──────────── */
.btn-atc.confirmed {
  background: var(--green);
  color: var(--white);
  pointer-events: none;
}

/* ──────────── QUANTITY SELECTOR FEEDBACK ──────────── */
@keyframes qtyBump {
  0% { transform: scale(1); }
  50% { transform: scale(1.2); }
  100% { transform: scale(1); }
}
.qty-value.bump {
  animation: qtyBump 0.2s ease;
}
.qty-btn.disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

/* ──────────── VOLUME PRICING ROW HOVER ──────────── */
.volume-row {
  transition: background 0.15s ease, transform 0.15s ease;
  border-radius: 6px;
}
@media (min-width: 768px) {
  .volume-row:hover {
    background: rgba(240,180,41,0.15);
    transform: scale(1.01);
  }
}
.volume-row:active {
  background: rgba(240,180,41,0.15);
}

/* ──────────── WISHLIST HEART POP ──────────── */
@keyframes heartPop {
  0% { transform: scale(1); }
  25% { transform: scale(1.3); }
  50% { transform: scale(0.9); }
  100% { transform: scale(1); }
}
.btn-wishlist.active .lucide {
  animation: heartPop 0.4s ease;
}

/* ──────────── TABS ──────────── */
.product-tabs {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 32px 48px;
}
.tabs-nav {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--border-light);
  margin-bottom: 28px;
}
.tab-btn {
  padding: 14px 24px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--muted);
  background: none;
  border: none;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: all 0.15s;
  font-family: inherit;
}
.tab-btn:hover { color: var(--black); }
.tab-btn.active { color: var(--black); border-bottom-color: var(--yellow); }

.tab-content { display: none; }
.tab-content.active { display: block; }
.tab-content.fade-out { opacity: 0; transform: translateY(8px); }
.tab-content p { font-size: 0.9rem; color: var(--text); line-height: 1.75; margin-bottom: 16px; }

.specs-table {
  width: 100%;
  border-collapse: collapse;
}
.specs-table tr { border-bottom: 1px solid var(--border-light); }
.specs-table td {
  padding: 12px 16px;
  font-size: 0.88rem;
}
.specs-table td:first-child {
  font-weight: 600;
  color: var(--black);
  width: 200px;
}
.specs-table td:last-child { color: var(--text); }

/* ──────────── RELATED & RECENTLY VIEWED ──────────── */
.related-section,
.recently-viewed-section {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 32px 48px;
}
.recently-viewed-section {
  margin-top: 0;
  padding-top: 12px;
  border-top: 1.5px solid var(--border-light);
}

@media (max-width: 768px) {
  .product-detail { grid-template-columns: 1fr; gap: 20px; padding: 16px; }
  .gallery-main { height: 260px; }
  .gallery-thumb { width: 60px; height: 60px; }
  .gallery-thumb .lucide { width: 24px; height: 24px; }
  .product-detail-name { font-size: 1.3rem; }
  .product-detail-brand { font-size: 0.7rem; }
  .product-detail-meta { font-size: 0.78rem; gap: 8px; flex-wrap: wrap; }
  .price-block { padding: 20px; }
  .price-main { font-size: 1.6rem; }
  .atc-widget { flex-wrap: wrap; }
  .btn-atc { min-width: 0; font-size: 0.88rem; height: 44px; }
  .btn-wishlist { width: 44px; height: 44px; }
  .product-tabs { padding: 0 16px 32px; }
  .related-section,
  .recently-viewed-section { padding: 0 16px 32px; }
  .recently-viewed-section { margin-top: 0; }
  .tabs-nav { overflow-x: auto; scrollbar-width: none; gap: 0; }
  .tabs-nav::-webkit-scrollbar { display: none; }
  .tab-btn { padding: 12px 16px; font-size: 0.82rem; white-space: nowrap; }
  .specs-table td:first-child { width: auto; min-width: 120px; }
  .specs-table td { padding: 10px 12px; font-size: 0.82rem; }
}

@media (max-width: 480px) {
  .product-detail { padding: 12px; gap: 16px; }
  .gallery-main { height: 220px; }
  .product-detail-name { font-size: 1.15rem; }
  .price-main { font-size: 1.4rem; }
  .price-block { padding: 16px; }
  .volume-row { font-size: 0.78rem; padding: 5px 8px; }
  .qty-btn { width: 36px; height: 40px; }
  .qty-value { width: 44px; height: 40px; font-size: 0.88rem; }
  .btn-atc { height: 42px; font-size: 0.85rem; border-radius: 10px; }
  .btn-wishlist { width: 42px; height: 42px; border-radius: 10px; }
}

/* ──────────── REVIEW STARS ──────────── */
.star-btn {
  background: none; border: none; cursor: pointer; padding: 2px;
  color: var(--border-light); transition: color 0.15s;
}
.star-btn .lucide { width: 24px; height: 24px; }
.star-btn:hover { color: var(--yellow); }

/* ──────────── GALLERY IMAGES ──────────── */
.gallery-main-img {
  max-width: 100%; max-height: 100%; object-fit: contain; cursor: zoom-in;
}
.gallery-thumb img {
  width: 100%; height: 100%; object-fit: contain; border-radius: 4px;
}

/* ──────────── LIGHTBOX ──────────── */
.lightbox-overlay {
  position: fixed; inset: 0; z-index: 10000;
  background: rgba(0,0,0,0.92); display: flex;
  align-items: center; justify-content: center;
  opacity: 0; pointer-events: none; transition: opacity 0.25s;
}
.lightbox-overlay.active { opacity: 1; pointer-events: auto; }
.lightbox-img {
  max-width: 90vw; max-height: 85vh; object-fit: contain;
  border-radius: 8px; user-select: none;
}
.lightbox-close {
  position: absolute; top: 16px; right: 16px;
  background: rgba(255,255,255,0.1); border: none;
  color: #fff; width: 44px; height: 44px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: background 0.15s;
}
.lightbox-close:hover { background: rgba(255,255,255,0.25); }
.lightbox-prev, .lightbox-next {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: rgba(255,255,255,0.1); border: none;
  color: #fff; width: 48px; height: 48px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: background 0.15s;
}
.lightbox-prev { left: 16px; }
.lightbox-next { right: 16px; }
.lightbox-prev:hover, .lightbox-next:hover { background: rgba(255,255,255,0.25); }
.lightbox-counter {
  position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%);
  color: rgba(255,255,255,0.7); font-size: 0.85rem; font-weight: 600;
}

@media (prefers-reduced-motion: reduce) {
  .tab-content { transition: none; }
  .qty-value.bump { animation: none; }
  .btn-wishlist.active .lucide { animation: none; }
  .btn-atc.confirmed { transition: none; }
  .lightbox-overlay { transition: none; }
}
