/* ==========================================================================
   AGARWAL COMPUTER — PRODUCT DETAIL STYLES
   White & Blue Technical Retail Identity
   ========================================================================== */

.product-detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 40px;
  background-color: var(--color-white);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 32px;
  margin-bottom: 32px;
  max-width: 100%;
}

/* Gallery Section */
.product-gallery {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
  max-width: 100%;
}

.product-gallery__main-wrap {
  width: 100%;
  max-width: 100%;
  padding-top: 75%;
  position: relative;
  background-color: var(--color-bg-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
}

.product-gallery__main-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  padding: 24px;
  transition: opacity 0.2s ease, transform 0.22s ease;
  -webkit-user-drag: none;
}

.product-gallery__main-img.is-switching {
  opacity: 0.35;
}

.product-gallery__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--border-color);
  background: rgba(255, 255, 255, 0.92);
  color: var(--color-deep-navy);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(16, 45, 79, 0.12);
  transition: background-color 0.15s ease, transform 0.15s ease;
}

.product-gallery__nav:hover {
  background: var(--color-white);
  transform: translateY(-50%) scale(1.05);
}

.product-gallery__nav--prev { left: 10px; }
.product-gallery__nav--next { right: 10px; }

.product-gallery__dots {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  display: flex;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(16, 45, 79, 0.55);
}

.product-gallery__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  border: none;
  padding: 0;
  background: rgba(255, 255, 255, 0.45);
  cursor: pointer;
  transition: width 0.2s ease, background-color 0.2s ease;
}

.product-gallery__dot.is-active {
  width: 18px;
  border-radius: 999px;
  background: #FFFFFF;
}

@media (max-width: 640px) {
  .product-gallery__nav {
    display: none;
  }
}

.product-gallery__thumbs {
  display: flex;
  gap: 8px;
  flex-wrap: nowrap;
  overflow-x: auto;
  max-width: 100%;
  padding: 2px 0 4px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.product-gallery__thumbs::-webkit-scrollbar {
  display: none;
}

.product-gallery-thumb {
  flex: 0 0 auto;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 4px;
  background: var(--color-white);
  cursor: pointer;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.product-gallery-thumb:hover,
.product-gallery-thumb.is-active {
  border-color: var(--color-brand-blue);
  box-shadow: 0 0 0 1px var(--color-brand-blue);
}

.product-gallery-thumb img {
  width: 56px;
  height: 56px;
  object-fit: contain;
  display: block;
}

/* Product Info Section */
.product-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
  max-width: 100%;
}

.product-info__brand {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--color-brand-blue);
  margin-bottom: 4px;
  overflow-wrap: anywhere;
}

.product-info__title {
  font-size: 1.75rem;
  font-weight: 600;
  color: var(--color-deep-navy);
  margin-bottom: 12px;
  line-height: 1.25;
  letter-spacing: -0.02em;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.product-info__meta {
  display: flex;
  align-items: center;
  gap: 8px 12px;
  margin-bottom: 20px;
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  flex-wrap: wrap;
  overflow-wrap: anywhere;
}

/* Pricing Box */
.product-info__price-box {
  padding: 16px 20px;
  margin-bottom: 20px;
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px 12px;
  background-color: var(--color-ice-blue);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  max-width: 100%;
}

.product-info__current-price {
  font-size: 1.875rem;
  font-weight: 600;
  color: var(--color-deep-navy);
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.product-info__tax-note {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  line-height: 1.4;
}

/* Discreet Demo Banner */
.product-info__demo-banner {
  background-color: var(--color-ice-blue);
  border: 1px solid var(--color-soft-blue);
  border-left: 3px solid var(--color-brand-blue);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  margin-bottom: 20px;
  color: var(--color-text-muted);
  font-size: 0.8125rem;
  line-height: 1.45;
}

.product-info__demo-banner strong {
  color: var(--color-deep-navy);
}

.product-info__desc {
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--color-text-secondary);
  margin-bottom: 24px;
  white-space: pre-line;
}

/* Quantity & Action Buttons */
.product-info__actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 24px;
  max-width: 100%;
}

.product-info__actions .btn {
  min-height: 44px;
  white-space: nowrap;
}

.product-info__btn-cart {
  flex: 1 1 160px;
}

.product-info__btn-wa {
  flex: 1 1 160px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #15803D;
  border-color: #BBF7D0;
  background-color: #F0FDF4;
}

.product-info__btn-wa:hover {
  background-color: #DCFCE7;
  border-color: #16A34A;
  color: #166534;
}

.quantity-picker {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  background-color: var(--color-white);
  flex-shrink: 0;
}

.quantity-btn {
  width: 36px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  color: var(--color-deep-navy);
  background-color: var(--color-bg-subtle);
  cursor: pointer;
  border: none;
  transition: background-color var(--transition-fast), color var(--transition-fast);
}

.quantity-btn:hover {
  background-color: var(--color-soft-blue);
  color: var(--color-brand-blue);
}

.quantity-input {
  width: 40px;
  height: 42px;
  text-align: center;
  border: none;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--color-deep-navy);
  outline: none;
  background-color: var(--color-white);
  font-variant-numeric: tabular-nums;
}

/* Trust Guarantees */
.product-trust-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding-top: 20px;
  border-top: 1px solid var(--border-color);
}

.product-trust-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8125rem;
  color: var(--color-deep-navy);
  font-weight: 500;
}

.product-trust-item svg {
  width: 16px;
  height: 16px;
  stroke: var(--color-brand-blue);
  flex-shrink: 0;
}

/* Technical Specifications Table */
.product-tabs-section {
  background-color: var(--color-white);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 28px 32px;
  margin-bottom: 40px;
}

.specs-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--color-deep-navy);
  margin-bottom: 16px;
}

.specs-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.specs-table tr {
  border-bottom: 1px solid var(--border-color);
}

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

.specs-table th, .specs-table td {
  padding: 12px 16px;
  text-align: left;
  font-size: 0.875rem;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.specs-table th {
  width: 32%;
  color: var(--color-deep-navy);
  font-weight: 600;
  background-color: var(--color-bg-subtle);
  border-right: 1px solid var(--border-color);
}

.specs-table td {
  color: var(--color-text-main);
  font-weight: 400;
  background-color: var(--color-white);
}

/* Responsive adjustments */
@media (max-width: 900px) {
  .product-detail-layout {
    grid-template-columns: minmax(0, 1fr);
    padding: 20px;
    gap: 24px;
  }
  .product-trust-row {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .specs-table th {
    width: 38%;
  }
}

@media (max-width: 600px) {
  .product-detail-layout {
    padding: 16px;
    gap: 20px;
    margin-bottom: 24px;
  }
  .product-gallery__main-img {
    padding: 16px;
  }
  .product-info__title {
    font-size: 1.375rem;
  }
  .product-info__current-price {
    font-size: 1.5rem;
  }
  .product-info__price-box {
    padding: 12px 16px;
  }
  .product-info__actions .btn {
    white-space: normal;
  }
  .product-info__btn-cart,
  .product-info__btn-wa {
    flex: 1 1 100%;
    width: 100%;
  }
  .product-tabs-section {
    padding: 20px 16px;
    margin-bottom: 28px;
  }
  .specs-table,
  .specs-table tbody,
  .specs-table tr,
  .specs-table th,
  .specs-table td {
    display: block;
    width: 100%;
  }
  .specs-table th {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid var(--border-color);
    padding: 8px 12px;
    font-size: 0.8125rem;
  }
  .specs-table td {
    padding: 10px 12px;
    font-size: 0.875rem;
  }
}
