/**
 * DTC Single Product Page Styling - MaxCloud Theme
 * Commercial Direct-to-Consumer UI/UX Architecture
 */

/* 1. Page Container & Layout */
.dtc-product-container {
  max-width: 1400px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

@media (min-width: 1024px) {
  .dtc-product-container {
    padding-left: 2.5rem;
    padding-right: 2.5rem;
  }
}

.dtc-grid-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  align-items: start;
}

@media (min-width: 1024px) {
  .dtc-grid-layout {
    grid-template-columns: 1fr 1fr;
    gap: 3.5rem;
  }
}

/* 2. Product Showcase Stage (Gallery) */
.dtc-gallery-wrapper {
  display: flex;
  flex-direction: column-reverse;
  gap: 1.25rem;
}

@media (min-width: 768px) {
  .dtc-gallery-wrapper {
    flex-direction: row;
  }
}

.dtc-gallery-thumbnails {
  display: flex;
  flex-direction: row;
  gap: 0.75rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
  scroll-behavior: smooth;
}

@media (min-width: 768px) {
  .dtc-gallery-thumbnails {
    flex-direction: column;
    overflow-y: auto;
    overflow-x: visible;
    max-height: 580px;
    padding-bottom: 0;
    padding-right: 0.5rem;
    width: 88px;
    shrink: 0;
  }
}

.dtc-thumb-item {
  width: 72px;
  height: 72px;
  border-radius: 16px;
  background: #f8fafc;
  border: 2px solid transparent;
  overflow: hidden;
  cursor: pointer;
  transition: all 200ms cubic-bezier(0.4, 0, 0.2, 1);
  padding: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.dtc-thumb-item:hover {
  border-color: rgba(147, 51, 234, 0.4);
  transform: translateY(-2px);
}

.dtc-thumb-item.is-active {
  border-color: #9333ea;
  box-shadow: 0 4px 14px rgba(147, 51, 234, 0.2);
  background: #ffffff;
}

.dtc-thumb-item img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Elevated Sale Badge */
.woocommerce span.onsale {
  position: absolute;
  top: 1rem;
  left: 1rem;
  background: linear-gradient(135deg, var(--color-accent), #ff3366);
  color: #ffffff;
  font-weight: 800;
  font-size: 0.85rem;
  padding: 0.5rem 1rem;
  border-radius: 9999px;
  z-index: 10;
  box-shadow: 0 4px 15px rgba(255, 92, 168, 0.4);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  min-height: auto;
  min-width: auto;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  animation: salePulse 2s infinite;
}

.dtc-gallery-column {
  position: relative;
}

/* DTC Professional Product Stage */
.dtc-stage-card {
  position: relative;
  flex: 1;
  aspect-ratio: 1 / 1;
  border-radius: 24px;
  background: radial-gradient(circle at 50% 40%, #ffffff 0%, #f0f7ff 50%, #f3e8ff 100%);
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 20px 40px -15px rgba(147, 51, 234, 0.08), inset 0 0 40px rgba(255, 255, 255, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2.5rem;
  overflow: hidden;
}

/* Subtle Stage Spotlight Effect */
.dtc-stage-card::before {
  content: '';
  position: absolute;
  top: 15%;
  left: 50%;
  transform: translateX(-50%);
  width: 70%;
  height: 70%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.9) 0%, rgba(220, 240, 255, 0.4) 50%, transparent 75%);
  border-radius: 50%;
  filter: blur(25px);
  pointer-events: none;
}

/* Soft Product Floor Reflection/Shadow */
.dtc-stage-card::after {
  content: '';
  position: absolute;
  bottom: 8%;
  left: 50%;
  transform: translateX(-50%);
  width: 55%;
  height: 18px;
  background: radial-gradient(ellipse at center, rgba(15, 23, 42, 0.12) 0%, rgba(147, 51, 234, 0.04) 50%, transparent 80%);
  border-radius: 50%;
  filter: blur(8px);
  pointer-events: none;
}

.dtc-main-image {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 350ms cubic-bezier(0.2, 0, 0.2, 1);
  will-change: transform;
}

.dtc-stage-card:hover .dtc-main-image {
  transform: scale(1.08) translateY(-4px);
}

.dtc-stage-actions {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 5;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.dtc-stage-btn {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.9);
  color: #0f172a;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.06);
  cursor: pointer;
  transition: all 200ms ease;
}

.dtc-stage-btn:hover {
  background: #ffffff;
  transform: scale(1.08);
  box-shadow: 0 6px 20px rgba(147, 51, 234, 0.15);
  color: #9333ea;
}

/* 3. Product Info Header */
.dtc-product-title {
  font-family: var(--font-heading, system-ui, sans-serif);
  font-size: clamp(2rem, 3.5vw, 2.75rem);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -0.025em;
  color: #0f172a;
  margin-bottom: 0.75rem;
}

.dtc-rating-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.dtc-stars {
  color: #ffaa00;
  font-size: 1.1rem;
  letter-spacing: 2px;
  display: inline-flex;
}

.dtc-review-link {
  font-size: 0.85rem;
  font-weight: 700;
  color: #7e22ce;
  text-decoration: none;
  transition: color 150ms ease;
}

.dtc-review-link:hover {
  color: #9333ea;
  text-decoration: underline;
}

/* Multi-Stop Gradient Price */
.dtc-price-wrapper {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.dtc-price-gradient {
  font-size: 2.25rem;
  font-weight: 900;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, #00b4d8 0%, #9333ea 50%, #ff007f 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
}

.dtc-price-original {
  font-size: 1.25rem;
  font-weight: 600;
  color: #94a3b8;
  text-decoration: line-through;
}

.dtc-savings-pill {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.1) 0%, rgba(236, 72, 153, 0.15) 100%);
  border: 1px solid rgba(239, 68, 68, 0.25);
  color: #dc2626;
  font-size: 0.78rem;
  font-weight: 800;
  padding: 0.35rem 0.85rem;
  border-radius: 9999px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.dtc-excerpt {
  font-size: 1rem;
  line-height: 1.8;
  color: #475569;
  max-width: 550px;
  margin-bottom: 1.5rem;
}

/* Feature Highlight Chips */
.dtc-highlights-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 2rem;
}

.dtc-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(147, 51, 234, 0.06);
  border: 1px solid rgba(147, 51, 234, 0.15);
  color: #6b21a8;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.4rem 0.9rem;
  border-radius: 9999px;
  transition: all 150ms ease;
}

.dtc-chip:hover {
  background: rgba(147, 51, 234, 0.12);
  border-color: rgba(147, 51, 234, 0.3);
  transform: translateY(-1px);
}

.dtc-chip-icon {
  color: #9333ea;
  font-size: 0.85rem;
}

/* 4. Elevated Glass Purchase Card */
.dtc-purchase-card {
  background: #ffffff;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 24px;
  padding: 1.75rem;
  box-shadow: 0 12px 36px rgba(147, 51, 234, 0.07);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

@media (min-width: 1024px) {
  .dtc-sticky-col {
    position: sticky;
    top: 100px;
  }
}

/* Custom +/- Quantity Controls */
.dtc-qty-row {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.dtc-qty-wrapper {
  display: inline-flex;
  align-items: center;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 0.3rem;
}

.dtc-qty-btn {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  border: none;
  background: #ffffff;
  color: #0f172a;
  font-size: 1.1rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
  transition: all 150ms ease;
  user-select: none;
}

.dtc-qty-btn:hover {
  background: #9333ea;
  color: #ffffff;
  transform: scale(1.05);
}

.dtc-qty-btn:active {
  transform: scale(0.95);
}

.dtc-qty-input {
  width: 48px;
  text-align: center;
  border: none;
  background: transparent;
  font-size: 1rem;
  font-weight: 800;
  color: #0f172a;
  outline: none;
}

/* Hide webkit arrows on qty input */
.dtc-qty-input::-webkit-outer-spin-button,
.dtc-qty-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.dtc-qty-input[type=number] {
  -moz-appearance: textfield;
}

/* Primary DTC Add to Cart Button */
.dtc-add-to-cart-btn {
  width: 100%;
  padding: 1rem 1.75rem;
  border-radius: 16px;
  border: none;
  background: linear-gradient(135deg, #00b4d8 0%, #9333ea 100%);
  color: #ffffff;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(147, 51, 234, 0.35);
  transition: all 250ms cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
}

.dtc-add-to-cart-btn:hover {
  background: linear-gradient(135deg, #00c6eb 0%, #a855f7 100%);
  box-shadow: 0 10px 28px rgba(147, 51, 234, 0.5);
  transform: translateY(-2px);
}

.dtc-add-to-cart-btn:active {
  transform: scale(0.98);
}

/* Secondary DTC Buy Now Button */
.dtc-buy-now-btn {
  width: 100%;
  padding: 0.85rem 1.75rem;
  border-radius: 16px;
  background: #ffffff;
  border: 2px solid transparent;
  background-image: linear-gradient(#ffffff, #ffffff), linear-gradient(135deg, #00b4d8, #9333ea);
  background-origin: border-box;
  background-clip: padding-box, border-box;
  color: #7e22ce;
  font-size: 0.95rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 200ms ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.dtc-buy-now-btn:hover {
  background-image: linear-gradient(#f8fafc, #f8fafc), linear-gradient(135deg, #00b4d8, #9333ea);
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(147, 51, 234, 0.12);
}

/* Horizontal Trust Pills */
.dtc-trust-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px solid #f1f5f9;
}

.dtc-trust-pill {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.25rem;
  background: #f8fafc;
  border: 1px solid #f1f5f9;
  border-radius: 12px;
  padding: 0.6rem 0.4rem;
  font-size: 0.72rem;
  font-weight: 700;
  color: #334155;
}

.dtc-trust-icon {
  font-size: 1.1rem;
}

/* Delivery Card */
.dtc-delivery-card {
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.dtc-delivery-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.82rem;
  color: #334155;
}

.dtc-delivery-icon {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: #ffffff;
  color: #9333ea;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
  shrink: 0;
}

/* Meta Links */
.dtc-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8rem;
  color: #64748b;
  padding-top: 0.5rem;
  border-top: 1px solid #f1f5f9;
}

.dtc-stock-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: #16a34a;
  font-weight: 800;
  font-size: 0.8rem;
}

.dtc-stock-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.2);
}

/* 5. Modern Accordion Section */
.dtc-accordions-wrapper {
  margin-top: 3.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.dtc-accordion-item {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.02);
  transition: border-color 200ms ease;
}

.dtc-accordion-item.is-open {
  border-color: rgba(147, 51, 234, 0.3);
  box-shadow: 0 8px 25px rgba(147, 51, 234, 0.06);
}

.dtc-accordion-header {
  width: 100%;
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: transparent;
  border: none;
  font-family: var(--font-heading, system-ui, sans-serif);
  font-size: 1.15rem;
  font-weight: 800;
  color: #0f172a;
  cursor: pointer;
  text-align: left;
}

.dtc-accordion-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #f1f5f9;
  color: #0f172a;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  transition: transform 250ms ease, background 200ms ease;
}

.dtc-accordion-item.is-open .dtc-accordion-icon {
  transform: rotate(180deg);
  background: #9333ea;
  color: #ffffff;
}

.dtc-accordion-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 350ms cubic-bezier(0.4, 0, 0.2, 1), padding 350ms ease;
  padding: 0 1.5rem;
}

.dtc-accordion-item.is-open .dtc-accordion-body {
  max-height: 1200px;
  padding: 0 1.5rem 1.5rem 1.5rem;
}

.dtc-accordion-content {
  font-size: 0.95rem;
  line-height: 1.8;
  color: #475569;
  border-top: 1px solid #f1f5f9;
  padding-top: 1rem;
}

/* Reviews Breakdown Graph Card */
.dtc-review-summary-card {
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 1.5rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

@media (min-width: 768px) {
  .dtc-review-summary-card {
    grid-template-columns: 180px 1fr;
  }
}

.dtc-review-score-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  border-right: none;
  border-bottom: 1px solid #e2e8f0;
  padding-bottom: 1rem;
}

@media (min-width: 768px) {
  .dtc-review-score-box {
    border-right: 1px solid #e2e8f0;
    border-bottom: none;
    padding-bottom: 0;
    padding-right: 1.5rem;
  }
}

.dtc-big-score {
  font-size: 3rem;
  font-weight: 900;
  color: #0f172a;
  line-height: 1;
}

.dtc-review-bars {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  justify-content: center;
}

.dtc-bar-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.8rem;
  font-weight: 700;
  color: #64748b;
}

.dtc-bar-track {
  flex: 1;
  height: 8px;
  background: #e2e8f0;
  border-radius: 9999px;
  overflow: hidden;
}

.dtc-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #00b4d8, #9333ea);
  border-radius: 9999px;
}

/* Verified Review Cards */
.dtc-review-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 1.25rem;
  margin-bottom: 1rem;
}

.dtc-review-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.dtc-reviewer-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.dtc-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, #00b4d8, #9333ea);
  color: #ffffff;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dtc-verified-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  background: rgba(34, 197, 94, 0.1);
  color: #16a34a;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 0.2rem 0.5rem;
  border-radius: 9999px;
}

/* 6. Mobile Sticky Purchase Bar */
.dtc-mobile-sticky-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 999;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid rgba(226, 232, 240, 0.9);
  padding: 0.75rem 1rem;
  box-shadow: 0 -8px 25px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  transform: translateY(100%);
  transition: transform 300ms cubic-bezier(0.4, 0, 0.2, 1);
}

.dtc-mobile-sticky-bar.is-active {
  transform: translateY(0);
}

@media (min-width: 1024px) {
  .dtc-mobile-sticky-bar {
    display: none !important;
  }
}
