/* Product Detail Modern Design - Extracted from test.html */

:root {
  --border: #ececec;
  --shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  --text: #111;
}

/* Gallery Styles */
.gallery-card {
  border: 1px solid var(--border);
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.gallery-main {
  position: relative;
  background: #f4f5f7;
  overflow: hidden;
  cursor: zoom-in !important;
  user-select: none;
  z-index: 1;
}

.gallery-main:hover {
  cursor: zoom-in !important;
}

.gallery-main .main-img {
  display: block;
  width: 100%;
  aspect-ratio: 1/1;
  object-fit: cover;
  transition: transform 0.3s ease-out;
  transform-origin: center center;
  pointer-events: none;
  will-change: transform;
}

/* Zoom effect khi hover */
.gallery-main.zooming {
  cursor: zoom-out !important;
}

.gallery-main.zooming:hover {
  cursor: zoom-out !important;
}

.gallery-main.zooming .main-img {
  transition: transform 0.1s ease-out;
}

.gallery-thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0.75rem;
  border-top: 1px solid var(--border);
}

.thumb-btn {
  border: 1px solid var(--border);
  background: #fff;
  padding: 0;
  border-radius: 10px;
  overflow: hidden;
  width: 60px;
  height: 60px;
  cursor: pointer;
}

.thumb-btn img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.thumb-btn.active,
.thumb-btn:focus {
  outline: 0;
  box-shadow: 0 0 0 0.2rem rgba(0, 0, 0, 0.08);
}

/* Sticky sidebar for desktop */
.sticky-lg {
  position: sticky;
  top: 24px;
}

/* Price styling */
.pill {
  border-radius: 999px;
  padding: 0.35rem 0.6rem;
}

.price-box .price-now {
  font-size: 1.8rem;
  font-weight: 800;
}

.price-strike {
  color: #9ca3af;
  text-decoration: line-through;
  margin-left: 0.5rem;
}

.save-badge {
  background: #fee2e2;
  color: #991b1b;
  border-radius: 0.5rem;
  padding: 0.15rem 0.4rem;
  font-weight: 600;
  margin-left: 0.5rem;
  font-size: 0.8rem;
}

/* Size Selection Styles */
.size-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.size-pill {
  display: inline-block;
  padding: 0.5rem 0.8rem;
  border: 2px solid #111;
  border-radius: 0.65rem;
  cursor: pointer;
  user-select: none;
  transition: 0.2s;
}

.size-pill:hover {
  transform: translateY(-1px);
}

.size-radio:checked + .size-pill {
  background: #111;
  color: #fff;
}

.size-pill.disabled {
  border-color: #c9c9c9;
  color: #bbb;
  cursor: not-allowed;
  position: relative;
}

.size-pill.disabled:after {
  content: "Hết";
  position: absolute;
  top: -8px;
  right: -8px;
  background: #e11d48;
  color: #fff;
  font-size: 0.65rem;
  padding: 0.15rem 0.35rem;
  border-radius: 0.5rem;
}

/* Quantity Stepper (matching cart style) */
.qty-stepper {
  width: 160px;
}

.qty-stepper .btn {
  border: 1px solid var(--border);
  background: #fff;
  color: #111;
  width: 42px;
  transition: all 0.2s;
}

.qty-stepper .btn:hover {
  background: #f5f6f7;
  border-color: #111;
}

.qty-stepper .btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.qty-input {
  background: #f5f6f7 !important;
  border: 1px solid var(--border) !important;
  font-weight: 600;
  pointer-events: none;
}

.qty-stepper .btn i {
  font-size: 0.875rem;
}

/* Variant Chip Styles */
.variant-row {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.variant-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.45rem;
  width: 72px;
  padding: 6px;
  border-radius: 14px;
  background: #fff;
  border: 1.5px solid #e5e7eb;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.06);
  cursor: pointer;
  transition: 0.15s transform, 0.15s border-color, 0.15s box-shadow;
}

.variant-chip:hover {
  transform: translateY(-2px);
}

.variant-chip:focus {
  outline: none;
}

.variant-chip:focus-visible {
  box-shadow: 0 0 0 3px rgba(17, 17, 17, 0.15);
}

.variant-chip.active {
  border-color: #111;
  box-shadow: 0 0 0 3px #fff, 0 0 0 5px #111;
}

.variant-chip__img {
  width: 58px;
  height: 58px;
  border-radius: 12px;
  object-fit: cover;
  display: block;
  background: #f0f0f0;
}

.variant-chip__label {
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  color: #111;
  max-width: 58px;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.variant-chip.is-fallback .variant-chip__img {
  display: none;
}

.variant-chip.is-fallback .variant-chip__label {
  width: 58px;
  height: 58px;
  border-radius: 12px;
  background: #e5e5e5;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Detail Sections */
.detail-sections {
  margin-top: 2rem;
  margin-bottom: 3rem;
}

.detail-block {
  background: #fff;
  border-radius: 1rem;
  padding: 1.25rem 1.5rem;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.04);
  border: 1px solid #ececec;
  margin-bottom: 1.25rem;
}

.detail-block__head {
  display: flex;
  align-items: center;
  margin-bottom: 0.75rem;
}

.detail-block__icon {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #f3f4f6;
  margin-right: 0.6rem;
  font-size: 0.9rem;
}

.detail-block__title {
  font-weight: 700;
  font-size: 1rem;
  margin: 0;
}

.detail-block__body {
  font-size: 0.95rem;
  color: #4b5563;
}

.detail-block__body ul {
  padding-left: 1.2rem;
}

/* Reviews Stars */
.stars {
  display: flex;
  gap: 0.25rem;
  flex-direction: row-reverse;
  justify-content: flex-end;
}

.stars input {
  display: none;
}

.stars label {
  font-size: 1.25rem;
  cursor: pointer;
  color: #d1d5db;
  transition: color 0.15s ease;
}

.stars input:checked ~ label,
.stars label:hover,
.stars label:hover ~ label {
  color: #f59e0b;
}

.review-item + .review-item {
  border-top: 1px solid #eee;
  padding-top: 1rem;
  margin-top: 1rem;
}

.verified-badge {
  font-size: 0.75rem;
  background: #ecfdf5;
  color: #059669;
  border-radius: 0.5rem;
  padding: 0.15rem 0.4rem;
  font-weight: 700;
}

/* Q&A Accordion Styles */
.accordion .card {
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  border-radius: 0.75rem;
}

.accordion .card-header {
  background: #fff;
}

.accordion .btn-link {
  font-weight: 600;
  color: #111;
  text-decoration: none;
}

.accordion .btn-link.collapsed {
  color: #4b5563;
}

/* Size Guide Modal */
.size-modal .modal-dialog {
  max-width: 980px;
}

.size-modal .modal-header {
  border-bottom: 0;
}

.size-tabs {
  display: inline-flex;
  gap: 0.5rem;
  border-bottom: 2px solid #eee;
  margin: -0.25rem 0 1rem;
}

.size-tab {
  padding: 0.5rem 1rem;
  font-weight: 700;
  border-radius: 0.5rem 0.5rem 0 0;
  border: 1px solid transparent;
  cursor: pointer;
  color: #6b7280;
}

.size-tab.active {
  color: #111;
  border-color: #ececec #ececec #fff;
  background: #fff;
  border-bottom-color: #fff;
}

.size-tools {
  display: flex;
  gap: 1rem;
  align-items: center;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.size-tools .hint {
  color: #6b7280;
  font-size: 0.9rem;
}

.size-scroll {
  overflow: auto;
  border: 1px solid #ececec;
  border-radius: 0.75rem;
}

.size-table {
  min-width: 900px;
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.size-table thead th {
  position: sticky;
  top: 0;
  background: #111;
  color: #fff;
  padding: 0.75rem;
  white-space: nowrap;
}

.size-table th,
.size-table td {
  padding: 0.85rem;
  text-align: center;
  border-bottom: 1px solid #f0f0f0;
}

.size-table tbody th {
  text-align: left;
  background: #f9fafb;
  position: sticky;
  left: 0;
  z-index: 1;
}

.size-table tbody td:nth-child(even) {
  background: #fafafa;
}

.size-note {
  margin-top: 1rem;
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: 0.5px;
}

.how-to {
  background: #f3f4f6;
  border-radius: 0.75rem;
  padding: 1rem;
}

.how-to img {
  max-width: 180px;
  opacity: 0.9;
}

/* Size Guide Header */
.size-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.size-title {
  font-weight: 800;
  font-size: 1rem;
  letter-spacing: 0.2px;
}

.size-guide-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  border: 0;
  background: transparent;
  color: #6b7280;
  font-weight: 600;
  padding: 0.25rem 0.5rem;
  border-radius: 0.5rem;
}

.size-guide-btn i {
  font-size: 1rem;
}

.size-guide-btn:hover {
  color: #111;
  background: #f1f2f4;
}

/* Quantity Inline */
.qty-inline {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.qty-inline label {
  margin: 0;
  font-size: 1rem;
}

/* Mobile Buy Bar */
.buybar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  background: #fff;
  border-top: 1px solid #eee;
  box-shadow: 0 -6px 20px rgba(0, 0, 0, 0.08);
  z-index: 1030;
}

.buybar .price {
  font-weight: 800;
}

/* Hide buy bar on desktop */
@media (min-width: 992px) {
  .buybar {
    display: none;
  }
}

/* Responsive adjustments */
@media (max-width: 576px) {
  .variant-chip {
    width: 62px;
  }
  .variant-chip__img {
    width: 52px;
    height: 52px;
    border-radius: 10px;
  }
  .variant-chip__label {
    max-width: 52px;
  }
  .thumb-btn {
    width: 52px;
    height: 52px;
  }
  .qty-inline {
    gap: 0.5rem;
  }
  .detail-block {
    padding: 1rem 1rem;
  }
}

/* Breadcrumb styling */
.crumb a {
  color: #6b7280;
}

.crumb .sep {
  margin: 0 0.25rem;
  color: #9ca3af;
}

/* Additional utility classes */
.gap-12 {
  gap: 12px;
}

/* Review form disabled state */
.review-form-disabled {
  opacity: 0.5;
  pointer-events: none;
  position: relative;
}

.review-form-disabled::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.7);
  cursor: not-allowed;
}

/* Action Buttons - Pill-shaped style */
.btn-action-primary {
  border-radius: 999px;
  padding: 0.75rem 1.5rem;
  font-weight: 600;
  border: none;
  background-color: #212529;
  color: #fff;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-action-primary:hover {
  background-color: #1a1e21;
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-action-primary:focus,
.btn-action-primary:active {
  background-color: #1a1e21;
  color: #fff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-action-fav {
  border-radius: 999px;
  padding: 0.75rem 1.5rem;
  font-weight: 600;
  border: 1px solid #e5e7eb;
  background: #fff;
  color: #6b7280;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-action-fav:hover {
  background: #f9fafb;
  border-color: #d1d5db;
  transform: translateY(-1px);
}

.btn-action-fav.active {
  background: #fee2e2;
  border-color: #fca5a5;
  color: #dc2626;
}

.btn-action-fav.active i {
  color: #dc2626;
}

.btn-action-fav.active:hover {
  background: #fecaca;
  border-color: #f87171;
}

/* Size suggest text - Brand color */
.size-suggest-text {
  color: #2e7d71;
  font-weight: 600;
}
