/* ==========================================================================
   TOOLS | أدوات الفاروق - أنماط المنصة الهندسية والحاسبات التفاعلية
   AL-FAROUQ TOOLS & CALCULATORS SPECIFIC STYLESHEET
   ========================================================================== */

/* 1. Ambient Background & Canvas */
#site-living-ambient-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 0;
  opacity: 0.55;
}

.site-ambient-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.ambient-blueprint-grid {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    linear-gradient(to right, rgba(32, 55, 99, 0.035) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(32, 55, 99, 0.035) 1px, transparent 1px);
  background-size: 36px 36px;
}

.ambient-glow-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  opacity: 0.4;
  animation: orbFloat 22s infinite alternate ease-in-out;
}

.ambient-orb-gold {
  width: 480px;
  height: 480px;
  background: radial-gradient(circle, rgba(250, 176, 25, 0.22) 0%, rgba(250, 176, 25, 0) 70%);
  top: 10%;
  right: -100px;
}

.ambient-orb-navy {
  width: 550px;
  height: 550px;
  background: radial-gradient(circle, rgba(30, 58, 138, 0.18) 0%, rgba(30, 58, 138, 0) 70%);
  bottom: 5%;
  left: -120px;
  animation-duration: 28s;
}

.ambient-fastener-shape {
  position: absolute;
  pointer-events: none;
  animation: rotateFastener 45s linear infinite;
}

.ambient-fastener-1 {
  width: 130px;
  height: 130px;
  top: 18%;
  left: 8%;
}

.ambient-fastener-2 {
  width: 160px;
  height: 160px;
  top: 60%;
  right: 6%;
  animation-duration: 60s;
  animation-direction: reverse;
}

.ambient-fastener-3 {
  width: 110px;
  height: 110px;
  bottom: 12%;
  left: 35%;
  animation-duration: 50s;
}

@keyframes orbFloat {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(40px, -30px) scale(1.08); }
  100% { transform: translate(-30px, 40px) scale(0.95); }
}

@keyframes rotateFastener {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* 2. Hero Section Specialized for TOOLS - Sleek & Compact */
.tools-hero {
  position: relative;
  padding: 30px 0 35px;
  background: radial-gradient(circle at 50% 20%, rgba(233, 239, 250, 0.7) 0%, rgba(248, 250, 252, 0.95) 100%);
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
  z-index: 1;
}

.hero-tools-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #ffffff;
  border: 1.5px solid rgba(250, 176, 25, 0.6);
  box-shadow: 0 4px 15px rgba(250, 176, 25, 0.15);
  padding: 4px 14px;
  border-radius: var(--border-radius-full);
  margin-bottom: 14px;
}

.hero-tools-badge img {
  width: 20px;
  height: 20px;
  object-fit: contain;
}

.hero-tools-badge span {
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--color-primary-dark);
}

.tools-hero-title {
  font-size: 2.1rem;
  font-weight: 900;
  color: var(--color-primary-dark);
  line-height: 1.25;
  margin-bottom: 12px;
}

.tools-hero-title span {
  color: #b45309;
  background: linear-gradient(135deg, #b45309 0%, #fab019 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.tools-hero-subtitle {
  font-size: 1.02rem;
  color: #334155;
  max-width: 760px;
  margin: 0 auto 20px;
  line-height: 1.6;
  font-weight: 500;
}

.tools-hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}

/* Quick Tools Switcher Bar */
.tools-quick-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  max-width: 1050px;
  margin: 0 auto;
}

.quick-tool-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: var(--border-radius-full);
  padding: 6px 14px;
  font-size: 0.85rem;
  font-weight: 700;
  color: #1e293b;
  cursor: pointer;
  transition: all var(--transition-fast);
  box-shadow: 0 2px 6px rgba(18, 34, 64, 0.04);
}

.quick-tool-btn:hover {
  border-color: var(--color-accent);
  color: #b45309;
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(250, 176, 25, 0.2);
}

.quick-tool-btn.active {
  background: var(--color-primary-dark);
  border-color: var(--color-primary-dark);
  color: #fab019;
  box-shadow: 0 6px 18px rgba(18, 34, 64, 0.25);
}

.quick-tool-btn svg {
  width: 15px;
  height: 15px;
  fill: currentColor;
}

/* 3. Stats Highlight Strip */
.tools-stats-strip {
  background: #ffffff;
  border-bottom: 1px solid #e2e8f0;
  padding: 12px 0;
  position: relative;
  z-index: 2;
}

.stats-strip-inner {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.stat-strip-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 10px;
  border-right: 1px solid #e2e8f0;
}

.stat-strip-item:first-child {
  border-right: none;
}

.stat-strip-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: rgba(250, 176, 25, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #b45309;
  flex-shrink: 0;
}

.stat-strip-icon svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.stat-strip-text h4 {
  font-size: 1rem;
  font-weight: 800;
  color: var(--color-primary-dark);
  margin-bottom: 2px;
}

.stat-strip-text p {
  font-size: 0.78rem;
  color: #334155;
  font-weight: 700;
}

/* Calculators Section Compact Overrides */
#calculators.section {
  padding: 30px 0 40px !important;
}

#calculators .section-header {
  margin: 0 auto 20px !important;
}

#calculators .section-title {
  font-size: 1.65rem !important;
  margin-bottom: 6px !important;
}

#calculators .section-desc {
  font-size: 0.92rem !important;
  line-height: 1.6 !important;
}

/* 4. Calculator Layout & Cards */
.calc-wrapper {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 6px 20px -4px rgba(18, 34, 64, 0.07);
  overflow: hidden;
  margin-bottom: 25px;
  transition: all var(--transition-normal);
}

.calc-header {
  background: linear-gradient(135deg, #122240 0%, #1e3a8a 100%);
  color: #ffffff;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.calc-header-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.calc-header-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: rgba(250, 176, 25, 0.2);
  border: 1px solid rgba(250, 176, 25, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fab019;
  flex-shrink: 0;
}

.calc-header-icon svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.calc-header h1,
.calc-header h2,
.calc-header h3,
.calc-header h4,
.calc-header-text h3,
.calc-wrapper .calc-header h3,
.calc-wrapper .calc-header-text h3 {
  font-size: 1.15rem;
  font-weight: 800 !important;
  color: #ffffff !important;
  margin-bottom: 2px;
}

.calc-header p,
.calc-header-text p,
.calc-wrapper .calc-header p,
.calc-wrapper .calc-header-text p {
  font-size: 0.82rem;
  color: #f1f5f9 !important;
  font-weight: 500 !important;
  margin: 0;
  line-height: 1.35;
}

.calc-grid {
  display: grid;
  grid-template-columns: 1.1fr 1.25fr;
  min-height: auto;
}

.calc-inputs-pane {
  padding: 18px 20px;
  border-left: 1px solid #e2e8f0;
  background: #ffffff;
}

.calc-results-pane {
  padding: 18px 20px;
  background: #f8fafc;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/* Form Groups & Inputs (Slim & Compact) */
.form-group {
  margin-bottom: 12px;
}

.form-group-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.85rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 4px;
}

.form-group-hint {
  font-size: 0.74rem;
  font-weight: 600;
  color: #475569;
}

.calc-select, .calc-input {
  width: 100%;
  padding: 7px 12px;
  font-size: 0.88rem;
  font-weight: 600;
  color: #0f172a;
  background: #ffffff;
  border: 1.5px solid #94a3b8;
  border-radius: 6px;
  transition: all var(--transition-fast);
  outline: none;
}

.calc-select:focus, .calc-input:focus {
  background: #ffffff;
  border-color: #fab019;
  box-shadow: 0 0 0 2px rgba(250, 176, 25, 0.25);
}

.calc-input-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.calc-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.calc-chip {
  padding: 4px 10px;
  border-radius: var(--border-radius-full);
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #334155;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition-fast);
  user-select: none;
}

.calc-chip:hover {
  border-color: #fab019;
  color: #b45309;
}

.calc-chip.active {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #ffffff;
}

/* Quick Qty & Stepper Controls (Slim & Sleek) */
.qty-stepper-wrap {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 100%;
}

.qty-input-inner {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.qty-input-inner .calc-input,
.calc-input.qty-main-input {
  width: 100% !important;
  min-width: 100% !important;
  height: 38px;
  font-size: 1.05rem !important;
  font-weight: 800 !important;
  color: #122240 !important;
  background: #ffffff !important;
  border: 1.5px solid #cbd5e1 !important;
  border-radius: 6px;
  padding: 0 12px 0 55px !important; /* RTL: left has unit tag, right has text */
  text-align: right;
  transition: all var(--transition-fast);
  box-shadow: inset 0 1px 3px rgba(18, 34, 64, 0.04);
}

.qty-input-inner .calc-input:focus,
.calc-input.qty-main-input:focus {
  border-color: #fab019 !important;
  box-shadow: 0 0 0 2px rgba(250, 176, 25, 0.25) !important;
  background: #ffffff !important;
  outline: none;
}

.qty-unit-tag {
  position: absolute;
  left: 6px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.76rem;
  font-weight: 700;
  color: #475569;
  background: #f1f5f9;
  padding: 2px 7px;
  border-radius: 4px;
  pointer-events: none;
  border: 1px solid #e2e8f0;
}

.quick-qty-group {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  width: 100%;
}

.quick-qty-btn {
  flex: 1;
  min-width: 0;
  height: 26px;
  padding: 0 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  font-size: 0.76rem;
  font-weight: 700;
  color: #1e293b;
  cursor: pointer;
  transition: all var(--transition-fast);
  user-select: none;
  white-space: nowrap;
}

.quick-qty-btn:hover {
  background: #fab019;
  border-color: #fab019;
  color: #122240;
  font-weight: 800;
}

/* Remove ugly browser spin buttons that clip text in number inputs */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
input[type="number"] {
  -moz-appearance: textfield;
}

/* Results Display Cards (Slim & Compact) */
.results-primary-card {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 10px 14px;
  box-shadow: 0 2px 8px rgba(18, 34, 64, 0.04);
  margin-bottom: 8px;
  position: relative;
  overflow: hidden;
}

.results-primary-card::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(to bottom, #fab019, #d97706);
}

.res-header-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: 0.2px;
  margin-bottom: 2px;
}

.res-primary-val {
  font-size: 1.45rem;
  font-weight: 900;
  color: #0c1626;
  line-height: 1.15;
  margin-bottom: 3px;
  font-family: inherit;
}

.res-sub-val {
  font-size: 0.78rem;
  font-weight: 700;
  color: #92400e;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Real-time Price Estimation Card (Weight * Price per KG - Slim & Sleek) */
.results-price-card {
  background: linear-gradient(135deg, #122240 0%, #1c3563 100%) !important;
  border: 1.5px solid #fab019 !important;
  border-radius: 8px;
  padding: 10px 14px;
  color: #ffffff !important;
  margin-bottom: 8px;
  box-shadow: 0 4px 14px -2px rgba(18, 34, 64, 0.16);
  position: relative;
  overflow: hidden;
}

.results-price-card::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, #fab019, #f59e0b, #10b981);
}

.res-price-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 6px;
  padding-bottom: 5px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.res-price-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(250, 176, 25, 0.18);
  color: #fab019 !important;
  padding: 2px 7px;
  border-radius: 12px;
  font-size: 0.72rem;
  font-weight: 700;
  border: 1px solid rgba(250, 176, 25, 0.4);
}

.res-price-badge svg {
  width: 12px;
  height: 12px;
  fill: currentColor;
}

.res-price-calc-note {
  font-size: 0.76rem;
  color: #e2e8f0 !important;
  font-weight: 600;
  direction: rtl;
}

.res-price-body {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.res-price-title {
  font-size: 0.78rem;
  color: #cbd5e1 !important;
  font-weight: 700;
  margin-bottom: 1px;
}

.res-price-val {
  font-size: 1.45rem;
  font-weight: 900;
  color: #fab019 !important;
  line-height: 1.1;
  font-family: inherit;
  letter-spacing: -0.3px;
}

.res-price-single-box {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  padding: 4px 10px;
  border-radius: 6px;
  text-align: right;
  min-width: 110px;
}

.res-price-single-label {
  display: block;
  font-size: 0.7rem;
  color: #cbd5e1 !important;
  font-weight: 600;
  margin-bottom: 1px;
}

.res-price-single-val {
  display: block;
  font-size: 0.95rem;
  font-weight: 800;
  color: #ffffff !important;
}

.price-input-hint {
  font-size: 0.75rem;
  color: #047857;
  font-weight: 700;
}

/* Results Breakdown Grid (Slim 2x2) */
.results-grid-2x2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-bottom: 8px;
}

.res-mini-card {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 7px 10px;
  box-shadow: 0 1px 4px rgba(18, 34, 64, 0.03);
  transition: all var(--transition-fast);
}

.res-mini-card:hover {
  border-color: #94a3b8;
  box-shadow: 0 3px 10px rgba(18, 34, 64, 0.06);
}

.res-mini-label {
  font-size: 0.74rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 2px;
}

.res-mini-value {
  font-size: 1rem;
  font-weight: 800;
  color: #0c1626;
  line-height: 1.2;
}

.res-mini-sub {
  font-size: 0.7rem;
  color: #475569;
  font-weight: 600;
  margin-top: 2px;
}

/* Product Matching CTA inside Calculator */
.product-cta-card {
  background: #ffffff;
  border: 1.5px dashed rgba(250, 176, 25, 0.8);
  border-radius: var(--border-radius);
  padding: 14px;
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 18px;
  background: linear-gradient(135deg, rgba(250, 176, 25, 0.06), rgba(30, 58, 138, 0.03));
}

.product-cta-img {
  width: 60px;
  height: 60px;
  border-radius: 8px;
  background: #ffffff;
  padding: 6px;
  border: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.product-cta-img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.product-cta-info {
  flex: 1;
}

.product-cta-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 800;
  color: #b45309;
  background: #fef3c7;
  padding: 2px 8px;
  border-radius: 4px;
  margin-bottom: 4px;
}

.product-cta-info h5 {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--color-primary-dark);
  margin-bottom: 2px;
}

.product-cta-info p {
  font-size: 0.78rem;
  color: #475569;
  line-height: 1.4;
}

.calc-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 20px;
}

/* 5. Technical Tables Section */
.tables-search-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.table-search-input-wrap {
  flex: 1;
  position: relative;
  min-width: 280px;
}

.table-search-input-wrap svg {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  fill: #64748b;
  pointer-events: none;
}

.table-search-input {
  width: 100%;
  padding: 12px 42px 12px 16px;
  font-size: 0.92rem;
  border: 1.5px solid #cbd5e1;
  border-radius: var(--border-radius);
  background: #ffffff;
  color: #122240;
  font-weight: 600;
  outline: none;
  transition: all var(--transition-fast);
}

.table-search-input:focus {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(250, 176, 25, 0.2);
}

.table-tabs {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 12px;
  margin-bottom: 20px;
  scrollbar-width: thin;
}

.table-tab-btn {
  padding: 8px 16px;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: var(--border-radius-full);
  font-size: 0.88rem;
  font-weight: 700;
  color: #334155;
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--transition-fast);
}

.table-tab-btn:hover {
  border-color: #fab019;
  color: #b45309;
}

.table-tab-btn.active {
  background: var(--color-primary-dark);
  border-color: var(--color-primary-dark);
  color: #fab019;
  box-shadow: 0 4px 12px rgba(18, 34, 64, 0.2);
}

.data-table-container {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: var(--border-radius-lg);
  overflow-x: auto;
  box-shadow: 0 4px 18px rgba(18, 34, 64, 0.05);
  margin-bottom: 30px;
}

.engineering-table {
  width: 100%;
  border-collapse: collapse;
  text-align: right;
  font-size: 0.88rem;
  white-space: nowrap;
}

.engineering-table thead {
  background: #122240;
  color: #ffffff;
  position: sticky;
  top: 0;
}

.engineering-table th {
  padding: 13px 16px;
  font-weight: 800;
  border-bottom: 2px solid #fab019;
  font-size: 0.85rem;
  letter-spacing: 0.3px;
}

.engineering-table td {
  padding: 11px 16px;
  border-bottom: 1px solid #f1f5f9;
  color: #1e293b;
  font-weight: 500;
}

.engineering-table tbody tr:nth-child(even) {
  background-color: #f8fafc;
}

.engineering-table tbody tr:hover {
  background-color: #fef9c3;
}

.font-code {
  font-family: 'Consolas', 'Courier New', monospace;
  font-weight: 700;
}
td.font-code, th.font-code {
  display: table-cell !important;
}

/* 6. Technical Guides Section */
.guides-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 24px;
  margin-top: 30px;
}

.guide-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: var(--border-radius-lg);
  padding: 24px;
  box-shadow: 0 4px 16px rgba(18, 34, 64, 0.04);
  transition: all var(--transition-normal);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
}

.guide-card:hover {
  transform: translateY(-4px);
  border-color: #fab019;
  box-shadow: 0 14px 30px rgba(18, 34, 64, 0.1);
}

.guide-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.76rem;
  font-weight: 800;
  color: #b45309;
  background: rgba(250, 176, 25, 0.12);
  padding: 4px 12px;
  border-radius: var(--border-radius-full);
  margin-bottom: 12px;
  border: 1px solid rgba(250, 176, 25, 0.3);
}

.guide-title {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--color-primary-dark);
  line-height: 1.4;
  margin-bottom: 10px;
}

.guide-desc {
  font-size: 0.88rem;
  color: #475569;
  line-height: 1.6;
  margin-bottom: 20px;
  flex: 1;
}

.guide-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid #f1f5f9;
  padding-top: 14px;
}

.guide-read-time {
  font-size: 0.8rem;
  color: #475569;
  font-weight: 700;
}

.guide-read-link {
  font-size: 0.88rem;
  font-weight: 800;
  color: #b45309;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* Guide Full Modal / Article View */
.guide-modal-body {
  max-height: 80vh;
  overflow-y: auto;
  padding: 10px 15px;
}

.article-content {
  color: #334155;
  line-height: 1.9;
  font-size: 1.05rem;
}

.article-content h3 {
  font-size: 1.5rem;
  color: var(--color-primary-dark);
  font-weight: 800;
  margin: 25px 0 12px;
  border-right: 4px solid var(--color-accent);
  padding-right: 12px;
}

.article-content h4 {
  font-size: 1.2rem;
  color: #1e3a8a;
  font-weight: 700;
  margin: 18px 0 8px;
}

.article-content ul, .article-content ol {
  padding-right: 24px;
  margin-bottom: 18px;
}

.article-content li {
  margin-bottom: 8px;
  position: relative;
}

.article-callout {
  background: #f8fafc;
  border-right: 4px solid #fab019;
  border-radius: 8px;
  padding: 16px 20px;
  margin: 20px 0;
  font-size: 0.95rem;
}

.article-callout strong {
  color: var(--color-primary-dark);
}

.article-table-wrap {
  margin: 20px 0;
  overflow-x: auto;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
}

/* 7. BOQ Builder Layout */
.boq-stats-banner {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.boq-stat-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: var(--border-radius);
  padding: 18px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(18, 34, 64, 0.04);
}

.boq-stat-card h6 {
  font-size: 0.8rem;
  font-weight: 800;
  color: #1e293b;
  margin-bottom: 6px;
}

.boq-stat-card .boq-stat-val {
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--color-primary-dark);
}

.boq-item-title {
  font-weight: 800;
  color: #122240;
  margin-bottom: 2px;
}

.boq-item-cat {
  font-size: 0.72rem;
  color: #b45309;
  background: #fef3c7;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 700;
}

.btn-boq-del {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #fee2e2;
  color: #ef4444;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: none;
  font-weight: 800;
  transition: all var(--transition-fast);
}

.btn-boq-del:hover {
  background: #ef4444;
  color: #ffffff;
}

/* Toast Notification */
.toast-container {
  position: fixed;
  bottom: 24px;
  left: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast-message {
  pointer-events: auto;
  background: #122240;
  color: #ffffff;
  padding: 14px 22px;
  border-radius: var(--border-radius);
  border-right: 4px solid #fab019;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.92rem;
  font-weight: 700;
  animation: toastIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  transition: opacity 0.3s ease;
}

.toast-message.fade-out {
  opacity: 0;
  transform: translateY(10px);
}

@keyframes toastIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* 8. Print Stylesheet (@media print) for formal Quotations */
@media print {
  body {
    background: #ffffff !important;
    color: #000000 !important;
  }

  .top-bar,
  .main-header,
  .site-ambient-canvas,
  #site-living-ambient-canvas,
  .tools-hero,
  .tools-stats-strip,
  #calculators,
  #tables,
  #guides,
  #contact,
  .main-footer,
  .floating-actions,
  .btn-boq-del,
  .boq-actions,
  .calc-quick-bar,
  .boq-manual-form-card {
    display: none !important;
  }

  #boq-builder {
    display: block !important;
    padding: 0 !important;
  }

  .boq-print-header {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    border-bottom: 2px solid #122240;
    padding-bottom: 20px;
    margin-bottom: 30px;
  }

  .engineering-table {
    border: 1px solid #000000 !important;
  }

  .engineering-table th {
    background: #122240 !important;
    color: #ffffff !important;
    -webkit-print-color-adjust: exact;
  }

  .engineering-table td {
    border-bottom: 1px solid #ccc !important;
  }
}

/* Nut & Washer Simplified Cards (Calculator 3) */
.nw-cards-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

@media (max-width: 640px) {
  .nw-cards-grid {
    grid-template-columns: 1fr;
  }
}

.nw-card-highlight {
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  border-radius: var(--border-radius-lg);
  padding: 18px;
  box-shadow: 0 3px 12px rgba(18, 34, 64, 0.05);
  transition: all var(--transition-fast);
}

.nw-card-highlight:hover {
  border-color: #94a3b8;
  box-shadow: 0 6px 18px rgba(18, 34, 64, 0.09);
}

.nw-card-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0;
}

.nw-spec-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
  border-bottom: 1px dashed #e2e8f0;
}

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

.nw-spec-label {
  font-size: 0.88rem;
  font-weight: 700;
  color: #334155;
}

.nw-spec-val {
  font-size: 0.95rem;
  font-weight: 800;
  color: #0c1626;
}

.nw-summary-bar {
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: var(--border-radius);
  padding: 16px 20px;
  box-shadow: 0 4px 15px rgba(18, 34, 64, 0.05);
  position: relative;
  overflow: hidden;
}

.nw-summary-bar::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 5px;
  background: linear-gradient(to bottom, #fab019, #d97706);
}

/* Responsive adjustments */
@media (max-width: 991px) {
  .calc-grid {
    grid-template-columns: 1fr;
  }
  .calc-inputs-pane {
    border-left: none;
    border-bottom: 1px solid #e2e8f0;
  }
  .stats-strip-inner {
    grid-template-columns: 1fr 1fr;
  }
  .stat-strip-item {
    border-right: none;
    border-bottom: 1px solid #e2e8f0;
  }
  .boq-stats-banner {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 640px) {
  .tools-hero-title {
    font-size: 2rem;
  }
  .stats-strip-inner {
    grid-template-columns: 1fr;
  }
  .results-grid-2x2 {
    grid-template-columns: 1fr;
  }
  .calc-input-row {
    grid-template-columns: 1fr;
  }
  .boq-stats-banner {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   New Unified Dual Summary & Engineering Breakdown Table (Clean & Simple)
   ========================================================================== */
.results-dual-card {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.04);
  margin-bottom: 10px;
  overflow: hidden;
}

.results-dual-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: stretch;
}

.dual-card-col {
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.dual-card-weight {
  background: #ffffff;
  border-left: 1px solid #e2e8f0;
  position: relative;
}

.dual-card-weight::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 4px;
  background: #2563eb;
}

.dual-card-price {
  background: #f8fafc;
  position: relative;
}

.dual-card-price::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 4px;
  background: #fab019;
}

.dual-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 3px;
}

.dual-card-title {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.8rem;
  font-weight: 700;
  color: #334155;
}

.dual-card-val {
  font-size: 1.25rem;
  font-weight: 900;
  color: #0f172a;
  line-height: 1.25;
  margin-bottom: 3px;
  font-family: inherit;
}

.dual-card-val.price-active {
  color: #047857;
}

.dual-card-val.price-empty {
  color: #64748b;
  font-size: 1.05rem;
}

.dual-card-sub {
  font-size: 0.74rem;
  font-weight: 600;
  color: #64748b;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
}

.dual-card-sub strong {
  color: #0f172a;
}

/* Engineering Breakdown Table Card */
.results-table-card {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  margin-bottom: 12px;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.03);
}

.results-table-header {
  background: #f1f5f9;
  border-bottom: 1px solid #e2e8f0;
  padding: 8px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.82rem;
  font-weight: 700;
  color: #1e293b;
}

.badge-table-al-farouq {
  font-size: 0.7rem;
  font-weight: 700;
  color: #065f46;
  background: #d1fae5;
  padding: 2px 8px;
  border-radius: 12px;
  border: 1px solid #a7f3d0;
}

.bolt-breakdown-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.84rem;
  table-layout: fixed;
}

.bolt-breakdown-table th {
  background: #f1f5f9;
  color: #0f172a;
  font-weight: 800;
  padding: 8px 10px;
  border-bottom: 2px solid #cbd5e1;
  border-left: 1px solid #e2e8f0;
  font-size: 0.78rem;
  letter-spacing: 0.2px;
  text-align: right;
  vertical-align: middle;
}

.bolt-breakdown-table th:last-child {
  border-left: none;
}

.bolt-breakdown-table th.text-center {
  text-align: center;
}

.bolt-breakdown-table td {
  padding: 8px 10px;
  border-bottom: 1px solid #e2e8f0;
  border-left: 1px solid #f1f5f9;
  color: #1e293b;
  vertical-align: middle;
  display: table-cell;
}

.bolt-breakdown-table td:last-child {
  border-left: none;
}

.bolt-breakdown-table .tbl-col-name {
  width: 40%;
  text-align: right;
}

.bolt-breakdown-table .tbl-col-qty {
  width: 18%;
  text-align: center;
}

.bolt-breakdown-table .tbl-col-unit {
  width: 20%;
  text-align: center;
  font-weight: 700;
  color: #334155;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.bolt-breakdown-table .tbl-col-total {
  width: 22%;
  text-align: center;
  font-weight: 800;
  color: #1e3a8a;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.bolt-breakdown-table tbody tr:nth-child(even) {
  background-color: #fafbfc;
}

.bolt-breakdown-table tbody tr:hover {
  background-color: #f0f7ff;
}

.bolt-breakdown-table .tbl-item-title {
  font-weight: 800;
  color: #0f172a;
  font-size: 0.84rem;
  line-height: 1.3;
}

.bolt-breakdown-table .sub-dim {
  display: block;
  font-size: 0.72rem;
  color: #64748b;
  margin-top: 2px;
}

.tbl-qty-badge {
  display: inline-block;
  background: #e2e8f0;
  color: #0f172a;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 0.78rem;
  white-space: nowrap;
}

.tbl-total-cell {
  color: #1e3a8a !important;
  font-weight: 800;
  font-size: 0.88rem;
}

/* Table Footer / Grand Total Row */
.tbl-total-row {
  background: #eff6ff !important;
  border-top: 2.5px solid #203763 !important;
}

.tbl-total-row td {
  padding: 10px 10px;
  border-bottom: none;
  border-left: 1px solid #dbeafe;
}

.tbl-total-row td:last-child {
  border-left: none;
}

.tbl-total-title {
  display: flex;
  align-items: center;
  gap: 5px;
  font-weight: 900;
  color: #1e3a8a;
  font-size: 0.84rem;
}

.tbl-grand-qty {
  font-weight: 900;
  color: #1e3a8a;
  font-size: 0.9rem;
}

.tbl-grand-single {
  font-weight: 800;
  color: #334155;
  font-size: 0.84rem;
}

.tbl-grand-total {
  font-weight: 900;
  color: #1e3a8a;
  font-size: 1rem;
  line-height: 1.2;
}

/* ==========================================================================
   INTERACTIVE CALCULATOR TABS (Modern Segmented Navigation)
   ========================================================================== */
.calc-tabs-container {
  margin-bottom: 24px;
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  border-radius: 14px;
  padding: 8px;
  box-shadow: 0 4px 18px rgba(18, 34, 64, 0.05);
}

.calc-tabs-nav {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}

.calc-tab-pill {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 10px 8px;
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
  text-align: center;
  font-family: inherit;
  position: relative;
  user-select: none;
}

.calc-tab-pill:hover {
  background: #eff6ff;
  border-color: #93c5fd;
  transform: translateY(-1px);
}

.calc-tab-pill.active {
  background: #122240;
  border-color: #122240;
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(18, 34, 64, 0.22);
}

.calc-tab-num {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #e2e8f0;
  color: #1e3a8a;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.76rem;
  font-weight: 800;
  margin-bottom: 4px;
  transition: all 0.2s;
}

.calc-tab-pill.active .calc-tab-num {
  background: #fab019;
  color: #122240;
}

.calc-tab-title {
  font-size: 0.88rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.25;
  margin-bottom: 2px;
  white-space: nowrap;
}

.calc-tab-pill.active .calc-tab-title {
  color: #ffffff;
}

.calc-tab-sub {
  font-size: 0.7rem;
  color: #64748b;
  font-weight: 600;
  white-space: nowrap;
}

.calc-tab-pill.active .calc-tab-sub {
  color: #cbd5e1;
}

.calc-tabs-footer-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px 2px;
  margin-top: 6px;
  border-top: 1px solid #f1f5f9;
  font-size: 0.78rem;
  color: #64748b;
}

.calc-tabs-hint {
  display: flex;
  align-items: center;
  gap: 5px;
  font-weight: 600;
}

.btn-toggle-calcs-view {
  background: transparent;
  border: 1px dashed #94a3b8;
  border-radius: 6px;
  padding: 3px 10px;
  font-size: 0.76rem;
  font-weight: 700;
  color: #475569;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-toggle-calcs-view:hover {
  background: #f1f5f9;
  border-color: #fab019;
  color: #b45309;
}

/* Compact Engineering Specs Bar */
.results-specs-bar {
  background: #eef2ff;
  border: 1px solid #c7d2fe;
  border-radius: 8px;
  padding: 8px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
  font-size: 0.8rem;
}

.results-specs-bar .spec-item {
  display: flex;
  align-items: center;
  gap: 5px;
}

.results-specs-bar .spec-icon {
  font-size: 0.95rem;
}

.results-specs-bar .spec-label {
  color: #4338ca;
  font-weight: 700;
}

.results-specs-bar .spec-val {
  color: #1e1b4b;
  font-weight: 800;
}

.results-specs-bar .spec-sep {
  color: #a5b4fc;
}

/* --------------------------------------------------------------------------
   Specialized Page Sections (BOQ, Catalog Connection, Contact CTA)
   -------------------------------------------------------------------------- */
.boq-body-pane {
  padding: 28px;
}

.catalog-products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 30px;
}

.contact-cta-card {
  background: linear-gradient(135deg, #101c33 0%, #1a3560 100%);
  border: 1.5px solid rgba(250, 176, 25, 0.3);
  border-radius: var(--border-radius-xl, 16px);
  padding: 45px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
}

.contact-cta-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 40px;
  align-items: center;
}

.contact-cta-title {
  font-size: 2.3rem;
  font-weight: 900;
  color: #ffffff;
  margin: 14px 0;
  line-height: 1.3;
}

.contact-cta-desc {
  color: #cbd5e1;
  font-size: 1.1rem;
  line-height: 1.8;
  margin-bottom: 24px;
}

.contact-cta-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.contact-info-card {
  background: rgba(18, 34, 64, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 30px;
}

/* ==========================================================================
   DESKTOP & LAPTOP STYLES (>= 992px)
   ========================================================================== */
@media (min-width: 992px) {
  .calc-wrapper {
    margin-bottom: 28px;
    border: 1.5px solid #cbd5e1;
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 6px 20px rgba(18, 34, 64, 0.05);
    overflow: hidden;
  }

  .calc-grid {
    display: grid;
    grid-template-columns: 1.05fr 1.25fr;
  }

  .calc-inputs-pane {
    padding: 22px 24px;
  }

  .calc-results-pane {
    padding: 22px 24px;
  }

  .results-dual-grid {
    grid-template-columns: 1fr 1fr;
  }

  .bolt-breakdown-table {
    font-size: 0.86rem;
  }

  .bolt-breakdown-table th,
  .bolt-breakdown-table td {
    padding: 10px 12px;
  }
}

/* Specific Laptop Fine-Tuning (992px - 1240px) */
@media (min-width: 992px) and (max-width: 1240px) {
  .header-inner {
    gap: 8px !important;
  }
  .brand-logo {
    gap: 6px !important;
  }
  .brand-name {
    font-size: 1.05rem !important;
  }
  .brand-tagline {
    font-size: 0.72rem !important;
  }
  .nav-menu {
    gap: 2px !important;
  }
  .nav-link {
    font-size: 0.84rem !important;
    padding: 4px 6px !important;
  }
  .btn-rfq-header {
    padding: 6px 10px !important;
    font-size: 0.82rem !important;
  }
  .calc-grid {
    grid-template-columns: 1fr 1.15fr;
  }
}

/* ==========================================================================
   TABLET STYLES (max-width: 991px)
   ========================================================================== */
@media (max-width: 991px) {
  .calc-grid {
    grid-template-columns: 1fr !important;
  }

  .calc-inputs-pane {
    border-left: none !important;
    border-bottom: 1px solid #e2e8f0 !important;
    padding: 18px 16px !important;
  }

  .calc-results-pane {
    padding: 18px 16px !important;
  }

  #boq-manual-form {
    grid-template-columns: 1fr 1fr 1fr !important;
    gap: 10px !important;
  }

  #boq-manual-form .form-group:first-child {
    grid-column: 1 / -1;
  }

  .contact-cta-grid {
    grid-template-columns: 1fr !important;
    gap: 28px !important;
  }
}

/* ==========================================================================
   MEDIUM & SMALL TABLET SCREENS (max-width: 768px)
   ========================================================================== */
@media (max-width: 768px) {
  .calc-tabs-nav {
    display: flex;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
    gap: 8px;
    padding-bottom: 6px;
  }

  .calc-tab-pill {
    flex: 0 0 160px;
    scroll-snap-align: start;
    padding: 8px 6px;
  }

  .calc-tabs-footer-bar {
    flex-direction: column;
    gap: 6px;
    text-align: center;
  }

  .data-table-container,
  .table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
  }

  .data-table-container::after,
  .table-responsive::after {
    content: '← اسحب الجدول أفقياً للاطلاع على كافة الأعمدة →';
    display: block;
    text-align: center;
    font-size: 0.72rem;
    font-weight: 700;
    color: #64748b;
    padding: 6px 0;
    background: #f8fafc;
    border-top: 1px dashed #e2e8f0;
  }
}

/* ==========================================================================
   SMARTPHONE MOBILE SCREENS (max-width: 640px)
   ========================================================================== */
@media (max-width: 640px) {
  /* 1. Streamline Hero Section on Mobile */
  .tools-hero {
    padding: 16px 0 12px !important;
  }

  .hero-tools-badge {
    margin-bottom: 8px !important;
    padding: 3px 10px !important;
  }

  .hero-tools-badge span {
    font-size: 0.74rem !important;
  }

  .tools-hero-title {
    font-size: 1.6rem !important;
    margin-bottom: 4px !important;
  }

  .tools-hero-subtitle {
    font-size: 0.82rem !important;
    line-height: 1.5 !important;
    margin-bottom: 10px !important;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .tools-hero-actions {
    display: none !important;
  }

  .tools-quick-bar {
    display: none !important; /* Replaced by the Tab Switcher */
  }

  .tools-stats-strip {
    display: none !important; /* Remove clutter so calculators appear immediately */
  }

  #calculators.section {
    padding: 16px 0 30px !important;
  }

  #calculators .section-header {
    margin-bottom: 12px !important;
  }

  #calculators .section-subtitle {
    font-size: 0.74rem !important;
  }

  #calculators .section-title {
    font-size: 1.35rem !important;
    margin-bottom: 4px !important;
  }

  #calculators .section-desc {
    font-size: 0.8rem !important;
    line-height: 1.45 !important;
    margin-bottom: 8px !important;
  }

  /* Tabs Container Mobile Polish */
  .calc-tabs-container {
    margin-bottom: 14px !important;
    padding: 6px !important;
    border-radius: 10px !important;
  }

  .calc-tabs-nav {
    display: flex !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    scroll-snap-type: x mandatory !important;
    gap: 6px !important;
    padding-bottom: 4px !important;
    scrollbar-width: none !important;
  }

  .calc-tabs-nav::-webkit-scrollbar {
    display: none !important;
  }

  .calc-tab-pill {
    flex: 0 0 135px !important;
    padding: 7px 5px !important;
    border-radius: 8px !important;
  }

  .calc-tab-num {
    width: 20px !important;
    height: 20px !important;
    font-size: 0.72rem !important;
    margin-bottom: 2px !important;
  }

  .calc-tab-title {
    font-size: 0.78rem !important;
    margin-bottom: 1px !important;
  }

  .calc-tab-sub {
    font-size: 0.65rem !important;
  }

  .calc-tabs-footer-bar {
    padding: 6px 6px 2px !important;
    gap: 4px !important;
    flex-direction: column !important;
  }

  .calc-tabs-hint {
    font-size: 0.72rem !important;
    color: #475569 !important;
    justify-content: center !important;
  }

  .btn-toggle-calcs-view {
    width: 100% !important;
    padding: 6px !important;
    font-size: 0.74rem !important;
    text-align: center !important;
  }

  /* 2. Calculator Wrapper & Header on Mobile */
  .calc-wrapper {
    margin-bottom: 16px !important;
    border-radius: 10px !important;
  }

  .calc-header {
    padding: 10px 12px !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 8px !important;
  }

  .calc-header-title {
    gap: 8px !important;
  }

  .calc-header-title h3 {
    font-size: 0.98rem !important;
    line-height: 1.3 !important;
  }

  .calc-header p {
    font-size: 0.74rem !important;
    line-height: 1.35 !important;
  }

  .calc-header .btn {
    width: 100% !important;
    justify-content: center !important;
    padding: 8px !important;
    font-size: 0.82rem !important;
  }

  /* 3. Inputs & Form Fields on Mobile */
  .calc-inputs-pane {
    padding: 12px 10px !important;
  }

  .calc-input-row {
    grid-template-columns: 1fr 1fr !important;
    gap: 8px !important;
  }

  .form-group {
    margin-bottom: 8px !important;
  }

  .form-group-label {
    font-size: 0.8rem !important;
    margin-bottom: 3px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
  }

  .form-group-hint {
    font-size: 0.72rem !important;
    font-weight: 700 !important;
  }

  /* Prevent iOS zoom by setting strict 16px input font size */
  .calc-input, .calc-select, select, input[type="number"], input[type="text"] {
    font-size: 16px !important;
    height: 38px !important;
    border-radius: 6px !important;
  }

  .qty-input-inner .calc-input,
  .calc-input.qty-main-input {
    padding: 0 10px 0 65px !important;
    font-size: 16px !important;
    font-weight: 800 !important;
  }

  /* 4. Results Pane on Mobile */
  .calc-results-pane {
    padding: 10px 10px 75px 10px !important;
  }

  /* Dual Card: Compact Side-by-Side (Weight + Price) */
  .results-dual-card {
    border-radius: 8px !important;
    margin-bottom: 8px !important;
    border: 1px solid #cbd5e1 !important;
  }

  .results-dual-grid {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 0 !important;
  }

  .dual-card-col {
    padding: 6px 8px !important;
    border-radius: 0 !important;
  }

  .dual-card-weight {
    border-left: 1px solid #e2e8f0 !important;
    border-right: none !important;
    background: #ffffff !important;
    position: relative !important;
  }

  .dual-card-weight::before {
    content: '' !important;
    position: absolute !important;
    top: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    left: auto !important;
    width: 3px !important;
    height: 100% !important;
    background: #2563eb !important;
  }

  .dual-card-price {
    background: #f8fafc !important;
    position: relative !important;
    border-right: none !important;
  }

  .dual-card-price::before {
    content: '' !important;
    position: absolute !important;
    top: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    left: auto !important;
    width: 3px !important;
    height: 100% !important;
    background: #fab019 !important;
  }

  .dual-card-header {
    margin-bottom: 2px !important;
  }

  .dual-card-title {
    font-size: 0.7rem !important;
    font-weight: 700 !important;
    gap: 4px !important;
  }

  .dual-card-title svg {
    width: 12px !important;
    height: 12px !important;
  }

  .dual-card-val {
    font-size: 1.05rem !important;
    margin: 1px 0 !important;
    font-weight: 900 !important;
    line-height: 1.2 !important;
  }

  .dual-card-val.price-empty {
    font-size: 0.92rem !important;
    color: #64748b !important;
  }

  .dual-card-sub {
    font-size: 0.65rem !important;
    line-height: 1.2 !important;
    gap: 3px !important;
    color: #64748b !important;
  }

  .dual-card-sub strong {
    font-size: 0.68rem !important;
  }

  /* 5. Clean, Ultra-Compact Native Mobile Breakdown Table */
  .results-table-card {
    border-radius: 8px !important;
    margin-bottom: 8px !important;
    border: 1px solid #cbd5e1 !important;
    overflow: hidden !important;
  }

  .results-table-header {
    padding: 6px 10px !important;
    font-size: 0.74rem !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
  }

  .badge-table-al-farouq {
    font-size: 0.65rem !important;
    padding: 1px 6px !important;
  }

  .bolt-breakdown-table {
    display: table !important;
    width: 100% !important;
    border-collapse: collapse !important;
    table-layout: fixed !important;
    font-size: 0.75rem !important;
    background: #ffffff !important;
    padding: 0 !important;
    border: none !important;
  }

  .bolt-breakdown-table thead {
    display: table-header-group !important;
  }

  .bolt-breakdown-table thead th {
    display: table-cell !important;
    padding: 5px 4px !important;
    font-size: 0.68rem !important;
    font-weight: 800 !important;
    background: #f1f5f9 !important;
    border-bottom: 1.5px solid #cbd5e1 !important;
    color: #334155 !important;
    text-align: center !important;
    vertical-align: middle !important;
  }

  .bolt-breakdown-table thead th.tbl-col-name {
    text-align: right !important;
    padding-right: 6px !important;
    width: 44% !important;
  }

  .bolt-breakdown-table thead th.tbl-col-qty {
    width: 14% !important;
  }

  .bolt-breakdown-table thead th.tbl-col-unit {
    width: 21% !important;
  }

  .bolt-breakdown-table thead th.tbl-col-total {
    width: 21% !important;
  }

  .bolt-breakdown-table tbody {
    display: table-row-group !important;
  }

  .bolt-breakdown-table tbody tr {
    display: table-row !important;
    background: transparent !important;
    border: none !important;
    border-bottom: 1px solid #f1f5f9 !important;
    border-radius: 0 !important;
    padding: 0 !important;
    box-shadow: none !important;
  }

  .bolt-breakdown-table tbody tr:nth-child(even) {
    background: #fafbfc !important;
  }

  .bolt-breakdown-table tbody td {
    display: table-cell !important;
    padding: 5px 4px !important;
    border: none !important;
    border-bottom: 1px solid #f1f5f9 !important;
    vertical-align: middle !important;
    text-align: center !important;
  }

  /* Completely suppress all card pseudo-elements */
  .bolt-breakdown-table tbody td::before,
  .bolt-breakdown-table tfoot td::before {
    display: none !important;
    content: none !important;
  }

  .bolt-breakdown-table .tbl-col-name {
    text-align: right !important;
    padding-right: 6px !important;
    width: 44% !important;
  }

  .bolt-breakdown-table .tbl-item-title {
    font-size: 0.74rem !important;
    font-weight: 800 !important;
    color: #0f172a !important;
    display: block !important;
    line-height: 1.2 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  .bolt-breakdown-table .sub-dim {
    font-size: 0.64rem !important;
    color: #64748b !important;
    display: block !important;
    line-height: 1.2 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  .bolt-breakdown-table .tbl-col-qty {
    width: 14% !important;
    text-align: center !important;
    padding: 5px 2px !important;
  }

  .bolt-breakdown-table .tbl-qty-badge {
    font-size: 0.68rem !important;
    font-weight: 700 !important;
    padding: 1px 4px !important;
    white-space: nowrap !important;
  }

  .bolt-breakdown-table .tbl-col-unit {
    width: 21% !important;
    text-align: center !important;
    font-size: 0.72rem !important;
    font-weight: 700 !important;
    color: #334155 !important;
    white-space: nowrap !important;
    padding: 5px 2px !important;
  }

  .bolt-breakdown-table .tbl-col-total {
    width: 21% !important;
    text-align: center !important;
    font-size: 0.74rem !important;
    font-weight: 800 !important;
    color: #1e40af !important;
    background: transparent !important;
    white-space: nowrap !important;
    padding: 5px 2px !important;
    border-radius: 0 !important;
  }

  /* Tfoot Grand Total Row */
  .bolt-breakdown-table tfoot {
    display: table-footer-group !important;
  }

  .bolt-breakdown-table tfoot tr {
    display: table-row !important;
    background: #eff6ff !important;
    border: none !important;
    border-top: 1.5px solid #2563eb !important;
    padding: 0 !important;
    box-shadow: none !important;
    border-radius: 0 !important;
  }

  .bolt-breakdown-table tfoot td {
    display: table-cell !important;
    padding: 6px 4px !important;
    border: none !important;
    vertical-align: middle !important;
    text-align: center !important;
  }

  .bolt-breakdown-table tfoot td.tbl-col-name {
    text-align: right !important;
    padding-right: 6px !important;
  }

  .bolt-breakdown-table tfoot .tbl-total-title {
    font-size: 0.75rem !important;
    font-weight: 900 !important;
    color: #1e3a8a !important;
    display: flex !important;
    align-items: center !important;
    gap: 3px !important;
  }

  .bolt-breakdown-table tfoot .tbl-total-title svg {
    width: 12px !important;
    height: 12px !important;
  }

  .bolt-breakdown-table tfoot .tbl-grand-qty {
    font-size: 0.72rem !important;
    font-weight: 800 !important;
    color: #1e3a8a !important;
    white-space: nowrap !important;
  }

  .bolt-breakdown-table tfoot .tbl-grand-single {
    font-size: 0.72rem !important;
    font-weight: 800 !important;
    color: #1e3a8a !important;
    white-space: nowrap !important;
  }

  .bolt-breakdown-table tfoot .tbl-grand-total {
    font-size: 0.8rem !important;
    font-weight: 900 !important;
    color: #1e3a8a !important;
    background: transparent !important;
    padding: 0 !important;
    border: none !important;
    white-space: nowrap !important;
  }

  /* 6. Mini 2x2 Cards & Specs Bar on Mobile */
  .results-grid-2x2 {
    grid-template-columns: 1fr 1fr !important;
    gap: 5px !important;
    margin-bottom: 8px !important;
  }

  .res-mini-card {
    padding: 5px 7px !important;
    border-radius: 6px !important;
  }

  .res-mini-label {
    font-size: 0.68rem !important;
    margin-bottom: 1px !important;
  }

  .res-mini-value {
    font-size: 0.98rem !important;
    line-height: 1.2 !important;
  }

  .res-mini-sub {
    font-size: 0.62rem !important;
  }

  .results-specs-bar {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 4px 6px !important;
    padding: 6px 8px !important;
    font-size: 0.72rem !important;
    border-radius: 6px !important;
    margin-top: 6px !important;
  }

  .results-specs-bar .spec-sep {
    display: none !important;
  }

  .results-specs-bar .spec-item {
    gap: 3px !important;
  }

  .results-specs-bar .spec-label {
    font-size: 0.68rem !important;
  }

  .results-specs-bar .spec-val {
    font-size: 0.72rem !important;
  }

  /* 7. Calculator 2, 3, 4 Result Cards on Mobile */
  .results-primary-card {
    padding: 6px 10px !important;
    border-radius: 6px !important;
    margin-bottom: 6px !important;
  }

  .res-header-label {
    font-size: 0.72rem !important;
    margin-bottom: 2px !important;
  }

  .res-primary-val {
    font-size: 1.18rem !important;
    line-height: 1.2 !important;
  }

  .res-sub-val {
    font-size: 0.68rem !important;
  }

  .results-price-card {
    padding: 6px 10px !important;
    border-radius: 6px !important;
    margin-bottom: 6px !important;
  }

  .res-price-header {
    margin-bottom: 4px !important;
  }

  .res-price-badge {
    font-size: 0.68rem !important;
    padding: 1px 6px !important;
  }

  .res-price-calc-note {
    font-size: 0.64rem !important;
  }

  .res-price-body {
    gap: 6px !important;
  }

  .res-price-title {
    font-size: 0.7rem !important;
  }

  .res-price-val {
    font-size: 1.15rem !important;
    line-height: 1.2 !important;
  }

  .res-price-single-box {
    padding: 2px 6px !important;
    min-width: 80px !important;
  }

  .res-price-single-label {
    font-size: 0.62rem !important;
  }

  .res-price-single-val {
    font-size: 0.78rem !important;
  }

  /* 8. BOQ Builder on Mobile */
  .boq-stats-banner {
    grid-template-columns: 1fr 1fr !important;
    gap: 8px !important;
  }

  .boq-stat-card {
    padding: 10px 8px !important;
  }

  .boq-stat-val {
    font-size: 1.15rem !important;
  }

  .boq-stat-label {
    font-size: 0.72rem !important;
  }

  #boq-manual-form {
    grid-template-columns: 1fr 1fr !important;
    gap: 8px !important;
  }

  #boq-manual-form .form-group:first-child {
    grid-column: 1 / -1 !important;
  }

  #boq-manual-form button[type="submit"] {
    grid-column: 1 / -1 !important;
    width: 100% !important;
    padding: 10px !important;
    font-size: 0.9rem !important;
  }

  .boq-actions {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 8px !important;
  }

  .boq-actions .btn {
    width: 100% !important;
    justify-content: center !important;
  }

  /* 9. Specialized Sections Mobile Rules */
  .boq-body-pane {
    padding: 12px 10px !important;
  }

  .catalog-products-grid {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
    margin-top: 16px !important;
  }

  .guides-grid {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
    margin-top: 16px !important;
  }

  .guide-card {
    padding: 16px 14px !important;
  }

  .contact-cta-card {
    padding: 20px 14px !important;
    border-radius: 12px !important;
  }

  .contact-cta-grid {
    grid-template-columns: 1fr !important;
    gap: 20px !important;
  }

  .contact-cta-title {
    font-size: 1.45rem !important;
    margin: 8px 0 !important;
  }

  .contact-cta-desc {
    font-size: 0.85rem !important;
    line-height: 1.6 !important;
    margin-bottom: 16px !important;
  }

  .contact-cta-actions {
    flex-direction: column !important;
    gap: 8px !important;
  }

  .contact-cta-actions .btn {
    width: 100% !important;
    justify-content: center !important;
  }

  .contact-info-card {
    padding: 16px 14px !important;
    border-radius: 10px !important;
  }
}

/* ==========================================================================
   EXTRA SMALL PHONES (max-width: 480px)
   ========================================================================== */
@media (max-width: 480px) {
  .tools-hero-title {
    font-size: 1.45rem !important;
  }

  .calc-tab-pill {
    flex: 0 0 120px !important;
  }

  .toast-message {
    padding: 8px 12px !important;
    font-size: 0.8rem !important;
    left: 8px !important;
    right: 8px !important;
    bottom: 12px !important;
  }

  .floating-actions {
    bottom: 14px !important;
    left: 14px !important;
    z-index: 99 !important;
  }

  .floating-actions .fab {
    width: 44px !important;
    height: 44px !important;
  }

  .floating-actions .fab svg {
    width: 22px !important;
    height: 22px !important;
  }
}


