/* ============================================================
   detail.css — Product Detail Page
   ============================================================ */

/* ---------- Breadcrumb ---------- */
.detail-breadcrumb {
  padding: 14px 40px;
  border-bottom: 1px solid #e8e8e8;
  background: #fff;
}
.detail-breadcrumb ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  color: #666;
}
.detail-breadcrumb a {
  color: #333;
  text-decoration: none;
}
.detail-breadcrumb a:hover { text-decoration: underline; }
.detail-breadcrumb .sep { color: #aaa; }

/* ---------- Product Section Layout ---------- */
.product-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  max-width: 1400px;
  margin: 0 auto;
  padding: 40px 40px 60px;
  align-items: start;
}

/* ---------- Gallery ---------- */
.product-gallery {
  display: flex;
  gap: 14px;
  position: sticky;
  top: 90px;
}

.gallery-thumbs {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-shrink: 0;
}

.thumb {
  width: 72px;
  height: 72px;
  border: 2px solid transparent;
  border-radius: 4px;
  overflow: hidden;
  background: #f5f5f5;
  padding: 0;
  cursor: pointer;
  transition: border-color 0.2s;
}
.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.thumb.active,
.thumb:hover {
  border-color: #111;
}

.gallery-main {
  flex: 1;
  position: relative;
  background: #f7f7f7;
  border-radius: 6px;
  overflow: hidden;
  aspect-ratio: 1;
}

.gallery-main-inner {
  width: 100%;
  height: 100%;
  position: relative;
}

.gallery-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}
.gallery-img.active {
  opacity: 1;
  pointer-events: auto;
}

.gallery-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.9);
  border: 1px solid #ddd;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 2;
  transition: background 0.2s, box-shadow 0.2s;
  display: none; /* shown on mobile only */
}
.gallery-arrow:hover {
  background: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.gallery-arrow--prev { left: 10px; }
.gallery-arrow--next { right: 10px; }

/* ---------- Product Info ---------- */
.product-info {
  padding-left: 50px;
}

.product-title {
  font-family: 'Mulish', sans-serif;
  font-size: 1.65rem;
  font-weight: 800;
  color: #111;
  line-height: 1.2;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: -0.01em;
}
.product-title span {
  font-weight: 400;
  font-size: 1.1rem;
  text-transform: none;
  color: #555;
  letter-spacing: 0;
}

.product-ref {
  font-family: 'Source Code Pro', monospace;
  font-size: 0.78rem;
  color: #888;
  margin-bottom: 10px;
  letter-spacing: 0.04em;
}

.product-rating {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
}
.stars { color: #ccc; font-size: 1rem; letter-spacing: 2px; }
.rating-count { font-size: 0.8rem; color: #888; }

/* Price */
.product-price {
  margin-bottom: 24px;
}
.price-current {
  font-size: 1.8rem;
  font-weight: 800;
  color: #111;
  font-family: 'Mulish', sans-serif;
}

/* ---------- Size ---------- */
.product-sizes { margin-bottom: 22px; }

.size-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.size-label {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #333;
}
.size-guide-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  background: none;
  border: none;
  font-size: 0.8rem;
  color: #0069b4;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
}
.size-guide-btn .material-symbols-outlined { font-size: 16px; }
.size-guide-btn:hover { color: #004a80; }

.size-options {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.size-btn {
  min-width: 52px;
  height: 44px;
  padding: 0 10px;
  border: 1.5px solid #ddd;
  border-radius: 4px;
  background: #fff;
  font-size: 0.85rem;
  font-weight: 600;
  color: #333;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
  position: relative;
}
.size-btn:hover:not(.disabled) {
  border-color: #111;
}
.size-btn.active {
  border-color: #111;
  background: #111;
  color: #fff;
}
.size-btn.disabled {
  color: #bbb;
  cursor: not-allowed;
  position: relative;
  overflow: hidden;
}
.size-btn.disabled::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: #ddd;
  transform: rotate(-20deg);
}

.size-unavailable-note {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.75rem;
  color: #999;
  margin-top: 8px;
}
.size-unavailable-note .material-symbols-outlined { font-size: 14px; }

/* ---------- Add to Cart Button ---------- */
.btn-add-to-cart {
  width: 100%;
  padding: 16px;
  background: #111;
  color: #fff;
  border: none;
  border-radius: 4px;
  font-size: 1rem;
  font-weight: 700;
  font-family: 'Mulish', sans-serif;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  transition: background 0.2s, transform 0.1s;
  margin-bottom: 24px;
}
.btn-add-to-cart:hover { background: #222; }
.btn-add-to-cart:active { transform: scale(0.99); }

/* ---------- Reassurances ---------- */
.product-reassurances {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 18px 0;
  border-top: 1px solid #eee;
  border-bottom: 1px solid #eee;
  margin-bottom: 24px;
}
.reassurance-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.83rem;
  color: #444;
}
.reassurance-item .material-symbols-outlined {
  font-size: 18px;
  color: #111;
}

/* ---------- Accordions ---------- */
.product-accordions { margin-bottom: 20px; }

.accordion {
  border-bottom: 1px solid #e8e8e8;
}
.accordion summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
  cursor: pointer;
  list-style: none;
  user-select: none;
}
.accordion summary::-webkit-details-marker { display: none; }
.accordion-title {
  font-weight: 700;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #111;
}
.accordion-icon {
  font-size: 20px;
  color: #555;
  transition: transform 0.25s;
  flex-shrink: 0;
}
.accordion[open] .accordion-icon {
  transform: rotate(45deg);
}
.accordion-body {
  padding: 0 0 18px;
  font-size: 0.9rem;
  color: #555;
  line-height: 1.7;
}
.accordion-body p { margin-bottom: 8px; }
.accordion-body p:last-child { margin-bottom: 0; }
.accordion-body ul {
  margin: 0;
  padding-left: 18px;
}
.accordion-body li { margin-bottom: 4px; }

.non-contractual {
  font-size: 0.72rem;
  color: #aaa;
  margin-top: 8px;
}

/* ---------- Features Section ---------- */
.features-section {
  background: #f7f7f7;
  padding: 60px 40px;
  text-align: center;
}
.features-title {
  font-size: 1.5rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #111;
  margin-bottom: 40px;
}
.features-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 24px;
  max-width: 1200px;
  margin: 0 auto;
}
.feature-card {
  background: #fff;
  border-radius: 8px;
  padding: 28px 20px;
  text-align: center;
  transition: box-shadow 0.2s;
}
.feature-card:hover {
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}
.feature-icon {
  width: 52px;
  height: 52px;
  background: #111;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
}
.feature-icon .material-symbols-outlined {
  color: #fff;
  font-size: 24px;
}
.feature-card h3 {
  font-size: 0.88rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #111;
  margin-bottom: 8px;
}
.feature-card p {
  font-size: 0.8rem;
  color: #777;
  line-height: 1.6;
  margin: 0;
}

/* ---------- Additional Images ---------- */
.additional-images {
  padding: 40px;
  max-width: 1400px;
  margin: 0 auto;
}
.additional-images-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.additional-images-grid img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 6px;
  display: block;
  transition: transform 0.3s;
}
.additional-images-grid img:hover {
  transform: scale(1.02);
}

/* ---------- Standards ---------- */
.standards-section {
  background: #111;
  padding: 40px;
}
.standards-inner {
  display: flex;
  justify-content: center;
  gap: 60px;
  max-width: 900px;
  margin: 0 auto;
}
.standard-badge {
  display: flex;
  align-items: center;
  gap: 14px;
  color: #fff;
}
.standard-badge .material-symbols-outlined {
  font-size: 36px;
  color: #888;
  flex-shrink: 0;
}
.standard-badge strong {
  display: block;
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}
.standard-badge p {
  font-size: 0.75rem;
  color: #999;
  margin: 2px 0 0;
}

/* ---------- Size Guide Modal ---------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
}
.modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}
.modal-box {
  background: #fff;
  border-radius: 8px;
  padding: 40px;
  max-width: 560px;
  width: 90%;
  position: relative;
  max-height: 85vh;
  overflow-y: auto;
}
.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  cursor: pointer;
  color: #666;
  padding: 4px;
}
.modal-close:hover { color: #111; }
.modal-box h2 {
  font-size: 1.1rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 12px;
  color: #111;
}
.modal-box p {
  font-size: 0.85rem;
  color: #555;
  line-height: 1.6;
  margin-bottom: 20px;
}
.size-table-wrap { overflow-x: auto; margin-bottom: 16px; }
.size-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.83rem;
}
.size-table th,
.size-table td {
  border: 1px solid #ddd;
  padding: 10px 14px;
  text-align: center;
}
.size-table th {
  background: #111;
  color: #fff;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.size-table td:first-child { font-weight: 600; color: #333; }
.size-tip {
  font-size: 0.82rem;
  color: #555;
  background: #f5f5f5;
  padding: 12px 16px;
  border-radius: 6px;
  border-left: 3px solid #111;
  margin: 0;
}

/* ---------- Cart Toast ---------- */
.cart-toast {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #111;
  color: #fff;
  padding: 12px 24px;
  border-radius: 30px;
  font-size: 0.88rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 3000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s, transform 0.3s;
}
.cart-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.cart-toast .material-symbols-outlined { color: #4caf50; font-size: 18px; }

/* ---------- Sticky ATC ---------- */
.sticky-atc {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #fff;
  border-top: 1px solid #e0e0e0;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.1);
  z-index: 1500;
  transform: translateY(100%);
  transition: transform 0.3s;
}
.sticky-atc.visible { transform: translateY(0); }
.sticky-atc-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 12px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.sticky-atc-product {
  display: flex;
  align-items: center;
  gap: 14px;
}
.sticky-atc-product img {
  width: 52px;
  height: 52px;
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid #eee;
}
.sticky-atc-name {
  font-size: 0.88rem;
  font-weight: 700;
  color: #111;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 300px;
}
.sticky-atc-price {
  font-size: 0.88rem;
  color: #555;
  margin: 2px 0 0;
}
.sticky-atc-btn {
  padding: 12px 32px;
  background: #111;
  color: #fff;
  border: none;
  border-radius: 4px;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background 0.2s;
}
.sticky-atc-btn:hover { background: #333; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .features-grid { grid-template-columns: repeat(3, 1fr); }
  .additional-images-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
  .product-section {
    grid-template-columns: 1fr;
    padding: 20px;
    gap: 32px;
  }
  .product-gallery { position: static; }
  .product-info { padding-left: 0; }
  .gallery-arrow { display: flex; }
  .gallery-thumbs { display: none; }
  .standards-inner { flex-direction: column; gap: 24px; align-items: flex-start; }
}

@media (max-width: 600px) {
  .features-grid { grid-template-columns: 1fr 1fr; }
  .additional-images-grid { grid-template-columns: 1fr 1fr; }
  .sticky-atc-name { max-width: 140px; }
  .sticky-atc-inner { padding: 12px 16px; }
  .detail-breadcrumb { padding: 12px 20px; }
  .features-section { padding: 40px 20px; }
  .additional-images { padding: 20px; }
  .standards-section { padding: 30px 20px; }
}