/* ============================================
   PRODUCTION-READY PRODUCT DETAIL PAGE
   Professional, Minimal, Elegant Theme
   ============================================ */

:root {
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --secondary: #64748b;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --text-primary: #1e293b;
  --text-secondary: #64748b;
  --bg-primary: #ffffff;
  --bg-secondary: #f8fafc;
  --border: #e2e8f0;
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 8px 20px rgba(0, 0, 0, 0.1);
  --radius: 10px;
  --transition: all 0.25s ease;
}

/* ============================================
   LAYOUT
   ============================================ */
.product-detail-container {
  max-width: 1200px;
  margin: 2rem auto;
  padding: 0 1rem;
}

/* ============================================
   BREADCRUMB
   ============================================ */
.breadcrumb {
  background: transparent;
  padding: 0;
  margin-bottom: 1.25rem;
  font-size: 0.875rem;
}

.breadcrumb-item {
  color: var(--text-secondary);
}

.breadcrumb-item a {
  color: var(--primary);
  text-decoration: none;
  transition: var(--transition);
  font-weight: 500;
}

.breadcrumb-item a:hover {
  color: var(--primary-hover);
}

.breadcrumb-item.active {
  color: var(--text-primary);
  font-weight: 500;
}

/* ============================================
   PRODUCT IMAGE
   ============================================ */
.product-image-wrapper {
  background: var(--bg-primary);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  margin-bottom: 1rem;
  border: 1px solid var(--border);
}

.product-image {
  width: 100%;
  max-height: 450px;
  object-fit: contain;
  border-radius: 8px;
  transition: var(--transition);
}

.product-image:hover {
  transform: scale(1.02);
}

.thumbnail-gallery {
  display: flex;
  flex-wrap: wrap;
  gap: 0.625rem;
  justify-content: center;
  margin-bottom: 1rem;
}

.thumbnail-image {
  width: 75px;
  height: 75px;
  object-fit: cover;
  border-radius: 8px;
  cursor: pointer;
  border: 2px solid var(--border);
  transition: var(--transition);
  background: var(--bg-primary);
}

.thumbnail-image:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
}

.thumbnail-image.active {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

/* ============================================
   PRODUCT DETAILS BOX
   ============================================ */
.product-details-box {
  background: var(--bg-secondary);
  border-radius: var(--radius);
  padding: 1.25rem;
  border: 1px solid var(--border);
}

.product-details-box h5 {
  color: var(--text-primary);
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.product-details-box h5::before {
  content: "";
  width: 3px;
  height: 18px;
  background: var(--primary);
  border-radius: 2px;
}

.product-details-box p {
  margin-bottom: 0.625rem;
  color: var(--text-secondary);
  font-size: 0.875rem;
  line-height: 1.5;
}

.product-details-box p:last-child {
  margin-bottom: 0;
}

.product-details-box strong {
  color: var(--text-primary);
  font-weight: 600;
  margin-right: 0.5rem;
}

/* ============================================
   PRODUCT INFO SECTION
   ============================================ */
.product-info-section {
  background: var(--bg-primary);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
}

.product-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.875rem;
  line-height: 1.3;
}

/* ============================================
   BADGES
   ============================================ */
.badge {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.375rem 0.875rem;
  border-radius: 20px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.badge.bg-success {
  background-color: var(--success) !important;
}

.badge.bg-warning {
  background-color: var(--warning) !important;
}

.badge.bg-danger {
  background-color: var(--danger) !important;
}

/* ============================================
   PRICE SECTION
   ============================================ */
.price-section {
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin: 1.25rem 0;
  border: 1px solid #bfdbfe;
}

.price {
  font-size: 2rem;
  font-weight: 800;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.original-price {
  font-size: 1.375rem;
  color: var(--text-secondary);
  text-decoration: line-through;
  font-weight: 500;
}

.discount-badge {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.8125rem;
  font-weight: 700;
}

/* ============================================
   VARIANT SECTION
   ============================================ */
.variant-section {
  margin: 1.25rem 0;
  padding: 1.25rem;
  background: var(--bg-secondary);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.variant-section h6 {
  color: var(--text-primary);
  font-weight: 700;
  margin-bottom: 0.875rem;
  font-size: 0.9375rem;
}

.variant-options {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.variant-option {
  padding: 0.75rem 1.25rem;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  background: var(--bg-primary);
  transition: var(--transition);
  text-align: center;
  min-width: 110px;
  position: relative;
}

.variant-option:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.variant-option.active {
  border-color: var(--primary);
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.variant-option span {
  display: block;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.125rem;
  font-size: 0.9375rem;
}

.variant-option small {
  font-size: 0.75rem;
  font-weight: 500;
}

/* ============================================
   ACTION BUTTONS
   ============================================ */
.action-buttons {
  display: flex;
  gap: 0.75rem;
  margin: 1.25rem 0;
  flex-wrap: wrap;
}

.btn {
  font-weight: 600;
  border-radius: var(--radius);
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: 0.9375rem;
  box-shadow: var(--shadow-xs);
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, #1d4ed8 100%);
  border: none;
  color: white;
  padding: 0.75rem 1.75rem;
}

.btn-primary:hover:not(:disabled) {
  background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-outline-danger {
  border: 2px solid var(--danger);
  color: var(--danger);
  background: white;
  padding: 0.75rem 1.25rem;
}

.btn-outline-danger:hover {
  background: var(--danger);
  color: white;
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.btn i {
  font-size: 1rem;
}

/* ============================================
   STOCK STATUS
   ============================================ */
.stock-status {
  margin: 1rem 0;
  padding: 0.75rem;
  background: var(--bg-secondary);
  border-radius: var(--radius);
  display: inline-block;
}

/* ============================================
   KEY FEATURES
   ============================================ */
.features-list {
  background: var(--bg-secondary);
  border-radius: var(--radius);
  padding: 1.25rem;
  /* margin: 1.25rem 0; */
  border: 1px solid var(--border);
}

.features-list h6 {
  color: var(--text-primary);
  font-weight: 700;
  margin-bottom: 0.875rem;
  font-size: 0.9375rem;
}

.features-list ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.features-list li {
  /* padding: 0.5rem 0; */
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.625rem;
  font-size: 0.875rem;
}

.features-list li i {
  color: var(--success);
  font-size: 0.875rem;
  flex-shrink: 0;
}

/* ============================================
   SHIPPING INFO
   ============================================ */
.shipping-info {
  background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
  border: 1px solid #bbf7d0;
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-top: 1.5rem;
}

.shipping-info h6 {
  color: var(--text-primary);
  font-weight: 700;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9375rem;
}

.shipping-info h6 i {
  color: var(--success);
  font-size: 1.125rem;
}

.shipping-info p {
  margin-bottom: 0.375rem;
  color: var(--text-primary);
  font-size: 0.875rem;
}

/* ============================================
   PRODUCT TABS
   ============================================ */
.tabs-section {
  margin-top: 3rem;
  background: white;
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
}

.nav-tabs {
  border-bottom: 2px solid var(--border);
  gap: 0.5rem;
  flex-wrap: nowrap;
  overflow-x: auto;
  padding-bottom: 0;
}

.nav-tabs::-webkit-scrollbar {
  height: 3px;
}

.nav-tabs::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 2px;
}

.nav-tabs .nav-link {
  color: var(--text-secondary);
  font-weight: 600;
  padding: 0.875rem 1.25rem;
  border: none;
  border-bottom: 3px solid transparent;
  background: transparent;
  transition: var(--transition);
  white-space: nowrap;
  font-size: 0.9375rem;
}

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

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

.tab-content {
  padding: 1.5rem 0;
  min-height: 150px;
}

.tab-pane {
  animation: fadeIn 0.3s ease;
}

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

.tab-pane p {
  color: var(--text-primary);
  line-height: 1.7;
  font-size: 0.9375rem;
}

/* ============================================
   SPECIFICATIONS TABLE
   ============================================ */
.table {
  margin: 0;
}

.table td {
  padding: 0.875rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
  font-size: 0.9375rem;
}

.table td:first-child {
  font-weight: 600;
  color: var(--text-primary);
  width: 180px;
}

.table td:last-child {
  color: var(--text-secondary);
}

.table tbody tr:last-child td {
  border-bottom: none;
}

/* ============================================
   RELATED PRODUCTS
   ============================================ */
.related-products {
  margin-top: 3.5rem;
}

.related-products h3 {
  font-size: 1.625rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 1.5rem;
  position: relative;
  padding-bottom: 0.75rem;
}

.related-products h3::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 60px;
  height: 3px;
  background: var(--primary);
  border-radius: 2px;
}

.product-card {
  transition: var(--transition);
  cursor: pointer;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
  background: white;
  box-shadow: var(--shadow-xs);
}

.product-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary);
}

.product-card img {
  transition: var(--transition);
}

.product-card:hover img {
  transform: scale(1.08);
}

.overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.65) 100%);
  opacity: 0;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}

.product-card:hover .overlay {
  opacity: 1;
}

.overlay .btn {
  transform: translateY(15px);
  transition: var(--transition);
  border-radius: 25px;
  padding: 0.5rem 1.25rem;
  font-size: 0.875rem;
  box-shadow: var(--shadow-md);
}

.product-card:hover .overlay .btn {
  transform: translateY(0);
}

.product-card .card-body {
  padding: 1rem;
}

.product-card .card-title {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0.375rem 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.4;
}

.product-card .card-text {
  font-size: 1rem;
  font-weight: 700;
  color: var(--primary);
  margin-top: auto;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */
@media (max-width: 992px) {
  .product-title {
    font-size: 1.5rem;
  }

  .price {
    font-size: 1.75rem;
  }

  .tabs-section {
    padding: 1.25rem;
  }
}

@media (max-width: 768px) {
  .product-detail-container {
    margin: 1.5rem auto;
    padding: 0 0.875rem;
  }

  .product-image-wrapper {
    padding: 1.25rem;
  }

  .product-image {
    max-height: 350px;
  }

  .thumbnail-image {
    width: 65px;
    height: 65px;
  }

  .product-info-section {
    padding: 1.25rem;
    margin-top: 0;
  }

  .product-title {
    font-size: 1.375rem;
  }

  .price {
    font-size: 1.5rem;
  }

  .original-price {
    font-size: 1.125rem;
  }

  .variant-option {
    padding: 0.625rem 1rem;
    min-width: 95px;
  }

  .btn-primary,
  .btn-outline-danger {
    width: 100%;
    padding: 0.75rem 1.5rem;
  }

  .action-buttons {
    flex-direction: column;
  }

  .tabs-section {
    padding: 1rem;
    margin-top: 2.5rem;
  }

  .nav-tabs .nav-link {
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
  }

  .tab-content {
    padding: 1.25rem 0;
  }

  .product-details-box {
    padding: 1rem;
  }

  .related-products {
    margin-top: 2.5rem;
  }

  .related-products h3 {
    font-size: 1.375rem;
  }

  .table td:first-child {
    width: 130px;
  }
}

@media (max-width: 576px) {
  .product-detail-container {
    padding: 0 0.75rem;
  }

  .product-image {
    max-height: 280px;
  }

  .thumbnail-image {
    width: 55px;
    height: 55px;
  }

  .thumbnail-gallery {
    gap: 0.5rem;
  }

  .product-title {
    font-size: 1.25rem;
  }

  .price {
    font-size: 1.375rem;
    flex-direction: column;
    align-items: flex-start;
  }

  .variant-option {
    flex: 1 1 calc(50% - 0.375rem);
    min-width: auto;
    padding: 0.625rem 0.875rem;
  }

  .variant-options {
    gap: 0.625rem;
  }

  .price-section {
    padding: 1rem;
  }

  .badge {
    font-size: 0.6875rem;
    padding: 0.3125rem 0.75rem;
  }

  .features-list li {
    font-size: 0.8125rem;
  }

  .shipping-info p {
    font-size: 0.8125rem;
  }
}

@media print {
  .action-buttons,
  .nav-tabs,
  .related-products,
  .overlay {
    display: none !important;
  }
}
