@charset "utf-8";
/* CSS Document */

.product-page {
  max-width: 1200px;
  margin: 20px auto 40px;
  background-color: rgba(255, 248, 220, 0.95); /* parchment-ish */
  padding: 20px 25px;
  border: 2px solid #c0a060;
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.25);
  border-radius: 10px;
  font-family: 'Georgia', serif;
  color: #4B3A22;
}

.product-main-layout {
  display: grid;
  grid-template-columns: 2fr 3fr 2fr; /* images | info | buy box */
  gap: 20px;
}

/* Left column: images */
.product-media-column {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.product-main-image img {
  width: 100%;
  max-width: 400px;
  border-radius: 6px;
  border: 1px solid #d8a9ff;
  background: #fdf7ff;
}

.product-thumbnails {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.product-thumbnails img {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid #d8a9ff;
  cursor: pointer;
}

/* Center column: info */
.product-info-column {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.product-title {
  font-size: 1.8rem;
  color: #4B3A22;
  margin-bottom: 0.3em;
}

.product-rating-summary {
  display: flex;
  align-items: center;
  gap: 0.4em;
  font-size: 0.95rem;
}

.product-rating-summary .stars {
  color: #f1c40f;
}

.product-rating-summary .reviews-link {
  margin-left: 0.5em;
  color: #6a3d9a;
  text-decoration: none;
  font-size: 0.9rem;
}

.product-rating-summary .reviews-link:hover {
  text-decoration: underline;
}

.product-meta {
  font-size: 0.9rem;
  color: #6b5840;
}

.product-description-preview p {
  margin-top: 0.4em;
}

.product-specs-preview ul {
  padding-left: 1.2em;
  margin-top: 0.3em;
}

/* Right column: buy box */
.product-buy-column {
  display: flex;
  justify-content: flex-start;
}

.buy-box {
  width: 100%;
  border: 1px solid #d8a9ff;
  border-radius: 8px;
  padding: 15px;
  background: #f5ebff;
  box-shadow: 0 0 10px rgba(200, 150, 255, 0.25);
  font-size: 0.95rem;
}

.buy-price {
  font-size: 1.2rem;
  margin-bottom: 0.5em;
}

.buy-price .label {
  font-weight: bold;
  margin-right: 0.2em;
}

.buy-price .value {
  color: #6a3d9a;
  font-weight: bold;
}

.buy-stock {
  margin-bottom: 0.8em;
}

.buy-stock.in-stock {
  color: #2e7d32;
  font-weight: bold;
}

.buy-stock.out-of-stock {
  color: #c0392b;
  font-weight: bold;
}

.buy-form {
  display: flex;
  flex-direction: column;
  gap: 0.5em;
}

.buy-form select {
  max-width: 80px;
}

.buy-button {
  background-color: #6a3d9a;
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 0.6em 1.2em;
  font-size: 0.95rem;
  cursor: pointer;
  margin-top: 0.3em;
  transition: background 0.3s, transform 0.05s;
}

.buy-button:hover:not(:disabled) {
  background-color: #9d5bce;
}

.buy-button:active:not(:disabled) {
  transform: scale(0.97);
}

.buy-button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.buy-note {
  margin-top: 0.8em;
  font-size: 0.8rem;
  color: #6b5840;
}

/* Lower layout: description + reviews */
.product-lower-layout {
  margin-top: 30px;
  display: grid;
  grid-template-columns: 2fr 3fr;
  gap: 30px;
}

.product-full-details h2,
.product-reviews h2 {
  margin-bottom: 0.4em;
}

.review-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.review-item {
  border-bottom: 1px solid #e0d0b8;
  padding: 10px 0;
}

.review-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.review-header .star {
  color: #f1c40f;
}

.review-body {
  margin-top: 4px;
}

.review-meta small {
  color: #8a7a60;
}

.review-form {
  margin-top: 15px;
  display: flex;
  flex-direction: column;
  gap: 0.5em;
}

.review-form input[type="text"],
.review-form select,
.review-form textarea {
  width: 100%;
  max-width: 400px;
}

/* General */
.breadcrumb {
  max-width: 1200px;
  margin: 15px auto 5px;
  font-size: 0.9rem;
}

.breadcrumb a {
  color: #6a3d9a;
  text-decoration: none;
}

.breadcrumb a:hover {
  text-decoration: underline;
}

.back-link {
  margin-top: 20px;
  text-align: right;
}

/* Responsive tweaks */
@media (max-width: 900px) {
  .product-main-layout {
    grid-template-columns: 1fr;
  }
  .product-buy-column {
    order: 3;
  }
  .product-media-column {
    order: 1;
  }
  .product-info-column {
    order: 2;
  }
  .product-lower-layout {
    grid-template-columns: 1fr;
  }
}
