/* responsive.css — GRS Kumaşçılık */

/* ── Tablet (768 – 1279px) ── */
@media (max-width: 1279px) {

  .numbers-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .numbers-heading {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .number-item:nth-child(2) {
    border-right: none;
  }

  .number-item:nth-child(1),
  .number-item:nth-child(2) {
    border-bottom: 1px solid var(--border-subtle);
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-xl) var(--space-lg);
  }

  .editorial-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .masonry-grid {
    columns: 2;
  }

  /* Horizontal → Vertical for collections */
  #collections {
    height: auto;
  }

  .collections-track {
    flex-direction: column;
    padding-block: var(--space-xl);
  }

  .collection-card {
    width: 100%;
    height: 60vw;
    min-height: 300px;
    max-height: 480px;
  }

  .collection-group-card {
    height: clamp(420px, 58vw, 560px);
    max-height: none;
  }
}

/* ── Mobile (<768px) ── */
@media (max-width: 767px) {

  /* Nav */
  .nav-links {
    display: none;
  }

  .nav-hamburger {
    display: flex;
  }

  .mobile-menu {
    display: block;
  }

  /* Hero */
  #hero {
    align-items: flex-end;
    min-height: 760px;
  }

  .hero-content {
    max-width: 100%;
    padding-bottom: clamp(6.75rem, 13vh, 9rem);
  }

  .hero-eyebrow {
    max-width: 100%;
    gap: 0.65rem;
    font-size: 0.58rem;
    letter-spacing: 0.16em;
    white-space: normal;
  }

  .hero-eyebrow-mark {
    width: 36px;
  }

  .hero-title {
    font-size: clamp(3rem, 14vw, 4.6rem);
    line-height: 0.92;
  }

  .hero-sub {
    max-width: 30ch;
    font-size: 0.98rem;
  }

  .hero-tags {
    gap: 0.45rem;
    margin-top: 1.2rem;
  }

  .hero-tags li {
    padding: 0.46rem 0.72rem;
    font-size: 0.66rem;
  }

  .hero-cta {
    align-items: flex-start;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1.65rem;
  }

  .hero-cta-secondary {
    max-width: 100%;
    font-size: 0.78rem;
  }

  .hero-est {
    display: none;
  }

  /* Split screen → single column */
  .split-screen {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  #about-teaser .image-side {
    height: 55vw;
    min-height: 240px;
  }

  #about-teaser .text-side {
    padding: var(--space-xl) var(--container-pad);
  }

  /* Numbers */
  .numbers-grid {
    grid-template-columns: 1fr 1fr;
  }

  #numbers {
    min-height: auto;
  }

  #numbers .section-header.section-header-wide {
    grid-template-columns: 1fr;
  }

  .numbers-heading {
    grid-template-columns: 1fr;
    margin-bottom: var(--space-lg);
  }

  .numbers-heading h2 {
    max-width: 11ch;
  }

  .number-item {
    padding: var(--space-lg) var(--space-md);
    border-right: none;
    border-bottom: 1px solid var(--border-subtle);
  }

  #numbers .number-item {
    min-height: 220px;
  }

  .number-item:nth-child(odd) {
    border-right: 1px solid var(--border-subtle);
  }

  /* Editorial */
  .editorial-grid {
    grid-template-columns: 1fr;
  }

  /* Footer */
  .footer-grid {
    grid-template-columns: 1fr;
    gap: var(--space-xl);
  }

  .footer-bar {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }

  .footer-bar-links {
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
  }

  /* CTA buttons */
  .cta-buttons {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    max-width: 280px;
  }

  /* Masonry → single column */
  .masonry-grid {
    columns: 1;
  }

  /* Form */
  .form-grid-2 {
    grid-template-columns: 1fr;
  }

  /* Fair card */
  .fair-card {
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto;
  }

  .fair-card .btn {
    grid-column: 1 / -1;
  }

  /* Page hero */
  .page-hero {
    height: auto;
    min-height: 190px;
    padding-top: 72px !important;
  }

  .page-hero.large {
    height: auto;
    min-height: 260px;
  }

  .page-hero-content {
    padding-bottom: 2rem;
  }

  /* Timeline */
  .timeline {
    flex-direction: column;
  }

  .timeline-item {
    border-left: 1px solid var(--border-subtle);
    border-top: none;
  }

  /* Marquee — slow on mobile */
  .marquee-track {
    animation-duration: 50s;
  }

  /* Cursor hidden on touch */
  #cursor {
    display: none;
  }

  /* Cookie banner */
  #cookie-banner {
    left: 1rem;
    right: 1rem;
    bottom: 1rem;
    max-width: none;
  }

  /* Scroll indicator */
  .scroll-indicator {
    display: none;
  }

  /* Nav cta */
  .nav-cta {
    display: none;
  }

  /* Tabs */
  .tabs {
    overflow-x: auto;
    scrollbar-width: none;
  }

  .tabs::-webkit-scrollbar { display: none; }

  /* Sticky sidebar — unstick on mobile */
  .sticky-sidebar {
    position: static;
  }
}

/* ── Very small (<380px) ── */
@media (max-width: 380px) {
  .numbers-grid {
    grid-template-columns: 1fr;
  }

  .product-type-grid {
    grid-template-columns: 1fr;
  }

  .fabric-motion-bg {
    opacity: 0.46;
  }

  .number-item:nth-child(odd) {
    border-right: none;
  }
}

/* ── Large screens (1920px+) ── */
@media (min-width: 1920px) {
  :root {
    --container-pad: 8rem;
  }
}

@media (max-width: 1279px) {
  .fabric-lab-inner {
    display: block;
  }

  .product-catalog-inner {
    grid-template-columns: 1fr;
  }

  .product-catalog-side {
    grid-template-rows: auto auto;
    grid-template-columns: 1fr;
    max-width: 720px;
    width: 100%;
  }

  .product-catalog-media {
    max-width: 100%;
    width: 100%;
    justify-self: start;
  }

  .product-catalog-note {
    min-height: auto;
  }

  .collection-lab-header,
  .fabric-lab-heading,
  .principles-heading {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .fabric-type-grid,
  .fabric-type-grid-large {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .collection-family-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .principles-grid {
    grid-template-columns: 1fr;
  }

  .principle-item {
    min-height: auto;
  }

  .principle-item h3,
  .principle-item p {
    min-height: 0;
  }

  .principle-item,
  .principle-item:last-child {
    border-right: none;
    border-bottom: 1px solid var(--border-subtle);
  }

  .collection-group-card {
    width: 100%;
  }

  .collection-groups-track {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 767px) {
  .fabric-type-grid,
  .fabric-type-grid-large,
  .product-type-grid,
  .collection-family-grid {
    grid-template-columns: 1fr;
  }

  .fabric-type-item {
    min-height: 112px;
  }

  .product-type-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .product-type-grid .fabric-type-item {
    min-height: 84px;
  }

  .about-origin-gallery {
    grid-template-columns: 1fr;
    padding: 0.5rem;
  }

  .fair-page-hero {
    min-height: 360px;
  }

  .collection-lab-header {
    position: relative;
    top: auto;
    left: auto;
    transform: none;
    padding-top: var(--space-xl);
    pointer-events: auto;
  }

  .collection-groups-track {
    grid-template-columns: 1fr;
    padding-top: var(--space-md);
  }

  .collection-group-card {
    height: auto;
    min-height: 430px;
    aspect-ratio: 4 / 5;
  }

  .collection-card-body {
    padding: 1.35rem;
  }

  .collection-card-name {
    font-size: clamp(1.75rem, 8vw, 2.25rem);
    line-height: 0.98;
  }

  .collection-card-sub {
    font-size: 0.64rem;
    letter-spacing: 0.16em;
  }

  .collection-card-copy {
    max-height: none;
    opacity: 1;
    overflow: visible;
    margin-top: 0.65rem;
    font-size: 0.86rem;
    line-height: 1.55;
  }

  .collection-card-cta {
    margin-top: 0.8rem;
  }

  .collection-family-card {
    min-height: 280px;
  }

  .contact-info-panel {
    position: static;
    min-width: 0;
  }

  .contact-info-panel .section-lede {
    max-width: 28ch;
  }

  .contact-grid > * {
    min-width: 0;
  }

  .map-panel-meta {
    position: static;
    margin: 1rem;
    flex-direction: column;
  }

  .map-panel .map-embed {
    height: 300px;
  }

  .showroom-grid {
    grid-template-columns: 1fr !important;
    gap: var(--space-lg) !important;
  }
}
