/* Amazon-style product detail page */
.cn-pdp {
  background: #fff;
  padding-bottom: 1rem;
}

@media (min-width: 768px) {
  .cn-pdp {
    padding-bottom: 1.5rem;
  }
}

@media (min-width: 992px) {
  .cn-pdp {
    padding-bottom: 2rem;
  }
}

.cn-pdp-breadcrumb {
  font-size: 12px;
  color: var(--cn-zinc-500);
  margin-bottom: 12px;
}

.cn-pdp-breadcrumb a {
  color: #007185;
}

.cn-pdp-top {
  display: grid;
  gap: 20px;
  width: 100%;
}

@media (max-width: 991px) {
  .cn-pdp-top {
    padding: 0 16px;
    box-sizing: border-box;
  }

  .cn-pdp-gallery-col,
  .cn-pdp-info-col,
  .cn-pdp-buybox-col {
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }

  .cn-pdp-info-col {
    padding: 0;
  }

  .cn-pdp-title,
  .cn-pdp-brand,
  .cn-pdp-rating-row,
  .cn-pdp-price-block,
  .cn-pdp-offers,
  .cn-pdp-trust {
    width: 100%;
    max-width: 100%;
  }

  /* Purchase box scrolls with the page — no fixed/sticky footer bar */
  .cn-pdp-buybox {
    border: 1px solid var(--cn-zinc-200);
    border-radius: 12px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
    padding: 14px 16px;
  }

  /* Price already shown in the info column */
  .cn-pdp-buybox-price {
    display: none;
  }

  .cn-pdp-delivery,
  .cn-pdp-stock.in-stock,
  .cn-pdp-stock.out-stock {
    display: block !important;
  }

  .cn-pdp-pay-badges {
    display: flex !important;
  }

  .cn-pdp-gallery-col {
    min-height: min(52vw, 280px);
  }
}

@media (min-width: 992px) {
  .cn-pdp-top {
    grid-template-columns: 420px 1fr 320px;
    gap: 24px;
    align-items: start;
    padding: 0;
  }
}

/* Gallery */
.cn-pdp-gallery {
  display: flex;
  gap: 12px;
}

.cn-pdp-thumbs {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cn-pdp-thumb {
  width: 48px;
  height: 48px;
  padding: 0;
  border: 2px solid var(--cn-zinc-200);
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
  overflow: hidden;
}

.cn-pdp-thumb.is-active {
  border-color: var(--cn-brand-500);
  box-shadow: 0 0 0 1px var(--cn-brand-500);
}

.cn-pdp-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.cn-pdp-main-image {
  position: relative;
  flex: 1;
  min-height: 280px;
  max-height: 480px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border: 1px solid var(--cn-zinc-100);
  border-radius: 8px;
}

.cn-pdp-main-image img {
  max-width: 100%;
  max-height: 460px;
  object-fit: contain;
  padding: 16px;
}

.cn-pdp-share {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 1px solid var(--cn-zinc-200);
  background: rgba(255, 255, 255, 0.95);
  cursor: pointer;
}

/* Info column */
.cn-pdp-title {
  margin: 0 0 4px;
  font-size: 1.25rem;
  font-weight: 400;
  line-height: 1.35;
  color: var(--cn-zinc-900);
}

@media (min-width: 768px) {
  .cn-pdp-title {
    font-size: 1.5rem;
  }
}

.cn-pdp-brand a {
  color: #007185;
  font-size: 14px;
}

.cn-pdp-brand a:hover {
  color: #c7511f;
  text-decoration: underline;
}

.cn-pdp-rating-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 8px 0 12px;
  font-size: 14px;
}

.cn-pdp-rating-link {
  color: #007185;
}

.cn-pdp-price-block {
  border-bottom: 1px solid var(--cn-zinc-100);
  padding-bottom: 12px;
  margin-bottom: 12px;
}

.cn-pdp-discount {
  font-size: 1.75rem;
  color: #cc0c39;
  margin-right: 8px;
}

.cn-pdp-price {
  font-size: 1.75rem;
  font-weight: 400;
  color: var(--cn-zinc-900);
}

.cn-pdp-mrp {
  display: block;
  font-size: 13px;
  color: var(--cn-zinc-500);
  margin-top: 4px;
}

.cn-pdp-tax,
.cn-pdp-save {
  font-size: 12px;
  margin: 4px 0 0;
}

.cn-pdp-save {
  color: #067d62;
}

/* Offers */
.cn-pdp-offers {
  margin: 16px 0;
}

.cn-pdp-offers-title {
  margin: 0 0 8px;
  font-size: 14px;
  font-weight: 700;
}

.cn-pdp-offers-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

@media (min-width: 640px) {
  .cn-pdp-offers-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.cn-pdp-offer-card {
  border: 1px solid var(--cn-zinc-200);
  border-radius: 8px;
  padding: 12px;
  background: #fff;
  min-height: 100px;
}

.cn-pdp-offer-head {
  margin: 0;
  font-size: 12px;
  font-weight: 700;
}

.cn-pdp-offer-text {
  margin: 6px 0 0;
  font-size: 12px;
  color: var(--cn-zinc-600);
  line-height: 1.4;
}

.cn-pdp-offer-link {
  display: inline-block;
  margin-top: 8px;
  font-size: 12px;
  color: #007185;
}

.cn-pdp-trust {
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
  font-size: 14px;
  color: var(--cn-zinc-700);
}

.cn-pdp-trust li {
  padding: 6px 0;
  padding-left: 20px;
  position: relative;
}

.cn-pdp-trust li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--cn-brand-600);
  font-weight: 700;
}

/* Buy box */
.cn-pdp-buybox {
  border: 1px solid var(--cn-zinc-200);
  border-radius: 8px;
  padding: 16px;
  background: #fff;
}

@media (min-width: 992px) {
  .cn-pdp-buybox {
    position: sticky;
    top: 88px;
  }
}

.cn-pdp-buybox-price {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 400;
}

.cn-pdp-delivery {
  margin: 8px 0;
  font-size: 14px;
  color: var(--cn-zinc-700);
}

.cn-pdp-stock.in-stock {
  color: #067d62;
  font-size: 18px;
  font-weight: 500;
  margin: 0 0 12px;
}

.cn-pdp-stock.out-stock {
  color: #b12704;
}

.cn-pdp-cart-form form.cart {
  margin: 0;
}

/* WooCommerce / gateway promos hook in before the cart <form>; put quantity + Add to cart first so CTAs stay visible */
@media (max-width: 991px) {
  .cn-pdp-cart-form {
    display: flex;
    flex-direction: column;
    gap: 6px;
  }

  /* Hide gateway promo nodes injected as siblings before <form.cart> */
  .cn-pdp-cart-form > :not(form.cart) {
    display: none !important;
  }

  .cn-pdp-cart-form > form.cart {
    order: -1;
    width: 100%;
  }

  .cn-pdp-cart-form .quantity {
    justify-content: flex-end;
    margin-bottom: 6px;
    padding: 6px 10px;
  }

  .cn-pdp-cart-form .quantity label {
    display: none;
  }

  .cn-pdp-cart-form .quantity .qty {
    width: 52px !important;
    height: 36px !important;
    font-size: 14px !important;
  }

  .cn-pdp-cart-form .single_add_to_cart_button {
    padding: 10px 12px !important;
    font-size: 14px !important;
    border-radius: 999px !important;
  }
}

.cn-pdp-cart-form .quantity {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 12px;
  padding: 12px 14px;
  background: var(--cn-zinc-50);
  border: 1px solid var(--cn-zinc-200);
  border-radius: 10px;
}

.cn-pdp-cart-form .quantity label {
  font-size: 14px;
  font-weight: 600;
  color: var(--cn-zinc-700);
  margin: 0;
  flex-shrink: 0;
}

.cn-pdp-cart-form .quantity .qty {
  width: 72px !important;
  height: 44px !important;
  padding: 0 8px !important;
  text-align: center;
  font-size: 16px !important;
  font-weight: 600;
  border: 1px solid var(--cn-zinc-300) !important;
  border-radius: 8px !important;
  background: #fff !important;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.04);
}

.cn-pdp-cart-form .single_add_to_cart_button {
  width: 100%;
  background: #ffd814 !important;
  border: 1px solid #fcd200 !important;
  color: #0f1111 !important;
  font-weight: 600 !important;
  border-radius: 24px !important;
  padding: 14px 16px !important;
  margin: 0 !important;
  cursor: pointer;
  font-size: 15px !important;
}

.cn-pdp-cart-form .single_add_to_cart_button:hover {
  background: #f7ca00 !important;
}

.cn-pdp-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 12px;
}

.cn-pdp-buy-now-form {
  margin: 0;
}

.cn-btn-buy-now {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  background: #ffa41c;
  border: 1px solid #ff8f00;
  color: #0f1111;
  font-weight: 600;
  border-radius: 24px;
  padding: 14px 16px;
  cursor: pointer;
  text-align: center;
  font-size: 15px;
  box-sizing: border-box;
}

.cn-btn-buy-now:hover {
  background: #fa8900;
}

.cn-btn-app {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  background: #fff;
  border: 2px solid #0d9488;
  color: #0f766e;
  font-weight: 600;
  border-radius: 24px;
  padding: 12px 16px;
  text-decoration: none;
  font-size: 14px;
  box-sizing: border-box;
}

.cn-btn-app:hover {
  background: #f0fdfa;
}

.cn-play-icon {
  flex-shrink: 0;
}

@media (max-width: 991px) {
  .cn-pdp-actions {
    gap: 8px;
    margin-top: 10px;
  }

  .cn-btn-buy-now,
  .cn-btn-app {
    padding: 12px 14px;
    font-size: 14px;
    border-radius: 14px;
  }
}

.cn-pdp-pay-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.cn-pdp-pay-badges span {
  font-size: 11px;
  border: 1px solid var(--cn-zinc-200);
  border-radius: 4px;
  padding: 2px 8px;
  background: #fff;
}

/* Details */
.cn-pdp-details {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--cn-zinc-200);
}

.cn-pdp-details h2 {
  margin: 0 0 12px;
  font-size: 1.125rem;
}

.cn-pdp-description {
  font-size: 14px;
  line-height: 1.6;
  color: var(--cn-zinc-700);
}

.cn-pdp-description img {
  max-width: 100%;
  height: auto;
}

/* FBT */
.cn-pdp-fbt {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--cn-zinc-200);
}

.cn-pdp-fbt h2 {
  margin: 0 0 16px;
  font-size: 1.125rem;
}

.cn-pdp-fbt-inner {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

@media (min-width: 992px) {
  .cn-pdp-fbt-inner {
    flex-direction: row;
    align-items: flex-start;
  }
}

.cn-pdp-fbt-products {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  flex: 1;
}

.cn-pdp-fbt-plus {
  font-size: 20px;
  color: var(--cn-zinc-400);
}

.cn-pdp-fbt-item {
  width: 140px;
  cursor: pointer;
}

.cn-pdp-fbt-item input {
  position: absolute;
  top: 4px;
  right: 4px;
  z-index: 2;
  accent-color: var(--cn-brand-600);
}

.cn-pdp-fbt-item a {
  display: block;
  position: relative;
  border: 1px solid var(--cn-zinc-200);
  border-radius: 8px;
  padding: 8px;
  background: #fff;
  text-decoration: none;
  color: inherit;
}

.cn-pdp-fbt-img {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1;
  background: var(--cn-zinc-50);
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 6px;
}

.cn-pdp-fbt-img img,
.cn-pdp-fbt-img .cn-pdp-fbt-img-el {
  width: auto !important;
  height: auto !important;
  max-width: 100% !important;
  max-height: 100% !important;
  object-fit: contain !important;
  object-position: center;
}

.cn-pdp-fbt-name {
  display: block;
  font-size: 11px;
  margin-top: 6px;
  line-height: 1.3;
  color: #007185;
}

.cn-pdp-fbt-price {
  display: block;
  font-size: 14px;
  font-weight: 700;
  margin-top: 4px;
}

.cn-pdp-fbt-summary {
  min-width: 200px;
}

.cn-btn-fbt {
  width: 100%;
  background: #ffd814;
  border: 1px solid #fcd200;
  color: #0f1111;
  font-weight: 600;
  border-radius: 24px;
  padding: 12px;
  cursor: pointer;
  margin-top: 12px;
}

/* Reviews */
.cn-pdp-reviews {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--cn-zinc-200);
}

.cn-pdp-reviews h2 {
  margin: 0 0 20px;
}

.cn-pdp-reviews-grid {
  display: grid;
  gap: 32px;
}

@media (min-width: 992px) {
  .cn-pdp-reviews-grid {
    grid-template-columns: 280px 1fr;
  }
}

.cn-pdp-reviews-score {
  font-size: 1.125rem;
  margin: 0;
}

.cn-pdp-histogram {
  margin: 16px 0;
}

.cn-pdp-hist-row {
  display: grid;
  grid-template-columns: 52px 1fr 36px;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  margin-bottom: 4px;
}

.cn-pdp-hist-bar {
  height: 16px;
  background: var(--cn-zinc-100);
  border-radius: 2px;
  overflow: hidden;
}

.cn-pdp-hist-bar span {
  display: block;
  height: 100%;
  background: #ffa41c;
}

.cn-pdp-write-review {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--cn-zinc-100);
}

.cn-pdp-write-review h3 {
  margin: 0 0 4px;
  font-size: 14px;
}

.cn-pdp-reviews-list .commentlist {
  list-style: none;
  margin: 0;
  padding: 0;
}

.cn-pdp-reviews-list .comment {
  border-bottom: 1px solid var(--cn-zinc-100);
  padding: 16px 0;
}

/* PDP details padding on mobile */
@media (max-width: 991px) {
  .cn-pdp-details,
  .cn-pdp-fbt,
  .cn-pdp-related,
  .cn-pdp-reviews {
    padding-left: 16px;
    padding-right: 16px;
  }
}

.cn-pdp-related .cn-section {
  border-top: none;
}
