/* ============================================================
 * WUShop Product v2 — PDP + Card
 * Mobile-first, premium design
 * ============================================================ */

/* --- CSS Custom Properties --- */
:root {
  --wu-primary: #4F46E5;
  --wu-primary-dark: #4338CA;
  --wu-gradient: linear-gradient(135deg, #4F46E5, #7C3AED, #EC4899);
  --wu-text: #1E1B4B;
  --wu-text-secondary: #6B7280;
  --wu-text-muted: #9CA3AF;
  --wu-bg: #F8F9FC;
  --wu-card-bg: #FFFFFF;
  --wu-card-border: #F3F4F6;
  --wu-success: #059669;
  --wu-success-bg: #ECFDF5;
  --wu-danger: #DC2626;
  --wu-warning: #D97706;
  --wu-shadow: 0 4px 20px rgba(0,0,0,0.06);
  --wu-shadow-hover: 0 12px 40px rgba(0,0,0,0.08);
  --wu-radius: 16px;
  --wu-radius-sm: 12px;
  --wu-radius-xs: 8px;
  --wu-font: -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', Roboto, sans-serif;
}

/* ============================================================
 * PRODUCT CARD (wu-card)
 * ============================================================ */
.wu-card {
  background: var(--wu-card-bg);
  border-radius: var(--wu-radius);
  box-shadow: var(--wu-shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
  transition: box-shadow 0.25s ease, transform 0.25s ease;
  font-family: var(--wu-font);
  border: 1px solid var(--wu-card-border);
}
.wu-card:hover {
  box-shadow: var(--wu-shadow-hover);
  transform: translateY(-2px);
}

/* Media */
.wu-card__media {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  background: #fff;
}
.wu-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
  padding: 0;
}
.wu-card:hover .wu-card__img {
  transform: scale(1.03);
}

/* Badges */
.wu-card__badges {
  position: absolute;
  top: 10px;
  left: 10px;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  z-index: 2;
}
.wu-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.3;
}
.wu-badge--save {
  background: var(--wu-gradient);
  color: #fff;
}
.wu-badge--hit {
  background: #FEF3C7;
  color: #92400E;
}

/* Body */
.wu-card__body {
  padding: 14px 16px 16px;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 6px;
}
.wu-card__title {
  font-size: 14px;
  font-weight: 600;
  color: var(--wu-text);
  text-decoration: none;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.wu-card__title:hover {
  color: var(--wu-primary);
}
.wu-card__category {
  font-size: 12px;
  color: var(--wu-text-muted);
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Prices */
.wu-card__prices {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 4px;
}
.wu-card__price-label {
  font-size: 11px;
  color: var(--wu-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  font-weight: 500;
}
.wu-card__price {
  font-size: 20px;
  font-weight: 700;
  color: var(--wu-primary);
  line-height: 1.2;
}
.wu-card__price-old {
  font-size: 13px;
  color: var(--wu-text-muted);
  text-decoration: line-through;
  display: inline;
}
.wu-card__price-mp-label {
  font-size: 11px;
  color: var(--wu-text-muted);
  display: inline;
  margin-left: 4px;
}
.wu-card__savings {
  font-size: 12px;
  font-weight: 600;
  color: var(--wu-success);
  background: var(--wu-success-bg);
  display: inline-block;
  padding: 2px 8px;
  border-radius: 12px;
  margin-top: 2px;
  width: fit-content;
}

/* CTA */
.wu-card__cta-form {
  margin-top: auto;
  padding-top: 8px;
}
.wu-card__cta {
  display: block;
  width: 100%;
  padding: 10px 16px;
  border: none;
  border-radius: var(--wu-radius-xs);
  background: var(--wu-gradient);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s ease, transform 0.15s ease;
  text-align: center;
  line-height: 1.3;
}
.wu-card__cta:hover {
  opacity: 0.92;
  transform: scale(1.01);
}
.wu-card__cta:active {
  transform: scale(0.98);
}
.wu-card__cta--cart {
  background: var(--wu-success);
}

/* MP links */
.wu-card__mp-links {
  font-size: 12px;
  color: var(--wu-text-muted);
  margin-top: 6px;
  text-align: center;
}
.wu-card__mp-links a {
  color: var(--wu-text-secondary);
  text-decoration: none;
  font-weight: 500;
}
.wu-card__mp-links a:hover {
  color: var(--wu-primary);
  text-decoration: underline;
}

/* Card in horizontal scroll */
.wu-cards-scroll {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 8px;
  scrollbar-width: none;
}
.wu-cards-scroll::-webkit-scrollbar { display: none; }
.wu-cards-scroll .wu-card {
  flex: 0 0 78vw;
  max-width: 280px;
  scroll-snap-align: start;
}

@media (min-width: 576px) {
  .wu-cards-scroll .wu-card {
    flex: 0 0 45vw;
    max-width: 280px;
  }
}
@media (min-width: 768px) {
  .wu-cards-scroll .wu-card {
    flex: 0 0 32%;
    max-width: 300px;
  }
}
@media (min-width: 992px) {
  .wu-cards-scroll .wu-card {
    flex: 0 0 24%;
    max-width: 300px;
  }
}

/* Card grid */
.wu-cards-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
@media (min-width: 576px) {
  .wu-cards-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
}
@media (min-width: 768px) {
  .wu-cards-grid { grid-template-columns: repeat(3, 1fr); gap: 18px; }
}
@media (min-width: 992px) {
  .wu-cards-grid { grid-template-columns: repeat(4, 1fr); gap: 20px; }
}


/* ============================================================
 * PDP — PRODUCT DETAIL PAGE
 * ============================================================ */
.wu-pdp {
  font-family: var(--wu-font);
  color: var(--wu-text);
  padding-bottom: 40px;
}

/* Breadcrumbs override */
.wu-pdp .breadcrumb {
  background: transparent;
  padding: 0;
  margin-bottom: 20px;
  font-size: 13px;
}
.wu-pdp .breadcrumb-item a {
  color: var(--wu-text-secondary);
  text-decoration: none;
}
.wu-pdp .breadcrumb-item a:hover {
  color: var(--wu-primary);
}
.wu-pdp .breadcrumb-item.active {
  color: var(--wu-text-muted);
}

/* Hero row */
.wu-pdp__hero {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  margin-bottom: 40px;
}
@media (min-width: 768px) {
  .wu-pdp__hero {
    grid-template-columns: minmax(280px, 480px) 1fr;
    gap: 40px;
  }
}
@media (min-width: 992px) {
  .wu-pdp__hero {
    grid-template-columns: minmax(300px, 500px) 1fr;
    gap: 48px;
  }
}

/* Gallery */
.wu-pdp__gallery {}

/* REMOVED: old 1:1 aspect ratio + padding (was breaking 3:4 layout) */
.wu-pdp__main-image {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 4;
  border-radius: 20px;
  overflow: hidden;
  background: #fff;
  cursor: zoom-in;
  position: relative;
}
.wu-pdp__main-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  padding: 0;
}

.wu-pdp__thumbs {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 4px;
  scrollbar-width: none;
}
.wu-pdp__thumbs::-webkit-scrollbar { display: none; }
.wu-pdp__thumb {
  flex: 0 0 64px;
  width: 64px;
  height: 64px;
  border-radius: var(--wu-radius-xs);
  overflow: hidden;
  border: 2px solid transparent;
  cursor: pointer;
  scroll-snap-align: start;
  transition: border-color 0.2s ease;
  background: #fff;
}
.wu-pdp__thumb:hover,
.wu-pdp__thumb.active {
  border-color: var(--wu-primary);
}
.wu-pdp__thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 4px;
}

/* Buy box */
.wu-pdp__buybox {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.wu-pdp__title {
  font-size: 22px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--wu-text);
  margin: 0;
}
@media (min-width: 768px) {
  .wu-pdp__title { font-size: 26px; }
}

.wu-pdp__vendor {
  font-size: 13px;
  color: var(--wu-text-muted);
}

/* Price block */
.wu-pdp__price-block {
  background: var(--wu-bg);
  border-radius: var(--wu-radius-sm);
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.wu-pdp__price-label {
  font-size: 12px;
  color: var(--wu-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 500;
}
.wu-pdp__price {
  font-size: 32px;
  font-weight: 800;
  background: var(--wu-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.1;
}
.wu-pdp__price-old {
  font-size: 16px;
  color: var(--wu-text-muted);
  text-decoration: line-through;
}
.wu-pdp__price-mp-hint {
  font-size: 12px;
  color: var(--wu-text-muted);
  display: inline;
  margin-left: 6px;
}
.wu-pdp__savings {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 14px;
  font-weight: 600;
  color: var(--wu-success);
  background: var(--wu-success-bg);
  padding: 4px 12px;
  border-radius: 20px;
  width: fit-content;
}

/* Wholesale block */
.wu-pdp__wholesale {
  background: #F5F3FF;
  border: 1px solid #E0E7FF;
  border-radius: var(--wu-radius-sm);
  padding: 14px 18px;
  font-size: 14px;
  color: var(--wu-text);
}
.wu-pdp__wholesale-price {
  font-weight: 700;
  color: var(--wu-primary);
}
.wu-pdp__wholesale-hint {
  font-size: 12px;
  color: var(--wu-text-secondary);
  margin-top: 2px;
}

/* CTA */
.wu-pdp__cta-form { margin-top: 4px; }
.wu-pdp__cta {
  display: block;
  width: 100%;
  padding: 16px 24px;
  border: none;
  border-radius: var(--wu-radius-sm);
  background: var(--wu-gradient);
  color: #fff;
  font-size: 17px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.2s ease, transform 0.15s ease;
  text-align: center;
  letter-spacing: 0.01em;
}
.wu-pdp__cta:hover {
  opacity: 0.93;
  transform: scale(1.01);
}
.wu-pdp__cta:active {
  transform: scale(0.98);
}
.wu-pdp__cta--cart {
  background: var(--wu-success);
}
.wu-pdp__cta-quantity {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}
.wu-pdp__qty-btn {
  width: 36px;
  height: 36px;
  border: 1px solid var(--wu-card-border);
  border-radius: var(--wu-radius-xs);
  background: #fff;
  font-size: 18px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--wu-text);
  transition: border-color 0.15s;
}
.wu-pdp__qty-btn:hover {
  border-color: var(--wu-primary);
}
.wu-pdp__qty-input {
  width: 48px;
  text-align: center;
  border: 1px solid var(--wu-card-border);
  border-radius: var(--wu-radius-xs);
  padding: 6px;
  font-size: 15px;
  font-weight: 600;
  color: var(--wu-text);
}

/* Secondary MP links */
.wu-pdp__mp-section {
  padding-top: 4px;
}
.wu-pdp__mp-label {
  font-size: 13px;
  color: var(--wu-text-muted);
  margin-bottom: 8px;
}
.wu-pdp__mp-links {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.wu-pdp__mp-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border: 1px solid var(--wu-card-border);
  border-radius: var(--wu-radius-xs);
  font-size: 13px;
  font-weight: 500;
  color: var(--wu-text-secondary);
  text-decoration: none;
  transition: border-color 0.2s, color 0.2s;
  background: #fff;
}
.wu-pdp__mp-link:hover {
  border-color: var(--wu-primary);
  color: var(--wu-primary);
}

/* Trust block */
.wu-pdp__trust {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
@media (min-width: 576px) {
  .wu-pdp__trust { grid-template-columns: 1fr 1fr 1fr; }
}
.wu-pdp__trust-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--wu-text-secondary);
  line-height: 1.3;
}
.wu-pdp__trust-icon {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  background: var(--wu-bg);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

/* ============================================================
 * TABS / ACCORDION
 * ============================================================ */
.wu-pdp__tabs {
  margin-top: 40px;
}
.wu-pdp__tabs .accordion-item {
  border: 1px solid var(--wu-card-border);
  border-radius: var(--wu-radius-sm) !important;
  overflow: hidden;
  margin-bottom: 10px;
  box-shadow: none;
}
.wu-pdp__tabs .accordion-button {
  font-size: 16px;
  font-weight: 600;
  color: var(--wu-text);
  background: var(--wu-card-bg);
  padding: 16px 20px;
  box-shadow: none !important;
}
.wu-pdp__tabs .accordion-button:not(.collapsed) {
  color: var(--wu-primary);
  background: #FAFAFE;
}
.wu-pdp__tabs .accordion-button::after {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%236B7280' viewBox='0 0 16 16'%3E%3Cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3E%3C/svg%3E");
}
.wu-pdp__tabs .accordion-body {
  padding: 16px 20px 20px;
  font-size: 14px;
  line-height: 1.65;
  color: var(--wu-text-secondary);
}

/* Specs table */
.wu-pdp__specs-table {
  width: 100%;
  border-collapse: collapse;
}
.wu-pdp__specs-table tr {
  border-bottom: 1px solid var(--wu-card-border);
}
.wu-pdp__specs-table tr:last-child { border-bottom: none; }
.wu-pdp__specs-table th,
.wu-pdp__specs-table td {
  padding: 10px 12px;
  font-size: 14px;
  vertical-align: top;
}
.wu-pdp__specs-table th {
  color: var(--wu-text-muted);
  font-weight: 500;
  width: 40%;
  text-align: left;
}
.wu-pdp__specs-table td {
  color: var(--wu-text);
  font-weight: 500;
}
@media (max-width: 480px) {
  .wu-pdp__specs-table th,
  .wu-pdp__specs-table td {
    display: block;
    width: 100%;
    padding: 4px 0;
  }
  .wu-pdp__specs-table th { padding-top: 10px; }
  .wu-pdp__specs-table td { padding-bottom: 10px; }
}

/* Delivery info */
.wu-pdp__delivery-info {
  font-size: 14px;
  line-height: 1.7;
  color: var(--wu-text-secondary);
}
.wu-pdp__delivery-info h4 {
  font-size: 15px;
  font-weight: 600;
  color: var(--wu-text);
  margin-top: 16px;
  margin-bottom: 6px;
}
.wu-pdp__delivery-info h4:first-child { margin-top: 0; }
.wu-pdp__delivery-info ul {
  padding-left: 20px;
  margin: 4px 0;
}
.wu-pdp__delivery-info li {
  margin-bottom: 4px;
}

/* ============================================================
 * RELATED SECTIONS
 * ============================================================ */
.wu-pdp__related-section {
  margin-top: 48px;
}
.wu-pdp__related-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--wu-text);
  margin-bottom: 20px;
}

/* ============================================================
 * STICKY MOBILE CTA
 * ============================================================ */
.wu-pdp__sticky-cta {
  display: none;
}
@media (max-width: 767px) {
  .wu-pdp__sticky-cta {
    display: block;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1050;
    background: rgba(255,255,255,0.97);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 6px 12px;
    padding-bottom: calc(6px + env(safe-area-inset-bottom));
    box-shadow: 0 -2px 12px rgba(0,0,0,0.06);
    border-top: 1px solid var(--wu-card-border);
  }
  .wu-pdp__sticky-cta .wu-pdp__sticky-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
  }
  .wu-pdp__sticky-cta .wu-pdp__cta {
    flex: 1;
    padding: 10px 16px;
    font-size: 14px;
  }
  /* offset for sticky bar */
  .wu-pdp { padding-bottom: 56px; }
}

/* ============================================================
 * LOADING STATE
 * ============================================================ */
.wu-card__cta.is-loading,
.wu-pdp__cta.is-loading {
  pointer-events: none;
  opacity: 0.7;
}
.wu-card__cta.is-loading::after,
.wu-pdp__cta.is-loading::after {
  content: '';
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255,255,255,0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: wu-spin 0.6s linear infinite;
  margin-left: 8px;
  vertical-align: middle;
}
@keyframes wu-spin {
  to { transform: rotate(360deg); }
}

/* Added-to-cart success */
.wu-card__cta.is-added,
.wu-pdp__cta.is-added {
  background: var(--wu-success);
}

/* ===== MARKETPLACE-ONLY BUTTONS (for products not buyable on site) ===== */
.wu-card__mp-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: auto;
}
.wu-card__mp-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 14px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s;
  flex: 1;
  min-width: 0;
  text-align: center;
  white-space: nowrap;
}
.wu-card__mp-btn--wb {
  background: #F3E8FF;
  color: #7C3AED;
  border: 1px solid #E9D5FF;
}
.wu-card__mp-btn--wb:hover {
  background: #7C3AED;
  color: #fff;
}
.wu-card__mp-btn--ozon {
  background: #DBEAFE;
  color: #2563EB;
  border: 1px solid #BFDBFE;
}
.wu-card__mp-btn--ozon:hover {
  background: #2563EB;
  color: #fff;
}
.wu-card__mp-btn--ym {
  background: #FEF3C7;
  color: #D97706;
  border: 1px solid #FDE68A;
}
.wu-card__mp-btn--ym:hover {
  background: #D97706;
  color: #fff;
}

/* ===== FIX: PDP breadcrumbs spacing from header ===== */
.wu-pdp-section .wu-breadcrumbs {
  margin-top: 16px;
}

/* ===== FIX: Main image fits natural aspect ratio ===== */
/* FIXED: use cover instead of contain */
.wu-pdp__main-image img {
  width: 100%;
  aspect-ratio: 3 / 4;
  display: block;
  object-fit: cover;
}
.wu-pdp__gallery {
  position: relative;
}

/* ===== FIX: Related products & articles need slider arrows ===== */
.wu-related-products-section .wu-section-header,
.wu-related-posts-section .wu-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

/* ===== FIX: Related products cards in slider — proper width ===== */
.wu-hslider .wu-card {
  flex-shrink: 0;
  width: 220px;
  min-width: 220px;
}
.wu-hslider .wu-card__img {
  aspect-ratio: 3 / 4;
  object-fit: cover;
  width: 100%;
}
.wu-hslider .wu-card__body {
  padding: 10px 12px 14px;
}
.wu-hslider .wu-card__title {
  font-size: 13px;
  -webkit-line-clamp: 2;
}
.wu-hslider .wu-card__price { font-size: 16px; }
.wu-hslider .wu-card__cta { font-size: 12px; padding: 8px 12px; }
.wu-hslider .wu-card__mp-links { font-size: 10px; }
.wu-hslider .wu-card__mp-buttons { gap: 4px; }
.wu-hslider .wu-card__mp-btn { font-size: 11px; padding: 6px 10px; }

/* ===== FIX: PDP gallery — compact, don't stretch full width ===== */
.wu-pdp__hero {
  display: grid;
  grid-template-columns: minmax(300px, 500px) 1fr;
  gap: 40px;
  align-items: start;
}
@media (max-width: 900px) {
  .wu-pdp__hero {
    grid-template-columns: 1fr;
  }
}

/* === CARD IMAGE: 3:4 aspect, edge-to-edge, no padding === */
.wu-card__media {
  aspect-ratio: 3 / 4;
}
.wu-card__img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  display: block;
  padding: 0;
  /* NO border-radius — card overflow:hidden handles it */
}
.wu-card:hover .wu-card__img {
  transform: scale(1.05);
}

/* === TITLE: fixed 2-line height === */
.wu-card__title {
  min-height: 38px;
  margin-bottom: 6px;
}

/* === PRICES: push to bottom === */
.wu-card__prices {
  margin-top: auto;
  margin-bottom: 10px;
}

/* === CTA: fixed height, always at bottom === */
.wu-card__cta {
  padding: 10px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
}

/* === Non-buyable state === */
.wu-card--unavailable {
  opacity: 0.8;
}
.wu-card--unavailable .wu-card__prices {
  color: #9CA3AF;
}

/* === Marketplace notice === */
.wu-card__mp-notice {
  font-size: 12px;
  color: #6B7280;
  text-align: center;
  margin-top: auto;
  margin-bottom: 8px;
  font-weight: 500;
}

/* === Placeholder image === */
.wu-card__img--placeholder {
  width: 100%;
  aspect-ratio: 3 / 4;
  background: #F3F4F6;
}

/* === Catalog grid: equal height rows === */
.wu-catalog-grid > * {
  min-height: 0;
}

/* ===== FIX: PDP breadcrumbs spacing ===== */
.wu-pdp-section .wu-breadcrumbs {
  margin-top: 24px !important;
  margin-bottom: 16px;
}

/* ===== FIX: PDP main image — proper WB ratio (3:4) ===== */
.wu-pdp__main-image {
  display: block;
  border-radius: 16px;
  overflow: hidden;
  background: #fff;
}
.wu-pdp__main-image img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  display: block;
}

/* ===== FIX: Desktop sticky CTA ===== */
@media (min-width: 768px) {
  .wu-pdp__sticky-cta {
    display: block !important;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1050;
    background: rgba(255,255,255,0.97);
    backdrop-filter: blur(12px);
    border-top: 1px solid #E5E7EB;
    padding: 6px 40px;
    box-shadow: 0 -2px 12px rgba(0,0,0,0.05);
  }
}

/* ===== FIX: When marketplace is the ONLY option (no buy on site), make buttons bigger ===== */
.wu-pdp__mp-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s;
  border: 2px solid #E5E7EB;
  color: #374151;
  background: #fff;
}
.wu-pdp__mp-link:hover {
  border-color: #4F46E5;
  color: #4F46E5;
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(79,70,229,0.1);
  text-decoration: none;
}
.wu-pdp__mp-links {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.wu-pdp__mp-label {
  font-size: 14px;
  font-weight: 600;
  color: #6B7280;
  margin-bottom: 12px;
}

/* ===== OUT OF STOCK: Badge on gallery ===== */
.wu-pdp__oos-badge {
  position: absolute;
  bottom: 16px;
  left: 16px;
  background: rgba(0,0,0,0.65);
  backdrop-filter: blur(8px);
  color: #fff;
  padding: 8px 16px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  z-index: 5;
}

/* ===== OUT OF STOCK: Primary marketplace buttons ===== */
.wu-pdp__mp-section--primary {
  background: linear-gradient(135deg, #F5F3FF, #FDF2F8);
  border: 2px solid #E9D5FF;
  border-radius: 16px;
  padding: 24px;
  margin-top: 16px;
}
.wu-pdp__mp-section--primary .wu-pdp__mp-label {
  font-size: 16px;
  font-weight: 700;
  color: #1E1B4B;
  margin-bottom: 16px;
}
.wu-pdp__mp-section--primary .wu-pdp__mp-link {
  padding: 16px 28px;
  font-size: 16px;
  font-weight: 700;
  border: 2px solid #E5E7EB;
  border-radius: 14px;
  flex: 1;
  justify-content: center;
  min-width: 140px;
}
.wu-pdp__mp-section--primary .wu-pdp__mp-link:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(79,70,229,0.15);
}
.wu-pdp__mp-section--primary .wu-pdp__mp-links {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* ===========================================================
   NUCLEAR FIX: PDP Layout — Definitive Override
   =========================================================== */

/* Global container */
.wu-pdp {
  max-width: 1200px !important;
  margin: 0 auto !important;
  padding: 0 20px !important;
}

/* Hero: 2-column flex */
.wu-pdp__hero {
  display: flex !important;
  gap: 40px !important;
  align-items: flex-start !important;
  max-width: 1200px !important;
}

/* Gallery: left column, fixed width */
.wu-pdp__gallery {
  flex: 0 0 480px !important;
  max-width: 480px !important;
  position: relative !important;
}

/* Main image: 3:4, cover, edge-to-edge */
.wu-pdp__main-image {
  display: block !important;
  border-radius: 20px !important;
  overflow: hidden !important;
  padding: 0 !important;
  background: #fff !important;
}
.wu-pdp__main-image img {
  width: 100% !important;
  aspect-ratio: 3 / 4 !important;
  object-fit: cover !important;
  display: block !important;
  border-radius: 0 !important;
}

/* Buybox: right column, doesn't stretch */
.wu-pdp__buybox {
  flex: 1 !important;
  max-width: 560px !important;
  min-width: 0 !important;
}

/* MP section primary (out of stock) — 3 buttons in a row */
.wu-pdp__mp-section--primary .wu-pdp__mp-links {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
  gap: 10px !important;
}
.wu-pdp__mp-section--primary .wu-pdp__mp-link {
  padding: 14px 12px !important;
  font-size: 14px !important;
  justify-content: center !important;
  text-align: center !important;
  flex: none !important;
  min-width: 0 !important;
  background: #fff !important;
  border: 1px solid #E5E7EB !important;
  border-radius: 12px !important;
}

/* Breadcrumbs spacing */
.wu-pdp-section .wu-breadcrumbs {
  margin-top: 24px !important;
  margin-bottom: 12px !important;
}

/* Thumbnails strip */
.wu-pdp__thumbs {
  display: flex !important;
  gap: 8px !important;
  margin-top: 12px !important;
  overflow-x: auto !important;
}
.wu-pdp__thumb {
  flex-shrink: 0 !important;
  width: 64px !important;
  height: 85px !important;
  border-radius: 10px !important;
  overflow: hidden !important;
  cursor: pointer !important;
  border: 2px solid transparent !important;
  transition: border-color 0.2s !important;
}
.wu-pdp__thumb.active,
.wu-pdp__thumb:hover {
  border-color: #4F46E5 !important;
}
.wu-pdp__thumb img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
}

/* Accordion/tabs spacing */
.wu-pdp__accordion {
  margin-top: 32px !important;
}

/* Mobile: stack vertically */
@media (max-width: 900px) {
  .wu-pdp__hero {
    flex-direction: column !important;
    gap: 24px !important;
  }
  .wu-pdp__gallery {
    flex: none !important;
    max-width: 100% !important;
    width: 100% !important;
  }
  .wu-pdp__buybox {
    max-width: 100% !important;
  }
  .wu-pdp__mp-section--primary .wu-pdp__mp-links {
    grid-template-columns: 1fr !important;
  }
}

/* Tablet: smaller gallery */
@media (min-width: 901px) and (max-width: 1100px) {
  .wu-pdp__gallery {
    flex: 0 0 380px !important;
    max-width: 380px !important;
  }
}

/* ===========================================================
   FINAL: PDP spacing and proportions
   =========================================================== */
.wu-pdp-section .wu-breadcrumbs {
  margin-top: 40px !important;
  margin-bottom: 16px !important;
}
.wu-pdp__gallery {
  flex: 0 0 450px !important;
  max-width: 450px !important;
}
.wu-pdp__buybox {
  max-width: 550px !important;
}
.wu-pdp__hero {
  justify-content: flex-start !important;
}
/* Compact OOS section */
.wu-pdp__mp-section--primary {
  margin-top: 12px !important;
  padding: 20px !important;
}
@media (min-width: 901px) and (max-width: 1100px) {
  .wu-pdp__gallery { flex: 0 0 360px !important; max-width: 360px !important; }
}

/* ==========================================================
 * PDP Reviews — Badge + Modal
 * ========================================================== */

/* Badge button next to vendor code */
.wu-pdp__vendor {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}
.wu-pdp__reviews-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  border: 1.5px solid #4F46E5;
  border-radius: 10px;
  background: #F5F3FF;
  color: #4F46E5;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background .2s, transform .15s;
  font-family: inherit;
  line-height: 1.3;
}
.wu-pdp__reviews-btn:hover {
  background: #4F46E5;
  color: #fff;
  transform: translateY(-1px);
}
.wu-pdp__reviews-btn:hover svg { stroke: #fff; }
.wu-pdp__reviews-stars {
  color: #FBBF24;
  font-size: 12px;
  letter-spacing: 0.5px;
  margin-left: 2px;
}

/* Modal overlay */
.wu-rv-modal {
  position: fixed;
  inset: 0;
  z-index: 99998;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s ease;
}
.wu-rv-modal--active {
  opacity: 1;
  pointer-events: auto;
}
.wu-rv-modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.5);
}

/* Slide-in panel */
.wu-rv-modal__panel {
  position: relative;
  width: 460px;
  max-width: 95vw;
  height: 100vh;
  background: #fff;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform .35s cubic-bezier(.4,0,.2,1);
  box-shadow: -8px 0 40px rgba(0,0,0,0.12);
}
.wu-rv-modal--active .wu-rv-modal__panel {
  transform: translateX(0);
}

/* Header */
.wu-rv-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid #F3F4F6;
  flex-shrink: 0;
}
.wu-rv-modal__header h3 {
  font-size: 18px;
  font-weight: 700;
  color: #1E1B4B;
  margin: 0;
}
.wu-rv-modal__close {
  background: none;
  border: none;
  font-size: 28px;
  color: #9CA3AF;
  cursor: pointer;
  line-height: 1;
  padding: 0 4px;
  transition: color .2s;
}
.wu-rv-modal__close:hover { color: #1E1B4B; }

/* Scrollable body */
.wu-rv-modal__body {
  flex: 1;
  overflow-y: auto;
  padding: 20px 24px;
  -webkit-overflow-scrolling: touch;
}
.wu-rv-modal__loader {
  text-align: center;
  color: #9CA3AF;
  font-size: 14px;
  padding: 40px 0;
}

/* Review card inside modal */
.wu-rv-card {
  padding: 16px 0;
  border-bottom: 1px solid #F3F4F6;
}
.wu-rv-card:last-child { border-bottom: none; }

.wu-rv-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.wu-rv-card__name {
  font-size: 15px;
  font-weight: 700;
  color: #1E1B4B;
}
.wu-rv-card__stars {
  color: #FBBF24;
  font-size: 14px;
  letter-spacing: 1px;
}
.wu-rv-card__text {
  font-size: 14px;
  color: #374151;
  line-height: 1.6;
}

/* Review photos in modal */
.wu-rv-card__photos {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}
.wu-rv-card__photo {
  width: 56px;
  height: 56px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid #E5E7EB;
  transition: border-color .2s, transform .2s;
  display: block;
}
.wu-rv-card__photo:hover {
  border-color: #4F46E5;
  transform: scale(1.05);
}
.wu-rv-card__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Mobile */
@media (max-width: 640px) {
  .wu-rv-modal__panel { width: 100vw; max-width: 100vw; }
  .wu-rv-modal__body { padding: 16px; }
  .wu-pdp__reviews-btn { font-size: 12px; padding: 4px 10px; }
}

/* ==========================================================
 * MOBILE FIXES: PDP
 * ========================================================== */
/* MP buttons: single column on narrow */
@media (max-width: 768px) {
  .wu-pdp__mp-section--primary .wu-pdp__mp-links { grid-template-columns: 1fr; }
}
/* Sticky CTA: safe area */
@media (max-width: 767px) {
  .wu-pdp__sticky-cta { padding-bottom: calc(4px + env(safe-area-inset-bottom, 0px)); }
  .wu-pdp { padding-bottom: calc(90px + env(safe-area-inset-bottom, 0px)); }
}
/* Thumbnail scroll snap */
.wu-pdp__thumbs { scroll-snap-type: x mandatory; }
.wu-pdp__thumb { scroll-snap-align: center; }
/* Review badge compact */
@media (max-width: 640px) {
  .wu-pdp__reviews-btn { font-size: 12px; padding: 4px 10px; }
  .wu-pdp__reviews-stars { font-size: 11px; }
}

/* ===== Sticky CTA: compact with qty selector ===== */
.wu-pdp__sticky-form {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 12px !important;
  max-width: 500px !important;
  margin: 0 auto !important;
}
.wu-pdp__sticky-qty {
  display: flex;
  align-items: center;
  border: 2px solid #E5E7EB;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  flex-shrink: 0;
}
.wu-pdp__qty-btn {
  width: 40px;
  height: 40px;
  border: none;
  background: #F9FAFB;
  font-size: 18px;
  font-weight: 600;
  cursor: pointer;
  color: #4F46E5;
  transition: background 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.wu-pdp__qty-btn:hover { background: #EEF2FF; }
.wu-pdp__qty-input {
  width: 48px;
  height: 40px;
  text-align: center;
  border: none;
  font-size: 16px;
  font-weight: 700;
  color: #1E1B4B;
  -moz-appearance: textfield;
}
.wu-pdp__qty-input::-webkit-outer-spin-button,
.wu-pdp__qty-input::-webkit-inner-spin-button { -webkit-appearance: none; }
.wu-pdp__sticky-btn {
  padding: 12px 32px !important;
  background: linear-gradient(135deg, #4F46E5, #7C3AED, #EC4899) !important;
  color: #fff !important;
  border: none !important;
  border-radius: 12px !important;
  font-size: 15px !important;
  font-weight: 700 !important;
  cursor: pointer !important;
  transition: all 0.2s !important;
  white-space: nowrap !important;
  font-family: inherit !important;
}
.wu-pdp__sticky-btn:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 6px 20px rgba(79,70,229,0.3) !important;
}
@media (max-width: 640px) {
  .wu-pdp__sticky-form {
    max-width: 100% !important;
    gap: 8px !important;
  }
  .wu-pdp__sticky-btn {
    padding: 12px 20px !important;
    font-size: 14px !important;
  }
}

/* ===== Buybox: qty + button side by side ===== */
.wu-pdp__buybox-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}
.wu-pdp__buybox-actions .wu-pdp__cta {
  flex: 1;
}

/* ===== Sticky CTA: hidden until scroll ===== */
.wu-pdp__sticky-cta {
  transform: translateY(100%) !important;
  transition: transform 0.3s ease !important;
}
.wu-pdp__sticky-cta--visible {
  transform: translateY(0) !important;
}

/* Sticky bar: compact single-line */
@media (min-width: 768px) {
  .wu-pdp__sticky-inner {
    max-width: 1200px;
    margin: 0 auto;
    justify-content: center;
  }
}

/* ===== Stock hint ===== */
.wu-pdp__stock-hint {
  font-size: 13px;
  color: #059669;
  font-weight: 500;
  margin-bottom: 8px;
}

.wu-pdp__stock-hint {
  font-size: 13px;
  color: #059669;
  font-weight: 500;
  margin-bottom: 8px;
}
