/* ══════════════════════════════════════════════════════════════
   SMRITI INDUSTRIES — Machine Detail Page (SIB Theme)
   Fonts: Fraunces (serif display) · Instrument Sans (body) · Outfit (brand)
══════════════════════════════════════════════════════════════ */

:root {
  --bg: #F7FAFF;
  --surface: #FFFFFF;
  --surface2: #EEF4FF;
  --line: #DCE7F9;
  --ink: #0F1D3D;
  --text: #16264A;
  --muted: #5C6B85;
  --dim: #8593AC;
  --accent: #1E56C7;
  --accent-deep: #123C93;
  --sky: #4C86F0;
  --sky-soft: #DCEAFF;
  --green: #1E9E63;
  --radius-sm: 10px;
  --radius: 18px;
  --radius-lg: 24px;
  --shadow-sm: 0 4px 14px rgba(11, 23, 54, 0.04);
  --shadow: 0 14px 36px rgba(11, 23, 54, 0.08);
  --shadow-lg: 0 22px 48px rgba(15, 29, 61, .16);
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── MACHINE DETAIL SECTION ──────────────────────────────── */
.machine-detail-section {
  padding: 64px 0;
  background: var(--bg);
}

.machine-detail-container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 20px;
}

.machine-detail-section > .machine-detail-container {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 48px;
  align-items: start;
}

/* ── IMAGE COLUMN ────────────────────────────────────────── */
.machine-image-col {
  position: sticky;
  top: 80px;
}

.machine-img-wrap {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 32px 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 300px;
  box-shadow: var(--shadow);
  overflow: hidden;
  position: relative;
}

.machine-img-wrap img {
  max-width: 100%;
  max-height: 280px;
  object-fit: contain;
  transition: transform 0.4s ease;
}

.machine-img-wrap:hover img {
  transform: scale(1.04);
}

.machine-cta-box {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  margin-top: 16px;
  box-shadow: var(--shadow-sm);
}

.machine-cta-box p {
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 14px;
  font-weight: 500;
  text-align: center;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  font-weight: 600;
  border-radius: 999px;
  padding: 12px 22px;
  font-size: 0.93rem;
  background: #0E7C4A;
  color: #ffffff;
  border: none;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(14, 124, 74, 0.25);
  transition: background .15s ease, transform .15s ease;
  width: 100%;
}

.btn-primary:hover {
  background: #0A6A3E;
  transform: translateY(-1px);
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  font-weight: 600;
  border-radius: 999px;
  padding: 11px 22px;
  font-size: 0.9rem;
  background: transparent;
  color: var(--accent);
  border: 1.5px solid var(--accent);
  cursor: pointer;
  transition: background .15s ease, color .15s ease, transform .15s ease;
  width: 100%;
  margin-top: 10px;
}

.btn-outline:hover {
  background: var(--accent);
  color: #ffffff;
  transform: translateY(-1px);
}

/* ── INFO COLUMN ─────────────────────────────────────────── */
.section-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  border-radius: 999px;
  background: var(--sky-soft);
  color: var(--accent-deep);
  font-weight: 600;
  font-size: 0.82rem;
  margin-bottom: 10px;
  border: 1px solid var(--line);
}

.machine-title {
  font-family: 'Fraunces', serif;
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 600;
  color: var(--ink);
  line-height: 1.15;
  margin: 8px 0 16px;
  letter-spacing: -0.015em;
}

.machine-overview {
  font-size: 0.95rem;
  color: var(--muted);
  line-height: 1.75;
  margin-bottom: 32px;
  max-width: 68ch;
}

/* ── SPECS, FEATURES, APPLICATIONS ──────────────────────── */
.machine-specs,
.machine-features,
.machine-applications {
  margin-bottom: 28px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 24px;
  box-shadow: var(--shadow-sm);
}

.machine-specs h3,
.machine-features h4,
.machine-applications h4 {
  font-family: 'Fraunces', serif;
  font-size: 1rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.machine-specs h3 i,
.machine-features h4 i,
.machine-applications h4 i {
  color: var(--accent);
  font-size: 0.95rem;
}

/* Specs Table */
.spec-table {
  width: 100%;
  border-collapse: collapse;
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.spec-table tr {
  border-bottom: 1px solid var(--line);
}

.spec-table tr:last-child {
  border-bottom: none;
}

.spec-table td {
  padding: 11px 14px;
  font-size: 0.88rem;
}

.spec-table td:first-child {
  color: var(--muted);
  font-weight: 500;
  width: 42%;
  background: var(--surface2);
}

.spec-table td:last-child {
  color: var(--ink);
  font-weight: 600;
}

/* Features List */
.feature-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.feature-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.9rem;
  color: var(--text);
  line-height: 1.5;
}

.feature-list li i {
  color: var(--green);
  font-size: 0.85rem;
  margin-top: 3px;
  flex-shrink: 0;
}

/* Application Tags */
.app-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.app-tags span {
  background: var(--sky-soft);
  border: 1px solid var(--line);
  color: var(--accent-deep);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 5px 14px;
  border-radius: 999px;
  transition: var(--transition);
}

.app-tags span:hover {
  background: var(--accent);
  color: #ffffff;
  border-color: var(--accent);
}

/* ── RELATED MACHINES ────────────────────────────────────── */
.related-machines-section {
  padding: 56px 0;
  background: var(--surface2);
  border-top: 1px solid var(--line);
}

.section-header.center {
  text-align: center;
  margin-bottom: 32px;
}

.section-header.center h2 {
  font-family: 'Fraunces', serif;
  font-size: clamp(1.5rem, 3vw, 2rem);
  color: var(--ink);
  font-weight: 600;
  margin-top: 8px;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.related-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.related-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow);
  border-color: var(--sky);
}

.related-img {
  height: 160px;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.related-img img {
  max-height: 130px;
  max-width: 90%;
  object-fit: contain;
  transition: transform 0.4s ease;
}

.related-card:hover .related-img img {
  transform: scale(1.07);
}

.related-body {
  padding: 14px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--line);
  background: var(--surface);
}

.related-body h3 {
  font-family: 'Fraunces', serif;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink);
}

.related-body span {
  font-size: 12px;
  color: var(--accent);
  font-weight: 600;
  white-space: nowrap;
}

/* ── FLOATING SOCIAL FAB ──────────────────────────────────── */
.social-fab {
  position: fixed;
  right: 24px;
  bottom: 96px;
  z-index: 60;
  display: flex;
  flex-direction: column-reverse;
  align-items: center;
  gap: 10px;
}

.social-toggle-btn {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 22px rgba(11, 23, 54, 0.3);
  transition: transform .3s, background .2s;
}

.social-toggle-btn:hover { background: var(--accent-deep); }
.social-fab.open .social-toggle-btn { transform: rotate(135deg); }

.social-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height .38s ease, opacity .3s ease;
  margin: 0;
}

.social-fab.open .social-list { max-height: 360px; opacity: 1; }

.social-list a {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid var(--line);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 16px rgba(11, 23, 54, 0.12);
  transition: background .2s, color .2s, transform .2s;
}

.social-list a:hover { background: var(--accent); color: #fff; transform: scale(1.08); }
.social-list svg { width: 22px; height: 22px; }

/* ── RESPONSIVE ─────────────────────────────────────────── */
@media (max-width: 900px) {
  .machine-detail-section > .machine-detail-container {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .machine-image-col { position: static; }
  .machine-img-wrap { min-height: 240px; }
  .related-grid { grid-template-columns: 1fr 1fr; }
  .machine-detail-container { padding: 0 20px; }
}

@media (max-width: 560px) {
  .related-grid { grid-template-columns: 1fr; }
  .machine-detail-section { padding: 44px 0; }
  .social-fab { right: 16px; bottom: 82px; }
  .social-toggle-btn { width: 52px; height: 52px; }
}