/* =========================================================
   Product Detail Page
   File: css/product-detail.css
   ========================================================= */

.product-detail-page {
  background: #fffdf8;
}

/* =========================================================
   Hero
   ========================================================= */

.product-detail-hero-section {
  position: relative;
  min-height: 390px;
  overflow: hidden;
  background: #021d13;
}

.product-detail-hero-bg {
  position: absolute;
  inset: 0;
  background-image: url("../images/hero-bg.jpg");
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
  transform: scale(1.03);
}

.product-detail-hero-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 16% 28%, rgba(213, 173, 88, 0.14), transparent 330px),
    linear-gradient(
      90deg,
      rgba(2, 29, 19, 0.20) 0%,
      rgba(2, 29, 19, 0.58) 45%,
      rgba(2, 29, 19, 0.92) 100%
    );
}

.product-detail-hero-content {
  position: relative;
  z-index: 2;
  min-height: 390px;
  max-width: 850px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  color: #ffffff;
  padding: 54px 0;
}

.product-detail-breadcrumb {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 24px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 14px;
}

.product-detail-breadcrumb a {
  color: #ead28a;
  font-weight: 800;
}

.product-detail-breadcrumb strong {
  color: rgba(255, 255, 255, 0.92);
}

.product-detail-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #d5ad58;
  font-size: 15px;
  font-weight: 900;
  margin-bottom: 8px;
}

.product-detail-label::before {
  content: "";
  width: 34px;
  height: 1px;
  background: #d5ad58;
}

.product-detail-hero-content h1 {
  margin: 0 0 14px;
  color: #ffffff;
  font-size: 46px;
  font-weight: 900;
  line-height: 1.45;
}

.product-detail-hero-content p {
  max-width: 820px;
  margin: 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: 17px;
  line-height: 2.05;
}

/* =========================================================
   Main Product
   ========================================================= */

.product-detail-main-section {
  background:
    radial-gradient(circle at 50% 0%, rgba(213, 173, 88, 0.08), transparent 430px),
    #fffdf8;
  padding: 58px 0 64px;
}

.product-detail-layout {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: 32px;
  align-items: start;
}

.product-gallery-card,
.product-summary-card,
.product-tabs-card,
.related-product-card {
  border: 1px solid #e9dfc9;
  border-radius: 20px;
  background: #ffffff;
  box-shadow: 0 9px 22px rgba(0, 0, 0, 0.035);
}

.product-gallery-card {
  padding: 22px;
}

.product-gallery-main {
  position: relative;
  min-height: 560px;
  border-radius: 18px;
  background:
    radial-gradient(circle at 50% 35%, rgba(213, 173, 88, 0.13), transparent 270px),
    #fffdf8;
  overflow: hidden;
  display: grid;
  place-items: center;
}

.product-gallery-main img {
  width: 100%;
  max-width: 560px;
  height: 520px;
  object-fit: contain;
  transition: 0.28s ease;
  cursor: zoom-in;
}

.product-gallery-main:hover img {
  transform: scale(1.035);
}

.product-gallery-badge {
  position: absolute;
  right: 18px;
  top: 18px;
  z-index: 2;
  height: 34px;
  border-radius: 999px;
  background: #d5ad58;
  color: #021d13;
  display: inline-flex;
  align-items: center;
  padding: 0 13px;
  font-size: 12px;
  font-weight: 900;
}

.product-gallery-zoom {
  position: absolute;
  left: 18px;
  top: 18px;
  z-index: 2;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: #07452e;
  color: #ffffff;
  display: grid;
  place-items: center;
  font-size: 18px;
  transition: 0.25s ease;
}

.product-gallery-zoom:hover {
  background: #d5ad58;
  color: #021d13;
}

.product-gallery-thumbs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-top: 14px;
}

.product-gallery-thumbs button {
  border: 1px solid #e9dfc9;
  border-radius: 14px;
  background: #fffdf8;
  height: 104px;
  padding: 8px;
  overflow: hidden;
  transition: 0.25s ease;
}

.product-gallery-thumbs button.active,
.product-gallery-thumbs button:hover {
  border-color: #d5ad58;
  box-shadow: 0 8px 18px rgba(213, 173, 88, 0.16);
}

.product-gallery-thumbs img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* =========================================================
   Summary
   ========================================================= */

.product-summary-card {
  padding: 30px;
}

.product-summary-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}

.product-category {
  height: 34px;
  border-radius: 999px;
  background: #fff7e4;
  color: #9c762e;
  display: inline-flex;
  align-items: center;
  padding: 0 13px;
  font-size: 12px;
  font-weight: 900;
}

.product-favorite-btn {
  width: 42px;
  height: 42px;
  border: 1px solid #e9dfc9;
  border-radius: 50%;
  background: #ffffff;
  color: #9d2a24;
  display: grid;
  place-items: center;
  font-size: 20px;
  transition: 0.25s ease;
}

.product-favorite-btn.active,
.product-favorite-btn:hover {
  background: #9d2a24;
  color: #ffffff;
  border-color: #9d2a24;
}

.product-summary-card h2 {
  margin: 0 0 12px;
  color: #063522;
  font-size: 36px;
  font-weight: 900;
  line-height: 1.45;
}

.product-rating-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.product-stars {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  color: #d5ad58;
}

.product-rating-row span {
  color: #063522;
  font-size: 13px;
  font-weight: 900;
}

.product-rating-row em {
  color: #777;
  font-size: 13px;
  font-style: normal;
}

.product-short-desc {
  margin: 0 0 20px;
  color: #5c665f;
  font-size: 15px;
  line-height: 2.05;
}

.product-price-box {
  border: 1px solid rgba(213, 173, 88, 0.38);
  border-radius: 16px;
  background:
    radial-gradient(circle at 12% 30%, rgba(213, 173, 88, 0.12), transparent 230px),
    #fffdf8;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  padding: 18px;
  margin-bottom: 20px;
}

.product-price-box span {
  color: #626a63;
  font-size: 13px;
  font-weight: 800;
}

.product-price-box strong {
  display: block;
  margin-top: 5px;
  color: #063522;
  font-size: 28px;
  font-weight: 900;
}

.product-price-box em {
  height: 34px;
  border-radius: 999px;
  background: rgba(7, 69, 46, 0.10);
  color: #07452e;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  font-size: 12px;
  font-weight: 900;
  font-style: normal;
}

.product-options {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-bottom: 20px;
}

.product-option-group {
  display: grid;
  gap: 8px;
}

.product-option-group label,
.product-quantity-row > span {
  color: #063522;
  font-size: 14px;
  font-weight: 900;
}

.product-option-group select {
  height: 50px;
  border: 1px solid #e0d5be;
  border-radius: 12px;
  background: #fffdf8;
  color: #273027;
  outline: 0;
  padding: 0 14px;
  font-size: 14px;
  font-weight: 800;
  transition: 0.22s ease;
}

.product-option-group select:focus {
  border-color: #d5ad58;
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(213, 173, 88, 0.12);
}

.product-quantity-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}

.product-quantity-control {
  width: 150px;
  height: 46px;
  border: 1px solid #e0d5be;
  border-radius: 999px;
  background: #fffdf8;
  display: grid;
  grid-template-columns: 42px 1fr 42px;
  align-items: center;
  overflow: hidden;
}

.product-quantity-control button {
  width: 42px;
  height: 46px;
  border: 0;
  background: transparent;
  color: #063522;
  display: grid;
  place-items: center;
  font-size: 18px;
}

.product-quantity-control button:hover {
  background: #fff7e4;
  color: #9c762e;
}

.product-quantity-control input {
  width: 100%;
  height: 46px;
  border: 0;
  outline: 0;
  background: transparent;
  color: #063522;
  text-align: center;
  font-size: 15px;
  font-weight: 900;
}

.product-actions-row {
  display: grid;
  grid-template-columns: 1fr 180px;
  gap: 14px;
  margin-bottom: 16px;
}

.add-to-cart-btn,
.quick-order-btn {
  height: 54px;
  border: 0;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  font-size: 15px;
  font-weight: 900;
  transition: 0.25s ease;
}

.add-to-cart-btn {
  background: #07452e;
  color: #ffffff;
}

.quick-order-btn {
  background: #fff7e4;
  color: #063522;
}

.add-to-cart-btn:hover,
.quick-order-btn:hover {
  background: #d5ad58;
  color: #021d13;
  transform: translateY(-2px);
}

.product-alert {
  display: none;
  border: 1px solid rgba(7, 69, 46, 0.16);
  border-radius: 12px;
  background: rgba(7, 69, 46, 0.07);
  color: #063522;
  padding: 14px;
  font-size: 14px;
  line-height: 2;
  font-weight: 800;
  margin-bottom: 18px;
}

.product-alert.show {
  display: block;
}

.product-service-list {
  margin: 0 0 20px;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 11px;
}

.product-service-list li {
  color: #5c665f;
  font-size: 14px;
  line-height: 1.9;
  display: flex;
  align-items: center;
  gap: 9px;
}

.product-service-list i {
  color: #9c762e;
  font-size: 19px;
}

.product-share-row {
  border-top: 1px solid #eee4cf;
  padding-top: 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.product-share-row span {
  color: #063522;
  font-size: 13px;
  font-weight: 900;
}

.product-share-row button,
.product-share-row a {
  height: 38px;
  border: 1px solid #e0d5be;
  border-radius: 999px;
  background: #ffffff;
  color: #063522;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 13px;
  font-size: 12px;
  font-weight: 900;
  transition: 0.25s ease;
}

.product-share-row button:hover,
.product-share-row a:hover {
  background: #07452e;
  color: #ffffff;
  border-color: #07452e;
}

/* =========================================================
   Tabs
   ========================================================= */

.product-info-tabs-section {
  background: #fffdf8;
  padding: 0 0 64px;
}

.product-tabs-card {
  overflow: hidden;
}

.product-tabs-nav {
  display: flex;
  align-items: center;
  gap: 0;
  border-bottom: 1px solid #eee4cf;
  background: #fffdf8;
  overflow-x: auto;
}

.product-tabs-nav button {
  min-width: 150px;
  height: 62px;
  border: 0;
  background: transparent;
  color: #063522;
  font-size: 14px;
  font-weight: 900;
  transition: 0.25s ease;
  white-space: nowrap;
}

.product-tabs-nav button.active,
.product-tabs-nav button:hover {
  background: #07452e;
  color: #ffffff;
}

.product-tabs-content {
  padding: 30px;
}

.product-tab-panel {
  display: none;
  animation: productTabFade 0.24s ease;
}

.product-tab-panel.active {
  display: block;
}

@keyframes productTabFade {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.product-tab-panel h2 {
  margin: 0 0 14px;
  color: #063522;
  font-size: 28px;
  font-weight: 900;
}

.product-tab-panel p {
  margin: 0 0 14px;
  color: #5c665f;
  font-size: 15px;
  line-height: 2.1;
}

.product-feature-grid,
.product-brew-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 22px;
}

.product-feature-grid article,
.product-brew-steps article {
  border: 1px solid #eee4cf;
  border-radius: 15px;
  background: #fffdf8;
  padding: 22px;
}

.product-feature-grid i {
  width: 58px;
  height: 58px;
  border-radius: 15px;
  background: #fff7e4;
  color: #9c762e;
  display: grid;
  place-items: center;
  font-size: 28px;
  margin-bottom: 14px;
}

.product-feature-grid h3,
.product-brew-steps h3 {
  margin: 0 0 8px;
  color: #063522;
  font-size: 19px;
  font-weight: 900;
}

.product-feature-grid p,
.product-brew-steps p {
  margin: 0;
  color: #626a63;
  font-size: 14px;
  line-height: 2;
}

.product-specs-table {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0;
  border: 1px solid #eee4cf;
  border-radius: 16px;
  overflow: hidden;
}

.product-specs-table div {
  display: grid;
  grid-template-columns: 170px 1fr;
  border-bottom: 1px solid #eee4cf;
}

.product-specs-table div:nth-last-child(1),
.product-specs-table div:nth-last-child(2) {
  border-bottom: 0;
}

.product-specs-table span {
  background: #fff7e4;
  color: #063522;
  padding: 16px;
  font-size: 13px;
  font-weight: 900;
}

.product-specs-table strong {
  color: #5c665f;
  padding: 16px;
  font-size: 14px;
  font-weight: 700;
  line-height: 2;
}

.product-brew-steps {
  grid-template-columns: repeat(4, 1fr);
}

.product-brew-steps span {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: #07452e;
  color: #d5ad58;
  display: grid;
  place-items: center;
  font-size: 16px;
  font-weight: 900;
  margin-bottom: 14px;
}

.product-reviews-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 22px;
}

.product-review-summary {
  border: 1px solid #eee4cf;
  border-radius: 16px;
  background: #fffdf8;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 26px;
}

.product-review-summary strong {
  color: #063522;
  font-size: 52px;
  font-weight: 900;
}

.product-review-summary div {
  color: #d5ad58;
  margin: 6px 0;
}

.product-review-summary span {
  color: #626a63;
  font-size: 13px;
  font-weight: 800;
}

.product-review-list {
  display: grid;
  gap: 14px;
}

.product-review-list article {
  border: 1px solid #eee4cf;
  border-radius: 15px;
  background: #fffdf8;
  padding: 18px;
}

.product-review-list article > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.product-review-list strong {
  color: #063522;
  font-size: 14px;
  font-weight: 900;
}

.product-review-list span {
  color: #999;
  font-size: 12px;
  font-weight: 700;
}

/* =========================================================
   Related
   ========================================================= */

.related-products-section {
  background:
    radial-gradient(circle at 50% 0%, rgba(213, 173, 88, 0.07), transparent 430px),
    #fffdf8;
  padding: 0 0 70px;
}

.related-products-head {
  text-align: center;
  margin-bottom: 28px;
}

.related-products-head > p {
  margin: 8px 0 0;
  color: #737970;
  font-size: 14px;
}

.related-products-head .product-detail-label {
  justify-content: center;
}

.related-products-head .product-detail-label::after {
  content: "";
  width: 34px;
  height: 1px;
  background: #d5ad58;
}

.related-products-head h2 {
  margin: 0;
  color: #063522;
  font-size: 34px;
  font-weight: 900;
  line-height: 1.5;
}

.related-products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 340px));
  justify-content: center;
  align-items: stretch;
  gap: 24px;
  max-width: 1100px;
  margin-inline: auto;
}

.related-product-card {
  overflow: hidden;
  transition: 0.25s ease;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.related-product-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 42px rgba(4, 53, 35, 0.12);
}

.related-product-image {
  position: relative;
  height: 255px;
  background: #fffdf8;
  display: grid;
  place-items: center;
  padding: 16px;
  overflow: hidden;
}

.related-product-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.35s ease;
}

.related-product-card:hover .related-product-image img {
  transform: scale(1.035);
}

.related-product-badge {
  position: absolute;
  z-index: 1;
  top: 14px;
  right: 14px;
  padding: 6px 11px;
  border-radius: 999px;
  background: #d5ad58;
  color: #173c2d;
  font-size: 11px;
  font-weight: 900;
}

.related-product-info {
  border-top: 1px solid #eee4cf;
  padding: 19px 20px 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.related-product-info span {
  color: #9c762e;
  font-size: 13px;
  font-weight: 900;
}

.related-product-info h3 {
  margin: 6px 0 8px;
  color: #063522;
  font-size: 21px;
  font-weight: 900;
}

.related-product-info h3 a {
  color: inherit;
  background: none;
  padding: 0;
  height: auto;
}

.related-product-info p {
  margin: 0 0 16px;
  color: #626a63;
  font-size: 14px;
  line-height: 2;
  min-height: 56px;
}

.related-product-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  padding-top: 15px;
  border-top: 1px dashed #e7dcc5;
}

.related-product-footer strong {
  color: #063522;
  font-size: 16px;
  white-space: nowrap;
}

.related-product-footer strong small {
  font-size: 11px;
}

.related-product-info .related-product-link {
  height: 42px;
  border-radius: 999px;
  background: #07452e;
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  padding: 0 16px;
  font-size: 13px;
  font-weight: 900;
  gap: 7px;
  white-space: nowrap;
}

.related-product-info .related-product-link:hover {
  background: #d5ad58;
  color: #021d13;
}

.product-detail-bottom-cta {
  background: #fffdf8;
  padding: 0;
}

/* =========================================================
   Image Modal
   ========================================================= */

.product-image-modal .modal-content {
  border: 1px solid rgba(213, 173, 88, 0.34);
  border-radius: 20px;
  overflow: hidden;
  background: #fffdf8;
}

.product-image-modal .modal-header {
  border-bottom: 1px solid #eee4cf;
  background: #07452e;
  color: #ffffff;
  padding: 18px 22px;
}

.product-image-modal .modal-header h2 {
  margin: 0;
  color: #ffffff;
  font-size: 20px;
  font-weight: 900;
}

.product-image-modal .btn-close {
  filter: invert(1);
  opacity: 0.9;
}

.product-image-modal .modal-body {
  min-height: 520px;
  display: grid;
  place-items: center;
  padding: 26px;
}

.product-image-modal .modal-body img {
  max-width: 100%;
  max-height: 620px;
  object-fit: contain;
}

/* =========================================================
   Responsive
   ========================================================= */

@media (max-width: 1199px) {
  .product-detail-layout {
    grid-template-columns: 1fr;
  }

  .product-gallery-main {
    min-height: 470px;
  }

  .product-gallery-main img {
    height: 430px;
  }

  .product-feature-grid,
  .product-brew-steps,
  .related-products-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .product-specs-table {
    grid-template-columns: 1fr;
  }

  .product-specs-table div:nth-last-child(2) {
    border-bottom: 1px solid #eee4cf;
  }
}

@media (max-width: 767px) {
  .product-detail-hero-section,
  .product-detail-hero-content {
    min-height: 420px;
  }

  .product-detail-hero-content {
    text-align: center;
    padding: 44px 0;
  }

  .product-detail-breadcrumb {
    justify-content: center;
    flex-wrap: wrap;
  }

  .product-detail-label {
    justify-content: center;
  }

  .product-detail-label::after {
    content: "";
    width: 34px;
    height: 1px;
    background: #d5ad58;
  }

  .product-detail-hero-content h1 {
    font-size: 31px;
  }

  .product-detail-hero-content p {
    font-size: 14px;
  }

  .product-detail-main-section {
    padding: 38px 0 44px;
  }

  .product-gallery-card,
  .product-summary-card,
  .product-tabs-content {
    padding: 18px;
  }

  .product-gallery-main {
    min-height: 330px;
  }

  .product-gallery-main img {
    height: 300px;
  }

  .product-gallery-thumbs {
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
  }

  .product-gallery-thumbs button {
    height: 76px;
  }

  .product-summary-card h2 {
    font-size: 27px;
  }

  .product-price-box,
  .product-quantity-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .product-options,
  .product-actions-row,
  .product-feature-grid,
  .product-brew-steps,
  .product-reviews-layout,
  .related-products-grid {
    grid-template-columns: 1fr;
  }

  .product-actions-row .add-to-cart-btn,
  .product-actions-row .quick-order-btn {
    width: 100%;
  }

  .product-tabs-nav button {
    min-width: 130px;
    height: 56px;
    font-size: 13px;
  }

  .product-tab-panel h2 {
    font-size: 24px;
  }

  .product-specs-table div {
    grid-template-columns: 1fr;
  }

  .product-review-list article > div {
    flex-direction: column;
  }

  .related-products-head h2 {
    font-size: 26px;
  }

  .product-image-modal .modal-body {
    min-height: 360px;
  }
}
/* Database-backed product reviews */
.product-review-form-card {
  margin-top: 28px;
  padding: 24px;
  border: 1px solid #ead9ad;
  border-radius: 18px;
  background: #fffdf8;
}

.product-review-form-card > p { color: #69736c; }
.product-review-form label { display: block; margin-bottom: 7px; font-weight: 800; color: #053421; }
.review-form-row { display: grid; grid-template-columns: 1fr 1fr .55fr; gap: 16px; }
.product-review-form input,
.product-review-form select,
.product-review-form textarea {
  width: 100%;
  border: 1px solid #d8cfbd;
  border-radius: 11px;
  padding: 12px 14px;
  background: #fff;
}
.product-review-form textarea { margin-bottom: 16px; resize: vertical; }
.product-review-form .errorlist { margin: 6px 0 0; color: #a32323; font-size: 13px; }
.product-review-item { padding: 18px; border-bottom: 1px solid #eee4cf; }
.product-review-item div { display: flex; justify-content: space-between; gap: 16px; }
.product-review-item time { color: #8b928d; font-size: 12px; }
@media (max-width: 767px) { .review-form-row { grid-template-columns: 1fr; } }
