/* Inventory-style single product page */

body.yg-inventory-pdp .yg-inv-pdp {
  --yg-pdp-ink: var(--yg-ink, #12100e);
  --yg-pdp-muted: var(--yg-muted, #6b6258);
  --yg-pdp-line: var(--yg-line, rgba(26, 23, 20, 0.12));
  --yg-pdp-surface: var(--yg-surface, #fffdf9);
  --yg-pdp-bg: var(--yg-bg, #f7f3ec);
  --yg-pdp-accent: var(--yg-accent, #0b3d2e);
  --yg-pdp-gold: var(--yg-gold, #c4a35a);
  --yg-pdp-ok: #0f6b3a;
  --yg-pdp-warn: #9a6700;
  --yg-pdp-danger: #b32d2e;
  max-width: 1100px;
  margin: 0 auto 2.5rem;
  padding: 0 1rem;
  color: var(--yg-pdp-ink);
  font-family: "Avenir Next", "Segoe UI", Candara, sans-serif;
}

/* Hide confusing theme / WC chrome around our layout */
body.yg-inventory-pdp .woocommerce-product-gallery,
body.yg-inventory-pdp .summary.entry-summary,
body.yg-inventory-pdp .product-images,
body.yg-inventory-pdp .wd-single-product,
body.yg-inventory-pdp .woocommerce-tabs,
body.yg-inventory-pdp .wc-tabs-wrapper,
body.yg-inventory-pdp .upsells.products,
body.yg-inventory-pdp .woodmart-woocommerce-tabs,
body.yg-inventory-pdp .entry-summary > .price,
body.yg-inventory-pdp .product_title:not(.yg-inv-pdp__title) {
  display: none !important;
}

/* Theme related blocks — we use our own related inventory grid */
body.yg-inventory-pdp .related.products,
body.yg-inventory-pdp .upsells.products {
  display: none !important;
}

.yg-inv-pdp__related {
  margin-top: 1.5rem;
}

.yg-inv-pdp__related-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.85rem;
}

.yg-inv-pdp__related-card {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  padding: 0.75rem;
  border: 1px solid var(--yg-pdp-line);
  background: var(--yg-pdp-surface);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.yg-inv-pdp__related-card:hover {
  border-color: var(--yg-pdp-gold);
  transform: translateY(-1px);
}

.yg-inv-pdp__related-img {
  display: block;
  aspect-ratio: 1;
  overflow: hidden;
  background: var(--yg-pdp-bg);
}

.yg-inv-pdp__related-img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.yg-inv-pdp__related-card strong {
  font-size: 0.9rem;
  font-weight: 650;
  line-height: 1.3;
}

.yg-inv-pdp__related-price {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--yg-pdp-accent);
}

.yg-inv-pdp__crumb {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
  margin: 0.75rem 0 1rem;
  font-size: 0.9rem;
}

.yg-inv-pdp__crumb a {
  color: var(--yg-pdp-accent);
  text-decoration: none;
  font-weight: 650;
}

.yg-inv-pdp__crumb a:hover {
  text-decoration: underline;
}

.yg-inv-pdp__header {
  margin-bottom: 1.1rem;
}

.yg-inv-pdp__ids {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
  margin-bottom: 0.45rem;
}

.yg-inv-pdp__sku {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--yg-pdp-muted);
  margin-right: 0.25rem;
}

.yg-inv-pdp__title {
  margin: 0;
  font-family: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  font-size: clamp(1.55rem, 3vw, 2.15rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.yg-inv-pdp__stock {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border: 1px solid var(--yg-pdp-line);
  background: var(--yg-pdp-surface);
}

.yg-inv-pdp__stock--in {
  color: var(--yg-pdp-ok);
  border-color: rgba(15, 107, 58, 0.35);
  background: rgba(15, 107, 58, 0.08);
}

.yg-inv-pdp__stock--low {
  color: var(--yg-pdp-warn);
  border-color: rgba(154, 103, 0, 0.4);
  background: rgba(154, 103, 0, 0.08);
}

.yg-inv-pdp__stock--out {
  color: var(--yg-pdp-danger);
  border-color: rgba(179, 45, 46, 0.35);
  background: rgba(179, 45, 46, 0.08);
}

.yg-inv-pdp__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: 1rem;
  margin-bottom: 1rem;
}

.yg-inv-pdp__media,
.yg-inv-pdp__buy {
  min-width: 0;
}

.yg-inv-pdp__image {
  border: 1px solid var(--yg-pdp-line);
  background:
    linear-gradient(180deg, rgba(196, 163, 90, 0.08), transparent 40%),
    var(--yg-pdp-surface);
  padding: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 280px;
}

.yg-inv-pdp__img {
  max-width: 100%;
  height: auto;
  max-height: 360px;
  object-fit: contain;
}

.yg-inv-pdp__thumbs {
  display: flex;
  gap: 0.45rem;
  margin-top: 0.55rem;
}

.yg-inv-pdp__thumb {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border: 1px solid var(--yg-pdp-line);
  background: var(--yg-pdp-surface);
}

.yg-inv-pdp__video {
  margin: 0.65rem 0 0;
}

.yg-inv-pdp__link {
  color: var(--yg-pdp-accent);
  font-weight: 650;
}

.yg-inv-pdp__panel {
  border: 1px solid var(--yg-pdp-line);
  background: var(--yg-pdp-surface);
  margin-bottom: 0.75rem;
  overflow: hidden;
}

.yg-inv-pdp__panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.7rem 1rem;
  border-bottom: 1px solid var(--yg-pdp-line);
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.03), transparent);
}

.yg-inv-pdp__panel-head h2 {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.yg-inv-pdp__live {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--yg-pdp-ok);
  border: 1px solid rgba(15, 107, 58, 0.35);
  padding: 0.15rem 0.4rem;
}

.yg-inv-pdp__panel-body {
  padding: 1rem;
}

.yg-inv-pdp__price-rows {
  display: grid;
  gap: 0.45rem;
}

.yg-inv-pdp__row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: baseline;
  font-size: 0.95rem;
}

.yg-inv-pdp__row span {
  color: var(--yg-pdp-muted);
}

.yg-inv-pdp__row--total {
  margin-top: 0.35rem;
  padding-top: 0.65rem;
  border-top: 1px dashed var(--yg-pdp-line);
  font-size: 1.15rem;
}

.yg-inv-pdp__row--total strong {
  color: var(--yg-pdp-accent);
  font-family: "Iowan Old Style", Palatino, Georgia, serif;
  font-size: 1.45rem;
}

.yg-inv-pdp__note {
  margin: 0.75rem 0 0;
  font-size: 0.85rem;
  color: var(--yg-pdp-muted);
  line-height: 1.45;
}

.yg-inv-pdp__alert {
  margin: 0.85rem 0;
  padding: 0.7rem 0.85rem;
  border-left: 3px solid var(--yg-pdp-accent);
  background: rgba(11, 61, 46, 0.06);
  font-size: 0.9rem;
}

.yg-inv-pdp__alert--warn {
  border-left-color: var(--yg-pdp-warn);
  background: rgba(154, 103, 0, 0.08);
}

.yg-inv-pdp__cart {
  margin-top: 1rem;
  display: grid;
  gap: 0.65rem;
}

.yg-inv-pdp__cart .cart,
.yg-inv-pdp__cart form.cart {
  display: flex !important;
  flex-wrap: wrap;
  gap: 0.55rem;
  align-items: center;
  margin: 0 !important;
}

.yg-inv-pdp__cart .quantity .qty {
  min-height: 42px;
  width: 4.5rem;
  border: 1px solid var(--yg-pdp-line);
  padding: 0.35rem 0.5rem;
}

.yg-inv-pdp__cart .single_add_to_cart_button,
.yg-inv-pdp__buy-now,
.yg-inv-pdp__cart .button {
  min-height: 42px;
  padding: 0.55rem 1.1rem !important;
  border-radius: 0 !important;
  font-weight: 700 !important;
}

.yg-inv-pdp__buy-now {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--yg-pdp-accent) !important;
  border: 1px solid var(--yg-pdp-accent) !important;
  color: #f7f3ec !important;
  text-decoration: none !important;
}

.yg-inv-pdp__watch {
  margin-top: 0.15rem;
}

.yg-inv-pdp__fulfills {
  margin: 0;
  padding-left: 1.1rem;
  color: var(--yg-pdp-ink);
}

.yg-inv-pdp__fulfills li {
  margin: 0.35rem 0;
  color: var(--yg-pdp-muted);
}

.yg-inv-pdp__fulfills strong {
  color: var(--yg-pdp-ink);
}

.yg-inv-pdp__policy-links {
  margin: 0.75rem 0 0;
  font-size: 0.88rem;
}

.yg-inv-pdp__policy-links a {
  color: var(--yg-pdp-accent);
}

.yg-inv-pdp__spec-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.65rem;
}

.yg-inv-pdp__spec {
  border: 1px solid var(--yg-pdp-line);
  background: rgba(0, 0, 0, 0.02);
  padding: 0.7rem 0.75rem;
}

.yg-inv-pdp__spec span {
  display: block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--yg-pdp-muted);
  margin-bottom: 0.25rem;
}

.yg-inv-pdp__spec strong {
  font-size: 0.95rem;
  font-weight: 650;
}

.yg-inv-pdp__prose {
  font-size: 0.98rem;
  line-height: 1.55;
  color: var(--yg-pdp-ink);
}

.yg-inv-pdp__prose p:first-child {
  margin-top: 0;
}

@media (max-width: 860px) {
  .yg-inv-pdp__grid {
    grid-template-columns: 1fr;
  }

  .yg-inv-pdp__spec-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .yg-inv-pdp__related-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 480px) {
  .yg-inv-pdp__spec-grid {
    grid-template-columns: 1fr;
  }

  .yg-inv-pdp__related-grid {
    grid-template-columns: 1fr;
  }
}
