/* AI HARD WORK TEXTILES — Dark Blue / White / Gray / Gold */
:root {
  --navy: #0d1b2a;
  --navy-mid: #1b263b;
  --navy-light: #415a77;
  --white: #ffffff;
  --gray-100: #f4f5f7;
  --gray-200: #e8eaed;
  --gray-400: #9aa0a6;
  --gold: #c9a227;
  --gold-hover: #ddb83a;
  --text: #1a1a2e;
  --shadow: 0 4px 24px rgba(13, 27, 42, 0.12);
  --radius: 8px;
  --header-h: 64px;
  --font: "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--white);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--navy-mid);
  text-decoration: none;
}

a:hover {
  color: var(--gold);
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--navy);
  box-shadow: var(--shadow);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--header-h);
  gap: 1rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--white);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.02em;
}

.logo-mark {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--gold), #8b6914);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  font-weight: 800;
  color: var(--navy);
}

.nav-toggle {
  display: flex;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  padding: 8px;
  cursor: pointer;
}

.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--white);
  transition: transform 0.2s;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.main-nav {
  display: none;
  position: absolute;
  top: var(--header-h);
  left: 0;
  right: 0;
  background: var(--navy-mid);
  padding: 1rem;
  flex-direction: column;
  gap: 0.25rem;
}

.main-nav.is-open {
  display: flex;
}

.main-nav a {
  color: var(--white);
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
}

.main-nav a:hover,
.main-nav a.active {
  background: rgba(201, 162, 39, 0.2);
  color: var(--gold);
}

.cart-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--white);
  padding: 0.5rem;
}

.cart-badge {
  background: var(--gold);
  color: var(--navy);
  font-size: 0.7rem;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

@media (min-width: 900px) {
  .nav-toggle {
    display: none;
  }

  .main-nav {
    display: flex;
    position: static;
    flex-direction: row;
    background: transparent;
    padding: 0;
    align-items: center;
  }

  .header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
  }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--radius);
  border: 2px solid transparent;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
  text-align: center;
  font-family: inherit;
}

.btn-primary {
  background: var(--gold);
  color: var(--navy);
  border-color: var(--gold);
}

.btn-primary:hover {
  background: var(--gold-hover);
  border-color: var(--gold-hover);
  color: var(--navy);
}

.btn-outline {
  background: transparent;
  color: var(--white);
  border-color: var(--white);
}

.btn-outline:hover {
  background: var(--white);
  color: var(--navy);
}

.btn-navy {
  background: var(--navy);
  color: var(--white);
  border-color: var(--navy);
}

.btn-navy:hover {
  background: var(--navy-mid);
}

.btn-secondary {
  background: var(--gray-100);
  color: var(--navy);
  border-color: var(--gray-200);
}

.btn-secondary:hover {
  border-color: var(--gold);
  color: var(--navy);
}

/* Hero */
.hero {
  position: relative;
  min-height: 420px;
  display: flex;
  align-items: center;
  background: var(--navy) center/cover no-repeat;
  color: var(--white);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    rgba(13, 27, 42, 0.92) 0%,
    rgba(27, 38, 59, 0.75) 50%,
    rgba(13, 27, 42, 0.5) 100%
  );
}

.hero .container {
  position: relative;
  z-index: 1;
  padding-top: 3rem;
  padding-bottom: 3rem;
}

.hero h1 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.75rem, 5vw, 2.75rem);
  line-height: 1.2;
  font-weight: 700;
}

.hero .subhead {
  margin: 0 0 1.75rem;
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  color: var(--gray-200);
  max-width: 540px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.hero--home {
  background-image: url("../images/hero-textile.svg"),
    linear-gradient(135deg, #2d4a6f 0%, #1b263b 40%, #0d1b2a 100%);
}

.hero--page {
  min-height: 220px;
}

.hero--page h1 {
  font-size: clamp(1.5rem, 4vw, 2.25rem);
}

/* Sections */
.section {
  padding: 3.5rem 0;
}

.section-alt {
  background: var(--gray-100);
}

.section-title {
  text-align: center;
  margin: 0 0 0.5rem;
  font-size: clamp(1.5rem, 3vw, 2rem);
  color: var(--navy);
}

.section-lead {
  text-align: center;
  margin: 0 auto 2.5rem;
  max-width: 640px;
  color: var(--navy-light);
}

/* Cards grid */
.grid {
  display: grid;
  gap: 1.5rem;
}

.grid-2 {
  grid-template-columns: 1fr;
}

.grid-3 {
  grid-template-columns: 1fr;
}

.grid-4 {
  grid-template-columns: repeat(2, 1fr);
}

@media (min-width: 600px) {
  .grid-2 {
    grid-template-columns: repeat(2, 1fr);
  }

  .grid-3 {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 900px) {
  .grid-4 {
    grid-template-columns: repeat(4, 1fr);
  }
}

.card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 32px rgba(13, 27, 42, 0.18);
}

.card-img {
  aspect-ratio: 4/3;
  background: var(--gray-200) center/cover no-repeat;
  background-color: var(--navy-light);
}

.card-body {
  padding: 1.25rem;
}

.card-body h3 {
  margin: 0 0 0.5rem;
  font-size: 1.1rem;
  color: var(--navy);
}

.card-body p {
  margin: 0 0 1rem;
  font-size: 0.9rem;
  color: var(--navy-light);
}

/* Stats */
.stats {
  background: var(--navy);
  color: var(--white);
  padding: 2.5rem 0;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  text-align: center;
}

@media (min-width: 768px) {
  .stats-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.stat-item strong {
  display: block;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  color: var(--gold);
  line-height: 1.2;
}

.stat-item span {
  font-size: 0.85rem;
  color: var(--gray-200);
}

/* Why choose */
.feature-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.feature-list li {
  padding: 1rem 0 1rem 2.5rem;
  position: relative;
  border-bottom: 1px solid var(--gray-200);
}

.feature-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--gold);
  font-weight: 700;
}

/* Forms */
.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.35rem;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--navy);
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 1rem;
  background: var(--white);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: 2px solid var(--gold);
  outline-offset: 0;
  border-color: var(--gold);
}

.form-row {
  display: grid;
  gap: 1rem;
}

@media (min-width: 600px) {
  .form-row-2 {
    grid-template-columns: 1fr 1fr;
  }
}

/* Product detail */
.product-layout {
  display: grid;
  gap: 2rem;
  padding: 2rem 0 3rem;
}

@media (min-width: 768px) {
  .product-layout {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }
}

.product-gallery {
  aspect-ratio: 1;
  border-radius: var(--radius);
  background: var(--gray-200) center/cover no-repeat;
  box-shadow: var(--shadow);
}

.product-gallery-img {
  width: 100%;
  max-height: 420px;
  object-fit: cover;
  display: block;
}

.card-img-real {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  display: block;
  background: var(--gray-200);
}

.card-img-url {
  margin: 0.5rem 0 0;
  font-size: 0.75rem;
}

.card-img-url a {
  color: var(--gold);
  word-break: break-all;
}

.card-cat {
  font-size: 0.8rem;
  color: var(--gold);
  margin: 0 0 0.25rem;
}

.cart-quick-add {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  margin-bottom: 1rem;
}

.cart-quick-add .btn {
  font-size: 0.8rem;
  padding: 0.5rem 0.75rem;
}

.product-info h1 {
  margin: 0 0 0.5rem;
  color: var(--navy);
}

.product-meta {
  color: var(--navy-light);
  margin-bottom: 1rem;
}

.product-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.qty-control {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 1rem 0;
}

.qty-control button {
  width: 36px;
  height: 36px;
  border: 1px solid var(--gray-200);
  background: var(--gray-100);
  border-radius: var(--radius);
  font-size: 1.25rem;
  cursor: pointer;
}

.qty-control input {
  width: 64px;
  text-align: center;
  padding: 0.5rem;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
}

/* Cart */
.cart-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.cart-table th,
.cart-table td {
  padding: 0.75rem;
  text-align: left;
  border-bottom: 1px solid var(--gray-200);
}

.cart-table th {
  background: var(--gray-100);
  color: var(--navy);
}

.cart-empty {
  text-align: center;
  padding: 3rem;
  color: var(--navy-light);
}

.card-actions {
  padding: 0 1.25rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.cart-product-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.cart-product-card {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 1rem;
  align-items: start;
  padding: 1rem;
}

.cart-product-thumb {
  width: 100px;
  height: 100px;
  border-radius: var(--radius);
  background: var(--gray-200) center/cover no-repeat;
}

.cart-product-img {
  width: 100px;
  height: 100px;
  object-fit: cover;
  border-radius: var(--radius);
  background: var(--gray-200);
  display: block;
}

.cart-product-img.img-error {
  object-fit: none;
  background: linear-gradient(160deg, #778da9, #415a77);
  min-height: 100px;
}

.cart-product-url {
  margin: 0.35rem 0;
  font-size: 0.75rem;
  line-height: 1.4;
  word-break: break-all;
  color: var(--navy-light);
}

.cart-product-url span {
  font-weight: 600;
  color: var(--navy);
}

.cart-product-url a {
  color: var(--gold);
}

.cart-product-id {
  margin: 0;
  font-size: 0.8rem;
  color: var(--navy-light);
}

.cart-product-info h3 {
  margin: 0 0 0.35rem;
  font-size: 1.05rem;
  color: var(--navy);
}

.cart-product-cat {
  margin: 0;
  font-size: 0.8rem;
  color: var(--gold);
}

.cart-product-qty {
  margin: 0.5rem 0;
  font-size: 0.9rem;
}

.cart-product-qty input {
  width: 88px;
  padding: 0.35rem 0.5rem;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  margin-left: 0.35rem;
}

.cart-product-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

@media (min-width: 600px) {
  .cart-product-card {
    grid-template-columns: 140px 1fr;
  }

  .cart-product-thumb,
  .cart-product-img {
    width: 140px;
    height: 140px;
  }
}

.cart-summary {
  background: var(--gray-100);
  padding: 1.5rem;
  border-radius: var(--radius);
  margin-top: 1.5rem;
}

/* Contact map */
.map-wrap {
  border-radius: var(--radius);
  overflow: hidden;
  min-height: 280px;
  background: var(--gray-200);
}

.map-wrap iframe {
  width: 100%;
  height: 280px;
  border: 0;
}

.contact-block {
  padding: 1rem 0;
}

.contact-block a {
  color: var(--gold);
  font-weight: 600;
}

/* Footer */
.site-footer {
  background: var(--navy);
  color: var(--gray-200);
  padding: 3rem 0 1.5rem;
  margin-top: auto;
}

.footer-grid {
  display: grid;
  gap: 2rem;
  margin-bottom: 2rem;
}

@media (min-width: 768px) {
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 900px) {
  .footer-grid {
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
  }
}

.footer-grid h4 {
  color: var(--gold);
  margin: 0 0 1rem;
  font-size: 1rem;
}

.footer-grid ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-grid li {
  margin-bottom: 0.5rem;
}

.footer-grid a {
  color: var(--gray-200);
}

.footer-grid a:hover {
  color: var(--gold);
}

.social-links {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.social-links a {
  width: 40px;
  height: 40px;
  border: 1px solid var(--navy-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
}

.footer-bottom {
  border-top: 1px solid var(--navy-mid);
  padding-top: 1.5rem;
  text-align: center;
  font-size: 0.85rem;
}

/* CTA band */
.cta-band {
  background: linear-gradient(135deg, var(--navy-mid), var(--navy));
  color: var(--white);
  text-align: center;
  padding: 3rem 1.25rem;
}

.cta-band h2 {
  margin: 0 0 0.75rem;
}

.cta-band p {
  margin: 0 0 1.5rem;
  opacity: 0.9;
}

/* Toast / alerts */
.toast {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--navy);
  color: var(--white);
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius);
  border-left: 4px solid var(--gold);
  z-index: 2000;
  opacity: 0;
  transition: transform 0.3s, opacity 0.3s;
  max-width: 90%;
}

.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

.alert {
  padding: 1rem;
  border-radius: var(--radius);
  margin-bottom: 1rem;
}

.alert-success {
  background: #e8f5e9;
  color: #1b5e20;
  border: 1px solid #a5d6a7;
}

.alert-info {
  background: #e3f2fd;
  color: #0d47a1;
}

/* Breadcrumb */
.breadcrumb {
  font-size: 0.85rem;
  padding: 1rem 0;
  color: var(--navy-light);
}

.breadcrumb a {
  color: var(--navy-light);
}

/* Service / about blocks */
.content-block {
  max-width: 800px;
}

.content-block h2 {
  color: var(--navy);
  margin-top: 2rem;
}

.icon-card {
  text-align: center;
  padding: 1.5rem;
}

.icon-card .icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 1rem;
  background: var(--gold);
  color: var(--navy);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

/* Utility */
.text-center {
  text-align: center;
}

.mt-2 {
  margin-top: 2rem;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.page-wrap {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
}

/* Print / reduced motion */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .card:hover {
    transform: none;
  }
}
