/* =============================================================================
   Krishna Amit Textiles — Design System
   Industrial-luxury B2B aesthetic
   ============================================================================= */

:root {
  --navy: #142B3A;
  --navy-deep: #0E1F2A;
  --charcoal: #20272B;
  --ivory: #F7F5EF;
  --beige: #E8E1D5;
  --gold: #B79A68;
  --gold-dark: #9A7F52;
  --white: #FFFFFF;
  --muted: #5C666C;
  --border: rgba(20, 43, 58, 0.12);
  --shadow-soft: 0 18px 50px rgba(14, 31, 42, 0.08);
  --radius: 2px;
  --header-h: 84px;
  --container: 1180px;
  --font-display: "Playfair Display", Georgia, "Times New Roman", serif;
  --font-body: "Inter", "Segoe UI", sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --transition: 280ms var(--ease);
}

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--charcoal);
  background: var(--ivory);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; transition: color var(--transition); }
button, input, select, textarea { font: inherit; color: inherit; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.2;
  color: var(--navy);
  margin: 0 0 0.6em;
  letter-spacing: -0.01em;
}
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

.container {
  width: min(100% - 2.5rem, var(--container));
  margin-inline: auto;
}

.section {
  padding: clamp(3.5rem, 7vw, 6.5rem) 0;
}

.section--navy {
  background: var(--navy);
  color: var(--beige);
}
.section--navy h2,
.section--navy h3 { color: var(--white); }
.section--beige { background: var(--beige); }
.section--white { background: var(--white); }

.eyebrow {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold-dark);
  margin-bottom: 0.85rem;
}

.lead {
  font-size: clamp(1.05rem, 1.4vw, 1.2rem);
  color: var(--muted);
  max-width: 40rem;
}

.section-head {
  max-width: 40rem;
  margin-bottom: clamp(2rem, 4vw, 3rem);
}

.section-head h2 {
  font-size: clamp(1.85rem, 3.2vw, 2.75rem);
}

/* ----- Buttons ----- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 3rem;
  padding: 0.75rem 1.6rem;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background var(--transition), color var(--transition), border-color var(--transition), transform var(--transition);
}
.btn:hover { transform: translateY(-1px); }
.btn:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}
.btn--primary {
  background: var(--navy);
  color: var(--white);
}
.btn--primary:hover { background: var(--navy-deep); }
.btn--gold {
  background: var(--gold);
  color: var(--navy-deep);
}
.btn--gold:hover { background: var(--gold-dark); color: var(--white); }
.btn--outline {
  background: transparent;
  border-color: var(--navy);
  color: var(--navy);
}
.btn--outline:hover { background: var(--navy); color: var(--white); }
.btn--outline-light {
  background: transparent;
  border-color: rgba(255,255,255,0.55);
  color: var(--white);
}
.btn--outline-light:hover {
  background: var(--white);
  color: var(--navy);
  border-color: var(--white);
}
.btn--ghost {
  background: transparent;
  color: var(--navy);
  padding-inline: 0.25rem;
  min-height: auto;
  text-transform: none;
  letter-spacing: 0;
  font-weight: 500;
}
.btn--sm {
  min-height: 2.35rem;
  padding: 0.45rem 0.9rem;
  font-size: 0.75rem;
}
.btn-group { display: flex; flex-wrap: wrap; gap: 0.85rem; }

/* ----- Header / Nav ----- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(247, 245, 239, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: background var(--transition), box-shadow var(--transition);
}
.site-header.is-scrolled {
  background: rgba(247, 245, 239, 0.98);
  box-shadow: 0 8px 30px rgba(14, 31, 42, 0.06);
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--header-h);
  gap: 1.5rem;
}
.brand {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
}
.brand__name {
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 2vw, 1.45rem);
  font-weight: 600;
  color: var(--navy);
  letter-spacing: 0.02em;
  line-height: 1.15;
}
.brand__tag {
  font-size: 0.65rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-dark);
  font-weight: 600;
}
.nav {
  display: flex;
  align-items: center;
  gap: 1.55rem;
}
.nav a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--charcoal);
  position: relative;
}
.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -0.35rem;
  width: 100%;
  height: 1px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition);
}
.nav a:hover,
.nav a.is-active { color: var(--navy); }
.nav a:hover::after,
.nav a.is-active::after { transform: scaleX(1); }
.nav a.btn {
  color: var(--navy-deep);
  text-transform: uppercase;
}
.nav a.btn::after { display: none !important; }
.nav a.btn--primary {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--navy-deep);
}
.nav a.btn--primary:hover,
.nav a.btn--primary:focus-visible {
  background: var(--gold-dark);
  border-color: var(--gold-dark);
  color: var(--white);
  transform: translateY(-1px);
}
.nav__cta { margin-left: 0.35rem; }

.nav-toggle {
  display: none;
  width: 2.75rem;
  height: 2.75rem;
  border: 1px solid var(--border);
  background: transparent;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}
.nav-toggle span {
  display: block;
  width: 1.2rem;
  height: 1.5px;
  background: var(--navy);
  transition: transform var(--transition), opacity var(--transition);
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* ----- Hero ----- */
.hero {
  position: relative;
  min-height: min(88vh, 780px);
  display: grid;
  align-items: end;
  color: var(--white);
  overflow: hidden;
  background: var(--navy-deep);
}
.hero__media {
  position: absolute;
  inset: 0;
}
.hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
  animation: heroZoom 18s var(--ease) forwards;
}
.hero__overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(14, 31, 42, 0.88) 0%, rgba(14, 31, 42, 0.55) 48%, rgba(14, 31, 42, 0.28) 100%),
    linear-gradient(0deg, rgba(14, 31, 42, 0.72) 0%, transparent 45%);
}
.hero__content {
  position: relative;
  z-index: 2;
  padding: clamp(4rem, 10vw, 7rem) 0 clamp(3.5rem, 7vw, 5.5rem);
  max-width: 38rem;
}
.hero__content .eyebrow { color: var(--gold); }
.hero h1 {
  color: var(--white);
  font-size: clamp(2.4rem, 5.5vw, 4.1rem);
  margin-bottom: 1rem;
  opacity: 0;
  animation: fadeUp 900ms var(--ease) 150ms forwards;
}
.hero__text {
  color: rgba(247, 245, 239, 0.88);
  font-size: clamp(1rem, 1.5vw, 1.15rem);
  margin-bottom: 1.75rem;
  opacity: 0;
  animation: fadeUp 900ms var(--ease) 320ms forwards;
}
.hero .btn-group {
  opacity: 0;
  animation: fadeUp 900ms var(--ease) 480ms forwards;
}
.hero-note {
  margin-top: 1.25rem;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  color: rgba(232, 225, 213, 0.65);
}

@keyframes heroZoom {
  from { transform: scale(1.08); }
  to { transform: scale(1); }
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ----- Grids / Cards (interaction containers only) ----- */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: center;
}
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
}
.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.25rem;
}

.category-tile {
  position: relative;
  display: block;
  min-height: 280px;
  overflow: hidden;
  background: var(--navy);
  color: var(--white);
}
.category-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  inset: 0;
  transition: transform 700ms var(--ease);
}
.category-tile:hover img { transform: scale(1.05); }
.category-tile__body {
  position: absolute;
  inset: auto 0 0 0;
  padding: 1.5rem;
  background: linear-gradient(0deg, rgba(14,31,42,0.9), transparent);
}
.category-tile h3 {
  color: var(--white);
  font-size: 1.35rem;
  margin: 0 0 0.35rem;
}
.category-tile p {
  color: rgba(247,245,239,0.8);
  font-size: 0.9rem;
  margin: 0;
}

.feature-block {
  padding: 1.75rem 0;
  border-top: 1px solid var(--border);
}
.feature-block h3 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}
.feature-block p { color: var(--muted); }

.product-card {
  display: flex;
  flex-direction: column;
  background: var(--white);
  border: 1px solid var(--border);
  height: 100%;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.product-card:hover {
  border-color: rgba(183, 154, 104, 0.55);
  box-shadow: var(--shadow-soft);
}
.product-card__media {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--beige);
}
.product-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 600ms var(--ease);
}
.product-card:hover .product-card__media img { transform: scale(1.04); }
.product-card__body {
  padding: 1.25rem 1.25rem 1.4rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  flex: 1;
}
.product-card__sku {
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold-dark);
  font-weight: 600;
}
.product-card h3 {
  font-size: 1.2rem;
  margin: 0;
}
.product-card p {
  color: var(--muted);
  font-size: 0.92rem;
  flex: 1;
}
.product-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 0.5rem;
}

.media-frame {
  position: relative;
  overflow: hidden;
  background: var(--beige);
  min-height: 320px;
}
.media-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  min-height: 320px;
}
.media-caption {
  margin-top: 0.65rem;
  font-size: 0.78rem;
  color: var(--muted);
  font-style: italic;
}

.stat-free-list {
  display: grid;
  gap: 1rem;
}
.stat-free-list li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.9rem;
  align-items: start;
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
}
.stat-free-list .icon-wrap {
  width: 2.4rem;
  height: 2.4rem;
  display: grid;
  place-items: center;
  background: var(--beige);
  color: var(--navy);
}
.stat-free-list h4 {
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 0.25rem;
  color: var(--navy);
}
.stat-free-list p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

/* ----- Forms ----- */
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.1rem 1.25rem;
}
.form-group { display: flex; flex-direction: column; gap: 0.4rem; }
.form-group--full { grid-column: 1 / -1; }
.form-group label {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--navy);
}
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.85rem 0.95rem;
  border: 1px solid var(--border);
  background: var(--white);
  border-radius: var(--radius);
  transition: border-color var(--transition), box-shadow var(--transition);
}
.form-group textarea { min-height: 140px; resize: vertical; }
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(183, 154, 104, 0.18);
}
.hp-field {
  position: absolute !important;
  left: -9999px !important;
  opacity: 0 !important;
  height: 0 !important;
  width: 0 !important;
  overflow: hidden !important;
}
.alert {
  padding: 0.95rem 1.1rem;
  margin-bottom: 1.25rem;
  border-left: 3px solid;
  background: var(--white);
}
.alert--success { border-color: #3d7a5a; color: #234836; }
.alert--error { border-color: #a14a4a; color: #6b2c2c; }
.alert--info { border-color: var(--gold); color: var(--navy); }

/* ----- Breadcrumbs ----- */
.breadcrumbs {
  padding: 1.15rem 0 0;
  font-size: 0.85rem;
  color: var(--muted);
}
.breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
}
.breadcrumbs li:not(:last-child)::after {
  content: "/";
  margin-left: 0.45rem;
  color: rgba(92, 102, 108, 0.55);
}
.breadcrumbs a:hover { color: var(--navy); }

.page-hero {
  padding: clamp(2.5rem, 6vw, 4rem) 0 clamp(2rem, 4vw, 3rem);
  background:
    linear-gradient(180deg, var(--beige) 0%, var(--ivory) 100%);
  border-bottom: 1px solid var(--border);
}
.page-hero h1 {
  font-size: clamp(2rem, 4vw, 3.1rem);
  max-width: 16ch;
}
.page-hero .lead { margin-top: 0.75rem; }

/* ----- Product detail ----- */
.product-detail {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(1.75rem, 4vw, 3rem);
}
.gallery-main {
  background: var(--beige);
  aspect-ratio: 1 / 1;
  overflow: hidden;
}
.gallery-main img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.gallery-thumbs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.65rem;
  margin-top: 0.75rem;
}
.gallery-thumbs button {
  border: 1px solid transparent;
  padding: 0;
  background: var(--beige);
  cursor: pointer;
  aspect-ratio: 1;
  overflow: hidden;
}
.gallery-thumbs button.is-active,
.gallery-thumbs button:hover { border-color: var(--gold); }
.gallery-thumbs img { width: 100%; height: 100%; object-fit: cover; }
.spec-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.25rem 0 1.5rem;
}
.spec-table th,
.spec-table td {
  text-align: left;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
.spec-table th {
  width: 38%;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
}

/* ----- Filters ----- */
.catalogue-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  align-items: end;
  margin-bottom: 2rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border);
}
.catalogue-toolbar .form-group { min-width: 180px; flex: 1; }
.catalogue-toolbar .form-group input,
.catalogue-toolbar .form-group select { min-height: 2.85rem; }

.empty-state {
  padding: 3rem 1.5rem;
  text-align: center;
  background: var(--white);
  border: 1px dashed var(--border);
}
.empty-state h3 { margin-bottom: 0.5rem; }
.empty-state p { color: var(--muted); max-width: 32rem; margin-inline: auto; }

/* ----- Contact / Map ----- */
.contact-layout {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: clamp(1.5rem, 4vw, 3rem);
}
.contact-meta dt {
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold-dark);
  font-weight: 600;
  margin-top: 1.15rem;
}
.contact-meta dd { margin: 0.35rem 0 0; color: var(--charcoal); }
.map-embed {
  margin-top: 1.5rem;
  min-height: 260px;
  background: var(--beige);
  border: 1px solid var(--border);
}
.map-embed iframe { width: 100%; height: 280px; border: 0; display: block; }

/* ----- Footer ----- */
.site-footer {
  background: var(--navy-deep);
  color: rgba(247, 245, 239, 0.78);
  padding: clamp(3rem, 6vw, 4.5rem) 0 1.5rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2.5rem;
}
.site-footer h3,
.site-footer .brand__name { color: var(--white); margin-bottom: 0.85rem; }
.site-footer a:hover { color: var(--gold); }
.footer-links { display: grid; gap: 0.55rem; }
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255,255,255,0.1);
  font-size: 0.85rem;
}

/* ----- WhatsApp float ----- */
.whatsapp-float {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 1100;
  width: 3.4rem;
  height: 3.4rem;
  border-radius: 50%;
  background: #25D366;
  color: #fff;
  display: grid;
  place-items: center;
  box-shadow: 0 12px 30px rgba(0,0,0,0.18);
  transition: transform var(--transition);
}
.whatsapp-float:hover { transform: translateY(-3px) scale(1.04); color: #fff; }
.whatsapp-float[aria-disabled="true"],
.whatsapp-float.is-disabled {
  opacity: 0.45;
  pointer-events: none;
}

/* ----- Reveal on scroll ----- */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 700ms var(--ease), transform 700ms var(--ease);
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* ----- Content prose ----- */
.prose { max-width: 46rem; }
.prose h2, .prose h3 { margin-top: 1.75rem; }
.prose ul, .prose ol { margin: 0 0 1em 1.2rem; list-style: disc; }
.prose ol { list-style: decimal; }
.prose li { margin-bottom: 0.4rem; }
.prose a { color: var(--gold-dark); text-decoration: underline; text-underline-offset: 3px; }

.pending-note {
  display: inline-block;
  margin-top: 0.75rem;
  padding: 0.35rem 0.65rem;
  background: rgba(183, 154, 104, 0.15);
  color: var(--navy);
  font-size: 0.78rem;
  font-weight: 600;
}

/* ----- Responsive ----- */
@media (max-width: 980px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .product-detail,
  .contact-layout,
  .grid-2 { grid-template-columns: 1fr; }
}

@media (max-width: 820px) {
  .nav-toggle { display: inline-flex; }
  .nav {
    position: fixed;
    inset: var(--header-h) 0 auto 0;
    background: var(--ivory);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    align-items: stretch;
    padding: 1rem 1.25rem 1.35rem;
    gap: 0.15rem;
    transform: translateY(-120%);
    opacity: 0;
    pointer-events: none;
    transition: transform var(--transition), opacity var(--transition);
  }
  .nav.is-open {
    transform: none;
    opacity: 1;
    pointer-events: auto;
  }
  .nav a {
    padding: 0.85rem 0.25rem;
    border-bottom: 1px solid var(--border);
  }
  .nav a::after { display: none; }
  .nav__cta { margin: 0.75rem 0 0; width: 100%; }
  .nav a.btn--primary {
    background: var(--gold);
    color: var(--navy-deep);
    justify-content: center;
  }
}


@media (max-width: 640px) {
  .container { width: min(100% - 1.5rem, var(--container)); }
  .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .hero { min-height: 78vh; }
  .btn-group { width: 100%; }
  .btn-group .btn { flex: 1; }
}
