/**
 * Product Single Page Styles
 */

/* Product Header Layout */
.seecommerce-product-single {
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 24px;
}

.product-header {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}

/* Product Image Gallery */
.product-image-gallery {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.main-image-wrapper {
  background: #f8fafc;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #e2e8f0;
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.product-main-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.product-image-placeholder {
  width: 100%;
  display: block;
}

/* Gallery Thumbnails */
.gallery-thumbnails {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  gap: 12px;
  max-width: 100%;
}

.gallery-thumbnail {
  position: relative;
  aspect-ratio: 1;
  width: 100%;
  max-width: 120px;
  height: auto;
  border-radius: 8px;
  overflow: hidden;
  border: 2px solid #e2e8f0;
  cursor: pointer;
  transition: all 0.2s;
  background: #f8fafc;
}

.gallery-thumbnail:hover {
  border-color: #2563eb;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(37, 99, 235, 0.15);
}

.gallery-thumbnail.active {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.gallery-thumbnail img {
  width: 100%;
  height: 100%;
  max-width: 100%;
  object-fit: cover;
  display: block;
}

/* Product Info Section */
.product-info {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.product-title {
  font-size: 32px;
  font-weight: 700;
  line-height: 1.2;
  margin: 0;
  color: #1e293b;
}

/* Rating Stars */
.product-rating {
  display: flex;
  align-items: center;
  gap: 12px;
}

.stars {
  display: flex;
  gap: 4px;
}

.star {
  font-size: 20px;
  color: #cbd5e1;
}

.star.filled {
  color: #f59e0b;
}

.rating-text {
  font-size: 14px;
  color: #64748b;
}

.rating-count {
  font-size: 14px;
  color: #94a3b8;
}

/* Price Section */
.product-price-section {
  padding: 16px 0;
  border-top: 1px solid #e2e8f0;
  border-bottom: 1px solid #e2e8f0;
}

.price-main {
  font-size: 36px;
  font-weight: 700;
  color: #2563eb;
}

/* Short Description */
.product-short-description {
  font-size: 16px;
  line-height: 1.6;
  color: #475569;
}

/* Product Meta */
.product-meta {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 20px 0;
  border-bottom: 1px solid #e2e8f0;
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 15px;
}

.meta-label {
  font-weight: 600;
  color: #475569;
  min-width: 100px;
}

.meta-value {
  color: #64748b;
}

.stock-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
}

.stock-status.in-stock {
  background: #dcfce7;
  color: #16a34a;
}

.stock-status.out-of-stock {
  background: #fee2e2;
  color: #dc2626;
}

/* Add to Cart Section */
.product-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 24px;
}

.product-info .add-to-cart {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px 32px;
  background: #2563eb;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.product-info .add-to-cart:hover {
  background: #1d4ed8;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.product-info .add-to-cart:active {
  transform: translateY(0);
}

/* Button Group for Add to Cart + View Bag */
.product-actions.button-group {
  display: flex;
  gap: 8px;
}

.product-actions.button-group .add-to-cart {
  flex: 2;
}

.product-actions.button-group .view-bag-btn {
  flex: 1;
  padding: 16px 24px;
  background: #059669;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: 0 !important;
}

.product-actions.button-group .view-bag-btn:hover {
  background: #047857;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(5, 150, 105, 0.3);
}

.product-actions.button-group .view-bag-btn:active {
  transform: translateY(0);
}

.product-info .add-to-cart.success {
  background: #059669;
}

.product-info .add-to-cart.error {
  background: #dc2626;
}

.product-info .add-to-cart:disabled {
  background: #94a3b8;
  cursor: not-allowed;
}

/* Product Tabs */
.product-tabs {
  margin-top: 48px;
}

.tabs-nav {
  display: flex;
  gap: 8px;
  border-bottom: 2px solid #e2e8f0;
  margin-bottom: 32px;
}

.tab-button {
  padding: 16px 32px;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  font-size: 16px;
  font-weight: 600;
  color: #64748b;
  cursor: pointer;
  transition: all 0.2s;
  margin-bottom: -2px;
}

.tab-button:hover {
  color: #2563eb;
}

.tab-button.active {
  color: #2563eb;
  border-bottom-color: #2563eb;
}

.tabs-content {
  padding: 0;
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
  animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Description Tab */
#tab-description {
  font-size: 16px;
  line-height: 1.8;
  color: #475569;
}

#tab-description p {
  margin-bottom: 16px;
}

#tab-description h2,
#tab-description h3 {
  margin-top: 32px;
  margin-bottom: 16px;
  color: #1e293b;
}

#tab-description ul,
#tab-description ol {
  margin: 16px 0;
  padding-left: 24px;
}

#tab-description li {
  margin-bottom: 8px;
}

/* Reviews Tab */
.reviews-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid #e2e8f0;
}

.reviews-summary h3 {
  font-size: 24px;
  margin: 0 0 8px 0;
  color: #1e293b;
}

.reviews-average {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.average-rating {
  font-size: 36px;
  font-weight: 700;
  color: #2563eb;
}

.reviews-count {
  font-size: 14px;
  color: #64748b;
}

.review-list {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.review-item {
  padding: 24px;
  background: #f8fafc;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
}

.review-header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  margin-bottom: 12px;
}

.review-author {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.author-name {
  font-weight: 600;
  font-size: 16px;
  color: #1e293b;
}

.review-date {
  font-size: 14px;
  color: #94a3b8;
}

.review-rating .stars {
  font-size: 16px;
}

.review-content {
  font-size: 15px;
  line-height: 1.6;
  color: #475569;
}

.review-verified {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 12px;
  padding: 4px 12px;
  background: #dcfce7;
  color: #16a34a;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
}

/* Empty Reviews State */
.no-reviews {
  text-align: center;
  padding: 64px 24px;
  color: #94a3b8;
}

.no-reviews h4 {
  font-size: 18px;
  margin-bottom: 8px;
  color: #64748b;
}

/* Responsive Design */
@media (max-width: 968px) {
  .product-header {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .product-title {
    font-size: 28px;
  }

  .price-main {
    font-size: 32px;
  }

  .tabs-nav {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .tab-button {
    padding: 12px 24px;
    white-space: nowrap;
  }
}

@media (max-width: 640px) {
  .seecommerce-product-single {
    padding: 24px 16px;
  }

  .product-title {
    font-size: 24px;
  }

  .price-main {
    font-size: 28px;
  }

  .product-info .add-to-cart {
    width: 100%;
    justify-content: center;
  }

  .reviews-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .tab-button {
    padding: 12px 16px;
    font-size: 14px;
  }
}
