/* Shared final layer: one catalog and one set of features at every screen size. */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
textarea { font: inherit; }
textarea:focus-visible { outline: 3px solid #d83f45; outline-offset: 4px; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
/* Text controls retained in product galleries and complementary products. */
.gallery-arrows button, .image-viewer-controls button, .related-controls button {
  width: auto; min-width: 72px; min-height: 44px; flex-basis: auto;
  padding: 8px 10px; border-radius: 5px; font-size: 13px; line-height: 1.3;
}
/* Crisp SVG arrows keep the hero and pagination compact on touch screens. */
.direction-icon { display: block; width: 20px; height: 20px; flex-shrink: 0; pointer-events: none; }
.image-arrows button, .pagination .page-arrow {
  display: grid; place-items: center; width: 44px; height: 44px;
  min-width: 44px; min-height: 44px; flex: 0 0 44px; padding: 11px;
  border-radius: 50%; line-height: 1;
}
.image-arrows button {
  background: rgb(255 255 255 / 88%); border: 1px solid rgb(255 255 255 / 80%);
  color: #35402e; box-shadow: 0 2px 8px rgb(32 41 28 / 12%);
}
/* Shared image galleries reveal arrows on hover; keyboard focus remains accessible. */
.hero-photo .image-arrows button,
.product-gallery .gallery-arrows button { opacity: 0; pointer-events: none; transition: opacity .18s ease; }
.hero-photo .image-arrows button:focus-visible,
.product-gallery .gallery-arrows button:focus-visible { opacity: 1; pointer-events: auto; }
@media (hover: hover) and (pointer: fine) {
  .hero-photo:hover .image-arrows button,
  .product-gallery:hover .gallery-arrows button { opacity: 1; pointer-events: auto; }
}
.pagination .page-arrow { border: 1px solid #e3e5db; background: #fff; color: #515949; }
.pagination .page-arrow.disabled { opacity: .35; }
.pagination a.page-arrow:hover { border-color: #d6dacf; background: #f2f3ed; color: var(--red); }
.product-overview > *, .contact-grid > *, .order-layout > *,
.account-layout > *, .cart-layout > *, .footer-columns > * { min-width: 0; }
.product-info h3, .product-summary h1, .product-reference,
.contact-email, .footer-email, .specification-list dt { overflow-wrap: anywhere; }

@media (max-width: 700px) {
  .container {
    width: 100%;
    padding-left: max(16px, env(safe-area-inset-left));
    padding-right: max(16px, env(safe-area-inset-right));
  }
  .utility { font-size: 10px; }
  .utility .container { height: auto; min-height: 32px; gap: 8px; padding-block: 6px; }
  .utility .container > span, .utility .location { font-size: 10px; }
  .header-inner { grid-template-columns: minmax(0, 1fr) auto; column-gap: 12px; padding-block: 7px 4px; }
  .header-inner .brand, .header-inner .brand img { width: 144px; max-width: 100%; }
  .header-inner .brand img { height: auto; aspect-ratio: 222 / 98; }
  .header-customer { gap: 12px; margin: 0 4px 0 0; }
  .header-customer a { min-width: 48px; min-height: 48px; font-size: 12px; }
  .main-nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .main-nav > a, .categories-toggle { width: 100%; min-height: 54px; font-size: 13px; }
  .category-menu { max-height: min(60vh, 480px); max-height: min(60dvh, 480px); }
  .category-menu a { min-height: 48px; font-size: 15px; }

  .hero-slideshow .hero-inner { grid-template-columns: minmax(0, 1fr); }
  .hero-slideshow .hero-copy { padding-block: 28px 24px; }
  .hero-slideshow h1, .hero-heading { font-size: clamp(32px, 8.2vw, 44px); line-height: 1.12; }
  .eyebrow, .section-kicker { font-size: 11px; line-height: 1.6; }
  .hero-slideshow .hero-copy > p { max-width: 100%; font-size: 16px; line-height: 1.65; }
  .hero-copy .button { min-height: 48px; font-size: 15px; padding-inline: 18px; }
  .hero-photo { min-height: 0; height: clamp(220px, 65vw, 360px); margin-bottom: 20px; }
  .hero-photo figcaption { max-width: calc(100% - 20px); font-size: 10px; }
  .slide-indicators { gap: 0; max-width: 100%; }
  .slide-indicator { width: 44px; height: 44px; flex: 0 0 44px; }
  .image-arrows { padding: 10px; }
  .gallery-arrows button { width: auto; min-width: 72px; height: 44px; flex-basis: auto; font-size: 13px; }

  .catalog-toolbar { flex-direction: column; gap: 12px; }
  .catalog-toolbar .search, .catalog-toolbar .select-wrap { width: 100%; min-width: 0; max-width: none; margin: 0; }
  .catalog-toolbar .search input, .catalog-toolbar .select-wrap select { width: 100%; min-width: 0; max-width: none; height: 48px; font-size: 16px; }
  .search svg { top: 16px; }
  .product-grid, .category-product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
  .product-info { padding: 18px 16px 16px; }
  .product-info h3 { font-size: 18px; line-height: 1.35; min-height: 0; }
  .product-category { font-size: 11px; }
  .product-description { font-size: 14px; line-height: 1.6; min-height: 0; }
  .category-product-grid .product-info h3, .category-product-grid .product-description { min-height: 0; }
  .category-explore, .price-pending, .draft-note { font-size: 13px; line-height: 1.6; }
  .product-call, .page-number, .page-arrow { min-width: 44px; min-height: 44px; }
  .pagination { gap: 12px; flex-wrap: wrap; }
  .pagination-summary, .card-cart-feedback { font-size: 13px; }
  .breadcrumbs { font-size: 12px; overflow-wrap: anywhere; }
  .category-heading h1, .subcategory-heading h1, .product-summary h1, .order-heading h1 { font-size: clamp(29px, 7.5vw, 38px); line-height: 1.2; }
  .category-heading > div > p:not(.section-kicker), .subcategory-heading > p:not(.section-kicker),
  .category-catalog-note, .product-summary-text, .detail-section-content { font-size: 15px; line-height: 1.7; }
  .product-detail-actions { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .product-detail-actions .button { width: 100%; }
  .product-detail-actions .detail-phone { display: flex; align-items: center; justify-content: center; min-height: 44px; font-size: 15px; }
  .product-section-nav { gap: 8px 18px; font-size: 14px; }
  .product-section-nav a { display: inline-flex; align-items: center; min-height: 44px; }
  .specification-list > div { grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 14px; }
  .detail-help, .detail-price .detail-stock, .product-gallery-note { font-size: 13px; line-height: 1.7; }
  .image-viewer-header p { font-size: 14px; overflow-wrap: anywhere; }

  .button, .card-add-cart { min-height: 48px; font-size: 15px; line-height: 1.4; }
  .form-field label { font-size: 14px; line-height: 1.5; }
  .form-field input, .form-field select, .form-field textarea { min-width: 0; width: 100%; min-height: 48px; font-size: 16px; }
  .form-row { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .contact-form-card, .order-form-card, .customer-card { padding: 24px 18px; }
  .contact-expanded .contact-intro, .contact-expanded .contact-form-card > p,
  .customer-card > p, .order-heading > p:last-child { font-size: 15px; line-height: 1.7; }
  .contact-detail p, .contact-email { font-size: 15px; line-height: 1.65; }
  .contact-details a[href^="tel:"] { display: inline-flex; align-items: center; min-height: 44px; }
  .privacy-note, .field-note, .order-field-note, .order-privacy { font-size: 12px; line-height: 1.7; }
  .cart-item-actions button { min-height: 44px; font-size: 14px; }
  .cart-item .cart-save-state, .cart-line-price > span { font-size: 12px; }
  .cart-item-purchase { gap: 12px; }
  .cart-grand-total { flex-wrap: wrap; }
  .auth-provider { min-height: 48px; font-size: 15px; flex-wrap: wrap; }
  .auth-provider small { font-size: 12px; }
  .faq-intro > p:not(.section-kicker), .faq-answer { font-size: 15px; line-height: 1.7; }
  .faq-list summary { font-size: 16px; line-height: 1.5; }
  .footer-columns { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
  .footer-columns h3 { font-size: 14px; }
  .footer-columns > div > a, .footer-columns address { font-size: 14px; line-height: 1.7; }
  .footer-columns > div > a { min-height: 44px; display: flex; align-items: center; overflow-wrap: anywhere; }
  .footer-bottom { font-size: 12px; gap: 12px; flex-wrap: wrap; padding-bottom: max(20px, env(safe-area-inset-bottom)); }
}

@media (max-width: 440px) {
  .product-grid, .category-product-grid, .footer-columns { grid-template-columns: minmax(0, 1fr); }
  .product-visual, .category-product-grid .product-visual { height: 220px; }
  .product-visual > svg { height: 210px; max-width: 100%; }
  .specification-list > div { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .specification-list dt { font-weight: 600; }
  .utility .container { flex-wrap: wrap; }
}

@media (max-width: 360px) {
  .header-inner .brand, .header-inner .brand img { width: 122px; }
  .header-customer { gap: 8px; }
  .header-customer a { font-size: 11px; }
}

/* Shared icon and label rows keep every navigation target on one baseline. */
.header-customer [hidden] { display: none !important; }
.header-customer .account-toggle .nav-label { display: inline-flex; align-items: center; gap: 4px; }
.header-customer .account-menu { right: -18px; left: auto; width: 270px; }
.header-customer .account-menu a, .header-customer .account-menu button { display: flex; flex-direction: row; justify-content: flex-start; align-items: center; min-height: 44px; width: 100%; padding: 10px 12px; font-size: 13px; font-weight: 400; white-space: normal; text-align: left; }
.header-customer .account-menu button { border: 0; background: transparent; color: var(--red); border-radius: 3px; cursor: pointer; }
.header-customer .account-menu button:hover, .header-customer .account-menu button:focus-visible { background: #f6f5ef; }
.header-customer .account-menu-caption { padding: 9px 12px; color: #7a8272; font-size: 11px; }
.header-customer .account-menu-exit { border-top: 1px solid var(--line); margin-top: 5px; padding-top: 5px; }
.header-customer [data-account-menu-error] { color: #a12828; white-space: normal; font-size: 12px; padding: 0 12px; }
.header-inner .main-nav > a,
.header-inner .categories-toggle,
.header-inner .header-customer > a {
  display: grid; grid-template-rows: 23px 16px; align-content: center;
  justify-items: center; align-items: center; gap: 7px;
  height: 60px; min-height: 60px; padding: 7px 0;
  font-size: 11px; line-height: 16px;
}
.header-inner .main-nav > a > svg,
.header-inner .categories-toggle > svg,
.header-inner .header-customer > a > svg { width: 23px; height: 23px; }
.header-inner .header-customer .cart-count { top: 0; }

/* Compact category tiles: one image and one clear, clickable name. */
.catalog-category-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 20px; margin-top: 24px; }
.catalog-category { min-width: 0; }
.catalog-category > a { display: flex; flex-direction: column; height: 100%; border: 1px solid #e6e7e1; border-radius: 8px; overflow: hidden; transition: border-color .18s,box-shadow .18s; }
.catalog-category > a:hover { border-color: #c4cbbd; box-shadow: 0 4px 18px #24301d0a; }
.catalog-category > a:focus-visible { outline-offset: 3px; }
.catalog-category-visual { display: flex; align-items: center; justify-content: center; height: 166px; overflow: hidden; background: #f4f3ef; }
.catalog-category-visual.sage { background: #f0f3ed; }
.catalog-category-visual.stone { background: #f1f2ef; }
.catalog-category-visual > img { display: block; width: 100%; height: 100%; object-fit: cover; }
.catalog-category-visual > svg { width: 100%; height: 146px; }
.catalog-category h3 { display: flex; align-items: center; min-height: 64px; margin: 0; padding: 16px 20px; font-size: 18px; line-height: 1.4; font-weight: 500; letter-spacing: -.2px; }
.catalog-category > a:hover h3 { color: var(--red); }
.catalog-reset, .catalog-page-links { display: flex; align-items: center; gap: 20px; min-height: 44px; margin-top: 18px; font-size: 14px; color: var(--red); }

@media (max-width: 700px) {
  .header-inner { position: relative; grid-template-columns: minmax(0,2fr) minmax(0,3fr); column-gap: 0 !important; }
  .header-inner .brand { grid-row: 1; grid-column: 1 / -1; }
  .header-inner .main-nav { position: static; grid-row: 2; grid-column: 1; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); width: 100%; gap: 0; margin: 0; }
  .header-inner .header-customer { grid-row: 2; grid-column: 2; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); width: 100%; gap: 0; margin: 0; }
  .header-inner .main-nav > a, .header-inner .categories-toggle, .header-inner .header-customer > a { min-width: 0; width: 100%; }
  .header-inner .categories-dropdown { position: static; }
  .header-inner .category-menu { top: 100%; left: 16px; right: 16px; width: auto; }
  .header-inner .account-toggle { width: 100%; min-width: 0; }
  .header-inner .header-customer .cart-count { right: calc(50% - 24px); }
  .header-inner .main-nav .nav-label { gap: 3px; }
  .catalog-category-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; margin-top: 20px; }
  .catalog-category-visual { height: 130px; }
  .catalog-category-visual > svg { height: 120px; }
  .catalog-category h3 { min-height: 64px; padding: 12px; font-size: 15px; line-height: 1.4; }
  .hero-photo .slide-indicators { gap: 0; padding: 0; }
  .hero-photo .slide-indicator { width: 36px; flex: 0 0 36px; }
  .hero-photo .slide-indicator > span { width: 24px; }
}
/* Compact cards keep the complete depot directory easy to scan. */
.catalog-category-grid {grid-template-columns:repeat(4,minmax(0,1fr));gap:14px}
.catalog-category-visual {height:auto;aspect-ratio:3/2}
.catalog-category-visual>svg {height:108px}
.catalog-category h3 {font-size:15px;min-height:60px;padding:12px 14px}
@media(max-width:1000px){.catalog-category-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:650px){.catalog-category-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.catalog-category-visual{height:auto}.catalog-category-visual>svg{height:92px}.catalog-category h3{font-size:14px;padding:10px;min-height:62px}}
