/* ==========================================================================
   Vegarix v3 - Clean Mobile-First Product Details Stylesheet
   Strict adherence to UX/UI guidelines: Bangla UI, Zero Clutter, One Set of CTAs
   ========================================================================== */

/* Page Wrapper & Grid */
.pdp-clean-page {
  padding: 16px 20px 48px 20px;
  max-width: 1040px;
  margin: 0 auto;
  font-family: 'Hind Siliguri', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: #0F172A;
  background-color: #FFFFFF;
}

.pdp-clean-layout {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

@media (min-width: 860px) {
  .pdp-clean-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: start;
  }
  .pdp-gallery-col {
    position: sticky;
    top: 90px;
  }
}

/* 1. Image Gallery: Aspect Ratio 1:1, Swipeable, Dots Below, NO Overlay Text */
.pdp-gallery-container {
  width: 100%;
}

.pdp-gallery-viewport {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 16px;
  overflow-x: auto;
  overflow-y: hidden;
  display: flex;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  background: #F8FAFC;
  position: relative;
}

.pdp-gallery-viewport::-webkit-scrollbar {
  display: none;
}

.pdp-gallery-slide {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  scroll-snap-align: start;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pdp-gallery-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 16px;
}

.pdp-gallery-dots {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
}

.pdp-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #CBD5E1;
  border: none;
  padding: 0;
  cursor: pointer;
  transition: all 0.2s ease;
}

.pdp-dot.active {
  background: #0F172A;
  width: 18px;
  border-radius: 9999px;
}

/* 2. Meta Line: "Category name · স্টকে আছে" (13px, muted) */
.pdp-meta-line {
  font-size: 13px;
  color: #64748B;
  font-weight: 400;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
}

.pdp-meta-cat {
  color: #64748B;
  text-decoration: none;
  transition: color 0.15s ease;
}

.pdp-meta-cat:hover {
  color: #0F172A;
}

.pdp-meta-sep {
  color: #CBD5E1;
}

.pdp-meta-stock {
  font-weight: 600;
  color: #16A34A; /* Green */
}

.pdp-meta-stock.low-stock {
  color: #D97706; /* Amber */
}

.pdp-meta-stock.out-of-stock {
  color: #DC2626; /* Red */
}

/* 3. Product Title: 24px, bold, line-height 1.35, max 2 lines */
.pdp-product-title {
  font-size: 24px;
  font-weight: 700;
  line-height: 1.35;
  color: #0F172A;
  margin: 0 0 12px 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* 4. Price Row, One Line: Current 28px bold, Old 16px muted line-through, Discount 13px red semibold */
.pdp-price-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 24px;
}

.pdp-current-price {
  font-size: 28px;
  font-weight: 700;
  color: #0F172A;
  line-height: 1;
}

.pdp-old-price {
  font-size: 16px;
  font-weight: 400;
  color: #94A3B8;
  text-decoration: line-through;
}

.pdp-discount-text {
  font-size: 13px;
  font-weight: 600;
  color: #DC2626;
}

/* 5. Size & Option Chips Selector */
.pdp-section-block {
  margin-bottom: 20px;
}

.pdp-selector-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: #0F172A;
  margin-bottom: 8px;
}

.pdp-size-options,
.pdp-chips-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pdp-size-btn,
.pdp-chip-btn {
  min-width: 48px;
  height: 42px;
  padding: 0 14px;
  border-radius: 8px;
  border: 1px solid #E2E8F0;
  background: #FFFFFF;
  color: #334155;
  font-size: 14px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.pdp-size-btn:hover,
.pdp-chip-btn:hover {
  border-color: #94A3B8;
  color: #0F172A;
}

.pdp-size-btn.active,
.pdp-chip-btn.active {
  border: 2px solid var(--primary, #0F172A);
  background: var(--primary, #0F172A);
  color: var(--primary-text, #FFFFFF);
  font-weight: 700;
}

.pdp-size-btn.disabled,
.pdp-chip-btn.disabled {
  opacity: 0.45;
  text-decoration: line-through;
  pointer-events: none;
  border: 1px dashed #CBD5E1;
  background: #F8FAFC;
  cursor: not-allowed;
}

/* 6. Color Selector: Circular Swatches 32px with 10px gap */
.pdp-color-options,
.pdp-swatches-options {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.pdp-color-btn,
.pdp-swatch-btn {
  width: 32px !important;
  height: 32px !important;
  min-width: 32px !important;
  min-height: 32px !important;
  max-width: 32px !important;
  max-height: 32px !important;
  border-radius: 50% !important;
  aspect-ratio: 1 / 1 !important;
  flex: 0 0 32px !important;
  box-sizing: border-box !important;
  border: 1px solid rgba(0, 0, 0, 0.15);
  padding: 0;
  cursor: pointer;
  outline: none;
  position: relative;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.pdp-color-btn:hover,
.pdp-swatch-btn:hover {
  transform: scale(1.08);
}

.pdp-color-btn.active,
.pdp-swatch-btn.active {
  box-shadow: 0 0 0 2px #FFFFFF, 0 0 0 4px var(--primary, #0F172A) !important;
  transform: scale(1.05);
}

.pdp-selector-error {
  display: none;
  font-size: 13px;
  font-weight: 600;
  color: #DC2626;
  margin-top: 6px;
}

@keyframes pdpShake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-6px); }
  40%, 80% { transform: translateX(6px); }
}
.pdp-shake-error {
  animation: pdpShake 0.4s ease-in-out;
}

/* 7. Quantity Row */
.pdp-quantity-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.pdp-stepper {
  display: flex;
  align-items: center;
  height: 44px;
  border: 1px solid #E2E8F0;
  border-radius: 10px;
  background: #FFFFFF;
  overflow: hidden;
}

.pdp-stepper-btn {
  width: 44px;
  height: 44px;
  background: transparent;
  border: none;
  color: #0F172A;
  font-size: 18px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s ease;
}

.pdp-stepper-btn:hover {
  background: #F1F5F9;
}

.pdp-stepper-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.pdp-stepper-val {
  width: 48px;
  height: 44px;
  border: none;
  background: transparent;
  text-align: center;
  font-size: 16px;
  font-weight: 600;
  color: #0F172A;
  outline: none;
  -moz-appearance: textfield;
}

.pdp-stepper-val::-webkit-outer-spin-button,
.pdp-stepper-val::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* 8. Action Buttons (Stacked vertically with 10px gap, both full width) */
.pdp-actions-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  margin-bottom: 24px;
}

.pdp-btn-primary {
  width: 100%;
  height: 52px;
  border-radius: 12px;
  background: var(--primary, #0F172A);
  color: var(--primary-text, #FFFFFF);
  border: none;
  font-size: 17px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.12);
}

.pdp-btn-primary:hover {
  filter: brightness(0.92);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.18);
}

.pdp-btn-primary:active {
  transform: scale(0.99);
}

.pdp-btn-secondary {
  width: 100%;
  height: 48px;
  border-radius: 12px;
  background: #FFFFFF;
  border: 1.5px solid var(--primary, #0F172A);
  color: var(--primary, #0F172A);
  font-size: 16px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.pdp-btn-secondary svg {
  width: 20px;
  height: 20px;
}

.pdp-btn-secondary:hover {
  background: #F8FAFC;
  transform: translateY(-1px);
}

.pdp-btn-secondary:active {
  transform: scale(0.99);
}

/* 9. Delivery Info Box (One bordered box, 12px radius, 12px/14px padding, 2 short lines) */
.pdp-delivery-box {
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  padding: 12px 14px;
  background: #FFFFFF;
  margin-bottom: 24px;
}

.pdp-delivery-line {
  font-size: 14px;
  line-height: 1.6;
  color: #334155;
  display: flex;
  align-items: center;
  gap: 8px;
}

.pdp-delivery-line:not(:last-child) {
  margin-bottom: 6px;
}

.pdp-delivery-bullet {
  color: #94A3B8;
  font-size: 10px;
}

/* 10. Accordion Sections: 52px high headers, 16px semibold, 1px dividers */
.pdp-accordion-group {
  margin-top: 24px;
  border-top: 1px solid #E2E8F0;
}

.pdp-accordion-item {
  border-bottom: 1px solid #E2E8F0;
}

.pdp-accordion-header {
  width: 100%;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: transparent;
  border: none;
  padding: 0;
  cursor: pointer;
  text-align: left;
}

.pdp-accordion-title {
  font-size: 16px;
  font-weight: 600;
  color: #0F172A;
}

.pdp-accordion-icon {
  font-size: 18px;
  font-weight: 400;
  color: #64748B;
  transition: transform 0.2s ease;
  line-height: 1;
}

.pdp-accordion-body {
  display: none;
  padding: 0 0 16px 0;
  font-size: 15px;
  line-height: 1.7;
  color: #334155;
}

.pdp-accordion-item.open .pdp-accordion-body {
  display: block;
}

.pdp-accordion-item.open .pdp-accordion-icon {
  color: #0F172A;
}

/* Size Guide Table inside Accordion */
.pdp-size-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
  margin-top: 8px;
}

.pdp-size-table th,
.pdp-size-table td {
  border: 1px solid #E2E8F0;
  padding: 8px 10px;
  text-align: left;
}

.pdp-size-table th {
  background: #F8FAFC;
  font-weight: 600;
  color: #0F172A;
}

/* 11. Related Products: 2-column grid, 12px gap, 2 or 4 products, NO badges/buttons */
.pdp-related-section {
  margin-top: 36px;
  padding-top: 24px;
  border-top: 1px solid #E2E8F0;
}

.pdp-related-heading {
  font-size: 18px;
  font-weight: 700;
  color: #0F172A;
  margin: 0 0 14px 0;
}

.pdp-related-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

@media (min-width: 640px) {
  .pdp-related-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
  }
}

.pdp-related-card {
  text-decoration: none;
  display: flex;
  flex-direction: column;
}

.pdp-related-thumb {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 12px;
  object-fit: cover;
  display: block;
  background: #F8FAFC;
  transition: transform 0.2s ease;
}

.pdp-related-card:hover .pdp-related-thumb {
  transform: scale(1.02);
}

.pdp-related-title {
  font-size: 14px;
  font-weight: 600;
  color: #0F172A;
  line-height: 1.35;
  margin: 8px 0 3px 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.pdp-related-price {
  font-size: 15px;
  font-weight: 700;
  color: #0F172A;
}
