/* =========================
   Product Details Page
========================= */

.product-details-page {
  min-height: calc(100vh - 86px - 220px);
  padding-top: 60px;
  padding-bottom: 90px;
}

.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 28px;
  color: var(--muted);
  font-size: 14px;
}

.breadcrumb a {
  color: var(--brown-dark);
  text-decoration: none;
  font-weight: 700;
  transition: 0.25s ease;
}

.breadcrumb a:hover {
  color: var(--gold);
}

.breadcrumb i {
  color: var(--gold);
  font-size: 13px;
}

.breadcrumb span {
  color: var(--muted);
}

.product-details-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  align-items: stretch;
}

.product-gallery-card,
.product-info-card,
.product-description-card,
.product-features-card {
  position: relative;
  background:
    radial-gradient(circle at top right, rgba(199, 154, 69, 0.12), transparent 42%),
    rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(74, 43, 18, 0.08);
  border-radius: 34px;
  box-shadow: 0 22px 70px rgba(43, 23, 8, 0.08);
  overflow: hidden;
}

.product-gallery-card {
  padding: 24px;
}

.main-product-image {
  position: relative;
  min-height: 520px;
  border-radius: 28px;
  background:
    radial-gradient(circle at top right, rgba(241, 215, 155, 0.35), transparent 45%),
    linear-gradient(135deg, rgba(241, 215, 155, 0.22), rgba(255, 250, 241, 0.86));
  display: grid;
  place-items: center;
  overflow: hidden;
}

.main-product-image img {
  width: 88%;
  height: 88%;
  object-fit: contain;
  transition: 0.35s ease;
}

.product-gallery-card:hover .main-product-image img {
  transform: scale(1.05) rotate(-2deg);
}

.product-badge {
  position: absolute;
  top: 22px;
  right: 22px;
  z-index: 2;
  min-height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--brown-dark), var(--brown));
  color: var(--gold-soft);
  font-size: 13px;
  font-weight: 900;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  direction: ltr;
}

.product-thumbs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 16px;
}

.thumb {
  height: 112px;
  border: 1px solid rgba(74, 43, 18, 0.1);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.68);
  padding: 10px;
  cursor: pointer;
  transition: 0.25s ease;
}

.thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.thumb:hover,
.thumb.active {
  transform: translateY(-4px);
  border-color: rgba(199, 154, 69, 0.55);
  box-shadow: 0 14px 35px rgba(43, 23, 8, 0.1);
}

.product-info-card {
  padding: 38px;
}

.product-info-card .eyebrow {
  margin-bottom: 16px;
}

.product-info-card h1 {
  color: var(--brown-dark);
  font-size: clamp(34px, 4.5vw, 56px);
  line-height: 1.15;
  margin: 0 0 18px;
}

.product-short-desc {
  color: var(--muted);
  font-size: 17px;
  line-height: 1.9;
  margin: 0 0 22px;
}

.price-box {
  padding: 22px;
  border-radius: 26px;
  background:
    radial-gradient(circle at top right, rgba(241, 215, 155, 0.22), transparent 44%),
    rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(74, 43, 18, 0.08);
  margin-bottom: 24px;
}

.price-box div {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 8px;
}

.price {
  color: var(--brown-dark);
  font-size: 34px;
  font-weight: 900;
}

.old-price {
  color: var(--muted);
  font-size: 18px;
  text-decoration: line-through;
}

.price-box small {
  color: var(--gold);
  font-weight: 800;
}

.quantity-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

.quantity-row > span {
  color: var(--brown-dark);
  font-weight: 800;
}

.quantity-box {
  min-width: 145px;
  min-height: 52px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.74);
  border: 1px solid rgba(74, 43, 18, 0.1);
  display: grid;
  grid-template-columns: 42px 1fr 42px;
  align-items: center;
  overflow: hidden;
}

.quantity-box button {
  height: 100%;
  border: 0;
  background: transparent;
  color: var(--brown-dark);
  font-size: 20px;
  font-weight: 900;
  cursor: pointer;
  transition: 0.25s ease;
}

.quantity-box button:hover {
  background: var(--gold-soft);
}

.quantity-box strong {
  text-align: center;
  color: var(--brown-dark);
}

.product-cta-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 14px;
  align-items: stretch;
}

.product-cta-row form {
  width: 100%;
  margin: 0;
}

.details-btn {
  width: 100%;
  min-height: 72px;
  border-radius: 24px;
  border: 0;
  padding: 0 22px;
  text-decoration: none;
  font-weight: 900;
  font-size: 16px;
  white-space: nowrap;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease,
    background 0.25s ease;
}

.primary-details-btn {
  background: linear-gradient(135deg, var(--brown-dark), var(--brown));
  color: var(--gold-soft);
  box-shadow: 0 16px 40px rgba(43, 23, 8, 0.16);
}

.ghost-details-btn {
  background: rgba(255, 255, 255, 0.74);
  color: var(--brown-dark);
  border: 1px solid rgba(74, 43, 18, 0.1);
}

.details-btn i {
  font-size: 18px;
  line-height: 1;
}

.details-btn:hover {
  transform: translateY(-4px);
}

.ghost-details-btn:hover {
  background: var(--gold-soft);
}

.details-whatsapp {
  width: 100%;
  min-height: 64px;
  border-radius: 22px;
  padding: 0 22px;
  text-decoration: none;
  color: var(--brown-dark);
  background: linear-gradient(135deg, rgba(255, 250, 241, 0.96), rgba(241, 215, 155, 0.48));
  border: 1px solid rgba(199, 154, 69, 0.3);
  font-weight: 900;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 14px 34px rgba(43, 23, 8, 0.08);
  transition:
    transform 0.25s ease,
    background 0.25s ease,
    color 0.25s ease,
    box-shadow 0.25s ease,
    border-color 0.25s ease;
}

.details-whatsapp i {
  color: var(--gold);
  font-size: 22px;
  transition: 0.25s ease;
}

.details-whatsapp:hover {
  transform: translateY(-4px);
  color: var(--gold-soft);
  background: linear-gradient(135deg, var(--brown-dark), var(--brown));
  border-color: rgba(199, 154, 69, 0.45);
  box-shadow: 0 16px 40px rgba(43, 23, 8, 0.16);
}

.details-whatsapp:hover i {
  color: var(--gold-soft);
}

.product-trust-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin-top: 26px;
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.58);
  border: 1px solid rgba(74, 43, 18, 0.07);
}

.trust-item i {
  flex: 0 0 48px;
  width: 48px;
  height: 48px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(241, 215, 155, 0.42), rgba(255, 250, 241, 0.88));
  display: grid;
  place-items: center;
  color: var(--gold);
  font-size: 22px;
}

.trust-item strong {
  display: block;
  color: var(--brown-dark);
  font-size: 16px;
  margin-bottom: 3px;
}

.trust-item span {
  color: var(--muted);
  font-size: 14px;
}

.product-extra-section {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 28px;
  margin-top: 34px;
}

.product-description-card,
.product-features-card {
  padding: 34px;
}

.product-description-card h2,
.product-features-card h2 {
  color: var(--brown-dark);
  font-size: 32px;
  margin: 12px 0 14px;
}

.product-description-card p {
  color: var(--muted);
  line-height: 1.9;
  margin: 0 0 24px;
}

.specs-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.spec-item {
  padding: 16px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(74, 43, 18, 0.07);
}

.spec-item span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 6px;
}

.spec-item strong {
  color: var(--brown-dark);
}

.product-features-card ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 14px;
}

.product-features-card li {
  color: var(--muted);
  line-height: 1.8;
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.product-features-card li i {
  color: var(--gold);
  font-size: 20px;
  margin-top: 3px;
}

.related-products-section {
  margin-top: 70px;
}

.related-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
}

.related-head h2 {
  color: var(--brown-dark);
  font-size: clamp(28px, 4vw, 42px);
  margin: 12px 0 0;
}

.related-head a {
  color: var(--brown-dark);
  text-decoration: none;
  font-weight: 900;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: 0.25s ease;
}

.related-head a:hover {
  color: var(--gold);
}

.related-products-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.related-product-card {
  background:
    radial-gradient(circle at top right, rgba(199, 154, 69, 0.1), transparent 42%),
    rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(74, 43, 18, 0.08);
  border-radius: 28px;
  padding: 18px;
  box-shadow: 0 18px 55px rgba(43, 23, 8, 0.07);
  display: flex;
  gap: 16px;
  align-items: center;
  transition: 0.3s ease;
}

.related-product-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 26px 70px rgba(43, 23, 8, 0.14);
}

.related-img {
  flex: 0 0 105px;
  width: 105px;
  height: 105px;
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(241, 215, 155, 0.24), rgba(255, 250, 241, 0.75));
  display: grid;
  place-items: center;
  padding: 12px;
}

.related-img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.related-product-card span {
  color: var(--gold);
  font-size: 13px;
  font-weight: 800;
}

.related-product-card h3 {
  color: var(--brown-dark);
  margin: 6px 0;
  font-size: 18px;
}

.related-product-card strong {
  color: var(--brown-dark);
  font-size: 17px;
}

.reveal {
  opacity: 0;
  transform: translateY(34px);
  transition: 0.75s ease;
}

.reveal.show {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1100px) {
  .product-details-layout,
  .product-extra-section {
    grid-template-columns: 1fr;
  }

  .main-product-image {
    min-height: 460px;
  }
}

@media (max-width: 992px) {
  .product-details-page {
    padding-top: 50px;
  }

  .related-products-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .product-details-page {
    padding-top: 36px;
    padding-bottom: 70px;
  }

  .breadcrumb {
    font-size: 13px;
    margin-bottom: 20px;
  }

  .product-gallery-card,
  .product-info-card,
  .product-description-card,
  .product-features-card {
    border-radius: 28px;
  }

  .product-gallery-card {
    padding: 18px;
  }

  .main-product-image {
    min-height: 320px;
    border-radius: 24px;
  }

  .product-thumbs {
    gap: 10px;
  }

  .thumb {
    height: 88px;
    border-radius: 18px;
  }

  .product-info-card {
    padding: 24px;
  }

  .product-info-card h1 {
    font-size: 34px;
  }

  .product-short-desc {
    font-size: 16px;
  }

  .price {
    font-size: 29px;
  }

  .product-cta-row {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .details-btn,
  .details-whatsapp {
    min-height: 60px;
    border-radius: 20px;
    font-size: 15px;
  }

  .quantity-row {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .quantity-box {
    width: 100%;
    min-height: 56px;
    grid-template-columns: 56px 1fr 56px;
  }

  .product-extra-section {
    margin-top: 24px;
  }

  .product-description-card,
  .product-features-card {
    padding: 24px;
  }

  .product-description-card h2,
  .product-features-card h2 {
    font-size: 27px;
  }

  .specs-grid {
    grid-template-columns: 1fr;
  }

  .related-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .related-products-section {
    margin-top: 52px;
  }

  .related-products-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .related-product-card {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    align-items: stretch;
    padding: 16px;
    border-radius: 26px;
    overflow: hidden;
  }

  .related-img {
    width: 100%;
    height: 220px;
    flex: none;
    flex-basis: auto;
    border-radius: 22px;
    padding: 16px;
    overflow: hidden;
  }

  .related-img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
  }

  .related-product-card > div {
    width: 100%;
    position: relative;
    z-index: 2;
  }

  .related-product-card span {
    display: block;
    margin-bottom: 6px;
  }

  .related-product-card h3 {
    font-size: 19px;
    line-height: 1.4;
    margin: 0 0 8px;
  }

  .related-product-card strong {
    font-size: 18px;
  }
}

@media (min-width: 993px) {
  .sidebar-overlay,
  .mobile-sidebar {
    display: none !important;
  }
}

.toast-message,
.ajax-toast {
  position: fixed;
  top: 104px;
  right: 24px;
  left: auto;
  z-index: 999999;
  width: fit-content;
  min-width: 280px;
  max-width: min(420px, calc(100vw - 48px));
  padding: 15px 18px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  line-height: 1.6;
  direction: rtl;
  color: #ffffff;
  box-shadow: 0 18px 55px rgba(43, 23, 8, 0.22);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-16px);
  pointer-events: none;
  transition:
    opacity 0.35s ease,
    visibility 0.35s ease,
    transform 0.35s ease;
}

.toast-message.show,
.ajax-toast.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.toast-message i,
.ajax-toast i {
  font-size: 20px;
  flex-shrink: 0;
  color: #ffffff;
}

.toast-message span,
.ajax-toast span {
  color: #ffffff;
  line-height: 1.6;
}

.toast-success,
.ajax-toast.success {
  background: linear-gradient(135deg, #176b42, #22a66a);
}

.toast-error,
.ajax-toast.error {
  background: linear-gradient(135deg, #7a1f1f, #c0392b);
}

@media (max-width: 620px) {
  .toast-message,
  .ajax-toast {
    top: 88px;
    right: 12px;
    left: 12px;
    width: auto;
    min-width: auto;
    max-width: none;
    padding: 14px 15px;
    border-radius: 16px;
    font-size: 14px;
  }
}

@media (max-width: 380px) {
  .toast-message,
  .ajax-toast {
    top: 84px;
    right: 10px;
    left: 10px;
    font-size: 13px;
  }

  .toast-message i,
  .ajax-toast i {
    font-size: 18px;
  }
}

.stock-row {
  display: flex;
  align-items: center;
  margin-bottom: 24px;
}

.stock-row strong {
  color: var(--gold);
  font-size: 14px;
  background: rgba(199, 154, 69, 0.1);
  border: 1px solid rgba(199, 154, 69, 0.18);
  border-radius: 999px;
  padding: 7px 12px;
}

.stock-row.out-stock-row {
  color: #9b2c2c;
  background: rgba(155, 44, 44, 0.08);
  border: 1px solid rgba(155, 44, 44, 0.18);
}

.stock-row.in-stock-row {
  color: #176b42;
}

.sold-out-badge {
  background: linear-gradient(135deg, #7a1f1f, #b33a3a) !important;
  color: #ffffff !important;
}

.disabled-details-btn,
.disabled-details-btn:disabled {
  background: linear-gradient(135deg, #9a8f86, #756a61) !important;
  color: #ffffff !important;
  cursor: not-allowed;
  box-shadow: none !important;
  opacity: 0.75;
}

.disabled-details-btn:hover {
  transform: none !important;
}

.product-details-layout:has(.sold-out-badge) .main-product-image img {
  opacity: 0.6;
  filter: grayscale(0.35);
}
