/* ============================================================
   OXID Product Page — BEM styles (.oxid-product__*)
   ============================================================ */

/* ---- Hero ------------------------------------------------- */
.oxid-product-hero {
  position: relative;
  width: 100%;
  height: 420px;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
}

.oxid-product-hero__bg {
  position: absolute;
  inset: 0;
  background-color: var(--wp--preset--color--oxid-black);
  background-size: cover;
  background-position: center right;
}

.oxid-product-hero__bg--fallback {
  background-image: linear-gradient(135deg, #0D1117 0%, #1a2540 100%);
}

.oxid-product-hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to right,
    rgba(13, 17, 23, 0.92) 0%,
    rgba(13, 17, 23, 0.82) 45%,
    rgba(13, 17, 23, 0.25) 100%
  );
}

.oxid-product-hero__logo-wrap {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 64px;
  pointer-events: none;
}

.oxid-product-hero__logo {
  max-width: 220px;
  max-height: 55%;
  width: auto;
  height: auto;
  object-fit: contain;
  opacity: 0.5;
  filter: drop-shadow(0 2px 16px rgba(0, 0, 0, 0.5));
}

.oxid-product-hero__content {
  position: relative;
  z-index: 1;
  padding: 0 48px 48px;
  max-width: 640px;
}

.oxid-product-hero__badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--wp--preset--color--oxid-cyan);
  border: 1px solid var(--wp--preset--color--oxid-cyan);
  border-radius: 2px;
  padding: 3px 10px;
  margin-bottom: 14px;
}

.oxid-product-hero__title {
  font-size: clamp(28px, 4vw, 48px);
  font-weight: 700;
  color: #ffffff;
  line-height: 1.15;
  margin: 0 0 16px;
}


/* ---- Split ------------------------------------------------ */
.oxid-product-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 56px 48px;
}

/* Gallery */
.oxid-product__gallery-main {
  aspect-ratio: 1 / 1;
  width: 100%;
  overflow: hidden;
  border-radius: 4px;
  background: var(--wp--preset--color--oxid-offwhite);
}

.oxid-product__gallery-main img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 200ms ease;
}

.oxid-product__gallery-thumbs {
  display: flex;
  gap: 10px;
  margin-top: 12px;
}

.oxid-product__gallery-thumb {
  width: 72px;
  height: 72px;
  border-radius: 3px;
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
  transition: border-color 200ms ease;
  flex-shrink: 0;
}

.oxid-product__gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.oxid-product__gallery-thumb.is-active,
.oxid-product__gallery-thumb:hover {
  border-color: var(--wp--preset--color--oxid-blue);
}

/* Info block */
.oxid-product__info {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.oxid-product__meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.oxid-product__eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--wp--preset--color--oxid-blue);
}

.oxid-product__brand-logo {
  display: block;
  height: 28px;
  width: auto;
  object-fit: contain;
}

.oxid-product__brand-text {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--wp--preset--color--oxid-gray);
}

.oxid-product__title-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.oxid-product__name {
  font-size: clamp(22px, 2.5vw, 32px);
  font-weight: 700;
  color: var(--wp--preset--color--oxid-black);
  margin: 0;
  line-height: 1.2;
}

.oxid-product__sku {
  font-size: 14px;
  color: var(--wp--preset--color--oxid-gray);
  margin: 0;
}

.oxid-product__sku--empty {
  display: none;
}

.oxid-product__price {
  font-size: 28px;
  font-weight: 700;
  color: var(--wp--preset--color--oxid-blue);
}

.oxid-product__price del {
  font-size: 18px;
  font-weight: 400;
  color: var(--wp--preset--color--oxid-gray);
  margin-right: 10px;
}

.oxid-product__divider {
  border: none;
  border-top: 1px solid #e8e8e8;
  margin: 0;
}

/* Variation chips */
.oxid-product__var-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--wp--preset--color--oxid-gray);
  margin-bottom: 8px;
}

.oxid-product__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.oxid-product__chip {
  padding: 6px 16px;
  border: 1.5px solid #d0d4dc;
  border-radius: 20px;
  background: transparent;
  font-size: 14px;
  color: var(--wp--preset--color--oxid-black);
  cursor: pointer;
  transition: border-color 200ms ease, background 200ms ease, color 200ms ease;
}

.oxid-product__chip:hover {
  border-color: var(--wp--preset--color--oxid-blue);
  color: var(--wp--preset--color--oxid-blue);
}

.oxid-product__chip.is-active {
  background: var(--wp--preset--color--oxid-blue);
  border-color: var(--wp--preset--color--oxid-blue);
  color: #ffffff;
}

.oxid-product__chip.is-oos {
  opacity: 0.45;
  text-decoration: line-through;
  cursor: not-allowed;
  pointer-events: none;
}

/* Hide WooCommerce native variation select */
.variations_form .variations select,
.variations_form table.variations {
  display: none !important;
}

/* Stock status */
.oxid-product__stock {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
}

.oxid-product__stock-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.oxid-product__stock--instock .oxid-product__stock-dot {
  background: #22c55e;
}

.oxid-product__stock--outofstock .oxid-product__stock-dot {
  background: var(--wp--preset--color--oxid-gray);
}

.oxid-product__stock--instock .oxid-product__stock-text {
  color: #22c55e;
}

.oxid-product__stock--outofstock .oxid-product__stock-text {
  color: var(--wp--preset--color--oxid-gray);
}

.oxid-product__stock--onbackorder .oxid-product__stock-dot {
  background: var(--wp--preset--color--oxid-blue);
}

.oxid-product__stock--onbackorder .oxid-product__stock-text {
  color: var(--wp--preset--color--oxid-blue);
}

/* Hide WooCommerce's duplicate variation price shown above the ATC button */
.woocommerce-variation-price {
  display: none !important;
}

/* Add to cart — inline row: [quantity] [button ~50%] */
.oxid-product__atc-wrapper form.cart:not(.variations_form),
.oxid-product__atc-wrapper .woocommerce-variation-add-to-cart {
  display: flex;
  align-items: stretch;
  gap: 12px;
}

.oxid-product__atc-wrapper .quantity {
  flex: 1;
  display: flex;
  align-items: center;
  border: 1.5px solid #d0d4dc;
  border-radius: 3px;
  transition: border-color 200ms ease;
}

.oxid-product__atc-wrapper .quantity:focus-within {
  border-color: var(--wp--preset--color--oxid-blue);
}

.oxid-product__atc-wrapper .quantity input.qty {
  width: 100%;
  height: 52px;
  padding: 0 8px;
  border: none;
  background: transparent;
  font-size: 18px;
  font-weight: 600;
  color: var(--wp--preset--color--oxid-black);
  text-align: center;
  outline: none;
}

.oxid-product__atc-wrapper .single_add_to_cart_button,
.oxid-product__atc-wrapper button[type="submit"] {
  flex: 0 0 70%;
  width: auto;
  padding: 14px 24px;
  background: var(--wp--preset--color--oxid-blue);
  color: #ffffff;
  border: none;
  border-radius: 3px;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 200ms ease, transform 200ms ease;
}

.oxid-product__atc-wrapper .single_add_to_cart_button:hover,
.oxid-product__atc-wrapper button[type="submit"]:hover {
  background: var(--wp--preset--color--oxid-cyan);
  transform: translateY(-2px);
}

/* ---- Tabs ------------------------------------------------- */
.oxid-product__tabs {
  max-width: 1200px;
  margin: 0 auto 64px;
  padding: 0 48px;
}

.oxid-product__tab-nav {
  display: flex;
  border-bottom: 2px solid #e8e8e8;
  margin-bottom: 32px;
  gap: 0;
}

.oxid-product__tab-btn {
  padding: 12px 24px;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--wp--preset--color--oxid-gray);
  cursor: pointer;
  transition: color 200ms ease, border-color 200ms ease;
}

.oxid-product__tab-btn.is-active {
  color: var(--wp--preset--color--oxid-blue);
  border-bottom-color: var(--wp--preset--color--oxid-blue);
}

.oxid-product__tab-panel {
  display: none;
  /* opacity managed by JS via inline style + double-rAF */
}

.oxid-product__tab-panel.is-active {
  display: block;
  transition: opacity 200ms ease;
}

/* Description tab */
.oxid-product__tab-panel p,
.oxid-product__tab-panel ul,
.oxid-product__tab-panel ol {
  font-size: 16px;
  line-height: 1.7;
  color: var(--wp--preset--color--oxid-black);
  max-width: none;
}

.oxid-product__tab-panel h3,
.oxid-product__tab-panel h4 {
  font-weight: 700;
  color: var(--wp--preset--color--oxid-black);
  margin-top: 24px;
}

/* Specs tab */
.oxid-product__spec-list {
  display: flex;
  flex-direction: column;
  max-width: 720px;
}

.oxid-product__spec-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid #f0f0f0;
}

.oxid-product__spec-icon {
  width: 28px;
  height: 28px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  flex-shrink: 0;
}

.oxid-product__spec-row--scale .oxid-product__spec-icon {
  background: linear-gradient(135deg, rgba(45, 79, 139, 0.15), rgba(79, 190, 211, 0.2));
  color: var(--wp--preset--color--oxid-blue);
}

.oxid-product__spec-row--text .oxid-product__spec-icon {
  background: #f4f4f4;
  color: var(--wp--preset--color--oxid-gray);
}

.oxid-product__spec-name {
  font-size: 14px;
  color: var(--wp--preset--color--oxid-gray);
  width: 140px;
  flex-shrink: 0;
}

.oxid-product__spec-track {
  flex: 1;
  height: 6px;
  background: #f0f0f0;
  border-radius: 3px;
  overflow: hidden;
}

.oxid-product__spec-fill {
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--wp--preset--color--oxid-blue), var(--wp--preset--color--oxid-cyan));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 600ms ease-out;
}

.oxid-product__spec-fill.is-visible {
  /* transform value is set via JS inline style; this class is a semantic marker only */
}

.oxid-product__spec-score {
  font-size: 13px;
  font-weight: 700;
  color: var(--wp--preset--color--oxid-blue);
  min-width: 32px;
  text-align: right;
}

.oxid-product__spec-value {
  font-size: 14px;
  font-weight: 600;
  color: var(--wp--preset--color--oxid-black);
  text-align: right;
  margin-left: auto;
}

/* Steps tab */
.oxid-product__steps {
  list-style: none;
  padding: 0;
  margin: 0;
  max-width: 680px;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.oxid-product__step {
  display: flex;
  gap: 16px;
  position: relative;
}

.oxid-product__step:not(:last-child)::after {
  content: '';
  position: absolute;
  left: 19px;
  top: calc(50% + 20px);
  bottom: -8px;
  width: 2px;
  background: #e8e8e8;
}

.oxid-product__step-num {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  align-self: center;
  border-radius: 50%;
  background: var(--wp--preset--color--oxid-blue);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 700;
  color: #ffffff;
}

.oxid-product__step-body {
  padding-bottom: 24px;
  flex: 1;
}

.oxid-product__step-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--wp--preset--color--oxid-black);
  margin: 0 0 6px;
}

.oxid-product__step-desc {
  font-size: 15px;
  line-height: 1.65;
  color: var(--wp--preset--color--oxid-gray);
  margin: 0;
}

/* ---- Toast notification ------------------------------------------ */
.oxid-toast {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 9999;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 14px 20px;
  border-radius: 4px;
  background: var(--wp--preset--color--oxid-black);
  border-left: 3px solid var(--wp--preset--color--oxid-blue);
  box-shadow: 0 6px 28px rgba(0, 0, 0, 0.36);
  font-size: 14px;
  color: #e8e8e8;
  max-width: 340px;
  transform: translateX(calc(100% + 48px));
  opacity: 0;
  transition: transform 300ms cubic-bezier(0.34, 1.3, 0.64, 1), opacity 220ms ease;
  pointer-events: none;
}

.oxid-toast.is-visible {
  transform: translateX(0);
  opacity: 1;
  pointer-events: auto;
}

.oxid-toast--error {
  border-left-color: #e53e3e;
}

.oxid-toast__msg {
  flex: 1;
  line-height: 1.45;
}

.oxid-toast__link {
  flex-shrink: 0;
  font-size: 13px;
  font-weight: 700;
  color: var(--wp--preset--color--oxid-cyan);
  text-decoration: none;
  letter-spacing: 0.04em;
  white-space: nowrap;
  transition: color 180ms ease;
}

.oxid-toast__link:hover {
  color: #ffffff;
}

/* ---- Related / other products ------------------------------------ */
.oxid-product-related,
.oxid-product-other {
  padding: 56px 48px;
}

.oxid-product-related {
  background: var(--wp--preset--color--oxid-offwhite);
}

.oxid-product-other {
  background: var(--wp--preset--color--oxid-white);
}

.oxid-product-related__inner,
.oxid-product-other__inner {
  max-width: 1200px;
  margin: 0 auto;
}

.oxid-product-related__title,
.oxid-product-other__title {
  font-size: 22px;
  font-weight: 700;
  color: var(--wp--preset--color--oxid-black);
  margin: 0 0 28px;
}

.oxid-product-related__grid,
.oxid-product-other__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

/* ---- Responsive ------------------------------------------ */
@media (max-width: 1199px) {
  .oxid-product-hero { height: 360px; }
}

@media (max-width: 991px) {
  .oxid-product-hero { height: 300px; }
  .oxid-product-hero__content { padding: 0 24px 36px; }
  .oxid-product-split { padding: 40px 24px; gap: 32px; }
  .oxid-product__tabs { padding: 0 24px; }
  .oxid-product-related,
  .oxid-product-other { padding: 40px 24px; }
  .oxid-product-related__grid,
  .oxid-product-other__grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 767px) {
  .oxid-product-hero { height: 260px; }
  .oxid-product-hero__bg { background-position: center center; }
  .oxid-product-hero__logo-wrap { display: none; }
  .oxid-product-split {
    grid-template-columns: 1fr;
    padding: 32px 20px;
    gap: 24px;
  }
  .oxid-product__gallery-thumb { width: 56px; height: 56px; }
  .oxid-product__tabs { padding: 0 20px; }
  .oxid-product__tab-btn { padding: 10px 14px; font-size: 11px; }
  .oxid-product-related,
  .oxid-product-other { padding: 32px 20px; }
}

@media (max-width: 479px) {
  .oxid-product-hero { height: 220px; }
  .oxid-product__chips { gap: 6px; }
  .oxid-product__chip { padding: 5px 12px; font-size: 13px; }
}

/* prefers-reduced-motion: disable bar transition; JS sets scaleX value immediately */
@media (prefers-reduced-motion: reduce) {
  .oxid-product__spec-fill {
    transition: none;
  }
}
