/*
 * Global responsive foundation
 * Loaded last by the public storefront and administration layouts so new pages
 * inherit safe media, forms, grids, tables and viewport behavior automatically.
 */
:where(*, *::before, *::after) { box-sizing: border-box; }

html { max-width: 100%; overflow-x: clip; }
body { min-width: 0; max-width: 100%; overflow-x: hidden; }
:where(main, header, footer, nav, section, article, aside, form, fieldset, div) { min-width: 0; }
:where(img, picture, video, canvas, svg, iframe) { max-width: 100%; }
:where(img, video) { height: auto; }
:where(input, select, textarea) { width: 100%; max-width: 100%; min-width: 0; }
:where(button, .button) { max-width: 100%; overflow-wrap: anywhere; }
:where(p, a, span, strong, small, h1, h2, h3, h4, dt, dd, td, th) { overflow-wrap: anywhere; }

/* Public storefront ------------------------------------------------------ */
.site-page .shell { width: min(1180px, calc(100% - clamp(24px, 5vw, 40px))); max-width: 100%; }
.site-page .site-header,
.site-page .main-nav,
.site-page .nav-inner,
.site-page .topbar { max-width: 100%; }
.site-page .site-logo { flex: 0 1 180px; max-width: 100%; }
.site-page .site-logo img { max-width: 100% !important; }
.site-page .menu { min-width: 0; }
.site-page .nav-actions { flex: none; }
.site-page .header-search,
.site-page .header-search__inner,
.site-page .header-search__form { max-width: 100%; }
.site-page .header-search__form { display: flex; flex-wrap: wrap; }
.site-page .header-search__input { flex: 1 1 220px; }
.site-page .hero-copy { max-width: min(100%, 620px); }
.site-page .hero-title { font-size: clamp(2.5rem, 6vw, 3.625rem); }
.site-page .hero-title strong { font-size: clamp(3.7rem, 9vw, 5.75rem); }
.site-page .category-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr)); }
.site-page .product-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr)); }
.site-page .promo-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.site-page .promo,
.site-page .combo-banner { width: 100%; max-width: 100%; }
.site-page .footer-grid,
.site-page .copyright { max-width: calc(100% - clamp(24px, 6vw, 80px)) !important; }
.site-page .footer-contact > :where(a, p.location),
.site-page .footer-contact > :where(a, p.location) > span { min-width: 0; white-space: normal !important; }
.site-page .product-detail,
.site-page .product-copy { min-width: 0; }
.site-page .product-thumbs { max-width: 100%; overflow-x: auto; overscroll-behavior-inline: contain; }
.site-page .product-thumbs button { flex: 0 0 74px; }

@media (max-width: 980px) {
  .site-page .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: clamp(24px, 5vw, 48px) !important; }
}

@media (max-width: 700px) {
  .site-page .topbar { height: 74px !important; min-height: 74px !important; }
  .site-page .site-logo { width: min(120px, 38vw) !important; height: 74px !important; overflow: hidden !important; }
  .site-page .site-logo img { width: 100% !important; transform: scale(1.35) !important; }
  .site-page .nav-inner { gap: 8px; }
  .site-page .category-toggle { min-width: 0; padding-inline: 10px; }
  .site-page .menu { top: 126px; width: 100%; max-height: calc(100dvh - 126px); overflow-y: auto; }
  .site-page .nav-actions { gap: 8px; margin-left: 0; }
  .site-page .nav-actions :where(button, a) { min-width: 36px; min-height: 36px; }
  .site-page .header-search__form { gap: 8px; padding-block: 12px; }
  .site-page .header-search__input { flex-basis: calc(100% - 52px); }
  .site-page .header-search__submit { flex: 1 1 auto; min-height: 42px; }
  .site-page .header-search__close { flex: 0 0 42px; min-height: 42px; }
  .site-page .hero { height: auto !important; min-height: clamp(500px, 150vw, 650px) !important; max-height: none !important; }
  .site-page .hero-copy { padding-inline: 0; }
  .site-page .section-head { gap: 12px; flex-wrap: wrap; }
  .site-page .promo { height: auto; min-height: 220px; }
  .site-page .footer-grid { grid-template-columns: 1fr !important; }
  .site-page .footer-grid > * { grid-column: auto !important; }
  .site-page .copyright { flex-direction: column; gap: 10px !important; text-align: center; }
  .site-page .product-detail,
  .site-page .product-copy { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .site-page .product-main-image,
  .site-page .product-no-image { height: clamp(240px, 82vw, 360px); }
  .site-page .product-buy h1 { font-size: clamp(1.8rem, 10vw, 2.375rem); }
}

@media (max-width: 390px) {
  .site-page .category-toggle { font-size: 10px; }
  .site-page .category-toggle span { margin-right: 4px; }
  .site-page .nav-actions { gap: 2px; }
  .site-page .product-grid { grid-template-columns: minmax(0, 1fr); }
  .site-page .promo > div:first-child { max-width: 100%; }
}

/* Administration -------------------------------------------------------- */
.admin-page .main { min-width: 0; }
.admin-page .topbar { max-width: 100%; }
.admin-page .card,
.admin-page .products-card,
.admin-page .data-card { max-width: 100%; }
.admin-page :where(.grid, .filters, .data-toolbar, .brands-toolbar, .categories-toolbar, .detail-grid, .kpi-grid, .stats, .category-grid) > * { min-width: 0; }
.admin-page :where(.table-wrap, .table-scroll, .brands-table-wrap, .categories-table-wrap) {
  width: 100%; max-width: 100%; overflow-x: auto; overscroll-behavior-inline: contain; -webkit-overflow-scrolling: touch;
}
.admin-page table { max-width: none; }
.admin-page :where(.admin-modal, .quick-product-modal) {
  width: min(900px, calc(100vw - 32px)); max-width: calc(100vw - 32px); max-height: calc(100dvh - 32px); overflow-y: auto;
}
.admin-page :where(.modal-head, .modal-body, .modal-actions, .form-actions, .row-actions, .table-actions, .section-head, .list-footer, .totals) { flex-wrap: wrap; }
.admin-page :where(.taxonomy-picker-row, .brand-picker-row, .video-picker) { min-width: 0; flex-wrap: wrap; }
.admin-page :where(.taxonomy-combobox, .brand-combobox) { min-width: min(100%, 220px); flex: 1 1 220px; }
.admin-page :where(.taxonomy-options, .brand-options) { width: 100%; max-width: 100%; }
.admin-page .popover,
.admin-page .stock-form { max-width: calc(100vw - 32px); }
.admin-page .login-shell { max-width: min(880px, 100%); }

@media (max-width: 1100px) {
  .admin-page .category-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-page .filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .admin-page.admin-menu-open { overflow: hidden; }
  .admin-page .sidebar { width: min(285px, calc(100vw - 48px)); max-width: 100%; }
  .admin-page .main { width: 100%; margin-left: 0; padding-inline: clamp(12px, 4vw, 16px); }
  .admin-page .topbar { height: auto; min-height: 74px; padding: 8px 8px 8px 54px; gap: 8px; }
  .admin-page .welcome-icon { display: none; }
  .admin-page .topbar-meta { min-width: 0; gap: 7px; }
  .admin-page .page-heading { align-items: stretch; }
  .admin-page .page-heading h1 { font-size: clamp(1.5rem, 8vw, 1.9rem); }
  .admin-page :where(.grid, .filters, .data-toolbar, .data-toolbar.wide, .brands-toolbar, .categories-toolbar, .detail-grid, .stats, .category-grid) { grid-template-columns: minmax(0, 1fr); }
  .admin-page :where(.span-2, .search-field, .brands-search, .categories-search) { grid-column: auto; }
  .admin-page .kpi-grid,
  .admin-page .category-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-page :where(.card, .products-card) { padding: clamp(14px, 4vw, 20px); }
  .admin-page :where(.data-card, .brands-card, .categories-card) { padding: 0; }
  .admin-page :where(.modal-head, .modal-body, .modal-actions) { padding: 16px; }
  .admin-page .modal-actions > .button { flex: 1 1 140px; }
  .admin-page .form-actions > :where(.button, button) { flex: 1 1 160px; }
  .admin-page dl { grid-template-columns: minmax(0, 1fr); }
  .admin-page dd { margin-bottom: 8px; }
  .admin-page .bar-chart > div { grid-template-columns: minmax(70px, .7fr) minmax(0, 1.3fr); }
  .admin-page .bar-chart strong { grid-column: 2; }
  .admin-page .login-shell { padding-inline: 16px; }
}

@media (max-width: 430px) {
  .admin-page .kpi-grid,
  .admin-page .category-kpis { grid-template-columns: minmax(0, 1fr); }
  .admin-page .category-kpi { flex-direction: row; align-items: center; }
  .admin-page .pagination { flex-wrap: wrap; justify-content: flex-start; }
  .admin-page .totals { justify-content: flex-start; }
  .admin-page .password button { padding-inline: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; }
}
.site-page .digital-details,.site-page .preview-section,.site-page .size-guide{margin-block:clamp(36px,7vw,70px)}.site-page .preview-section,.site-page .size-guide{padding:clamp(20px,4vw,38px);border-radius:14px;background:#f5f5f5}.site-page .product-class-digital .product-hero{align-items:start}
@media(max-width:760px){.admin-page .product-class-grid{grid-template-columns:minmax(0,1fr)}.admin-page .adaptive-product-form summary{align-items:flex-start}.admin-page .option-row{grid-template-columns:minmax(0,1fr)}}
