/* ═══════════════════════════════════════════
   PRODUCTS / STORE PAGE — stubease.com
═══════════════════════════════════════════ */

/* ── DISTRIBUTOR BAND ── */
.distributor-band {
  background: #1a2744;
  border-bottom: 1px solid rgba(254,80,0,0.2);
  padding: 14px 0;
}
.distributor-band .container {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  color: rgba(255,255,255,0.78);
  font-size: 0.88rem;
  line-height: 1.5;
}
.distributor-band a { color: #FE5000; text-decoration: underline; }
.distributor-band strong { color: #fff; }

/* ── STORE SECTION ── */
.store-section {
  padding: 64px 0 96px;
  background: var(--color-surface);
}

/* ── FILTER BAR ── */
.filter-bar {
  display: flex;
  gap: 32px;
  flex-wrap: wrap;
  align-items: center;
  padding: 20px 24px;
  background: var(--color-bg);
  border-radius: 8px;
  border: 1px solid rgba(26,39,68,0.1);
  margin-bottom: 32px;
}
.filter-group {
  display: flex;
  align-items: center;
  gap: 10px;
}
.filter-label {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #888;
  white-space: nowrap;
}
.filter-pills {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.filter-pill {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 6px 14px;
  border-radius: 4px;
  border: 1.5px solid rgba(26,39,68,0.2);
  color: var(--color-text-muted);
  background: var(--color-bg);
  cursor: pointer;
  transition: all 0.15s;
}
.filter-pill:hover { border-color: #FE5000; color: #FE5000; }
.filter-pill.active {
  background: #FE5000;
  border-color: #FE5000;
  color: #fff;
}

/* ── PRODUCT GRID ── */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}

/* ── PRODUCT CARD ── */
.product-card {
  background: var(--color-bg);
  border: 1px solid rgba(26,39,68,0.1);
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s, box-shadow 0.2s;
}
.product-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 32px rgba(26,39,68,0.12);
}
.product-card.out-of-stock {
  opacity: 0.7;
}
.product-card.hidden { display: none; }

.product-card-img {
  height: 180px;
  background: #1a2744;
  position: relative;
  overflow: hidden;
}
.product-card-img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 12px 16px;
  background: #1a2744;
}
.product-card-img svg {
  width: 100%;
  height: 100%;
}

.stock-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 4px;
}
.stock-badge.in-stock {
  background: rgba(67,122,34,0.9);
  color: #fff;
}
.stock-badge.low-stock {
  background: rgba(254,80,0,0.9);
  color: #fff;
}
.stock-badge.out-of-stock {
  background: rgba(100,100,100,0.85);
  color: #fff;
}

.sku-badge {
  position: absolute;
  bottom: 8px;
  left: 12px;
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 600;
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.65);
  background: rgba(0,0,0,0.4);
  padding: 3px 8px;
  border-radius: 3px;
}

.product-card-body {
  padding: 20px 20px 0;
  flex: 1;
}
.product-trade-size {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #FE5000;
  margin-bottom: 6px;
}
.product-name {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--color-text);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 10px;
  line-height: 1.2;
}
.product-specs {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.product-spec-tag {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  background: rgba(26,39,68,0.05);
  border: 1px solid rgba(26,39,68,0.1);
  padding: 3px 10px;
  border-radius: 3px;
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.product-pricing {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding: 12px 0;
  border-top: 1px solid rgba(26,39,68,0.06);
  border-bottom: 1px solid rgba(26,39,68,0.06);
  margin-bottom: 0;
}
.price-col { display: flex; flex-direction: column; gap: 2px; }
.price-label {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 600;
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #aaa;
}
.price-val {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 800;
  font-size: 1.4rem;
  color: var(--color-text);
  line-height: 1;
}
.price-val.msrp {
  color: #888;
  font-size: 1.1rem;
  text-decoration: line-through;
}
.price-per-unit {
  font-size: 0.72rem;
  color: #aaa;
  margin-top: 2px;
}

.product-card-footer {
  padding: 14px 20px 20px;
}
.qty-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.qty-label {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 600;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #888;
  white-space: nowrap;
}
.qty-control {
  display: flex;
  align-items: center;
  border: 1.5px solid rgba(26,39,68,0.15);
  border-radius: 4px;
  overflow: hidden;
}
.qty-btn {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-surface);
  color: var(--color-text);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
  user-select: none;
  border: none;
  font-family: inherit;
}
.qty-btn:hover { background: #e8e7e3; }
.qty-input {
  width: 44px;
  height: 32px;
  text-align: center;
  border: none;
  border-left: 1.5px solid rgba(26,39,68,0.12);
  border-right: 1.5px solid rgba(26,39,68,0.12);
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--color-text);
  background: var(--color-bg);
  -moz-appearance: textfield;
}
.qty-input::-webkit-outer-spin-button,
.qty-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.add-to-cart-btn {
  width: 100%;
  padding: 12px;
  font-size: 0.88rem;
}
.add-to-cart-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* ── CART DRAWER ── */
.cart-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 200;
}
.cart-overlay.open { display: block; }

.cart-drawer {
  position: fixed;
  top: 0;
  right: -420px;
  width: 420px;
  max-width: 100vw;
  height: 100vh;
  background: var(--color-bg);
  z-index: 201;
  display: flex;
  flex-direction: column;
  transition: right 0.3s cubic-bezier(0.4,0,0.2,1);
  box-shadow: -4px 0 40px rgba(0,0,0,0.15);
}
.cart-drawer.open { right: 0; }

.cart-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid rgba(26,39,68,0.1);
  background: #1a2744;
  color: #fff;
}
.cart-drawer-header h2 {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 800;
  font-size: 1.2rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.cart-close {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.7);
  border-radius: 4px;
  transition: color 0.15s, background 0.15s;
  background: none;
  border: none;
  cursor: pointer;
}
.cart-close:hover { color: #fff; background: rgba(255,255,255,0.1); }
.cart-close svg { width: 18px; height: 18px; }

.cart-items {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
}
.cart-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 200px;
  gap: 12px;
  color: #aaa;
  text-align: center;
}
.cart-empty svg { width: 48px; height: 48px; }
.cart-empty p { font-size: 0.9rem; color: #888; }

.cart-line-item {
  display: flex;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(26,39,68,0.07);
  align-items: flex-start;
}
.cart-item-info { flex: 1; }
.cart-item-name {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--color-text);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 3px;
}
.cart-item-sku {
  font-size: 0.72rem;
  color: #aaa;
  font-family: 'Barlow Condensed', sans-serif;
  letter-spacing: 0.08em;
}
.cart-item-price {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 800;
  font-size: 1rem;
  color: var(--color-text);
  white-space: nowrap;
}
.cart-item-qty {
  font-size: 0.78rem;
  color: #888;
  margin-top: 2px;
}
.cart-item-remove {
  background: none;
  border: none;
  color: #aaa;
  cursor: pointer;
  font-size: 1.1rem;
  padding: 2px 4px;
  transition: color 0.15s;
  line-height: 1;
}
.cart-item-remove:hover { color: #a12c2c; }

.cart-footer {
  padding: 16px 24px 24px;
  border-top: 1px solid rgba(26,39,68,0.1);
  background: var(--color-surface);
}
.cart-subtotal {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--color-text);
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.cart-note {
  font-size: 0.75rem;
  color: #888;
  line-height: 1.5;
  margin-bottom: 14px;
}
.cart-note a { color: #FE5000; }

.cart-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--color-bg);
  color: #FE5000;
  border-radius: 10px;
  min-width: 20px;
  height: 20px;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0 5px;
  margin-left: 4px;
}

/* ── CHECKOUT MODAL ── */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 300;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-overlay.open { display: flex; }

.checkout-modal {
  background: var(--color-bg);
  border-radius: 12px;
  width: 100%;
  max-width: 660px;
  max-height: 92vh;
  overflow-y: auto;
  box-shadow: 0 24px 80px rgba(0,0,0,0.3);
}
.checkout-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 28px;
  background: #1a2744;
  border-radius: 12px 12px 0 0;
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 1;
}
.checkout-modal-header h2 {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 800;
  font-size: 1.2rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.checkout-modal-header .cart-close { color: rgba(255,255,255,0.7); }
.checkout-modal-body { padding: 28px; }

.checkout-order-summary {
  background: var(--color-surface);
  border-radius: 8px;
  padding: 16px 20px;
  margin-bottom: 24px;
  border: 1px solid rgba(26,39,68,0.08);
}
.checkout-summary-item {
  display: flex;
  justify-content: space-between;
  font-size: 0.88rem;
  color: var(--color-text-muted);
  padding: 6px 0;
  border-bottom: 1px solid rgba(26,39,68,0.07);
}
.checkout-summary-item:last-child { border-bottom: none; }
.checkout-summary-item strong { color: var(--color-text); }

.checkout-form h3 {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 800;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-text);
  margin: 20px 0 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid rgba(26,39,68,0.08);
}
.checkout-form h3:first-of-type { margin-top: 0; }

.form-row { display: flex; gap: 12px; }
.form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
  flex: 1;
}
.form-field label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.form-field input,
.form-field textarea,
.form-field select {
  padding: 10px 14px;
  border: 1.5px solid rgba(26,39,68,0.18);
  border-radius: 5px;
  font-family: 'Barlow', sans-serif;
  font-size: 0.9rem;
  color: var(--color-text);
  transition: border-color 0.2s;
  background: var(--color-bg);
}
.form-field input:focus,
.form-field textarea:focus { outline: none; border-color: #FE5000; }
.form-field input.error { border-color: #a12c2c; }
.form-field textarea { resize: vertical; }

.stripe-placeholder {
  background: var(--color-surface);
  border: 1px solid rgba(26,39,68,0.12);
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 16px;
}
.stripe-mock-field { margin-bottom: 12px; }
.stripe-mock-field label {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 6px;
}
.stripe-input-mock {
  padding: 10px 14px;
  background: var(--color-bg);
  border: 1.5px solid rgba(26,39,68,0.15);
  border-radius: 5px;
  font-size: 0.9rem;
  color: #aaa;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.stripe-notice {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
  color: #888;
  margin-top: 10px;
}
.stripe-notice svg { width: 14px; height: 14px; flex-shrink: 0; color: #437A22; }

.checkout-total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 0 8px;
  border-top: 2px solid rgba(26,39,68,0.1);
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 800;
  font-size: 1.2rem;
  color: var(--color-text);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.checkout-total-row strong { color: #FE5000; }

/* ── SUCCESS MODAL ── */
.success-modal {
  background: var(--color-bg);
  border-radius: 12px;
  padding: 48px 40px;
  max-width: 480px;
  width: 100%;
  text-align: center;
  box-shadow: 0 24px 80px rgba(0,0,0,0.3);
}
.success-icon { margin-bottom: 24px; }
.success-icon svg { width: 64px; height: 64px; margin: 0 auto; }
.success-modal h2 {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 900;
  font-size: 1.8rem;
  color: var(--color-text);
  text-transform: uppercase;
  margin-bottom: 16px;
}
.success-modal p { font-size: 0.9rem; color: var(--color-text-muted); line-height: 1.65; }
.success-modal a { color: #FE5000; }

/* ── DOCS SECTION ── */
.docs-section {
  padding: 96px 0;
  background: var(--color-bg);
}
.docs-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-top: 48px;
}
.doc-card {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 24px;
  border: 1px solid rgba(26,39,68,0.1);
  border-radius: 8px;
  background: var(--color-surface);
  transition: box-shadow 0.2s;
}
.doc-card:hover { box-shadow: 0 4px 20px rgba(26,39,68,0.08); }
.doc-icon { flex-shrink: 0; width: 44px; }
.doc-icon svg { width: 44px; height: 44px; }
.doc-content { flex: 1; }
.doc-content h3 {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 800;
  font-size: 0.95rem;
  color: var(--color-text);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 4px;
}
.doc-content p { font-size: 0.82rem; color: var(--color-text-muted); line-height: 1.5; }

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  .filter-bar { flex-direction: column; align-items: flex-start; gap: 16px; }
  .docs-grid { grid-template-columns: 1fr; }
  .doc-card { flex-direction: column; text-align: center; }
  .cart-drawer { width: 100%; }
  .form-row { flex-direction: column; }
}
@media (max-width: 480px) {
  .product-grid { grid-template-columns: 1fr; }
}

/* ── QR deep-link highlight ── */
@keyframes qr-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(254,80,0,0.7); outline: 2px solid #FE5000; }
  50%  { box-shadow: 0 0 0 14px rgba(254,80,0,0); outline: 2px solid #FE5000; }
  100% { box-shadow: 0 0 0 0 rgba(254,80,0,0); outline: 2px solid transparent; }
}
.product-card.qr-highlight {
  animation: qr-pulse 1.4s ease-out 2;
}

/* Product page hero with display image */
.page-hero--with-product .page-hero-content {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: flex-end;
  gap: 2rem;
}

.page-hero--with-product .page-hero-text {
  padding-bottom: 0;
}

.page-hero-product {
  position: relative;
  z-index: 1;
  flex-shrink: 0;
  margin-bottom: -64px; /* bleed into next section */
}

.page-hero-product img {
  height: 380px;
  width: auto;
  max-width: 260px;
  display: block;
  object-fit: contain;
  filter: drop-shadow(0 24px 48px rgba(0,0,0,0.55));
}

@media (max-width: 768px) {
  .page-hero--with-product .page-hero-content {
    grid-template-columns: 1fr;
  }
  .page-hero-product {
    display: none; /* hide on mobile to keep hero clean */
  }
}


/* ═══════════════════════════════════════════
   HERO SECTION-CUT THUMBNAIL
═══════════════════════════════════════════ */

.hero-section-cut {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  width: 110px;
  background: var(--color-bg);
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.25);
  overflow: hidden;
  border: 2px solid rgba(254,80,0,0.3);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.hero-section-cut:hover {
  transform: scale(1.06);
  box-shadow: 0 8px 28px rgba(0,0,0,0.35);
}

.hero-section-cut img {
  width: 100%;
  display: block;
}

.hero-section-cut-label {
  background: #FE5000;
  color: #fff;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 0.55rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  text-align: center;
  padding: 0.2rem 0.25rem;
}


/* ═══════════════════════════════════════════
   ENGINEERING DETAIL SECTION
═══════════════════════════════════════════ */

.eng-detail-section {
  padding: 5rem 0 4rem;
  background: #F9F8F5;
  border-top: 1px solid #D4D1CA;
}

.eng-intro {
  font-size: 1rem;
  color: #7A7974;
  max-width: 640px;
  line-height: 1.7;
  margin: 0.5rem 0 2.5rem;
}

.eng-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 2rem;
  align-items: start;
}

.eng-img-wrap {
  background: var(--color-bg);
  border-radius: 10px;
  border: 1px solid #D4D1CA;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

.eng-img-wrap img {
  width: 100%;
  display: block;
  object-fit: contain;
  background: var(--color-surface);
  max-height: 360px;
}

.eng-img-label {
  font-size: 0.72rem;
  color: #7A7974;
  padding: 0.5rem 0.75rem;
  border-top: 1px solid #E8E6E0;
  font-style: italic;
}

.eng-specs-col {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.eng-spec-group {
  background: var(--color-bg);
  border: 1px solid #D4D1CA;
  border-radius: 8px;
  overflow: hidden;
}

.eng-spec-heading {
  background: #28251D;
  color: #fff;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.5rem 0.875rem;
}

.eng-spec-row {
  display: flex;
  justify-content: space-between;
  padding: 0.45rem 0.875rem;
  font-size: 0.85rem;
  border-bottom: 1px solid #F0EEE9;
  color: #28251D;
}

.eng-spec-row:last-child {
  border-bottom: none;
}

.eng-spec-row span:last-child {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: #FE5000;
}

.eng-spec-note {
  font-size: 0.8rem;
  color: #7A7974;
  line-height: 1.6;
  font-style: italic;
  padding: 0 0.25rem;
}

@media (max-width: 900px) {
  .eng-grid {
    grid-template-columns: 1fr 1fr;
  }

  .eng-specs-col {
    grid-column: 1 / -1;
  }

  .hero-section-cut {
    width: 80px;
  }
}

@media (max-width: 600px) {
  .eng-grid {
    grid-template-columns: 1fr;
  }
}

/* Product assembly image — taller area for portrait transparent PNG */
.eng-img-wrap--product img {
  max-height: 520px;
  background: var(--surface-2, #f0eeea);
  padding: 1.5rem;
}

[data-theme="dark"] .eng-detail-section {
  background: var(--surface);
  border-color: var(--border);
}
[data-theme="dark"] .eng-img-wrap {
  background: var(--surface-2);
  border-color: var(--border);
}
[data-theme="dark"] .eng-img-wrap img {
  background: var(--surface-2);
}
[data-theme="dark"] .eng-img-label {
  border-color: var(--border);
  color: var(--text-m);
}
[data-theme="dark"] .eng-spec-group {
  background: var(--surface-2);
  border-color: var(--border);
}
[data-theme="dark"] .eng-spec-row {
  border-color: var(--border);
  color: var(--text);
}
