/* Product Details Page Styles */

.details-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
}

.details-back-link {
  margin-bottom: 2rem;
  font-weight: 100;
  color: #000;
}

.back-link {
  color: #666;
  text-decoration: none;
  font-size: 0.95rem;
  transition: color 0.3s ease;
  letter-spacing: 0.3px;
}

.back-link:hover {
  color: #000;
}

.details-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}

.details-image-section {
  display: flex;
  justify-content: center;
}

.details-image-container {
  position: relative;
  width: 100%;
  overflow: hidden;
  background-color: #f5f5f5;
  cursor: zoom-in;
}

.details-image-container:hover {
  cursor: zoom-in;
}

.details-image-container.zoomed {
  cursor: zoom-out;
}

.details-product-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.details-magnifier {
  position: absolute;
  display: none;
  width: 200px;
  height: 200px;
  border: 3px solid #999;
  background-color: #fff;
  background-repeat: no-repeat;
  overflow: hidden;
  z-index: 10;
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.3);
  pointer-events: none;
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.details-magnifier.active {
  display: block;
}

.details-magnifier-glass {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: 300%;
  background-repeat: no-repeat;
}

.details-badge {
  position: absolute;
  top: 2rem;
  left: 2rem;
  background-color: #000;
  color: #fff;
  padding: 0.75rem 1.5rem;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.details-info-section {
  padding: 1rem;
}

.details-title {
  font-size: 2rem;
  font-weight: 400;
  color: #000;
  margin: 0 0 1rem 0;
  letter-spacing: 0.3px;
}

.details-category-rating {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid #eee;
}

.details-category,
.details-color {
  margin: 0;
  font-size: 0.95rem;
  color: #666;
}

.details-price-section {
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid #eee;
}

.details-price {
  font-size: 1.75rem;
  color: #e85d75;
  margin: 0 0 0.5rem 0;
  font-weight: 600;
}

.details-stock {
  margin: 0;
  font-size: 0.95rem;
}

.stock-available {
  color: #28a745;
  font-weight: 500;
}

.stock-unavailable {
  color: #dc3545;
  font-weight: 500;
}

.details-section {
  margin-bottom: 1rem;
}

.section-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: #000;
  margin: 0 0 1rem 0;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  font-size: 0.95rem;
}

.details-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.option-group {
  display: flex;
  flex-direction: column;
}

.option-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: #000;
  margin-bottom: 0.5rem;
  letter-spacing: 0.3px;
}

.option-select {
  padding: 0.7rem 2rem 0.7rem 0.7rem;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 0.95rem;
  background-color: #fff;
  color: #000;
  cursor: pointer;
  transition: border-color 0.3s ease;
}

.option-select:hover {
  border-color: #999;
}

.option-select:focus {
  outline: none;
  border-color: #000;
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.1);
}

.size-options {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.size-btn {
  padding: 0.6rem 1rem;
  border: 2px solid #ddd;
  background-color: #fff;
  color: #000;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 500;
  border-radius: 4px;
  transition: all 0.3s ease;
  letter-spacing: 0.3px;
}

.size-btn:hover {
  border-color: #000;
  background-color: #f5f5f5;
}

.size-btn.selected,
.size-btn[data-selected="True"] {
  background-color: #000;
  color: #fff;
  border-color: #000;
}

.details-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1rem;
}

.details-table tr {
  border-bottom: 1px solid #eee;
}

.details-table tr:last-child {
  border-bottom: none;
}

.details-table td {
  padding: 0.75rem 0;
  font-size: 0.95rem;
}

.details-table .label {
  font-weight: 600;
  color: #000;
  width: 30%;
  letter-spacing: 0.3px;
}

.details-table .value {
  color: #666;
}

#barcode {
  display: block;
  margin: 0.5rem 0;
}

.details-actions {
  margin-bottom: 2rem;
}

.add-to-cart-btn {
  width: 100%;
  padding: 1rem;
  background-color: #000;
  color: #fff;
  border: none;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.3s ease;
}

.add-to-cart-btn:hover:not(:disabled) {
  background-color: #333;
  transform: translateY(-2px);
}

.add-to-cart-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.details-share {
  padding-top: 2rem;
  border-top: 1px solid #eee;
}

.share-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: #000;
  margin: 0 0 1rem 0;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

.share-buttons {
  display: flex;
  gap: 1rem;
}

.share-btn {
  width: 45px;
  height: 45px;
  border: 1px solid #eee;
  background-color: #fff;
  color: #000;
  border-radius: 0;
  font-size: 1.2rem;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.share-btn:hover {
  background-color: #000;
  color: #fff;
}

.product-not-found {
  text-align: center;
  padding: 4rem 2rem;
}

.product-not-found p {
  font-size: 1.1rem;
  color: #666;
  margin-bottom: 1.5rem;
}

/* Reviews Section */
.reviews-section {
  margin-top: 4rem;
  padding: 3rem 0;
  border-top: 1px solid #eee;
  border-bottom: 1px solid #eee;
}

.reviews-title {
  font-size: 1.5rem;
  font-weight: 400;
  color: #000;
  margin: 0 0 2rem 0;
  letter-spacing: 0.3px;
}

.reviews-container {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}

.review-card {
  background-color: #f9f9f9;
  padding: 1.5rem;
  border-radius: 4px;
}

.review-header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  margin-bottom: 1rem;
}

.review-author {
  font-size: 1rem;
  font-weight: 600;
  color: #000;
  margin: 0;
  letter-spacing: 0.3px;
}

.review-rating {
  display: flex;
  gap: 0.25rem;
}

.star {
  font-size: 1.2rem;
  color: #ddd;
}

.star.filled {
  color: #ffc107;
}

.review-text {
  font-size: 0.95rem;
  color: #666;
  line-height: 1.6;
  margin: 0 0 0.75rem 0;
}

.review-date {
  font-size: 0.85rem;
  color: #999;
  margin: 0;
  letter-spacing: 0.3px;
}

/* Related Products Section */
.related-products-section {
  margin-top: 4rem;
  padding-top: 3rem;
  border-top: 1px solid #eee;
}

.related-title {
  font-size: 1.5rem;
  font-weight: 400;
  color: #000;
  margin: 0 0 2rem 0;
  letter-spacing: 0.3px;
}

.related-products-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}

.related-product-card {
  text-decoration: none;
  color: inherit;
  transition: transform 0.3s ease;
}

.related-product-card:hover {
  transform: translateY(-3px);
}

.related-product-image-container {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  overflow: hidden;
  background-color: #f5f5f5;
  margin-bottom: 1rem;
}

.related-product-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.related-product-card:hover .related-product-image {
  transform: scale(1.05);
}

.related-product-badge {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  background-color: #000;
  color: #fff;
  padding: 0.4rem 0.8rem;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.related-product-info {
  padding: 0 0.5rem;
}

.related-product-name {
  font-size: 0.95rem;
  font-weight: 500;
  color: #000;
  margin: 0 0 0.4rem 0;
  letter-spacing: 0.3px;
}

.related-product-brand {
  font-size: 0.85rem;
  color: #999;
  margin: 0 0 0.4rem 0;
  letter-spacing: 0.3px;
}

.related-product-price {
  font-size: 0.95rem;
  color: #e85d75;
  margin: 0;
  font-weight: 500;
}

/* Responsive Design */
@media (max-width: 768px) {
  .details-wrapper {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .details-title {
    font-size: 1.5rem;
  }

  .details-price {
    font-size: 1.5rem;
  }

  .details-category-rating {
    flex-direction: column;
    gap: 0.5rem;
  }

  .details-options {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .details-container {
    padding: 1.5rem;
  }

  .share-buttons {
    gap: 0.75rem;
  }

  .share-btn {
    width: 40px;
    height: 40px;
    font-size: 1rem;
  }

  .related-products-grid {
    grid-template-columns: 1fr;
  }

  .related-title {
    font-size: 1.25rem;
  }

  .reviews-container {
    grid-template-columns: 1fr;
  }

  .reviews-title {
    font-size: 1.25rem;
  }
}

@media (max-width: 480px) {
  .details-title {
    font-size: 1.25rem;
  }

  .details-price {
    font-size: 1.25rem;
  }

  .details-table .label {
    width: 40%;
    font-size: 0.9rem;
  }

  .details-table td {
    padding: 0.75rem 0;
  }

  .option-select {
    font-size: 0.9rem;
    padding: 0.6rem;
  }

  .size-btn {
    padding: 0.5rem 0.8rem;
    font-size: 0.85rem;
    gap: 0.5rem;
  }

  .add-to-cart-btn {
    padding: 0.8rem;
    font-size: 0.9rem;
  }
}
