/* Page container */
.product-page {
  max-width: 80rem; /* 7xl */
  margin: 0 auto;
  padding: 1.75rem;
}

/* Loader */
.product-loader {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 5rem 0;
}

.spinner {
  width: 3rem;
  height: 3rem;
  border: 4px solid #ef4444;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Error */
.product-error {
  color: #dc2626;
  padding: 2.5rem 0;
  font-weight: 500;
}

/* Breadcrumb */
.product-breadcrumb {
  font-size: 0.875rem;
  color: #6b7280;
  margin: 1rem 0;
}

.breadcrumb-list {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: nowrap;
  overflow: hidden;
}

.breadcrumb-item a {
  cursor: pointer;
  white-space: nowrap;
}

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

.breadcrumb-separator {
  flex-shrink: 0;
}

.breadcrumb-current {
  color: #374151;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Main layout */
.product-main {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
}

@media (min-width: 1024px) {
  .product-main {
    grid-template-columns: 1fr 1fr;
  }
}

/* Bottom section */
.product-bottom {
  margin-top: 2.5rem;
  width: 100%;
}


/* Product Left Side Layout */

.product-left {
  display: flex;
  gap: 1.5rem; /* gap-6 */
}

/* Thumbnails column */
.product-thumbnails {
  display: flex;
  flex-direction: column;
  gap: 0.75rem; /* gap-3 */
}

/* Thumbnail image */
.product-thumbnail {
  width: 5rem;   /* w-20 */
  height: 5rem;  /* h-20 */
  object-fit: cover;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: box-shadow 0.2s ease;
}

.product-thumbnail:hover {
  box-shadow: 0 0 0 2px #c7d2fe; /* indigo-200 */
}

/* Active thumbnail */
.product-thumbnail.active {
  box-shadow: 0 0 0 2px #6366f1; /* indigo-500 */
}

/* Main image container */
.product-image-wrapper {
  flex: 1;
  max-height: 500px; /* or any value that fits your design */
  overflow: hidden;
}

/* Main image */
.product-main-image {
  width: 100%;
  max-width: 36rem; /* max-w-xl */
  margin: 0 auto;
  border-radius: 0.75rem;
  object-fit: contain;
}

/* Mobile only */
@media (max-width: 640px) {
  .product-main-image {
    height: 27.5rem; /* h-110 */
  }
}


/* Product Right Side Layout */

/* Layout */
.product-right {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 1.5rem;
}

@media (min-width: 1024px) {
  .product-right {
    margin-top: 0;
  }
}

/* Title */
.product-title {
  font-size: 1.875rem;
  font-weight: 700;
}

/* Badges */
.product-badges {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.badge {
  padding: 0.125rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 0.5rem;
  text-transform: uppercase;
}

.badge-category {
  background: #dbeafe;
  color: #1e40af;
}

.badge-brand {
  background: #e5e7eb;
  color: #1f2937;
}

.badge-gender {
  background: #000;
  color: #fff;
}

.badge-discount {
  background: #ef4444;
  color: #fff;
}

/* Prices */
.product-prices {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.price-discount {
  font-size: 1.5rem;
  font-weight: 700;
  color: #dc2626;
}

.price-old {
  color: #9ca3af;
  text-decoration: line-through;
}

.price-regular {
  font-size: 1.125rem;
  font-weight: 700;
}

/* Sizes */
.product-sizes {
  margin-top: 0.75rem;
}

.size-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin-top: 0.5rem;
}

@media (min-width: 640px) {
  .size-grid { grid-template-columns: repeat(4, 1fr); }
}

@media (min-width: 768px) {
  .size-grid { grid-template-columns: repeat(6, 1fr); }
}

.size-btn {
  padding: 0.5rem;
  border: 1px solid #d1d5db;
  border-radius: 0.375rem;
  font-weight: 500;
  transition: all 0.2s ease;
  background: #fff;
}

.size-btn:hover {
  background: #e5e7eb;
}

.size-btn.active {
  background: #000;
  color: #fff;
  border-color: #000;
}

.size-error {
  margin-top: 0.5rem;
  color: #ef4444;
}

/* Actions */
.product-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 1rem;
}

.add-to-cart-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1.5rem;
  background: #000;
  color: #fff;
  border-radius: 0.5rem;
  transition: all 0.2s ease;
}

.add-to-cart-btn:hover {
  background: #1f2937;
}

.wishlist-wrapper {
  position: relative;
}

.wishlist-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border: 1px solid #d1d5db;
  border-radius: 0.5rem;
  transition: all 0.2s ease;
}

.wishlist-btn:hover {
  border-color: #ef4444;
  color: #ef4444;
}

/* Wishlist dropdown */
.wishlist-dropdown {
  position: absolute;
  right: 0;
  margin-top: 0.5rem;
  width: 13rem;
  background: #fff;
  border-radius: 0.75rem;
  box-shadow: 0 20px 30px rgba(0,0,0,0.1);
  border: 1px solid #f3f4f6;
  z-index: 50;
}

.wishlist-dropdown li {
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  cursor: pointer;
}

.wishlist-dropdown li:hover {
  background: #f9fafb;
}

/* Icons */
.icon {
  width: 1.25rem;
  height: 1.25rem;
}

.icon-lg {
  width: 1.5rem;
  height: 1.5rem;
}


/* Product Bottom Side */

/* Layout */
.product-bottom {
  margin-top: 2rem;
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 1024px) {
  .product-bottom {
    grid-template-columns: 1fr 1fr;
  }
}

.bottom-left,
.bottom-right {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Accordion */
.accordion-card {
  background: #fff;
  border-radius: 1rem;
  box-shadow: 0 8px 20px rgba(0,0,0,0.06);
  overflow: hidden;
}

.accordion-header {
  width: 100%;
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: none;
  cursor: pointer;
  transition: background 0.2s;
}

.accordion-header:hover {
  background: #f9fafb;
}

.accordion-title {
  font-size: 1.125rem;
  font-weight: 600;
}

.accordion-body {
  padding: 0.75rem 1.25rem 1.25rem;
}

/* Rating */
.rating-summary {
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

.rating-score p {
  font-size: 3rem;
  font-weight: 700;
}

.rating-score span {
  font-size: 0.875rem;
  color: #6b7280;
}

.rating-bars {
  flex: 1;
}

.rating-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.rating-label {
  width: 2.5rem;
  font-size: 0.75rem;
  font-weight: 700;
}

.rating-bar {
  flex: 1;
  height: 0.5rem;
  background: linear-gradient(90deg, #f0f9ff, #e0f2fe);
  border-radius: 999px;
  overflow: hidden;
}

.rating-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #ef4444, #f43f5e);
}

.rating-percent {
  width: 3rem;
  font-size: 0.75rem;
  text-align: right;
  font-weight: 700;
}

/* Comment */
.comment-card {
  border: 1px solid #e5e7eb;
  border-radius: 1rem;
  padding: 1.25rem;
}

.comment-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.comment-user {
  display: flex;
  gap: 0.75rem;
}

.comment-avatar {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  background: linear-gradient(90deg, #ef4444, #f43f5e);
  color: #fff;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.comment-info {
  display: flex;
  flex-direction: column;
}

.comment-name {
  font-weight: 600;
}

.comment-date {
  font-size: 0.75rem;
  color: #9ca3af;
}

.comment-text {
  margin-top: 1rem;
  font-weight: 600;
}

/* Dots */
.comment-dots {
  display: flex;
  justify-content: center;
  gap: 0.4rem;
  margin-top: 1rem;
}

.dot {
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 50%;
  background: #d1d5db;
}

.dot.active {
  background: #dc2626;
  transform: scale(1.3);
}

/* Add comment */
.add-comment {
  border: 1px solid #f3f4f6;
  border-radius: 1rem;
  padding: 1.25rem;
  margin-top: 1rem;
}

.add-comment-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
}

.textarea-wrapper {
  position: relative;
  margin-top: 0.75rem;
}

.textarea-wrapper textarea {
  width: 100%;
  border-radius: 0.75rem;
  border: 1px solid #e5e7eb;
  padding: 0.75rem 1rem;
  resize: none;
  background: #f9fafb;
}

.textarea-wrapper textarea:focus {
  outline: none;
  border-color: #ef4444;
  background: #fff;
}

.textarea-wrapper span {
  position: absolute;
  bottom: 0.4rem;
  right: 0.75rem;
  font-size: 0.75rem;
  color: #9ca3af;
}

.error-text {
  color: #ef4444;
  font-size: 0.875rem;
  text-align: center;
}

/* Submit */
.add-comment-action {
  display: flex;
  justify-content: flex-end;
  margin-top: 0.75rem;
}

.submit-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.5rem;
  border-radius: 0.5rem;
  background: #000;
  color: #fff;
  font-weight: 600;
  transition: background 0.2s;
}

.submit-btn:hover {
  background: #b91c1c;
}

.submit-btn svg {
  width: 1rem;
  height: 1rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}

/* HTML content */
.content-html {
  color: #374151;
  line-height: 1.6;
}


/* Star Rating Component */
/* ======================
   Star Rating Wrapper
====================== */
.star-rating {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

/* ======================
   Star Base
====================== */
.star-rating svg {
  width: 1.75rem;
  height: 1.75rem;
  cursor: pointer;
  transition:
    transform 0.18s ease,
    color 0.18s ease,
    filter 0.18s ease;
}

/* Active / Hovered stars */
.star-rating svg.text-dark-100 {
  color: #111827;
}

/* Inactive stars */
.star-rating svg.text-gray-300 {
  color: #d1d5db;
}

/* ======================
   Hover Effects
====================== */
.star-rating svg:hover {
  transform: scale(1.15);
}

/* ======================
   Smooth rating fill feel
====================== */
.star-rating svg {
  transform-origin: center;
}

/* ======================
   Optional: subtle click feedback
====================== */
.star-rating svg:active {
  transform: scale(0.95);
}



