/* =========================================================
   The Stitchery Co — interior pages
   Loaded after style.css so the homepage tokens and components
   stay untouched while interior pages reuse the same system.
   ========================================================= */

/* ---------- Interior page hero ---------- */
.page-hero { padding-top: 8px; }
.breadcrumbs { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem; padding: 12px 0 16px; font-size: .8rem; color: var(--muted); }
.breadcrumbs a { color: var(--text); }
.breadcrumbs a:hover { color: var(--ink); text-decoration: underline; }
.breadcrumbs i { font-size: .6rem; opacity: .55; }
.page-hero-card {
  display: grid; grid-template-columns: 1.05fr .95fr; min-height: 400px;
  border-radius: var(--radius); overflow: hidden; background: var(--surface);
}
.page-hero-content { padding: clamp(24px, 4vw, 56px); display: flex; flex-direction: column; justify-content: center; }
.page-hero h1 {
  font-family: var(--font-heading); font-size: clamp(2.1rem, 4vw, 3.35rem); font-weight: var(--heading-weight);
  line-height: 1.06; letter-spacing: -.02em; color: var(--ink); margin: 0 0 16px; max-width: 19ch;
}
.page-hero-intro { font-size: clamp(1rem, 1.2vw, 1.12rem); line-height: 1.55; color: var(--text); max-width: 58ch; margin-bottom: 24px; }
.page-hero-media { position: relative; min-height: 360px; background: var(--paper); display: grid; place-items: center; padding: clamp(16px, 3vw, 38px); }
.page-hero-media.contain img { width: 100%; height: 100%; max-height: 440px; object-fit: contain; mix-blend-mode: multiply; }
.page-hero-media.cover { background: var(--dark); padding: 0; }
.page-hero-media.cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.page-hero-media.cover::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(12,12,12,.28), rgba(12,12,12,0) 55%); }
.hero-note { font-size: .85rem; color: var(--muted); margin: 12px 0 0; }

/* ---------- Fact strip ---------- */
.fact-section { padding-top: var(--space-block); }
.fact-strip { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); margin: 0; }
.fact-strip > div { padding: 18px 20px 0; border-left: 1px solid var(--line); }
.fact-strip > div:first-child { border-left: 0; padding-left: 0; }
.fact-strip dt { font-family: var(--font-heading); font-size: clamp(1.6rem, 2.6vw, 2.2rem); font-weight: var(--heading-weight); line-height: 1; letter-spacing: -.02em; color: var(--ink); }
.fact-strip dd { font-size: .82rem; color: var(--muted); margin: .4rem 0 0; }

/* ---------- Section links and tile links ---------- */
.section-link { margin-top: var(--space-block); text-align: center; }
.tile-link { margin-top: auto; padding-top: 18px; display: inline-flex; align-items: center; gap: .35rem; font-size: .9rem; font-weight: 600; color: var(--ink); }
.tile-link i { transition: transform .25s var(--ease); }
.tile-link:hover { color: var(--ink); }
.tile-link:hover i { transform: translateX(3px); }

/* ---------- Product category media ---------- */
.category-media {
  border-radius: var(--radius); overflow: hidden; background: var(--paper);
  aspect-ratio: 16 / 10; margin-bottom: 18px; position: relative;
}
.category-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .9s var(--ease); }
.tile:hover .category-media img { transform: scale(1.035); }
.category-media.contain { display: grid; place-items: center; padding: clamp(12px, 2vw, 28px); }
.category-media.contain img { object-fit: contain; mix-blend-mode: multiply; }

/* ---------- Form honeypot ---------- */
.form-honey { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; pointer-events: none; }

/* ---------- Content blocks ---------- */
.split-media { border-radius: var(--radius); overflow: hidden; background: var(--paper); aspect-ratio: 4 / 3; }
.split-media img { width: 100%; height: 100%; object-fit: cover; }
.split-media.contain img { object-fit: contain; mix-blend-mode: multiply; padding: clamp(16px, 3vw, 32px); }
.split-copy .h-section { margin-bottom: 16px; }
.split-copy p:last-child { margin-bottom: 0; }

.detail-card { background: var(--surface); border-radius: var(--radius); padding: var(--space-card); height: 100%; }
.detail-card .label { margin-bottom: 6px; }
.detail-card h3 { font-size: 1.15rem; font-weight: 500; color: var(--ink); margin-bottom: 6px; }
.detail-card p { margin: 0; font-size: .94rem; }
.detail-card.dark { background: var(--dark); color: rgba(255,255,255,.75); }
.detail-card.dark h3 { color: #fff; }
.detail-card.dark .label { color: rgba(255,255,255,.55); }

.check-list { list-style: none; padding: 0; margin: 0; }
.check-list li { position: relative; padding: .48rem 0 .48rem 1.75rem; border-bottom: 1px solid var(--line); font-size: .95rem; }
.check-list li:last-child { border-bottom: 0; }
.check-list li::before { content: "\F26E"; font-family: "bootstrap-icons"; position: absolute; left: 0; top: .45rem; color: var(--ink); font-size: .9rem; }

.spec-table { width: 100%; border-collapse: collapse; font-size: .93rem; }
.spec-table th, .spec-table td { padding: .8rem .75rem; border-bottom: 1px solid var(--line); vertical-align: top; text-align: left; }
.spec-table th { font-weight: 600; color: var(--ink); width: 34%; background: var(--surface); }
.spec-table tr:last-child th, .spec-table tr:last-child td { border-bottom: 0; }
.spec-table-wrap { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: #fff; }

.number-list { list-style: none; padding: 0; margin: 0; counter-reset: n; }
.number-list li { counter-increment: n; position: relative; padding: 0 0 22px 52px; }
.number-list li::before { content: counter(n, decimal-leading-zero); position: absolute; left: 0; top: 0; font-family: var(--font-heading); font-size: 1.5rem; font-weight: 600; color: #c9c9c9; letter-spacing: -.03em; }
.number-list h3 { font-size: 1.08rem; font-weight: 500; color: var(--ink); margin: 0 0 4px; }
.number-list p { margin: 0; font-size: .94rem; }

.mini-facts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.mini-facts > div { background: #fff; border-radius: var(--radius-sm); padding: .85rem 1rem; }
.mini-facts strong { display: block; font-family: var(--font-heading); font-size: 1.35rem; font-weight: 600; line-height: 1; color: var(--ink); }
.mini-facts span { font-size: .78rem; color: var(--muted); }

.band { background: var(--surface); border-radius: var(--radius); padding: clamp(22px, 4vw, 48px); }
.band .h-section { max-width: 22ch; }
.band p:last-child { margin-bottom: 0; }

/* ---------- Gallery ---------- */
.gallery-toolbar { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 24px; }
.gallery-filter { border: 0; background: var(--surface-2); color: #1a1a1a; border-radius: var(--radius-btn); padding: .45rem .85rem; font-size: .88rem; font-weight: 600; }
.gallery-filter:hover { background: #e2e6ec; }
.gallery-filter.active { background: var(--ink-2); color: #fff; }
.gallery-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.gallery-item { background: var(--paper); border: 0; border-radius: var(--radius); overflow: hidden; text-align: left; padding: 0; display: flex; flex-direction: column; font-family: var(--font); cursor: pointer; }
.gallery-item .gallery-media { aspect-ratio: 1; display: grid; place-items: center; padding: 14px; overflow: hidden; background: var(--paper); }
.gallery-item img { max-width: 100%; max-height: 100%; object-fit: contain; mix-blend-mode: multiply; transition: transform .7s var(--ease); }
.gallery-item:hover img { transform: scale(1.05); }
.gallery-item > span:last-child { display: block; width: 100%; padding: .55rem .75rem .7rem; background: #fff; font-size: .84rem; font-weight: 600; color: var(--ink); }
.gallery-item[hidden] { display: none; }
.gallery-modal .modal-content { background: var(--dark); border: 0; border-radius: var(--radius); }
.gallery-modal .modal-body { display: grid; place-items: center; padding: 12px; min-height: 50vh; }
.gallery-modal img { max-width: 100%; max-height: 76vh; object-fit: contain; }
.gallery-modal .btn-close { position: absolute; top: 12px; right: 12px; z-index: 2; }
.gallery-modal-caption { color: rgba(255,255,255,.75); font-size: .86rem; text-align: center; padding: 0 12px 16px; margin: 0; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1.12fr .88fr; gap: 24px; align-items: start; }
.contact-card { background: var(--surface); border-radius: var(--radius); padding: clamp(22px, 3.5vw, 40px); }
.contact-form .form-control, .contact-form .form-select { background-color: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: .7rem .85rem; color: var(--ink); }
.contact-form .form-control:focus, .contact-form .form-select:focus { border-color: var(--ink); box-shadow: none; }
.contact-form .form-label { font-size: .85rem; font-weight: 500; color: var(--ink); margin-bottom: .35rem; }
.contact-details { list-style: none; padding: 0; margin: 0; }
.contact-details li { display: flex; gap: .8rem; padding: .8rem 0; border-bottom: 1px solid var(--line); }
.contact-details li:first-child { padding-top: 0; }
.contact-details li:last-child { border-bottom: 0; }
.contact-details i { color: var(--ink); font-size: 1.05rem; line-height: 1.4; }
.contact-details strong { display: block; color: var(--ink); font-size: .9rem; }
.contact-details span, .contact-details a { color: var(--text); font-size: .92rem; }
.contact-details a:hover { color: var(--ink); text-decoration: underline; }

/* ---------- Legal / prose ---------- */
.prose { max-width: 780px; }
.prose h2 { font-family: var(--font-heading); font-size: 1.6rem; font-weight: 600; color: var(--ink); margin: 2rem 0 .6rem; }
.prose h3 { font-family: var(--font-heading); font-size: 1.2rem; font-weight: 600; color: var(--ink); margin: 1.4rem 0 .4rem; }
.prose p, .prose li { font-size: .96rem; line-height: 1.7; }

/* ---------- Footer additions ---------- */
.footer-legal { display: flex; flex-wrap: wrap; gap: 1.25rem; align-items: center; padding-right: 64px; }
.footer-bottom .footer-legal a { margin-right: 0; color: var(--text); }
.footer-bottom .footer-legal a:hover { color: var(--ink); }
.footer-contact-col .footer-contact a { font-size: .9rem; overflow-wrap: anywhere; }

/* ---------- Responsive ---------- */
@media (max-width: 991.98px) {
  .page-hero-card { grid-template-columns: 1fr; min-height: 0; }
  .page-hero-media { min-height: 300px; order: 2; }
  .page-hero-media.contain img { max-height: 320px; }
  .page-hero-content { order: 1; }
  .fact-strip { grid-template-columns: repeat(2, 1fr); }
  .fact-strip > div:nth-child(3) { border-left: 0; padding-left: 0; }
  .fact-strip > div:nth-child(n+3) { border-top: 1px solid var(--line); margin-top: 16px; padding-top: 16px; }
  .gallery-grid { grid-template-columns: repeat(3, 1fr); }
  .contact-grid { grid-template-columns: 1fr; }
  .page-hero h1 { max-width: 22ch; }
}
@media (max-width: 767.98px) {
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 575.98px) {
  .fact-strip { grid-template-columns: 1fr 1fr; }
  .page-hero-content { padding: 22px; }
  .page-hero-media { min-height: 240px; }
  .page-hero h1 { font-size: 2rem; }
  .page-hero-intro { font-size: .98rem; }
  .gallery-grid { gap: 10px; }
  .gallery-item > span:last-child { font-size: .78rem; }
  .footer-bottom { gap: .75rem; }
  .footer-legal { gap: .75rem; padding-right: 0; }
}

/* ============================================================
   Product catalog
   ============================================================ */
.product-media {
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  background: var(--paper);
  border-radius: var(--radius);
  padding: clamp(18px, 4vw, 48px);
}
.product-media img { max-width: 100%; max-height: 100%; object-fit: contain; mix-blend-mode: multiply; }

.product-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.product-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: box-shadow .25s var(--ease), transform .25s var(--ease);
}
.product-card:hover { transform: translateY(-2px); box-shadow: 0 12px 30px rgba(12, 12, 12, .07); }
.product-card-media {
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  background: var(--paper);
  padding: 20px;
  overflow: hidden;
}
.product-card-media img { max-width: 100%; max-height: 100%; object-fit: contain; mix-blend-mode: multiply; transition: transform .6s var(--ease); }
.product-card:hover .product-card-media img { transform: scale(1.04); }
.product-card-body { display: flex; flex-direction: column; flex: 1; padding: 14px 16px 18px; }
.product-card-body .label { margin-bottom: 4px; }
.product-card h3 { font-family: var(--font-heading); font-size: 1.18rem; font-weight: 600; line-height: 1.15; letter-spacing: -.01em; margin: 0 0 4px; }
.product-card h3 a { color: var(--ink); }
.product-card-body p { font-size: .86rem; line-height: 1.45; color: var(--muted); margin: 0; }
.product-card .tile-link { margin-top: auto; padding-top: 12px; font-size: .84rem; }

.media-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.media-strip-item { margin: 0; background: var(--paper); border-radius: var(--radius); overflow: hidden; }
.media-strip-item img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; }
.media-strip-item figcaption { font-size: .8rem; color: var(--muted); padding: .6rem .8rem .7rem; background: #fff; }

@media (max-width: 1199.98px) {
  .product-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 991.98px) {
  .product-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 767.98px) {
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .product-card-body { padding: 12px 12px 14px; }
  .product-card h3 { font-size: 1.05rem; }
  .product-card-body p { font-size: .8rem; }
  .media-strip { grid-template-columns: 1fr; }
  .media-strip-item img { aspect-ratio: 16 / 10; }
}
@media (max-width: 575.98px) {
  .product-grid { grid-template-columns: repeat(2, 1fr); }
  .product-card-media { padding: 12px; }
  .product-card .tile-link { font-size: .8rem; }
}
