/**
 * V-Tech Glove PDP Styles — 1:1 Authentic McMaster-Carr Industrial Edition
 * Clean, flat, typography-driven, zero visual noise.
 */

/* ==========================================================================
   0. Header & Top Bar Suppression (Pure McMaster Industrial Focus)
   Per user instruction: Hide top staging bar and main site header with "وی‌تک"
   ========================================================================== */
#vtech-staging-bar,
#brx-header,
header#brx-header,
.site-header,
.skip-link,
.widget_shopping_cart_live_region {
  display: none !important;
  height: 0 !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
  overflow: hidden !important;
  position: absolute !important;
  top: -9999px !important;
  left: -9999px !important;
}

html,
html.theme-amber,
html[dir="rtl"],
body,
body.single-product,
body.single-product #brx-content,
#brxe-yvslng,
#brxe-mefqfx,
#mcmaster-pdp-root {
  padding-top: 0 !important;
  margin-top: 0 !important;
}

/* ==========================================================================
   0.1 McMaster Minimal Amber Header (1:1 Industrial Catalog Edition)
   ========================================================================== */
.mcmaster-nav-header {
  width: 100%;
  background: #FFFFFF;
  margin: 0 0 8px 0;
  padding: 6px 0 0 0 !important; /* Exactly 20% of previous ~30px gap */
}

.mcmaster-nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 12px 6px 12px !important;
  max-width: 1140px;
  margin: 0 auto;
  box-sizing: border-box;
}

/* Amber Logo Badge (McMaster signature square) */
.mcmaster-logo-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  background: #F59E0B; /* Warm Amber */
  border-radius: 4px;
  text-decoration: none !important;
  flex-shrink: 0;
  box-shadow: 0 1px 2px rgba(245, 158, 11, 0.25);
  transition: transform 0.1s ease, background 0.15s ease;
}

.mcmaster-logo-badge:hover {
  background: #D97706;
}

.mcmaster-logo-letter {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1.4rem;
  font-weight: 900;
  color: #1E6539; /* McMaster dark green on amber */
  line-height: 1;
}

.mcmaster-logo-badge.mini {
  width: 26px;
  height: 26px;
}

.mcmaster-logo-badge.mini .mcmaster-logo-letter {
  font-size: 1.05rem;
}

/* Minimal Search Input */
.mcmaster-search-form {
  position: relative;
  flex: 1;
  max-width: 440px;
  display: flex;
  align-items: center;
  margin: 0 4px;
}

.mcmaster-search-input {
  width: 100%;
  height: 34px;
  border: 1px solid #D1D5DB;
  border-radius: 4px;
  background: #FFFFFF;
  padding: 0 28px 0 28px;
  font-size: 0.8rem;
  color: #111827;
  font-family: inherit;
  outline: none;
  box-sizing: border-box;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.mcmaster-search-input:focus {
  border-color: #F59E0B;
  box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.2);
}

.mcmaster-search-icon {
  position: absolute;
  right: 8px;
  display: flex;
  align-items: center;
  color: #6B7280;
  pointer-events: none;
}

.mcmaster-search-cam {
  position: absolute;
  left: 8px;
  display: flex;
  align-items: center;
  color: #9CA3AF;
  pointer-events: none;
}

/* Actions: ORDER & Menu */
.mcmaster-nav-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.mcmaster-nav-order {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  color: #1E6539 !important;
  font-weight: 700;
  font-size: 0.82rem;
  text-decoration: none !important;
  padding: 4px 6px;
  border-radius: 4px;
  transition: background 0.15s ease;
}

.mcmaster-nav-order:hover {
  background: #F0FDF4;
}

.mcmaster-order-en {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.5px;
}

.mcmaster-nav-divider {
  width: 1px;
  height: 18px;
  background: #E5E7EB;
  display: inline-block;
  margin: 0 2px;
}

.mcmaster-nav-menu {
  background: transparent;
  border: none;
  cursor: pointer;
  color: #1E6539;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: background 0.15s ease;
}

.mcmaster-nav-menu:hover {
  background: #F0FDF4;
}

/* Amber Signature Accent Line */
.mcmaster-amber-bar {
  width: 100%;
  height: 2px;
  background: #F59E0B; /* Amber bar directly under header row */
}

/* Sub-nav: Share (1:1 with McMaster) */
.mcmaster-sub-nav {
  max-width: 1140px;
  margin: 0 auto;
  padding: 4px 12px 2px 12px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  box-sizing: border-box;
}

.mcmaster-share-action {
  background: transparent;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.78rem;
  color: #1E6539;
  font-weight: 600;
  padding: 2px 4px;
  transition: opacity 0.15s ease;
  font-family: inherit;
}

.mcmaster-share-action:hover {
  opacity: 0.75;
}

.mcmaster-share-en {
  font-size: 0.72rem;
  font-weight: 500;
  opacity: 0.85;
}

/* Slide Drawer */
.mcmaster-drawer {
  position: fixed;
  inset: 0;
  z-index: 99999;
}

.mcmaster-drawer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(2px);
}

.mcmaster-drawer-panel {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 290px;
  max-width: 85vw;
  background: #FFFFFF;
  box-shadow: -4px 0 20px rgba(0, 0, 0, 0.15);
  display: flex;
  flex-direction: column;
  padding: 16px;
  direction: rtl;
  box-sizing: border-box;
}

.mcmaster-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 12px;
  border-bottom: 2px solid #F59E0B;
  margin-bottom: 14px;
}

.mcmaster-drawer-brand {
  display: flex;
  align-items: center;
  gap: 8px;
}

.mcmaster-drawer-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #111827;
}

.mcmaster-drawer-close {
  background: transparent;
  border: none;
  font-size: 1.25rem;
  color: #6B7280;
  cursor: pointer;
  padding: 4px 8px;
}

.mcmaster-drawer-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.mcmaster-drawer-links a {
  display: block;
  padding: 8px 10px;
  color: #1F2937;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  border-radius: 4px;
  transition: all 0.15s ease;
}

.mcmaster-drawer-links a:hover {
  background: #FEF3C7;
  color: #B45309;
}

.mcmaster-drawer-links a.drawer-phone {
  background: #F0FDF4;
  color: #1E6539;
  font-weight: 700;
  margin-top: 10px;
  border: 1px dashed #276738;
}

/* Toast */
.mcmaster-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(30px);
  background: #111827;
  color: #FFFFFF;
  padding: 8px 18px;
  border-radius: 6px;
  font-size: 0.82rem;
  font-weight: 500;
  opacity: 0;
  transition: all 0.2s ease;
  pointer-events: none;
  z-index: 100000;
}

.mcmaster-toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* ==========================================================================
   1. Title & Brand Typography (McMaster Signature)
   ========================================================================== */
#brxe-ccswae h1,
h1#brxe-ccswae,
.mcmaster-title {
  color: #1E6539 !important; /* McMaster dark green */
  font-size: 1.35rem !important;
  font-weight: 700 !important;
  margin: 0 0 4px 0 !important;
  line-height: 1.3 !important;
}

.mcmaster-pdp-wrap,
.mcmaster-pdp-container {
  width: 100%;
  font-family: inherit;
  color: #1F2937;
  background: transparent;
  padding: 0;
  margin: 0;
}

.mcmaster-subtitle {
  color: #1E6539;
  font-size: 0.95rem;
  font-weight: 500;
  margin-bottom: 14px;
  line-height: 1.4;
}

/* ==========================================================================
   2. Choose a Size (Glove Size)
   ========================================================================== */
.mcmaster-size-block {
  margin: 12px 0 16px 0;
}
.mcmaster-size-heading {
  font-size: 0.95rem;
  font-weight: 600;
  color: #111827;
  margin-bottom: 8px;
}
.mcmaster-size-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.mcmaster-size-pill {
  border: 1px solid #D1D5DB;
  background: #FFFFFF;
  border-radius: 4px;
  padding: 6px 14px;
  font-size: 0.85rem;
  font-weight: 500;
  color: #374151;
  cursor: pointer;
  line-height: 1.2;
  transition: all 0.15s ease;
  font-family: inherit;
}
.mcmaster-size-pill:hover {
  border-color: #9CA3AF;
  background: #F9FAFB;
}
.mcmaster-size-pill.active {
  border: 2px solid #1E6539 !important;
  color: #1E6539 !important;
  background: #F0FDF4 !important;
  font-weight: 700 !important;
  padding: 5px 13px; /* balance 2px border */
}

/* ==========================================================================
   3. 2-Column Pricing & Stepper Row
   ========================================================================== */
.mcmaster-order-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid #F3F4F6;
  gap: 12px;
}
.mcmaster-price-tiers {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.mcmaster-tier-item {
  display: flex;
  gap: 12px;
  font-size: 0.88rem;
  line-height: 1.4;
}
.mcmaster-tier-qty {
  color: #111827;
  font-weight: 500;
}
.mcmaster-tier-val {
  color: #111827;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.mcmaster-sku-row {
  font-size: 0.8rem;
  color: #6B7280;
  margin-top: 2px;
  font-variant-numeric: tabular-nums;
}

/* Stepper */
.mcmaster-stepper-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.mcmaster-pack-meta {
  font-size: 0.75rem;
  color: #4B5563;
  font-weight: 500;
  white-space: nowrap;
}
.mcmaster-stepper {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.mcmaster-step-btn {
  width: 34px;
  height: 34px;
  border: 1px solid #D1D5DB;
  background: #FFFFFF;
  border-radius: 50%;
  font-size: 1.25rem;
  line-height: 1;
  color: #374151;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  transition: all 0.15s ease;
}
.mcmaster-step-btn:hover {
  background: #F9FAFB;
  border-color: #9CA3AF;
}
.mcmaster-qty-input {
  width: 52px;
  height: 36px;
  border: 1px solid #D1D5DB;
  border-radius: 4px;
  text-align: center;
  font-size: 1rem;
  font-weight: 700;
  color: #111827;
  background: #FFFFFF;
  margin: 0;
  box-sizing: border-box;
  font-variant-numeric: tabular-nums;
}

/* ==========================================================================
   4. Primary [ ADD ] Button & Phone Inquiry
   ========================================================================== */
.mcmaster-add-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 44px;
  background: #276738 !important; /* McMaster dark green */
  color: #FFFFFF !important;
  font-size: 0.95rem;
  font-weight: 700;
  border-radius: 4px;
  border: none;
  cursor: pointer;
  letter-spacing: 0.5px;
  transition: background 0.15s ease;
  font-family: inherit;
}
.mcmaster-add-btn:hover {
  background: #1E552D !important;
}
.mcmaster-add-btn.disabled {
  background: #9CA3AF !important;
  cursor: not-allowed;
}
.mcmaster-add-en {
  font-size: 0.75rem;
  opacity: 0.85;
}

/* Phone bar */
.mcmaster-phone-bar {
  margin: 8px 0 16px 0;
  text-align: center;
}
.mcmaster-phone-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  color: #276738;
  text-decoration: none;
  font-weight: 600;
}
.mcmaster-phone-link:hover {
  text-decoration: underline;
}

/* ==========================================================================
   5. McMaster 2-Column Technical Specifications Table
   ========================================================================== */
.mcmaster-specs-section {
  margin-top: 14px;
  border-top: 1px solid #E5E7EB;
}
.mcmaster-table {
  width: 100%;
  border-collapse: collapse;
  margin: 0;
}
.mcmaster-table tr {
  border-bottom: 1px solid #E5E7EB;
}
.mcmaster-table td {
  padding: 8px 0;
  font-size: 0.85rem;
  line-height: 1.4;
  vertical-align: top;
}
.mcmaster-table td.mc-label {
  color: #4B5563;
  width: 44%;
  padding-left: 12px;
  font-weight: 500;
}
.mcmaster-table td.mc-value {
  color: #111827;
  font-weight: 600;
}

/* ==========================================================================
   6. Image & Container Resets (Pure McMaster Zero-Bloat)
   ========================================================================== */
.mcmaster-image-col {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
  margin: 0 !important;
}

.mcmaster-image-frame {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  padding: 0 !important;
  margin: 0 !important;
}

.mcmaster-product-img {
  border: none !important;
  box-shadow: none !important;
  object-fit: contain !important;
  background: transparent !important;
  display: block !important;
}

/* ==========================================================================
   7. Responsive Layouts: Desktop Grid vs Mobile Above-The-Fold
   ========================================================================== */

/* Desktop: 2-Column Industrial Split (Right: Content/Buybox/Specs, Left: Sticky Image) */
@media (min-width: 768px) {
  .mcmaster-pdp-container {
    display: grid !important;
    grid-template-columns: 55% 45% !important;
    grid-template-rows: auto 1fr !important;
    grid-template-areas:
      "header image"
      "info   image" !important;
    column-gap: 3.5rem !important;
    row-gap: 0.5rem !important;
    max-width: 1140px !important;
    margin: 0 auto !important;
    align-items: start !important;
  }

  .mcmaster-header-block {
    grid-area: header !important;
  }

  .mcmaster-title {
    font-size: 1.55rem !important;
  }

  .mcmaster-subtitle {
    font-size: 1rem !important;
    margin-bottom: 18px !important;
  }

  .mcmaster-info-col {
    grid-area: info !important;
  }

  .mcmaster-image-col {
    grid-area: image !important;
    display: flex !important;
    justify-content: center !important;
    align-items: flex-start !important;
    position: sticky !important;
    top: 30px !important;
    padding-top: 10px !important;
  }

  .mcmaster-image-frame {
    width: 100% !important;
  }

  .mcmaster-product-img {
    max-height: 480px !important;
    width: auto !important;
    max-width: 100% !important;
    margin: 0 auto !important;
  }

  .mcmaster-specs-section {
    margin-top: 20px !important;
  }

  .mcmaster-table td {
    padding: 9px 0 !important;
    font-size: 0.88rem !important;
  }
}

/* Mobile: 1:1 McMaster Mobile Experience (Strict Above-The-Fold Visibility) */
@media (max-width: 767px) {
  .mcmaster-pdp-container {
    display: flex !important;
    flex-direction: column !important;
    gap: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .mcmaster-header-block {
    order: 1 !important;
    margin-bottom: 2px !important;
  }

  .mcmaster-title {
    font-size: 1.25rem !important;
    margin: 0 0 3px 0 !important;
    line-height: 1.3 !important;
  }

  .mcmaster-subtitle {
    font-size: 0.88rem !important;
    margin-bottom: 6px !important;
    line-height: 1.35 !important;
  }

  .mcmaster-image-col {
    order: 2 !important;
    width: 100% !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    margin: 2px 0 8px 0 !important;
  }

  .mcmaster-image-frame {
    width: 100% !important;
    display: flex !important;
    justify-content: center !important;
  }

  .mcmaster-product-img {
    max-height: 180px !important;
    width: auto !important;
    max-width: 90% !important;
    height: auto !important;
    object-fit: contain !important;
    margin: 0 auto !important;
  }

  .mcmaster-info-col {
    order: 3 !important;
    width: 100% !important;
  }

  .mcmaster-size-block {
    margin: 6px 0 10px 0 !important;
  }

  .mcmaster-size-heading {
    font-size: 0.9rem !important;
    margin-bottom: 6px !important;
  }

  .mcmaster-size-pill {
    padding: 5px 11px !important;
    font-size: 0.82rem !important;
  }

  .mcmaster-size-pill.active {
    padding: 4px 10px !important;
  }

  .mcmaster-order-row {
    margin-bottom: 10px !important;
    padding-bottom: 8px !important;
  }

  .mcmaster-add-btn {
    height: 42px !important;
  }

  .mcmaster-phone-bar {
    margin: 6px 0 10px 0 !important;
  }

  .mcmaster-specs-section {
    margin-top: 10px !important;
  }

  .mcmaster-table td {
    padding: 6px 0 !important;
    font-size: 0.82rem !important;
  }
}
