/* ─── MAIN LAYOUT ─── */
.product-page {
  max-width: 1400px;
  margin: 0 auto;
  padding: 32px 24px;
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 50px;
  align-items: start;
}

/* ─── GALLERY ─── */
.gallery {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.main-image-wrap {
  position: relative;

  border: 1.5px solid var(--border);
  overflow: hidden;
  aspect-ratio: 1/1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.main-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.4s ease;
}

.main-image-wrap:hover img {
  transform: scale(1.06);
}

.badge-row {
  position: absolute;
  top: 14px;
  left: 14px;
  display: flex;
  gap: 6px;
}

.i-badge {
  padding: 4px 10px;
  border-radius: 99px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.badge-new {
  background: var(--mzansi-orange);
  color: #fff;
}

.badge-sale {
  background: var(--danger);
  color: #fff;
}

.badge-local {
  background: var(--success);
  color: #fff;
}

.fav-btn {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.9);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  transition: all 0.2s;
  backdrop-filter: blur(4px);
}

.fav-btn:hover {
  transform: scale(1.1);
  background: #fff;
}

.fav-btn svg {
  width: 20px;
  height: 20px;
  color: var(--muted);
  transition: color 0.2s;
}

.fav-btn.active svg {
  color: var(--danger);
  fill: var(--danger);
}

.zoom-hint {
  position: absolute;
  bottom: 14px;
  right: 14px;
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  font-size: 0.72rem;
  padding: 4px 10px;
  border-radius: 99px;
  backdrop-filter: blur(4px);
}

.thumbnails {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.thumb {
  flex-shrink: 0;
  width: 72px;
  height: 72px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
  transition: border-color 0.2s;
}

.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.thumb.active {
  border-color: #222121;
}

.thumb:hover {
  border-color: #222121;
}

/* ─── PRODUCT INFO ─── */
.pitemdtls {
  display: flex;
  flex-direction: column;
  gap: .5rem;
}

.product-info {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.seller-row {
  gap: 8px;
}

.seller-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #222121;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
}

.item-seller-name {
  font-size: 0.85rem;
  color: var(--muted);
  font-weight: 400 !important;
}

.item-seller-name span {
  font-weight: 400 !important;
  color: var(--mzansi-orange);
  cursor: pointer;
}

.item-seller-name span:hover {
  text-decoration: underline;
}

.verified-badge {
  display: flex;
  align-items: center;
  gap: 3px;
  font-size: 0.72rem;
  font-weight: 400 !important;
  margin-top: -1px;
}

.verified-badge svg {
  width: 13px;
  height: 13px;
}

.product-title {
  font-size: 1.7rem;
  font-weight: 700;
  line-height: 1.2;
  color: var(--ink);
  letter-spacing: -0.5px;
}

.rating-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.stars {
  display: flex;
  gap: 2px;
}

.stars svg {
  width: 16px;
  height: 16px;
}

.stars .filled {
  color: var(--mzansi-orange-light);
}

.stars .empty {
  color: #ddd;
}

.rating-count {
  font-size: 0.8rem;
  color: var(--muted);
  color: var(--mzansi-orange);
  text-decoration: none;
}

.rating-count:hover {
  text-decoration: underline;
}

.sold-count {
  font-size: 0.8rem;
  color: var(--muted);
  padding-left: 10px;
  border-left: 1px solid var(--border);
}

.price-block {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
}

.price-main {
  font-family: 'Syne', sans-serif !important;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -1px;
}

.price-original {
  font-size: 1.1rem;
  color: var(--muted);
  text-decoration: line-through;
}

.price-save {
  font-size: 0.82rem;
  font-weight: 700;
  background: #fff0e8;
  color: var(--mzansi-orange-dark);
  padding: 3px 10px;
  border-radius: 99px;
}

/* ─── VARIANTS ─── */
.variants-section {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.variant-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.variant-label {
  font-size: 0.82rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.variant-label span {
  color: var(--text);
  font-weight: 700;
  text-transform: none;
  letter-spacing: 0;
}

.variant-options {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* Color swatches */
.color-swatch {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  position: relative;
  transition: transform 0.15s;
  outline-offset: 2px;
}

.color-swatch:hover {
  outline: 2.5px solid #222121;
}

.color-swatch.active {
  outline: 2.5px solid #222121;
}

.color-swatch .swatch-check {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.15s;
}

.color-swatch.active .swatch-check {
  opacity: 1;
}

.color-swatch .swatch-check svg {
  width: 14px;
  height: 14px;
  color: #fff;
}

/* Size chips */
.size-chip {
  padding: 7px 16px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  background: var(--white);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
  color: var(--text);
}

.size-chip:hover {
  border-color: var(--mzansi-orange-light);
  color: var(--mzansi-orange);
}

.size-chip.active {
  border-color: var(--mzansi-orange);
  background: var(--mzansi-orange);
  color: #fff;
}

.size-chip.disabled {
  opacity: 0.4;
  cursor: not-allowed;
  text-decoration: line-through;
}

.size-guide {
  font-size: 0.8rem;
  color: var(--mzansi-orange);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
  background: none;
  border: none;
}

/* ─── QUANTITY ─── */
.qty-block {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.qty-label {
  font-size: 0.82rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.qty-row {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.qty-control {
  display: flex;
  align-items: center;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.qty-btn {
  width: 40px;
  height: 40px;
  border: none;
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
  color: var(--text);
}

.qty-btn:hover {
  background: var(--mzansi-orange-pale);
  color: var(--mzansi-orange);
}

.qty-input {
  width: 52px;
  height: 40px;
  border: none;
  border-left: 1.5px solid var(--border);
  border-right: 1.5px solid var(--border);
  text-align: center;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  background: var(--white);
  outline: none;
}

.stock-status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.7rem;
}

.stock-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 6px;
}

.stock-in {
  color: var(--green);
}

.stock-dot.stock-in {
  background: var(--green);
  box-shadow: 0 0 0 3px rgba(39, 174, 96, 0.2);
}

.stock-dot.stock-low {
  background: var(--mzansi-orange);
  box-shadow: 0 0 0 3px var(--mzansi-orange-glow);
}

/* ─── CTA BUTTONS ─── */
.cta-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.add_to_cart_btn {
  flex: 1;
  min-width: 160px;
  padding: 10px 24px;
  background: #222121;
  color: #fff;
  border: none;

  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  letter-spacing: 0.01em;
}

.add_to_cart_btn:hover {
  background: black;
  transform: translateY(-1px);
}

.add_to_cart_btn:active {
  transform: translateY(0);
}

.add_to_cart_btn svg {
  width: 18px;
  height: 18px;
}

.btn-secondary {
  padding: 10px 20px;
  background: var(--white);
  color: #222121;
  border: 1px solid #222121;

  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-secondary:hover {
  background: var(--mzansi-orange-pale);
}

.btn-secondary svg {
  width: 18px;
  height: 18px;
}

.btn-icon {
  width: 52px;
  height: 52px;
  border: 1.5px solid var(--border);

  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.btn-icon:hover {
  border-color: #222121;
  background: var(--mzansi-orange-pale);
}

.btn-icon svg {
  width: 20px;
  height: 20px;
  color: var(--muted);
}

/* ─── PERKS ─── */
.perks-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.perk {
  display: flex;
  align-items: center;
  gap: 10px;
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  border: 1px solid var(--border);
}

.perk-icon {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.perk-icon svg {
  width: 17px;
  height: 17px;
}

.perk-text {
  font-size: 0.78rem;
  line-height: 1.3;
}

.perk-text strong {
  display: block;
  font-weight: 600;
  color: var(--text);
}

.perk-text span {
  color: var(--muted);
}

/* ─── TABS ─── */
.item-tabs-section {
  margin: auto;
  max-width: 1400px;
}

.tabs-nav {
  display: flex;
  border-bottom: 2px solid var(--border);
  gap: 0;
  overflow-x: auto;
}

.tabs-nav::-webkit-scrollbar {
  display: none;
}

.tab-btn {
  padding: 12px 22px;
  border: none;
  background: transparent;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--muted);
  cursor: pointer;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  white-space: nowrap;
  transition: all 0.2s;
}

.tab-btn:hover {
  color: var(--mzansi-orange);
}

.tab-btn.active {
  color: var(--mzansi-orange);
  border-bottom-color: var(--mzansi-orange);
}

.item-tab-content {
  display: none;
  padding-top: 10px;
}

.item-tab-content.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Description */
.desc-text {
  font-size: 0.8rem;
  line-height: 1.75;
  color: var(--text);
}

.desc-text p {
  margin-bottom: 14px;
}

.desc-text strong {
  color: var(--ink);
}

.spec-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 16px;
}

.spec-table tr {
  border-bottom: 1px solid var(--border);
}

.spec-table td {
  padding: 10px 0;
  font-size: 0.9rem;
}

.spec-table td:first-child {
  color: var(--muted);
  width: 40%;
  font-weight: 500;
}

.spec-table td:last-child {
  color: var(--text);
  font-weight: 600;
}

/* Reviews */
.review-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.reviews-summary {
  display: flex;
  gap: 32px;
  align-items: flex-start;
  align-items: center;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.rate-sum-num {
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.big-rating {
  font-size: 4rem;
  font-weight: 800;
  color: var(--mzansi-orange);
  line-height: 1;
}

.rating-breakdown {
  flex: 1;
  min-width: 180px;
}

.bar-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.bar-label {
  font-size: 0.78rem;
  color: var(--muted);
  width: 30px;
}

.bar-track {
  flex: 1;
  height: 6px;
  background: var(--border);
  border-radius: 99px;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  background: var(--mzansi-orange);
  border-radius: 99px;
}

.bar-count {
  font-size: 0.75rem;
  color: var(--muted);
  width: 20px;
  text-align: right;
}

.review-card {
  border-bottom: 1.5px solid var(--border);
  padding: 10px 0px;
  transition: border-color 0.2s;
}

.review-card:hover {
  border-color: var(--mzansi-orange-light);
}

.review-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.reviewer-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-weight: 700;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  flex-shrink: 0;
}

.reviewer-name {
  font-weight: 600;
  font-size: 0.9rem;
}

.reviewer-date {
  font-size: 0.7rem;
  color: var(--muted);
  margin-left: auto;
}

.review-body {
  font-size: 0.75rem;
  line-height: 1.6;
  color: var(--text);
}

.review-tags {
  display: flex;
  gap: 6px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.review-tag {
  font-size: 0.72rem;
  padding: 3px 10px;
  background: var(--mzansi-orange-pale);
  color: var(--mzansi-orange-dark);
  border-radius: 99px;
  font-weight: 600;
}

/* ─── RELATED ─── */
.related-section {
  max-width: 1200px;
  margin: 0 auto 60px;
  padding: 0 24px;
}

.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 20px;
}

.section-title {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--ink);
}

.section-link {
  font-size: 0.85rem;
  color: var(--mzansi-orange);
  text-decoration: none;
  font-weight: 600;
}

.section-link:hover {
  text-decoration: underline;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.related-card {
  border: 1.5px solid var(--border);

  overflow: hidden;
  background: var(--white);
  cursor: pointer;
  transition: all 0.2s;
}

.related-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: var(--mzansi-orange-light);
}

.related-img {
  aspect-ratio: 1/1;
  overflow: hidden;
}

.related-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.related-card:hover .related-img img {
  transform: scale(1.05);
}

.related-info {
  padding: 12px;
}

.related-name {
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 4px;
}

.related-price {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--mzansi-orange);
}

/* ─── STICKY MOBILE BAR ─── */
.sticky-bar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--white);
  border-top: 1.5px solid var(--border);
  padding: 12px 16px;
  gap: 10px;
  z-index: 100;
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.1);
}

.sticky-price {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--mzansi-orange);
}

.sticky-bar .btn-primary {
  min-width: 0;
  flex: 1;
  padding: 13px 18px;
  font-size: 0.9rem;
}

.sticky-bar .btn-secondary {
  padding: 13px 14px;
  font-size: 0.9rem;
}

/* ─── TOAST ─── */
.toast {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--ink);
  color: #fff;
  padding: 12px 22px;
  border-radius: 99px;
  font-size: 0.875rem;
  font-weight: 500;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 200;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.toast svg {
  width: 16px;
  height: 16px;
  color: var(--success);
}

/* ─── DIVIDER ─── */
.divider {
  height: 1px;
  background: var(--border);
  margin: 0px 0;
}

/* ─── RESPONSIVE ─── */
@media (max-width: 900px) {
  .product-page {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 10px;
  }

  .related-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .nav-search {
    display: none;
  }
}

@media (max-width: 600px) {
  .product-title {
    font-size: 1.35rem;
  }

  .price-main {
    font-size: 1.6rem;
  }

  .item-tabs-section,
  .related-section {
    padding: 0 16px;
  }

  .perks-grid {
    grid-template-columns: 1fr;
  }

  .cta-row {
    gap: 8px;
  }

  .sticky-bar {
    display: flex;
    align-items: center;
  }

  .related-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .reviews-summary {
    gap: 16px;
  }
}

@media (max-width: 350px) {

  .reviews-summary {
    justify-content: center;
    gap: 16px;
  }
}

.size-btn {
  padding: 0.5rem 1rem;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  /* px-4 py-2 */
  border: 2px solid lightgray;
  /* border */
  border-radius: 0rem;
  /* rounded-md */
  font-size: 0.875rem;
  /* text-sm */
  font-weight: 500;
  /* font-medium */
  background: #fff;
  cursor: pointer;

}

.size-btn:hover {
  border-color: #000;
}

.size-btn:focus {
  outline: none;
  border-color: #000;
}

.size-btn.selected {
  border-color: #000;
}

/* ******************* Review Form******************** */
/* Form container */
.form-container {
  display: none;
  position: fixed;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  background-color: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(.5px);
  -webkit-backdrop-filter: blur(.5px);
  z-index: 100;
  overflow: hidden;
  scroll-behavior: none;

  form {
    background-color: var(--white);
    max-width: 450px;
    min-width: 400px;
    border-radius: 8px;
    position: relative;
    overflow: hidden;

    .r-form-content {
      padding: 20px;
    }
  }
}

.form-container p {
  font-weight: 400;
}

.form-container label {
  font-size: 11pt;
}

/* Form inputs */
.form-input {
  display: block;
  width: 100%;
  margin-bottom: 10px;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 3px;
  font-size: 11px;
}

/* Rating stars */
.rating-stars {
  margin-bottom: 10px;
  text-align: center;
}

.star {
  font-size: 30px;
  color: #ddd;
  cursor: pointer;
  transition: color 0.3s;
}

.star:hover,
.star.active,
.star.active~.star {
  color: #f1c40f;
}

.button {
  text-align: center;
}

/* Submit button */
.button input[type="submit"] {
  width: 100%;
  height: 40px;
  border: 1px solid;
  background: orange;
  border-radius: 5px;
  font-size: 18px;
  color: #e9f4fb;
  font-weight: 700;
  cursor: pointer;
  outline: none;

}


/* Size Option Stying Start */
.size-options {}

.size-option {
  position: relative;
}

.size-option input[type="radio"] {
  position: absolute;
  opacity: 0;
}

.size-option label {
  display: block;
  min-width: 45px;
  padding: 4px 0.5rem;
  border: 1px solid var(--border);
  background: white;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 0.75rem;
  color: #374151;
}

.size-option input[type="radio"]:checked+label {
  border-color: #4f46e5;
  background-color: #f5f3ff;
  color: #4f46e5;
}

.size-option input[type="radio"]:disabled+label {
  background-color: #f9fafb;
  color: #9ca3af;
  cursor: not-allowed;
  text-decoration: line-through;
}

.size-option .price-indicator {
  font-size: 0.75rem;
  color: #10b981;
  margin-top: 0.25rem;
}

.size-option input[type="radio"]:checked+label .price-indicator {
  color: #4f46e5;
}

.size-guide-link {
  display: flex;
  align-items: center;
  gap: 5px;
  width: fit-content;
  margin: auto;
  margin-top: 5px;
  margin-right: 0;
  font-size: 0.75rem;
  color: #4f46e5;
  text-decoration: none;
  cursor: pointer;

  i {
    font-size: 1rem;
  }
}

.size-guide-link:active {
  transform: scale(.95);
}

.out-of-stock {
  position: absolute;
  top: -6px;
  right: -6px;
  background: var(--red);
  color: white;
  border-radius: 50%;
  width: 13px;
  height: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.6rem;
  font-weight: bold;
}