/* ═══════════════════════════════════════════════════════════════════
   GLOBAL STYLES
   ═══════════════════════════════════════════════════════════════════ */

/* ── Box-sizing reset ────────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
}

/* ── Base ───────────────────────────────── */
html, body {
  width: 100%;
}

/* ── Body: mobile bottom bar clearance ──────────────────────────── */
@media (max-width: 1023px) {
  body {
    padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px));
  }
}

/* ── Images ─────────────────────────────────────────────────────── */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ── Typography: prevent overflow on small screens ──────────────── */
h1, h2, h3, h4 {
  word-break: break-word;
  overflow-wrap: break-word;
}

/* ── Form inputs ─────────────────────────────────────────────────── */
input, select, textarea {
  max-width: 100%;
  box-sizing: border-box;
}

/* ── Buttons & links ─────────────────────────────────────────────── */
button, a.btn-primary, a.btn-ghost, a.btn-secondary {
  max-width: 100%;
  box-sizing: border-box;
}

/* Minimum 44px tap target on mobile — scoped away from sidebar nav */
@media (max-width: 1023px) {
  button:not(#sidebar button):not(#sidebar-nav-list button),
  a:not(#sidebar a):not(#sidebar-nav-list a),
  [role="button"]:not(#sidebar [role="button"]) {
    min-height: 44px;
  }
}


/* ═══════════════════════════════════════════════════════════════════
   MATERIAL SYMBOLS
   ═══════════════════════════════════════════════════════════════════ */
.material-symbols-outlined {
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
  min-height: unset; /* exempt from 44px tap-target rule */
}


/* ═══════════════════════════════════════════════════════════════════
   UTILITY CLASSES
   ═══════════════════════════════════════════════════════════════════ */

/* Text stroke */
.text-stroke-primary {
  -webkit-text-stroke: 1px #000000;
  color: transparent;
}
.text-stroke-white {
  -webkit-text-stroke: 1px #ffffff;
  color: transparent;
}

/* Grid background */
.industrial-grid,
.hero-grid {
  background-image: radial-gradient(#e5e5e5 1px, transparent 1px);
  background-size: 24px 24px;
}

/* Dashed industrial line */
.industrial-line {
  background-image: linear-gradient(90deg, #000 50%, transparent 50%);
  background-size: 20px 2px;
}

/* Left border accent */
.industrial-border-l {
  border-left: 4px solid #fe6b00;
}

/* Plinth / card surface */
.plinth-effect {
  background-color: #F4F4F4;
  border: 1px solid #E5E5E5;
}

/* Hard shadows */
.plinth-shadow,
.hard-shadow {
  box-shadow: 8px 8px 0px 0px rgba(0, 0, 0, 0.1);
}
.shadow-hard {
  box-shadow: 4px 4px 0px 0px rgba(0, 0, 0, 0.1);
}
.shadow-hard-interactive {
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.shadow-hard-interactive:hover {
  box-shadow: 6px 6px 0px 0px rgba(0, 0, 0, 0.15);
  transform: translate(-2px, -2px);
}

/* Slanted clip */
.clip-path-slanted {
  clip-path: polygon(0 0, 100% 0, 100% 90%, 0% 100%);
}

/* Hide scrollbar utility */
.no-scrollbar::-webkit-scrollbar,
.custom-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar { scrollbar-width: none; }
.custom-scrollbar::-webkit-scrollbar { height: 4px; }
.custom-scrollbar::-webkit-scrollbar-thumb { background: #fe6b00; }

/* Stats strip */
.stats-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
}


/* ═══════════════════════════════════════════════════════════════════
   ACCORDION
   ═══════════════════════════════════════════════════════════════════ */
details > summary { list-style: none; }
details > summary::-webkit-details-marker { display: none; }

.accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
}
.accordion-item.active .accordion-content {
  max-height: 500px;
}

.icon-rotate {
  transition: transform 0.35s ease;
}
.accordion-item.active .icon-rotate {
  transform: rotate(45deg);
}

.accordion-item {
  transition: all 0.3s ease;
}
.accordion-item.active {
  border-color: #FF6B00;
}
.accordion-item.active button {
  background: rgba(255, 107, 0, 0.06);
}


/* ═══════════════════════════════════════════════════════════════════
   PROCESS NODE (vertical connector line)
   ═══════════════════════════════════════════════════════════════════ */
.process-node::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 100%;
  width: 2px;
  height: 100%;
  background-color: #000;
  transform: translateX(-50%);
}
.process-node:last-child::after {
  display: none;
}


/* ═══════════════════════════════════════════════════════════════════
   TIMELINE
   ═══════════════════════════════════════════════════════════════════ */
.timeline-line {
  position: absolute;
  left: 24px;
  top: 0;
  bottom: 0;
  width: 2px;
  background-color: #000000;
  z-index: 0;
}
/* timeline-line::before variant (alternate usage) */
.timeline-line::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 24px;
  width: 2px;
  background-color: #000000;
}

@media (min-width: 768px) {
  .timeline-line {
    left: 50%;
    transform: translateX(-50%);
  }
  .timeline-item:nth-child(odd) .timeline-content {
    margin-left: auto;
    padding-left: 48px;
  }
  .timeline-item:nth-child(even) .timeline-content {
    margin-right: auto;
    padding-right: 48px;
    text-align: right;
  }
  .timeline-item:nth-child(even) .timeline-content .timeline-header {
    justify-content: flex-end;
  }
  .timeline-item:nth-child(even) .timeline-content .timeline-header .material-symbols-outlined {
    order: 2;
    margin-left: 16px;
    margin-right: 0;
  }
}


/* ═══════════════════════════════════════════════════════════════════
   TABS
   ═══════════════════════════════════════════════════════════════════ */
.active-tab {
  background-color: #000000;
  color: #ffffff;
  border-bottom: 4px solid #fe6b00;
}


/* ═══════════════════════════════════════════════════════════════════
   CATEGORY CARDS (products index)
   ═══════════════════════════════════════════════════════════════════ */
.category-card {
  opacity: 0;
  transform: translateY(16px);
  animation: card-in 0.4s ease forwards;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 6px 6px 0px 0px rgba(0, 0, 0, 0.08);
}
.category-card:hover {
  transform: translate(-3px, -3px);
  box-shadow: 9px 9px 0px 0px rgba(0, 0, 0, 0.12);
}
@keyframes card-in {
  to { opacity: 1; transform: translateY(0); }
}

/* Faint watermark index number */
.card-index {
  font-family: 'Montserrat', sans-serif;
  font-weight: 800;
  font-size: 96px;
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1px rgba(0, 0, 0, 0.06);
  position: absolute;
  bottom: -12px;
  right: 8px;
  pointer-events: none;
  user-select: none;
}

/* Filter pills */
.filter-pill.active {
  background-color: #000000;
  color: #ffffff;
  border-color: #000000;
}

/* Filter bar horizontal scroll */
.filter-scroll {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: 2px;
}
.filter-scroll::-webkit-scrollbar { display: none; }

/* Wide screen grid fallback */
@media (min-width: 1440px) {
  #category-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}


/* ═══════════════════════════════════════════════════════════════════
   FABRIC IMAGE ZOOM
   ═══════════════════════════════════════════════════════════════════ */
.fabric-image-zoom {
  transition: transform 0.5s ease;
}
.fabric-image-zoom:hover {
  transform: scale(1.1);
}


/* ═══════════════════════════════════════════════════════════════════
   MOBILE BOTTOM CTA BAR
   ═══════════════════════════════════════════════════════════════════ */
.mobile-bottom-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 30;
  transform: translateY(100%);
  transition: transform 0.4s cubic-bezier(0.32, 0.72, 0, 1) 0.6s;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
.mobile-bottom-bar.bar-visible {
  transform: translateY(0);
}

/* WhatsApp float: clear mobile bottom bar */
@media (max-width: 1023px) {
  .fixed.bottom-8.right-8[aria-label="Contact on WhatsApp"] {
    bottom: calc(72px + 1rem + env(safe-area-inset-bottom, 0px));
  }
}


/* ═══════════════════════════════════════════════════════════════════
   SPECS TABLE
   ═══════════════════════════════════════════════════════════════════ */
#specs-zone {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
#specs-zone table {
  min-width: 480px;
}


/* ═══════════════════════════════════════════════════════════════════
   CONTENT ZONES (engine-injected sections)
   ═══════════════════════════════════════════════════════════════════ */
#gallery-zone,
#attributes-zone,
#standout-zone,
#certifications-zone,
#colors-zone,
#faq-zone,
#rfq-zone,
#moq-bar-zone,
#breadcrumb-zone,
#page-hero-zone {
  min-width: 0;
  overflow-x: hidden;
}
#gallery-zone img {
  max-width: 100%;
  height: auto;
  display: block;
}


/* ═══════════════════════════════════════════════════════════════════
   PRODUCTS LAYOUT
   ═══════════════════════════════════════════════════════════════════ */
.products-layout-root {
  position: relative;
  /* NOTE: overflow-x must NOT be set here — it breaks sticky sidebar positioning */
}

@media (min-width: 1024px) {
  .products-canvas-offset {
    width: calc(100% - var(--sidebar-w, 320px));
    /* No overflow-x: hidden here — it breaks sticky sidebar */
  }
}
@media (max-width: 1023px) {
  .products-canvas-offset {
    width: 100%;
    margin-left: 0;
  }
}

.products-canvas {
  min-width: 0;
  overflow-x: hidden;
  box-sizing: border-box;
}

/* Mobile category select: sticky below header */
@media (max-width: 1023px) {
  #mobile-category-select-wrap {
    position: sticky;
    top: 88px;
    z-index: 15;
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
  }
}

/* Footer / WhatsApp containers */
#footer-container,
#whatsapp-container {
  width: 100%;
  margin-left: 0 !important;
  transform: none;
}


/* ═══════════════════════════════════════════════════════════════════
   IMAGE ERROR FALLBACK
   ═══════════════════════════════════════════════════════════════════ */
.image-error {
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #e4e2e2;
}
.image-error::after {
  content: 'Image unavailable';
  font-family: Inter, sans-serif;
  font-size: 12px;
  color: #7e7576;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Gallery placeholder fade */
.gallery-placeholder {
  transition: opacity 0.4s ease;
}


/* ═══════════════════════════════════════════════════════════════════
   RFQ FORM
   ═══════════════════════════════════════════════════════════════════ */
.rfq-field-error {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 500;
  color: #ba1a1a;
  margin-top: 4px;
}

input[aria-invalid="true"],
select[aria-invalid="true"],
textarea[aria-invalid="true"] {
  border-color: #ba1a1a !important;
  outline-color: #ba1a1a;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}
.animate-spin {
  animation: spin 0.8s linear infinite;
}

#rfq-form > div {
  animation: rfq-fade-in 0.4s ease forwards;
}
@keyframes rfq-fade-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}


/* ═══════════════════════════════════════════════════════════════════
   LIGHTBOX
   ═══════════════════════════════════════════════════════════════════ */
#lightbox-backdrop,
#lightbox-panel {
  transition: opacity 0.3s ease;
}

#lightbox-img {
  max-height: 70vh;
}
@media (min-width: 768px) {
  #lightbox-img {
    max-height: 80vh;
  }
}


/* ═══════════════════════════════════════════════════════════════════
   CTA BUTTON (uiverse)
   ═══════════════════════════════════════════════════════════════════ */
.cta {
  position: relative;
  margin: auto;
  padding: 12px 18px;
  transition: all 0.2s ease;
  border: none;
  background: none;
  cursor: pointer;
}
.cta:before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  display: block;
  border-radius: 50px;
  background: #ffffff;
  width: 45px;
  height: 45px;
  transition: all 0.3s ease;
}
.cta span {
  position: relative;
  font-family: "Ubuntu", sans-serif;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: #000000;
}
.cta svg {
  position: relative;
  top: 0;
  margin-left: 10px;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke: #ff6a00;
  stroke-width: 2;
  transform: translateX(-5px);
  transition: all 0.3s ease;
}
.cta:hover:before {
  width: 100%;
  background: #00c3ff;
}
.cta:hover svg {
  transform: translateX(0);
}
.cta:active {
  transform: scale(0.95);
}


/* ═══════════════════════════════════════════════════════════════════
   SOCIAL ICONS CARD (uiverse)
   ═══════════════════════════════════════════════════════════════════ */
.card {
  width: 100%;
  height: 100%;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  gap: 20px;
}

.socialContainer {
  width: clamp(72px, 18vw, 120px);
  height: clamp(72px, 18vw, 120px);
  background-color: rgb(44, 44, 44);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: background-color 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.05);
}
.containerOne:hover  { background-color: #d62976; }
.containerTwo:hover  { background-color: #00acee; }
.containerThree:hover { background-color: #0072b1; }
.containerFour:hover  { background-color: #128C7E; }

.socialContainer:active {
  transform: scale(0.9);
  transition-duration: 0.3s;
}

.socialSvg {
  width: 34px;
}
.socialSvg path {
  fill: rgb(255, 255, 255);
}
.socialContainer:hover .socialSvg {
  animation: slide-in-top 0.3s both;
}

@keyframes slide-in-top {
  0%   { transform: translateY(-50px); opacity: 0; }
  100% { transform: translateY(0);     opacity: 1; }
}


/* ═══════════════════════════════════════════════════════════════════
   SCROLL REVEAL ANIMATIONS
   ═══════════════════════════════════════════════════════════════════ */
.reveal-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94), transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  will-change: opacity, transform;
}
.reveal-on-scroll.is-revealed {
  opacity: 1;
  transform: translateY(0);
}