/* productPage.css — CoreByte Products Listing + Product Details */
/* Follows settings.css conventions exactly. No :root, no @import, no body reset. */


/* ===================================================
   PRODUCT DETAILS PAGE  (.product-details-page)
=================================================== */

.product-details-page {
  max-width: 1050px;
  margin: 28px auto;
  padding: 36px 32px;
  border-radius: 22px;
  background: rgba(229, 234, 245, 0.05);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-subtle);
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 40px;
  transition:
    border-color var(--hover-transition),
    box-shadow   var(--hover-transition);
}

.product-details-page:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-strong);
}

/* Main product image */
.product-details-page > img {
  width: 300px;
  max-width: 100%;
  height: auto;
  flex-shrink: 0;
  border-radius: 18px;
  border: 2px solid rgba(208, 189, 244, 0.28);
  background: rgba(0, 0, 0, 0.20);
  box-shadow: var(--shadow-strong);
  object-fit: cover;
  transition: transform var(--hover-transition), box-shadow var(--hover-transition);
}

.product-details-page > img:hover {
  transform: scale(1.02);
  box-shadow: 0 28px 64px rgba(0, 0, 0, 0.60);
}

/* Info column */
.product-details-info {
  flex: 1;
  min-width: 0;
}

.product-details-info h2 {
  font-size: clamp(22px, 3vw, 34px);
  font-weight: 900;
  line-height: 1.12;
  letter-spacing: 0.3px;
  color: var(--color-primary);
  text-shadow: 0 0 18px rgba(160, 210, 235, 0.18);
  margin-bottom: 14px;
}

.product-details-info p {
  font-size: clamp(13px, 1.5vw, 15px);
  font-weight: 600;
  line-height: 1.75;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.product-details-info p strong {
  color: var(--color-secondary);
  font-weight: 800;
}

.product-price {
  font-size: 20px !important;
  font-weight: 900 !important;
  color: var(--color-primary) !important;
  margin-top: 12px !important;
  margin-bottom: 16px !important;
}

/* Add to cart / Buy Now buttons */
.product-details-info button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border: none;
  border-radius: 14px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 900;
  color: var(--c-ice);
  background: var(--color-highlight);
  box-shadow: 0 14px 32px rgba(132, 88, 179, 0.32);
  transition:
    transform          var(--hover-transition),
    background-color   var(--hover-transition),
    box-shadow         var(--hover-transition);
}

.product-details-info button:hover {
  transform: translateY(-2px);
  background: #9158d6;
  box-shadow: 0 20px 44px rgba(132, 88, 179, 0.50);
}

.product-details-info button:active {
  transform: translateY(0) scale(0.98);
  box-shadow: none;
}

.product-details-info button:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
}


/* ---------------------------------------------------
    REVIEWS SECTION
--------------------------------------------------- */
#reviews-section {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid rgba(208, 189, 244, 0.14);
}

#reviews-section h2 {
  font-size: 20px;
  font-weight: 900;
  color: var(--color-primary);
  margin-bottom: 16px;
  letter-spacing: 0.2px;
}

#reviews-section h3 {
  font-size: 16px;
  font-weight: 900;
  color: var(--color-primary);
  margin-bottom: 12px;
}

/* Individual review card */
.review-card {
  padding: 16px;
  border-radius: 14px;
  background: rgba(229, 234, 245, 0.04);
  border: 1px solid var(--border);
  margin-bottom: 10px;
  transition: border-color var(--hover-transition);
}

.review-card:hover {
  border-color: var(--border-strong);
}

.review-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.review-author {
  font-size: 13px;
  font-weight: 900;
  color: var(--color-primary);
}

.review-stars {
  display: flex;
  gap: 2px;
}

.star {
  font-size: 16px;
  transition: color 0.1s;
}

.star.filled { color: var(--c-lav); }
.star.empty  { color: rgba(208, 189, 244, 0.25); }

.review-body {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  line-height: 1.6;
}

/* Review form */
#review-form {
  margin-top: 20px;
  padding: 20px;
  border-radius: 16px;
  background: rgba(229, 234, 245, 0.04);
  border: 1px solid var(--border);
}

/* Star rating radio input */
.star-rating {
  display: flex;
  flex-direction: row-reverse;
  gap: 4px;
  margin-bottom: 14px;
  width: fit-content;
}

.star-rating input[type="radio"] {
  display: none;
}

.star-rating label {
  font-size: 28px;
  color: rgba(208, 189, 244, 0.25);
  cursor: pointer;
  transition: color 0.12s;
}

.star-rating input:checked ~ label,
.star-rating label:hover,
.star-rating label:hover ~ label {
  color: var(--c-lav);
}

/* Textarea and number input in review form */
#review-form textarea,
#review-form input[type="number"] {
  width: 100%;
  padding: 11px 13px;
  border-radius: 12px;
  border: 1px solid rgba(208, 189, 244, 0.22);
  background: rgba(0, 0, 0, 0.20);
  color: var(--c-ice);
  font-size: 14px;
  font-weight: 600;
  outline: none;
  resize: vertical;
  transition:
    border-color var(--hover-transition),
    box-shadow   var(--hover-transition);
}

#review-form textarea::placeholder,
#review-form input::placeholder {
  color: rgba(229, 234, 245, 0.38);
}

#review-form textarea:focus,
#review-form input:focus {
  border-color: rgba(160, 210, 235, 0.55);
  box-shadow: 0 0 0 3px rgba(160, 210, 235, 0.14);
}


/* ===================================================
   PRODUCTS LISTING PAGE  (.products-page-wrapper)
   Class names match exactly what's in Products_Page.php
=================================================== */

/* View details link on product cards */
.view-details-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid rgba(208, 189, 244, 0.28);
  background: transparent;
  color: var(--color-primary);
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
  margin-bottom: 8px;
  transition:
    background-color var(--hover-transition),
    border-color     var(--hover-transition),
    transform        var(--hover-transition);
}

.view-details-btn:hover {
  background: rgba(208, 189, 244, 0.08);
  border-color: var(--border-strong);
  transform: translateY(-1px);
}


/* ---------------------------------------------------
    RESPONSIVE — Product Details
--------------------------------------------------- */
@media (max-width: 860px) {
  .product-details-page {
    gap: 28px;
    padding: 28px 24px;
  }

  .product-details-page > img {
    width: 240px;
  }
}

@media (max-width: 640px) {
  .product-details-page {
    flex-direction: column;
    align-items: center;
    margin: 16px 12px;
    padding: 24px 18px;
    gap: 20px;
    text-align: center;
  }

  .product-details-page > img {
    width: 100%;
    max-width: 320px;
  }

  .product-details-info button {
    width: 100%;
  }

  .review-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .star-rating {
    justify-content: center;
  }
}
