/* Product Layout */
.product-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-bottom: 3rem;
}

/* Product Gallery */
.product-gallery {
  background-color: white;
  border-radius: var(--border-radius);
  padding: 1.5rem;
  box-shadow: var(--box-shadow);
}

.main-image {
  position: relative;
  margin-bottom: 1.5rem;
  border-radius: var(--border-radius);
  overflow: hidden;
}

.main-image img {
  width: 100%;
  height: 400px;
  object-fit: contain;
  background-color: white;
}

.gallery-zoom {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background-color: rgba(255, 255, 255, 0.8);
  color: var(--text-color);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  cursor: pointer;
  transition: var(--transition);
}

.gallery-zoom:hover {
  background-color: white;
  color: var(--primary-color);
}

.gallery-thumbnails {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
}

.thumbnail {
  width: 80px;
  height: 80px;
  border-radius: var(--border-radius);
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
  transition: var(--transition);
}

.thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.thumbnail:hover {
  border-color: var(--gray);
}

.thumbnail.active {
  border-color: var(--primary-color);
}

/* Product Info */
.product-info {
  background-color: white;
  border-radius: var(--border-radius);
  padding: 2rem;
  box-shadow: var(--box-shadow);
}

.product-status {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.status {
  display: flex;
  align-items: center;
  font-weight: 500;
}

.status.in-stock {
  color: var(--success);
}

.status.out-of-stock {
  color: var(--danger);
}

.status i {
  margin-right: 0.5rem;
}

.product-code {
  color: var(--text-light);
  font-size: 0.875rem;
}

.product-price-block {
  margin-bottom: 2rem;
}

.price-wrapper {
  display: flex;
  align-items: center;
  margin-bottom: 1.5rem;
}

.product-price {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-color);
}

.old-product-price {
  font-size: 1.25rem;
  text-decoration: line-through;
  color: var(--text-light);
  margin-left: 1rem;
}

.product-price-block .btn {
  margin-right: 1rem;
  margin-bottom: 1rem;
}

.product-features-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.feature-item {
  display: flex;
  align-items: center;
}

.feature-icon {
  width: 50px;
  height: 50px;
  background-color: var(--primary-very-light);
  color: var(--primary-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 1rem;
  font-size: 1.25rem;
}

.feature-text {
  flex-grow: 1;
}

.feature-title {
  display: block;
  font-size: 0.875rem;
  color: var(--text-light);
  margin-bottom: 0.25rem;
}

.feature-value {
  font-weight: 700;
  color: var(--text-color);
}

.product-advantages,
.product-delivery {
  margin-bottom: 2rem;
}

.product-advantages h3,
.product-delivery h3 {
  margin-bottom: 1rem;
  font-size: 1.25rem;
  color: var(--text-color);
}

.product-advantages ul li,
.product-delivery ul li {
  display: flex;
  align-items: flex-start;
  margin-bottom: 0.75rem;
  color: var(--text-color);
}

.product-advantages ul li i,
.product-delivery ul li i {
  color: var(--primary-color);
  margin-right: 0.75rem;
  margin-top: 0.25rem;
}

/* Product Tabs */
.product-tabs {
  background-color: white;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  margin-bottom: 3rem;
}

.tab-controls {
  display: flex;
  border-bottom: 1px solid var(--gray);
  overflow-x: auto;
}

.tab-btn {
  padding: 1rem 1.5rem;
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-light);
  background-color: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}

.tab-btn:hover {
  color: var(--primary-color);
}

.tab-btn.active {
  color: var(--primary-color);
  border-bottom-color: var(--primary-color);
}

.tab-content {
  padding: 2rem;
}

.tab-pane {
  display: none;
}

.tab-pane.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.tab-pane h2 {
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  color: var(--text-color);
}

.tab-pane p {
  margin-bottom: 1.5rem;
  color: var(--text-color);
  line-height: 1.6;
}

.tab-pane ul {
  margin-bottom: 1.5rem;
  padding-left: 1.5rem;
  list-style-type: disc;
}

.tab-pane ul li {
  margin-bottom: 0.5rem;
  color: var(--text-color);
}

/* Specifications Tab */
.specs-table {
  width: 100%;
  border-collapse: collapse;
}

.specs-table tr {
  border-bottom: 1px solid var(--gray);
}

.specs-table tr:last-child {
  border-bottom: none;
}

.specs-table th,
.specs-table td {
  padding: 1rem;
  text-align: left;
}

.specs-table th {
  width: 40%;
  color: var(--text-light);
  font-weight: 500;
}

.specs-table td {
  color: var(--text-color);
  font-weight: 500;
}

.specs-table tr:nth-child(odd) {
  background-color: var(--gray-light);
}

/* Documents Tab */
.documents-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.document-item {
  display: flex;
  align-items: center;
  padding: 1rem;
  background-color: var(--gray-light);
  border-radius: var(--border-radius);
  transition: var(--transition);
}

.document-item:hover {
  background-color: var(--primary-very-light);
}

.document-item i {
  font-size: 1.5rem;
  color: var(--primary-color);
  margin-right: 1rem;
}

/* Reviews Tab */
.reviews-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
}

.review-item {
  border-bottom: 1px solid var(--gray);
  padding-bottom: 1.5rem;
  margin-bottom: 1.5rem;
}

.review-item:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

.review-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
}

.review-author {
  display: flex;
  align-items: center;
}

.review-author img {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  margin-right: 1rem;
}

.author-info h4 {
  margin-bottom: 0.25rem;
  color: var(--text-color);
}

.review-date {
  color: var(--text-light);
  font-size: 0.875rem;
}

.review-rating {
  color: var(--warning);
}

.review-content {
  margin-bottom: 1.5rem;
  color: var(--text-color);
}

.review-photos {
  display: flex;
  gap: 1rem;
}

.review-photos img {
  width: 100px;
  height: 100px;
  object-fit: cover;
  border-radius: var(--border-radius);
  cursor: pointer;
  transition: var(--transition);
}

.review-photos img:hover {
  transform: scale(1.05);
}

/* Rating Input */
.rating-input {
  display: flex;
  margin-bottom: 0.5rem;
}

.rating-input i {
  font-size: 1.5rem;
  color: var(--gray);
  margin-right: 0.5rem;
  cursor: pointer;
  transition: var(--transition);
}

.rating-input i:hover,
.rating-input i.active {
  color: var(--warning);
}

/* Gallery Modal */
.gallery-modal-content {
  position: relative;
  width: 100%;
  max-height: 80vh;
}

.gallery-modal-content img {
  max-width: 100%;
  max-height: 80vh;
  object-fit: contain;
  margin: 0 auto;
  display: block;
}

.gallery-modal-nav {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  transform: translateY(-50%);
  padding: 0 1rem;
}

.gallery-prev,
.gallery-next {
  width: 40px;
  height: 40px;
  background-color: rgba(255, 255, 255, 0.8);
  color: var(--text-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  cursor: pointer;
  transition: var(--transition);
}

.gallery-prev:hover,
.gallery-next:hover {
  background-color: white;
  color: var(--primary-color);
}

/* Related Products */
.related-products {
  margin-bottom: 3rem;
}

/* Responsive Styles */
@media (max-width: 1024px) {
  .product-features-list {
    grid-template-columns: 1fr;
  }

  .documents-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .product-layout {
    grid-template-columns: 1fr;
  }

  .main-image img {
    height: 300px;
  }

  .product-price-block .btn {
    display: block;
    width: 100%;
    margin-right: 0;
  }

  .review-header {
    flex-direction: column;
  }

  .review-rating {
    margin-top: 1rem;
  }
}

@media (max-width: 576px) {
  .tab-controls {
    flex-wrap: wrap;
  }

  .tab-btn {
    flex: 1 0 auto;
    text-align: center;
  }

  .tab-content {
    padding: 1.5rem;
  }

  .specs-table th, 
  .specs-table td {
    padding: 0.75rem;
  }
}