/* ─────────────────────────────────────────────────────────────
   Thermo-Stream Technologies — Design System
   Navy #021E54 · Brand Red #C1272D · Deep Navy #0B131E
   ───────────────────────────────────────────────────────────── */
:root {
  --navy: #021e54;
  --navy-700: #1a3364;
  --navy-900: #0b131e;
  --red: #c1272d;
  --red-400: #e03a40;
  --surface: #f5f7fa;
  --line: #dfe3ea;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}
html { scroll-padding-top: 110px; }
body { overflow-x: hidden; }
::selection { background: var(--red); color: #fff; }

/* Typography helpers */
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 12px; font-weight: 600; letter-spacing: 0.22em; text-transform: uppercase;
}
.eyebrow::before { content: ''; width: 28px; height: 2px; background: currentColor; display: inline-block; }
.text-center .eyebrow::after { content: ''; width: 28px; height: 2px; background: currentColor; display: inline-block; }

/* Buttons */
.btn-primary, .btn-outline, .btn-outline-light, .btn-dark {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 12px 24px; border-radius: 6px; font-weight: 600; font-size: 14.5px; letter-spacing: 0.01em;
  transition: all 0.25s var(--ease); white-space: nowrap; cursor: pointer; border: 1.5px solid transparent;
}
.btn-lg { padding: 16px 32px; font-size: 16px; }
.btn-primary { background: var(--red); color: #fff; box-shadow: 0 8px 20px -8px rgba(193, 39, 45, 0.6); }
.btn-primary:hover { background: #a81f25; transform: translateY(-2px); box-shadow: 0 14px 28px -10px rgba(193, 39, 45, 0.7); }
.btn-outline { border-color: var(--navy); color: var(--navy); }
.btn-outline:hover { background: var(--navy); color: #fff; }
.btn-outline-light { border-color: rgba(255,255,255,0.5); color: #fff; }
.btn-outline-light:hover { background: #fff; color: var(--navy); border-color: #fff; }
.btn-dark { background: var(--navy); color: #fff; }
.btn-dark:hover { background: var(--navy-700); transform: translateY(-2px); }

/* ───────── Header ───────── */
.site-header.is-transparent { background: transparent; }
.site-header.is-transparent .navbar { border-bottom: 1px solid rgba(255,255,255,0.1); }
.site-header.is-transparent .nav-link { color: rgba(255,255,255,0.85); }
.site-header.is-transparent .nav-link:hover, .site-header.is-transparent .nav-link.is-active { color: #fff; }
.site-header.is-transparent .logo-dark { display: none; }
.site-header.is-transparent .rfq-btn { border-color: rgba(255,255,255,0.35); color: #fff; }
.site-header.is-transparent #menu-toggle { color: #fff; border-color: rgba(255,255,255,0.35); }

.site-header.is-solid, .site-header.is-scrolled {
  background: rgba(255,255,255,0.96); backdrop-filter: blur(12px);
  box-shadow: 0 6px 30px -12px rgba(2, 30, 84, 0.25);
}
.site-header.is-solid .logo-light, .site-header.is-scrolled .logo-light { display: none; }
.site-header.is-scrolled .logo-dark { display: block; }
.site-header.is-solid .nav-link, .site-header.is-scrolled .nav-link { color: var(--navy); }
.site-header.is-scrolled .rfq-btn, .site-header.is-solid .rfq-btn { border-color: var(--line); color: var(--navy); }
.site-header.is-scrolled #menu-toggle, .site-header.is-solid #menu-toggle { color: var(--navy); border-color: var(--line); }
.site-header.is-scrolled .topbar { display: none; }
.site-header.is-scrolled .navbar .container { height: 70px; }

.nav-link { position: relative; border-radius: 6px; }
.nav-link::after {
  content: ''; position: absolute; left: 16px; right: 16px; bottom: 2px; height: 2px;
  background: var(--red); transform: scaleX(0); transform-origin: left; transition: transform 0.3s var(--ease);
}
.nav-link:hover::after, .nav-link.is-active::after { transform: scaleX(1); }

.mega-menu {
  position: absolute; top: 100%; left: 50%; transform: translate(-50%, 10px);
  background: #fff; border-radius: 12px; box-shadow: 0 30px 60px -20px rgba(2, 30, 84, 0.35); border: 1px solid var(--line);
  opacity: 0; visibility: hidden; transition: all 0.25s var(--ease); overflow: hidden;
}
.has-mega:hover .mega-menu { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
.mega-menu::before { content: ''; position: absolute; top: -12px; left: 0; right: 0; height: 12px; }

.mobile-menu.is-open { display: block; }

/* ───────── Hero ───────── */
.hero { min-height: 100vh; min-height: 100svh; }
.hero-bg { transform: scale(1.05); will-change: transform; }
.hero-grid {
  background-image: linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse at 30% 50%, #000 30%, transparent 75%);
}
.hero-word { display: inline-block; overflow: hidden; vertical-align: bottom; }
.hero-word > span { display: inline-block; transform: translateY(110%); }
.scroll-cue { animation: cue 2s infinite; }
@keyframes cue { 0%, 100% { transform: translateY(0); opacity: 0.6 } 50% { transform: translateY(8px); opacity: 1 } }

/* Partner marquee */
.marquee { overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.marquee-track { display: flex; gap: 80px; width: max-content; animation: marquee 30s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ───────── Cards ───────── */
.card { background: #fff; border: 1px solid var(--line); border-radius: 12px; transition: all 0.35s var(--ease); }
.card:hover { transform: translateY(-6px); box-shadow: 0 30px 50px -25px rgba(2, 30, 84, 0.35); border-color: transparent; }

.cat-card { position: relative; overflow: hidden; border-radius: 14px; aspect-ratio: 4/5; display: block; }
.cat-card img { transition: transform 0.7s var(--ease); }
.cat-card:hover img { transform: scale(1.08); }
.cat-card .cat-body { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: flex-end; padding: 28px; background: linear-gradient(180deg, rgba(11,19,30,0) 30%, rgba(11,19,30,0.55) 60%, rgba(2,30,84,0.95) 100%); }
.cat-card .cat-more { max-height: 0; opacity: 0; overflow: hidden; transition: all 0.45s var(--ease); }
.cat-card:hover .cat-more { max-height: 140px; opacity: 1; margin-top: 12px; }
.cat-card .cat-bar { position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--red); transform: scaleY(0); transform-origin: bottom; transition: transform 0.45s var(--ease); }
.cat-card:hover .cat-bar { transform: scaleY(1); }

.service-card { position: relative; padding: 36px 32px; border-radius: 14px; background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.08); transition: all 0.4s var(--ease); overflow: hidden; }
.service-card::before { content: ''; position: absolute; left: 0; top: 0; width: 4px; height: 0; background: var(--red); transition: height 0.4s var(--ease); }
.service-card:hover { background: rgba(255,255,255,0.08); transform: translateY(-6px); border-color: rgba(255,255,255,0.15); }
.service-card:hover::before { height: 100%; }
.service-icon { width: 60px; height: 60px; border-radius: 12px; display: grid; place-items: center; font-size: 24px; background: rgba(193,39,45,0.15); color: var(--red-400); transition: all 0.4s var(--ease); }
.service-card:hover .service-icon { background: var(--red); color: #fff; transform: rotate(-6deg) scale(1.05); }

.value-card { padding: 28px; border-radius: 12px; background: #fff; border: 1px solid var(--line); transition: all 0.35s var(--ease); }
.value-card:hover { border-color: var(--navy); transform: translateY(-4px); box-shadow: 0 25px 40px -25px rgba(2,30,84,0.4); }
.value-icon { width: 52px; height: 52px; border-radius: 10px; display: grid; place-items: center; background: var(--navy); color: #fff; font-size: 20px; }
.value-card:hover .value-icon { background: var(--red); }

.partner-card { position: relative; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 36px 28px; text-align: center; transition: all 0.4s var(--ease); overflow: hidden; }
.partner-card::after { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 4px; background: var(--navy); transform: scaleX(0); transition: transform 0.4s var(--ease); }
.partner-card:hover { transform: translateY(-8px); box-shadow: 0 35px 60px -30px rgba(2,30,84,0.4); }
.partner-card:hover::after { transform: scaleX(1); }
.partner-card img { filter: grayscale(1); opacity: 0.75; transition: all 0.4s; }
.partner-card:hover img { filter: none; opacity: 1; }

/* Red vertical accent used on image blocks (from company profile style) */
.img-accent { position: relative; }
.img-accent::before { content: ''; position: absolute; left: -14px; top: 10%; bottom: 10%; width: 8px; background: var(--red); border-radius: 2px; }
.img-accent-r::before { left: auto; right: -14px; }

/* Counters */
.stat-number { font-variant-numeric: tabular-nums; }

/* Process steps */
.step-line { position: absolute; top: 34px; left: 12%; right: 12%; height: 2px; background: linear-gradient(90deg, var(--line), var(--navy), var(--line)); }
.step-dot { width: 68px; height: 68px; border-radius: 50%; display: grid; place-items: center; background: #fff; border: 2px solid var(--line); font-family: Montserrat, sans-serif; font-weight: 800; color: var(--navy); transition: all 0.4s var(--ease); position: relative; z-index: 1; }
.step:hover .step-dot { background: var(--navy); color: #fff; border-color: var(--navy); transform: scale(1.08); }

/* ───────── Products page ───────── */
.cat-nav { position: sticky; top: 70px; z-index: 30; background: rgba(255,255,255,0.95); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.cat-nav a { display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 999px; font-size: 14px; font-weight: 600; color: var(--navy); border: 1px solid transparent; white-space: nowrap; transition: all 0.25s; }
.cat-nav a:hover { background: var(--surface); }
.cat-nav a.is-active { background: var(--navy); color: #fff; }
.filter-chip { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 8px; border: 1px solid var(--line); font-size: 13.5px; font-weight: 500; color: #334155; cursor: pointer; transition: all 0.2s; background: #fff; }
.filter-chip:hover { border-color: var(--navy); }
.filter-chip.is-active { background: var(--navy); border-color: var(--navy); color: #fff; }
.filter-chip img { height: 16px; }
.filter-chip.is-active img { filter: brightness(0) invert(1); }

.product-card { background: #fff; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; display: flex; flex-direction: column; transition: all 0.35s var(--ease); }
.product-card:hover { transform: translateY(-6px); box-shadow: 0 30px 50px -25px rgba(2,30,84,0.35); border-color: transparent; }
.product-media { position: relative; aspect-ratio: 4/3; background: var(--surface); overflow: hidden; }
.product-media > img { width: 100%; height: 100%; object-fit: contain; padding: 14px; background: #fff; transition: transform 0.6s var(--ease); }
.product-media.is-cover > img { object-fit: cover; padding: 0; }
.product-card:hover .product-media > img { transform: scale(1.06); }
.product-media .brand-tag { position: absolute; top: 12px; left: 12px; background: #fff; border-radius: 6px; padding: 5px 8px; box-shadow: 0 4px 12px rgba(0,0,0,0.1); }
.product-media .brand-tag img { height: 16px; width: auto; max-width: 90px; display: block; object-fit: contain; }
.product-actions { position: absolute; inset-inline: 12px; bottom: 12px; display: flex; gap: 8px; transform: translateY(20px); opacity: 0; transition: all 0.35s var(--ease); }
.product-card:hover .product-actions { transform: translateY(0); opacity: 1; }
.product-card.is-hidden { display: none; }
.group-section.is-hidden { display: none; }

/* Modal */
.modal { position: fixed; inset: 0; z-index: 100; display: none; }
.modal.is-open { display: block; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(11,19,30,0.75); backdrop-filter: blur(4px); }
.modal-panel { position: absolute; inset: 0; margin: auto; width: min(960px, 94vw); height: min(680px, 92vh); background: #fff; border-radius: 16px; overflow: hidden; display: grid; grid-template-columns: 1fr; box-shadow: 0 50px 100px -30px rgba(0,0,0,0.6); animation: pop 0.35s var(--ease); }
@media (min-width: 768px) { .modal-panel { grid-template-columns: 5fr 6fr; } }
@keyframes pop { from { transform: translateY(20px) scale(0.98); opacity: 0 } to { transform: none; opacity: 1 } }
/* Product image: natural size, whole image visible — no zoom, no crop */
.pm-media { background: #fff; display: flex; align-items: center; justify-content: center; padding: 14px; }
@media (min-width: 768px) { .pm-media { padding: 24px; } }
/* Product image only: natural size, whole image visible — no zoom, no crop.
   Scoped to #pm-image so the brand logo (#pm-brand) keeps its small size. */
.pm-media #pm-image { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; }

/* RFQ drawer */
.rfq-drawer { position: fixed; inset: 0; z-index: 110; visibility: hidden; }
.rfq-drawer.is-open { visibility: visible; }
.rfq-backdrop { position: absolute; inset: 0; background: rgba(11,19,30,0.6); opacity: 0; transition: opacity 0.3s; }
.rfq-drawer.is-open .rfq-backdrop { opacity: 1; }
.rfq-panel { position: absolute; top: 0; right: 0; bottom: 0; width: min(440px, 100vw); background: #fff; display: flex; flex-direction: column; transform: translateX(100%); transition: transform 0.4s var(--ease); box-shadow: -30px 0 60px -20px rgba(0,0,0,0.4); }
.rfq-drawer.is-open .rfq-panel { transform: none; }
.rfq-drawer.has-items #rfq-empty { display: none; }
.rfq-drawer:not(.has-items) #rfq-items, .rfq-drawer:not(.has-items) footer { display: none; }
.rfq-item { display: flex; gap: 12px; align-items: center; padding: 10px; border: 1px solid var(--line); border-radius: 10px; }
.rfq-item img { width: 56px; height: 56px; object-fit: cover; border-radius: 8px; background: var(--surface); }
.rfq-qty { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 6px; }
.rfq-qty button { width: 26px; height: 26px; }
.rfq-qty span { min-width: 26px; text-align: center; font-size: 13px; font-weight: 600; }

/* WhatsApp FAB */
.whatsapp-fab { position: fixed; right: 22px; bottom: 22px; z-index: 60; display: flex; align-items: center; gap: 10px; background: #25d366; color: #fff; padding: 12px 16px; border-radius: 999px; font-weight: 600; box-shadow: 0 15px 30px -10px rgba(37,211,102,0.7); transition: all 0.3s var(--ease); }
.whatsapp-fab i { font-size: 26px; }
.whatsapp-fab .whatsapp-label { max-width: 0; overflow: hidden; white-space: nowrap; transition: max-width 0.4s var(--ease); }
.whatsapp-fab:hover .whatsapp-label { max-width: 120px; }
.whatsapp-fab:hover { transform: translateY(-3px); }

/* Footer */
.footer-title { font-family: Montserrat, sans-serif; font-weight: 700; color: #fff; font-size: 15px; letter-spacing: 0.05em; text-transform: uppercase; margin-bottom: 18px; position: relative; padding-bottom: 10px; }
.footer-title::after { content: ''; position: absolute; left: 0; bottom: 0; width: 28px; height: 2px; background: var(--red); }
.footer-links li { margin-bottom: 9px; font-size: 14px; }
.footer-links a { transition: all 0.2s; display: inline-flex; align-items: center; gap: 8px; }
.footer-links a::before { content: '›'; color: var(--red-400); font-weight: 700; }
.footer-links a:hover { color: #fff; padding-left: 4px; }
.social-btn { width: 40px; height: 40px; border-radius: 8px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,0.15); color: #fff; transition: all 0.25s; }
.social-btn:hover { background: var(--red); border-color: var(--red); transform: translateY(-2px); }

/* Reveal animations */
[data-reveal] { opacity: 0; transform: translateY(28px); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); }
[data-reveal].is-visible { opacity: 1; transform: none; }
[data-reveal-stagger] > * { opacity: 0; transform: translateY(28px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
[data-reveal-stagger].is-visible > * { opacity: 1; transform: none; }
[data-reveal-stagger].is-visible > *:nth-child(2) { transition-delay: 0.08s }
[data-reveal-stagger].is-visible > *:nth-child(3) { transition-delay: 0.16s }
[data-reveal-stagger].is-visible > *:nth-child(4) { transition-delay: 0.24s }
[data-reveal-stagger].is-visible > *:nth-child(5) { transition-delay: 0.32s }
[data-reveal-stagger].is-visible > *:nth-child(6) { transition-delay: 0.40s }
[data-reveal-stagger].is-visible > *:nth-child(7) { transition-delay: 0.48s }
[data-reveal-stagger].is-visible > *:nth-child(8) { transition-delay: 0.56s }

/* Form */
.field { width: 100%; padding: 13px 16px; border: 1.5px solid var(--line); border-radius: 8px; font-size: 15px; background: #fff; transition: all 0.2s; color: #0f172a; }
.field:focus { outline: none; border-color: var(--navy); box-shadow: 0 0 0 4px rgba(2,30,84,0.08); }
.label { display: block; font-size: 13px; font-weight: 600; color: var(--navy); margin-bottom: 7px; letter-spacing: 0.02em; }

/* Legal docs */
.doc-card img { transition: transform 0.6s var(--ease); }
.doc-card:hover img { transform: scale(1.04); }

/* Toast */
.toast { position: fixed; left: 50%; bottom: 30px; transform: translate(-50%, 20px); background: var(--navy-900); color: #fff; padding: 12px 20px; border-radius: 10px; font-size: 14px; z-index: 200; opacity: 0; transition: all 0.35s var(--ease); pointer-events: none; display: flex; align-items: center; gap: 10px; box-shadow: 0 20px 40px -15px rgba(0,0,0,0.5); }
.toast.is-show { opacity: 1; transform: translate(-50%, 0); }

/* Applications tabs */
.app-tab { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-radius: 10px; border: 1px solid var(--line); cursor: pointer; transition: all 0.25s; font-weight: 600; color: var(--navy); text-align: left; background: #fff; }
.app-tab:hover { border-color: var(--navy); }
.app-tab.is-active { background: var(--navy); color: #fff; border-color: var(--navy); }
.app-tab.is-active i { color: var(--red-400); }
.app-panel { display: none; }
.app-panel.is-active { display: block; animation: fadein 0.4s var(--ease); }
@keyframes fadein { from { opacity: 0; transform: translateY(10px) } to { opacity: 1; transform: none } }

@media (prefers-reduced-motion: reduce) {
  [data-reveal], [data-reveal-stagger] > * { opacity: 1; transform: none; transition: none; }
  .marquee-track { animation: none; }
}

.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar { scrollbar-width: none; }

/* ── Draggable product-lines carousel (Partners page) ───────────────
   Desktop: click-drag to scroll + prev/next arrow buttons.
   Touch devices: native swipe still works (arrows are hidden).        */
.carousel-wrap { position: relative; }
.carousel-drag { cursor: grab; -webkit-user-select: none; user-select: none; }
.carousel-drag.is-dragging { cursor: grabbing; scroll-behavior: auto; }
.carousel-drag.is-dragging a { pointer-events: none; }
.carousel-drag img { -webkit-user-drag: none; user-drag: none; }
.carousel-nav { position: absolute; top: 50%; transform: translateY(-50%); z-index: 5; width: 44px; height: 44px; border-radius: 999px; background: #fff; color: var(--navy, #021E54); border: 1px solid var(--line, #DFE3EA); box-shadow: 0 10px 25px -8px rgba(2,30,84,0.35); display: none; align-items: center; justify-content: center; transition: background .2s, color .2s, opacity .2s; }
.carousel-nav:hover { background: var(--navy, #021E54); color: #fff; }
.carousel-nav[disabled] { opacity: .35; pointer-events: none; }
.carousel-prev { left: -10px; }
.carousel-next { right: -10px; }
@media (min-width: 768px) { .carousel-nav { display: flex; } }
