/* Product Details Page Styles */
.book-details-layout {
  padding: 40px 0;
  background-color: #f8f9fa;
  min-height: calc(100vh - 200px);
}

.product-gallery {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.main-image-wrap {
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  background: #fff;
  border: 1px solid #e5e7eb;
}

.main-image-wrap img {
  width: 100%;
  height: auto;
  object-fit: cover;
}

.thumbnail-gallery {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 8px;
}

.thumbnail-item {
  width: 80px;
  height: 100px;
  border-radius: 8px;
  overflow: hidden;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.thumbnail-item:hover,
.thumbnail-item.active {
  border-color: var(--clr-primary);
}

.thumbnail-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-info-card {
  background: #fff;
  border-radius: 12px;
  padding: 30px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
}

.product-title {
  font-size: 28px;
  font-weight: 700;
  color: #1f2937;
  margin-bottom: 12px;
}

.product-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 12px;
  color: #4b5563;
  font-size: 14px;
}

.product-meta span {
  display: flex;
  align-items: center;
  gap: 6px;
}

.product-price-wrap {
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid #f3f4f6;
}

.current-price {
  font-size: 28px;
  font-weight: 800;
  color: var(--clr-primary);
}

.old-price {
  font-size: 18px;
  color: #9ca3af;
  text-decoration: line-through;
  margin-left: 12px;
}

.discount-badge {
  background: var(--clr-danger);
  color: #fff;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  margin-left: 12px;
  vertical-align: middle;
}

/* ===== Quantity Selector ===== */
.qty-selector {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.qty-label {
  font-size: 15px;
  font-weight: 600;
  color: #374151;
  min-width: 56px;
}

.qty-controls {
  display: flex;
  align-items: center;
  border: 1.5px solid #d1d5db;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}

.qty-btn {
  background: transparent;
  border: none;
  width: 36px;
  height: 36px;
  font-size: 20px;
  font-weight: 500;
  color: #374151;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  line-height: 1;
}

.qty-btn:hover {
  background: #e5e7eb;
  color: var(--clr-primary);
}

.qty-input {
  width: 48px;
  height: 36px;
  border: none;
  border-left: 1.5px solid #d1d5db;
  border-right: 1.5px solid #d1d5db;
  text-align: center;
  font-size: 15px;
  font-weight: 600;
  color: #111827;
  outline: none;
  -moz-appearance: textfield;
  appearance: textfield;
}

.qty-input::-webkit-outer-spin-button,
.qty-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.qty-stock-hint {
  font-size: 12px;
  color: #6b7280;
}

.product-actions {
  display: flex;
  gap: 16px;
  margin-bottom: 24px;
}

.btn-add-cart {
  flex: 1;
  background: var(--clr-primary);
  color: #fff;
  border: none;
  padding: 14px 24px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  transition: all 0.3s ease;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
}

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

.btn-buy-now {
  flex: 1;
  background: var(--clr-secondary);
  color: #fff;
  border: none;
  padding: 14px 24px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  transition: all 0.3s ease;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  background-color: #212529;
}

.btn-buy-now:hover {
  background: #0f766e;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(20, 184, 166, 0.2);
}

.btn-wishlist {
  background: #f3f4f6;
  color: #4b5563;
  border: none;
  width: 52px;
  border-radius: 8px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 20px;
  transition: all 0.3s ease;
}

.btn-wishlist:hover {
  background: #e5e7eb;
  color: var(--clr-danger);
}

.product-features {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 24px;
}

.feature-item {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #4b5563;
  font-size: 14px;
}

.feature-item i {
  color: var(--clr-success);
  font-size: 18px;
}

.product-tabs-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
  margin-top: 24px;
  overflow: hidden;
}

.book-nav-tabs {
  border-bottom: 2px solid #f3f4f6;
  background: #fafafa;
  padding: 0 20px;
}

.book-nav-tabs .nav-link {
  color: #4b5563;
  font-weight: 600;
  border: none;
  border-bottom: 3px solid transparent;
  padding: 16px 24px;
  border-radius: 0;
  transition: all 0.3s ease;
}

.book-nav-tabs .nav-link:hover {
  color: var(--clr-primary);
  border-color: transparent;
}

.book-nav-tabs .nav-link.active {
  color: var(--clr-primary);
  border-color: var(--clr-primary);
  background: transparent;
}

.book-details-table th {
  width: 150px;
  background-color: #f9fafb;
  color: #374151;
  font-weight: 600;
}

.book-details-table td {
  color: #4b5563;
}

.related-books-section {
  margin-top: 40px;
}

.zoom-icon {
  position: absolute;
  top: 15px;
  right: 15px;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 13px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.main-image-wrap {
  position: relative;
}

.main-image-wrap:hover .zoom-icon {
  opacity: 1;
}

.action-secondary {
  display: flex;
  gap: 12px;
}

.btn-wishlist {
  background: #f3f4f6;
  color: #4b5563;
  border: none;
  padding: 0 20px;
  border-radius: 8px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 16px;
  font-weight: 600;
  gap: 6px;
  transition: all 0.3s ease;
}

.btn-wishlist:hover {
  background: #e5e7eb;
  color: var(--clr-danger);
}

.btn-share {
  background: #fff;
  color: #1d4ed8;
  border: 1px solid #1d4ed8;
  padding: 0 20px;
  border-radius: 8px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 16px;
  font-weight: 600;
  gap: 6px;
  transition: all 0.3s ease;
}

.btn-share:hover {
  background: #1d4ed8;
  color: #fff;
}

/* Adjust product actions for smaller screens */
@media (max-width: 991px) {
  .product-actions {
    flex-wrap: wrap;
  }

  .action-secondary {
    width: 100%;
    flex: 1 1 100%;
  }

  .action-secondary .btn-wishlist,
  .action-secondary .btn-share {
    flex: 1;
    padding: 14px 20px;
  }
}

@media(max-width:576px) {
  .btn-mobile-sm {
    padding: 10px 12px;
    font-size: 14px;
  }

  .mobile-tabs-scroll {
    flex-wrap: nowrap;
    overflow-x: auto;
    white-space: nowrap;
  }

  .mobile-tabs-scroll::-webkit-scrollbar {
    display: none;
  }

  .mobile-tabs-scroll .nav-link {
    padding: 8px 10px;
    font-size: 13px;
  }

  .btn-add-cart {
    padding: 5px;
  }

  .product-info-card {
    padding: 15px;
  }

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

@media(max-width:576px) {
  .thumbnail-item {
    width: 60px;
    height: 75px;
  }

  .book-details-layout {
    padding: 20px 0;
  }

  .main-image-wrap {
    width: 100%;
    border-radius: 0px;
    box-shadow: none;
    background: transparent;
    border: 0;
  }

  .thumbnail-gallery {
    justify-content: center;
  }

  .main-image-wrap img {
    width: 100%;
    height: auto;
    max-height: 38vh;
    object-fit: contain;
  }
}