/**
 * GARBALIA — Page-Specific Styles
 * Product Details Gallery & Zoom, Receipt Invoice & Print
 */

/* ==========================================================================
   Receipt & Invoice Styles
   ========================================================================== */
@keyframes draw { to { stroke-dashoffset: 0; } }
.check-path { stroke-dasharray: 30; stroke-dashoffset: 30; animation: draw .7s .5s ease forwards; }

@media (prefers-reduced-motion: reduce) {
  .check-path { stroke-dashoffset: 0; animation: none; }
}

@media print {
  @page { margin: 14mm; }
  body { background: #fff !important; }
  #invoice { width: 100% !important; }
}

/* ==========================================================================
   Product Details Gallery, Layout & Components
   ========================================================================== */
.brand-container { max-width: 1600px; margin: 0 auto; padding: 0 1.25rem; }

.pd-breadcrumbs {
  padding: 1.5rem 0; font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.1em; color: #71717a; 
  display: flex; flex-wrap: wrap; gap: 0.5rem;
}
.pd-breadcrumbs a { color: #71717a; text-decoration: none; transition: color 0.3s; }
.pd-breadcrumbs a:hover { color: #000; }
.pd-breadcrumbs .current { color: #000; font-weight: 600; }

.pd-layout { display: grid; grid-template-columns: 1fr; gap: 2.5rem; padding-bottom: 4rem; }

.pd-gallery { display: flex; flex-direction: column-reverse; gap: 1rem; }
.pd-thumbs-container { display: flex; gap: 0.75rem; overflow-x: auto; scrollbar-width: none; }
.pd-thumbs-container::-webkit-scrollbar { display: none; }

.pd-thumb {
  width: 70px; height: 90px; flex-shrink: 0; border: 1px solid transparent; 
  background: #f8f8f8; cursor: pointer; opacity: 0.5; transition: all 0.3s ease;
}
.pd-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pd-thumb:hover { opacity: 0.8; }
.pd-thumb.active { opacity: 1; border-color: #000; }

.pd-main-image {
  position: relative; width: 100%; background: #f8f8f8; 
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; cursor: crosshair;
}
.pd-main-image img { 
  width: 100%; height: auto; max-height: 70vh; object-fit: contain; 
  transition: transform 0.15s ease-out, transform-origin 0.15s ease-out; 
  transform-origin: center center; pointer-events: none; 
}
@media (hover: hover) and (pointer: fine) {
  .pd-main-image:hover img { transform: scale(2.5); }
}

.pd-wishlist-btn {
  position: absolute; top: 1rem; right: 1rem; width: 40px; height: 40px; 
  background: #fff; border: 1px solid #e5e5e5; border-radius: 50%; 
  display: flex; align-items: center; justify-content: center;
  color: #000; cursor: pointer; transition: all 0.3s ease; z-index: 10;
}
[dir="rtl"] .pd-wishlist-btn { right: auto; left: 1rem; }
.pd-wishlist-btn:hover, .pd-wishlist-btn.active { background: #000; color: #fff; border-color: #000; }
.pd-wishlist-btn svg { width: 18px; height: 18px; }

.pd-zoom-btn {
  position: absolute; bottom: 1rem; right: 1rem; width: 40px; height: 40px; 
  background: rgba(255,255,255,0.9); border: 1px solid #e5e5e5; border-radius: 50%; 
  display: flex; align-items: center; justify-content: center; color: #000; cursor: pointer; 
  transition: all 0.3s ease; z-index: 10;
}
[dir="rtl"] .pd-zoom-btn { right: auto; left: 1rem; }
.pd-zoom-btn:hover { background: #000; color: #fff; border-color: #000; }
.pd-zoom-btn svg { width: 18px; height: 18px; }

.pd-badge {
  position: absolute; top: 1rem; left: 1rem; background: #000; color: #fff; 
  padding: 0.3rem 0.8rem; font-size: 0.65rem; font-weight: 700; 
  text-transform: uppercase; letter-spacing: 0.1em; z-index: 10;
}
[dir="rtl"] .pd-badge { left: auto; right: 1rem; }

.pd-lightbox {
  position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; background: rgba(0,0,0,0.95);
  display: flex; align-items: center; justify-content: center; z-index: 99999; 
  opacity: 0; pointer-events: none; transition: opacity 0.3s ease;
}
.pd-lightbox.active { opacity: 1; pointer-events: all; }
.pd-lightbox img { max-width: 92vw; max-height: 90vh; object-fit: contain; }
.pd-lightbox-close {
  position: absolute; top: 1.25rem; right: 1.25rem; width: 40px; height: 40px; 
  background: transparent; border: none; color: #fff; font-size: 2rem; cursor: pointer;
}
[dir="rtl"] .pd-lightbox-close { right: auto; left: 1.25rem; }

.pd-info-container { display: flex; flex-direction: column; }
.pd-category { font-size: 0.7rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.15em; color: #71717a; margin-bottom: 0.75rem; display: block; }
.pd-title { font-size: 1.75rem; font-weight: 400; line-height: 1.15; margin: 0 0 1.25rem; color: #000; letter-spacing: -0.02em; }

.pd-price-wrap { display: flex; align-items: baseline; gap: 0.75rem; margin-bottom: 1.75rem; }
.pd-price { font-size: 1.35rem; font-weight: 600; color: #000; }
.pd-price-old { font-size: 1rem; color: #a1a1aa; text-decoration: line-through; }

.pd-error { background: #000; color: #fff; padding: 0.9rem; font-size: 0.85rem; margin-bottom: 1.25rem; font-weight: 500; }
.pd-section-title { font-size: 0.9rem; font-weight: 500; margin-bottom: 0.7rem; }

/* Color Selector */
.pd-color-selector {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 1.5rem;
}
.pd-color-option {
  width: 64px;
  height: 80px;
  border: 2px solid transparent;
  cursor: pointer;
  background: #f5f5f5;
  overflow: hidden;
  position: relative;
  transition: border-color 0.2s;
}
.pd-color-option img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.pd-color-option:hover { border-color: #999; }
.pd-color-option.selected { border-color: #000; }
.pd-color-option input { display: none; }

.pd-action-area { margin-bottom: 1.75rem; }
.pd-qty-wrapper { display: flex; border: 1px solid #e4e4e7; width: fit-content; height: 3.25rem; margin-bottom: 1.25rem; }
.pd-qty-btn { width: 3.25rem; background: transparent; border: none; font-size: 1.15rem; color: #000; cursor: pointer; }
.pd-qty-btn:hover { background: #f4f4f5; }
.pd-qty-num { width: 3.5rem; display: flex; align-items: center; justify-content: center; font-weight: 600; font-size: 1rem; border-left: 1px solid #e4e4e7; border-right: 1px solid #e4e4e7; }

.pd-buttons { display: flex; flex-direction: column; gap: 0.85rem; }
.pd-btn-primary { 
  width: 100%; height: 3.25rem; background: #000; color: #fff; border: 1px solid #000; 
  font-size: 0.8rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em; cursor: pointer;
}
.pd-btn-primary:hover { background: #333; }
.pd-btn-primary:disabled { background: #e4e4e7; border-color: #e4e4e7; color: #a1a1aa; cursor: not-allowed; }

.pd-btn-secondary {
  width: 100%; height: 3.25rem; background: #fff; color: #000; border: 1px solid #000; 
  font-size: 0.8rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em; cursor: pointer;
}
.pd-btn-secondary:hover { background: #f8f8f8; }

.pd-perks { display: flex; flex-direction: column; gap: 0.9rem; margin-top: 1.75rem; }
.pd-perk-item { display: flex; align-items: center; gap: 0.85rem; font-size: 0.85rem; color: #3f3f46; }
.pd-perk-item svg { width: 18px; height: 18px; color: #000; stroke-width: 1.5; flex-shrink: 0; }

.pd-offer-banner { background: #f4f4f5; padding: 1.25rem; margin-top: 1.75rem; border-left: 2px solid #000; }
[dir="rtl"] .pd-offer-banner { border-left: none; border-right: 2px solid #000; }
.pd-offer-banner h4 { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.1em; font-weight: 700; margin: 0 0 0.4rem; }
.pd-offer-banner p { font-size: 0.9rem; margin: 0; color: #27272a; }

.pd-accordion { margin-top: 2.5rem; border-top: 1px solid #e4e4e7; }
.pd-acc-item { border-bottom: 1px solid #e4e4e7; }
.pd-acc-header {
  width: 100%; display: flex; justify-content: space-between; align-items: center;
  padding: 1.25rem 0; background: none; border: none; cursor: pointer;
  font-size: 0.85rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: #000;
}
.pd-acc-header svg { width: 16px; height: 16px; transition: transform 0.3s; }
.pd-acc-header.open svg { transform: rotate(180deg); }
.pd-acc-content { max-height: 0; overflow: hidden; transition: max-height 0.4s ease; font-size: 0.9rem; line-height: 1.75; color: #52525b; }
.pd-acc-content-inner { padding-bottom: 1.25rem; }
.pd-acc-content ul { padding-left: 1.1rem; margin: 0; }
[dir="rtl"] .pd-acc-content ul { padding-left: 0; padding-right: 1.1rem; }
.pd-acc-content li { margin-bottom: 0.4rem; }

.pd-related-section { border-top: 1px solid #e4e4e7; padding: 3.5rem 0; }
.pd-related-title { font-size: 1.35rem; font-weight: 400; text-align: center; margin-bottom: 2rem; letter-spacing: 0.05em; }

@media (min-width: 768px) {
  .brand-container { padding: 0 2rem; }
  .pd-title { font-size: 2.25rem; }
  .pd-color-option { width: 72px; height: 90px; }
}

@media (min-width: 1024px) {
  .pd-layout { grid-template-columns: 7fr 5fr; gap: 5rem; align-items: start; }
  .pd-gallery { flex-direction: row; position: sticky; top: 2rem; }
  .pd-thumbs-container { flex-direction: column; overflow-y: auto; max-height: 850px; }
  .pd-thumb { width: 80px; height: 100px; }
  .pd-title { font-size: 2.75rem; }
  .pd-info-container { padding-top: 0.5rem; }
  .pd-main-image img { max-height: 850px; }
}
