/* Silver surfaces form a clear hierarchy; royal blue identifies controls and state. */
:root {
  color-scheme: dark;
  --on-action: oklch(.96 .005 255);
}

:root[data-theme="light"] {
  color-scheme: light;
  --background: #d4dae3;
  --surface: #e8ecf2;
  --surface-raised: #f7f9fc;
  --foreground: #202733;
  --muted: #4d596a;
  --line: #b3bdca;
  --accent-light: var(--brand);
  --action: #1149e8;
  --action-hover: #0c3ac0;
  --on-action: #f7f9fc;
  --header-metal: linear-gradient(145deg, #234b96, #1c3b78 60%, #172f61);
  --header-ink: #e7edf7;
  --header-muted: #cad6e9;
  --disabled-surface: #ced6e1;
  --disabled-ink: #4d596a;
  --field: var(--surface-raised);
  --field-border: #68788d;
  --focus: var(--brand);
  --danger: #9d263a;
  --face-silver: linear-gradient(155deg, #f7f9fc, #e8ecf2 56%, #dde4ee);
  --elevation-control: 0 2px 3px rgb(32 39 51 / .22), 0 8px 14px -4px rgb(32 39 51 / .28);
  --elevation-panel: 0 3px 5px rgb(32 39 51 / .16), 0 12px 20px -6px rgb(32 39 51 / .26), 0 32px 56px -16px rgb(32 39 51 / .30);
  --elevation-floating: 0 5px 9px -2px rgb(32 39 51 / .18), 0 18px 32px -8px rgb(32 39 51 / .30), 0 40px 64px -18px rgb(32 39 51 / .26);
  --elevation-overlay: 0 8px 16px -4px rgb(32 39 51 / .20), 0 28px 48px -10px rgb(32 39 51 / .30), 0 56px 96px -24px rgb(32 39 51 / .32);
  --elevation-chrome: 0 4px 8px rgb(20 35 65 / .18), 0 14px 24px -8px rgb(32 39 51 / .24);
  --elevation-action: 0 3px 5px rgb(8 38 126 / .40), 0 12px 18px -5px rgb(8 38 126 / .38), 0 24px 36px -12px rgb(32 39 51 / .30);
}

:root[data-theme="light"] .site-footer {
  background: var(--surface);
  border-color: var(--line);
  color: var(--foreground);
}
:root[data-theme="light"] .site-header {
  --background: #1c3b78;
  --foreground: var(--header-ink);
  --muted: var(--header-muted);
  --accent-light: #d4dae3;
  --focus: #e7edf7;
  --surface-raised: #ffffff14;
  --line: #8ca3cc66;
  color: var(--foreground);
  background: var(--header-metal);
  border-color: #4969a3;
  box-shadow: var(--elevation-chrome);
}
:root[data-theme="light"] .site-header .sport-brand { color: #e7edf7; text-shadow: 0 1px 0 #0b214b; }
:root[data-theme="light"] .site-header .brand-jay { color: #f7f9fc; }
:root[data-theme="light"] .site-header .brand-sport { color: #d4dae3; }
:root[data-theme="light"] .site-header .brand-dot { color: #b6c8ed; }
:root[data-theme="light"] .site-header .primary-navigation { background: transparent; }
:root[data-theme="light"] .site-header .primary-navigation a { color: var(--header-muted); }
:root[data-theme="light"] .site-header .primary-navigation a:hover,
:root[data-theme="light"] .site-header .primary-navigation .current-menu-item > a,
:root[data-theme="light"] .site-header .primary-navigation a[aria-current="page"] { color: #f7f9fc; }
:root[data-theme="light"] .site-header .header-tools .icon-button[aria-current="page"] { color: #f7f9fc; background: #ffffff1f; }
:root[data-theme="light"] .site-header .search-row {
  --background: #e8ecf2;
  --surface: #e8ecf2;
  --surface-raised: #f7f9fc;
  --foreground: #202733;
  --muted: #4d596a;
  --field: #f7f9fc;
  --field-border: #68788d;
  --accent-light: #1149e8;
  --focus: #1149e8;
  --line: #b3bdca;
  color: var(--foreground);
  background: var(--surface);
}
:root[data-theme="light"] .site-footer .brand-jay { color: var(--brand); }
:root[data-theme="light"] .site-footer .brand-dot { color: var(--brand); }
:root[data-theme="light"] .demo-bar {
  background: var(--surface-raised);
  border-bottom: 1px solid var(--line);
  color: var(--muted);
}
:root[data-theme="light"] .footer-bottom { border-color: var(--line); }

/* Layered cast shadows give complete surfaces depth without raised edge stripes. */
:root[data-theme="light"] :is(.activity-card, .woocommerce ul.products li.product a img, .single-product .woocommerce-product-gallery, .jay-account-access, .jay-account-workspace .woocommerce-MyAccount-content, .woocommerce-cart .cart_totals, .woocommerce-checkout form.checkout #order_review) {
  box-shadow: var(--elevation-panel);
}
:root[data-theme="light"] :is(.jay-account-access, .jay-account-workspace .woocommerce-MyAccount-content, .woocommerce-cart .cart_totals, .woocommerce-checkout form.checkout #order_review) {
  background-image: var(--face-silver);
  border-top-color: #b9c3d0;
}
:root[data-theme="light"] :is(.woocommerce input.input-text, .woocommerce textarea, .woocommerce select:not(.orderby), .product-search input, .filter-form input, .filter-form select, .select2-search__field):not(:disabled):not([readonly]),
:root[data-theme="light"] .select2-container:not(.select2-container--disabled) .select2-selection--single {
  background-image: var(--face-silver);
  box-shadow: var(--elevation-control);
}
:root[data-theme="light"] :is(.hero-button, .movement-banner .button-light, .woocommerce .single_add_to_cart_button, .woocommerce .checkout-button, .woocommerce #place_order, .jay-account-form-panel .button):not(:disabled):not(.disabled):not([aria-disabled="true"]) {
  box-shadow: var(--elevation-action);
}
:root[data-theme="light"] .select2-dropdown,
:root[data-theme="light"] .site-header .search-row[data-open] { background-image: var(--face-silver); box-shadow: var(--elevation-floating); }

.demo-tools { display: flex; align-items: center; gap: 16px; }
.demo-bar .theme-toggle { width: 44px; height: 44px; padding: 0; border: 1px solid oklch(.4 .012 255); border-radius: 8px; }
:root[data-theme="light"] .demo-bar .theme-toggle { color: var(--brand); border-color: var(--field-border); }
.theme-toggle [data-theme-icon="moon"] { display: none; }
:root[data-theme="light"] .theme-toggle [data-theme-icon="sun"] { display: none; }
:root[data-theme="light"] .theme-toggle [data-theme-icon="moon"] { display: block; }

/* Keep light text on photography; the light campaign uses the page's silver material. */
.sport-hero, .movement-banner { color: var(--on-action); }
:root[data-theme="light"] .movement-banner {
  color: var(--foreground);
  background: var(--surface);
  border-block: 1px solid var(--line);
}
:root[data-theme="light"] .movement-banner .banner-mark { color: var(--brand); opacity: .07; }
:root[data-theme="light"] .movement-banner .button-light { background: var(--action); color: var(--on-action); }
:root[data-theme="light"] .movement-banner .button-light:hover { background: var(--action-hover); color: var(--on-action); }

:root[data-theme="light"] :is(.woocommerce-tabs .tabs, .woocommerce-MyAccount-navigation) {
  background: var(--surface-raised);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px;
}
:root[data-theme="light"] .woocommerce-tabs .tabs { gap: 8px; }
:root[data-theme="light"] .woocommerce-tabs .tabs a {
  min-height: 44px;
  padding: 10px 16px;
  border-radius: 5px;
}
:root[data-theme="light"] .woocommerce-tabs .tabs li.active a,
:root[data-theme="light"] .woocommerce-MyAccount-navigation .is-active a {
  background: transparent;
  color: var(--brand);
  border-color: var(--brand);
  box-shadow: inset 0 -2px 0 var(--brand);
}
:root[data-theme="light"] .woocommerce-MyAccount-navigation a { border-radius: 5px; }
:root[data-theme="light"] .woocommerce-pagination .current { background: var(--surface-raised); color: var(--brand); }

:root[data-theme="light"] :is(.filter-form select, .filter-form input, .woocommerce-ordering select, .variations select, .quantity .qty, .woocommerce input.input-text, .woocommerce textarea, .woocommerce select:not(.orderby), .comment-form input:not([type="submit"]), .comment-form textarea) {
  color-scheme: light;
}
:root[data-theme="light"] .site-header .product-search input { color-scheme: light; }
:root[data-theme="light"] .woocommerce-error,
:root[data-theme="light"] .jay-account-page .woocommerce-password-strength.short,
:root[data-theme="light"] .jay-account-page .woocommerce-password-strength.bad { color: var(--danger); }
:root[data-theme="light"] .jay-account-page .woocommerce-password-strength.good { color: oklch(.43 .065 85); }
:root[data-theme="light"] .jay-account-page .woocommerce-password-strength.strong { color: oklch(.4 .08 160); }
:root[data-theme="light"] .woocommerce .required { color: var(--muted); }
:root[data-theme="light"] .summary .stock { color: var(--foreground); }
:root[data-theme="light"] .woocommerce ul.products li.product .button { color: var(--brand); }
:root[data-theme="light"] :is(.woocommerce-error, .woocommerce-info, .woocommerce-message) { background: var(--surface-raised); }
:root[data-theme="light"] .woocommerce-error { border-color: var(--danger); }
:root[data-theme="light"] .woocommerce-info { border-color: var(--field-border); }
:root[data-theme="light"] .woocommerce-message { border-color: #6d83a6; }
:root[data-theme="light"] .commerce-feedback { background: var(--surface-raised); background-image: var(--face-silver); color: var(--foreground); box-shadow: var(--elevation-floating); }
:root[data-theme="light"] .jcc-analytics-panel {
  --text: var(--foreground);
  --text-muted: var(--muted);
  --border: var(--field-border);
  --accent: var(--brand);
  background-image: var(--face-silver);
  box-shadow: var(--elevation-overlay);
}
/* Native SelectWoo carries important legacy rules; keep its fields equal to inputs. */
:root[data-theme="light"] .select2-container .select2-selection--single {
  height: 52px !important;
  min-height: 52px;
  background: var(--field) !important;
  background-image: var(--face-silver) !important;
  border: 1px solid var(--field-border) !important;
  color: var(--foreground);
}
:root[data-theme="light"] .select2-container .select2-selection--single .select2-selection__rendered {
  color: var(--foreground) !important;
  padding: 11px 40px 11px 14px !important;
  line-height: 28px !important;
  font-size: 16px !important;
}
:root[data-theme="light"] .select2-container .select2-selection--single .select2-selection__placeholder { color: var(--muted); }
:root[data-theme="light"] .select2-container .select2-selection--single .select2-selection__arrow {
  top: 0 !important;
  right: 12px !important;
  height: 50px !important;
}
:root[data-theme="light"] .select2-dropdown,
:root[data-theme="light"] .select2-container--default .select2-search--dropdown .select2-search__field {
  background: var(--field) !important;
  background-image: var(--face-silver) !important;
  border-color: var(--field-border) !important;
  color: var(--foreground);
  font-size: 16px;
}
:root[data-theme="light"] .select2-container--default .select2-search--dropdown .select2-search__field { min-height: 44px; }
:root[data-theme="light"] .select2-container:not(.select2-container--disabled) .select2-selection--single:hover,
:root[data-theme="light"] .select2-container--open .select2-selection--single,
:root[data-theme="light"] .select2-container .select2-selection--single:focus-visible,
:root[data-theme="light"] .select2-container--default .select2-search--dropdown .select2-search__field:focus {
  border-color: var(--brand) !important;
}
:root[data-theme="light"] .woocommerce .woocommerce-invalid .select2-selection--single { border-color: var(--danger) !important; }
:root[data-theme="light"] .select2-container--disabled .select2-selection--single { background: var(--disabled-surface) !important; }
:root[data-theme="light"] .select2-container--disabled .select2-selection--single .select2-selection__rendered { color: var(--disabled-ink) !important; }
:root[data-theme="light"] .select2-results__option[aria-selected="true"],
:root[data-theme="light"] .select2-results__option[data-selected="true"] {
  color: var(--brand);
  background: var(--surface) !important;
  font-weight: 600;
}
:root[data-theme="light"] .woocommerce [aria-busy="true"] button[type="submit"] { opacity: 1; }
:root[data-theme="light"] .woocommerce :is(input.input-text, textarea, select):is(:disabled, [readonly]) {
  color: var(--disabled-ink);
  -webkit-text-fill-color: var(--disabled-ink);
  background: var(--surface);
  opacity: 1;
}
:root[data-theme="light"] :is(.button, .woocommerce a.button, .woocommerce button.button, .woocommerce input.button):is(:disabled, .disabled, [aria-disabled="true"]) {
  color: var(--disabled-ink);
  background: var(--disabled-surface);
  border-color: var(--field-border);
  box-shadow: none;
  opacity: 1;
  transform: none;
}
:root[data-theme="light"] .select2-results__option--highlighted[aria-selected],
:root[data-theme="light"] .select2-results__option--highlighted[data-selected] {
  background: var(--surface) !important;
  color: var(--brand);
  box-shadow: inset 0 -2px 0 var(--brand);
}
:root[data-theme="light"] ::selection { background: var(--action); color: var(--on-action); }

@media (max-width: 960px) {
  :root[data-theme="light"] .site-header .primary-navigation {
    background: var(--header-metal);
    border-color: #8ca3cc;
    box-shadow: 0 5px 9px -2px rgb(20 35 65 / .22), 0 18px 32px -8px rgb(20 35 65 / .34), 0 40px 64px -18px rgb(20 35 65 / .28);
  }
}
@media (max-width: 700px) {
  .demo-tools .demo-platform { display: none; }
  .demo-tools { gap: 0; }
  .demo-bar { padding-block: 4px; }
}
@media (max-width: 480px) {
  .demo-bar .demo-description { display: none; }
}

/* Graphite material and cast shadows give the dark storefront the same depth. */
:root:not([data-theme="light"]) {
  --surface: #282e37;
  --surface-raised: #303640;
  --foreground: #eef2f8;
  --muted: #b0b9c7;
  --field: #2b323e;
  --field-border: #8090a7;
  --action: #294fa9;
  --action-hover: #365fbd;
  --on-action: #f7f9fc;
  --focus: #b7cfff;
  --disabled-surface: #242a33;
  --disabled-ink: #aab4c3;
  --face-graphite: linear-gradient(155deg, #303640, #282e37 56%, #222730);
  --face-control: linear-gradient(155deg, #333a46, #272e38);
  --face-action: linear-gradient(155deg, #365fbd, #294fa9 60%, #203e83);
  --face-action-hover: linear-gradient(155deg, #426bc8, #365fbd 60%, #294fa9);
  --face-action-pressed: linear-gradient(155deg, #294fa9, #203e83 60%, #1b326d);
  --face-identity: linear-gradient(145deg, #303742, #252b34 60%, #1c2128);
  --elevation-control: 0 2px 3px rgb(5 8 13 / .42), 0 8px 14px -4px rgb(5 8 13 / .55);
  --elevation-panel: 0 3px 5px rgb(5 8 13 / .36), 0 12px 22px -6px rgb(5 8 13 / .48), 0 32px 56px -16px rgb(5 8 13 / .55);
  --elevation-floating: 0 5px 9px -2px rgb(5 8 13 / .40), 0 18px 32px -8px rgb(5 8 13 / .58), 0 40px 64px -18px rgb(5 8 13 / .48);
  --elevation-overlay: 0 8px 16px -4px rgb(5 8 13 / .48), 0 28px 48px -10px rgb(5 8 13 / .62), 0 56px 96px -24px rgb(5 8 13 / .60);
  --elevation-chrome: 0 4px 8px rgb(5 8 13 / .38), 0 14px 24px -8px rgb(5 8 13 / .52);
  --elevation-action: 0 3px 5px rgb(5 8 13 / .42), 0 12px 18px -5px rgb(5 8 13 / .55), 0 24px 36px -12px rgb(5 8 13 / .48);
}
:root:not([data-theme="light"]) :is(.site-header, .site-footer) {
  background-color: #252b34;
  background-image: var(--face-identity);
  border-color: #495362;
}
:root:not([data-theme="light"]) .site-header {
  border-bottom-color: #191e26;
  box-shadow: var(--elevation-chrome);
}
:root:not([data-theme="light"]) .demo-bar { background: #20262f; }
:root:not([data-theme="light"]) .movement-banner {
  background-color: #252b34;
  background-image: var(--face-identity);
  border-block: 1px solid #495362;
  border-bottom-color: #191e26;
}
:root:not([data-theme="light"]) :is(.activity-card, .woocommerce ul.products li.product a img, .single-product .woocommerce-product-gallery, .jay-account-access, .jay-account-workspace .woocommerce-MyAccount-content, .woocommerce-cart .cart_totals, .woocommerce-checkout form.checkout #order_review, .commerce-empty-state:not(.empty-cart-state)) {
  box-shadow: var(--elevation-panel);
}
:root:not([data-theme="light"]) :is(.jay-account-access, .jay-account-workspace .woocommerce-MyAccount-content, .woocommerce-cart .cart_totals, .woocommerce-checkout form.checkout #order_review, .commerce-empty-state:not(.empty-cart-state)) {
  background-color: var(--surface);
  background-image: var(--face-graphite);
  border-top-color: #495362;
  border-bottom-color: #191e26;
}
:root:not([data-theme="light"]) :is(.woocommerce input.input-text, .woocommerce textarea, .woocommerce select, .product-search input, .filter-form input, .filter-form select, .select2-search__field, .demo-bar .theme-toggle, .product-search button, .woocommerce-cart .actions > .button):not(:disabled):not(.disabled):not([aria-disabled="true"]):not([readonly]) {
  background-image: var(--face-control);
  box-shadow: var(--elevation-control);
}
:root:not([data-theme="light"]) :is(.hero-button, .movement-banner .button-light, .woocommerce .single_add_to_cart_button, .woocommerce .checkout-button, .woocommerce #place_order, .jay-account-form-panel .button, .filter-form .button, .woocommerce-form-coupon .button, .coupon .button, .comment-form input[type="submit"]):not(:disabled):not(.disabled):not([aria-disabled="true"]) {
  background-color: var(--action);
  background-image: var(--face-action);
  color: var(--on-action);
  border-color: #4d70bc;
  box-shadow: var(--elevation-action);
}
@media (hover: hover) {
  :root:not([data-theme="light"]) :is(.hero-button, .movement-banner .button-light, .woocommerce .single_add_to_cart_button, .woocommerce .checkout-button, .woocommerce #place_order, .jay-account-form-panel .button, .filter-form .button, .woocommerce-form-coupon .button, .coupon .button, .comment-form input[type="submit"]):not(:disabled):not(.disabled):not([aria-disabled="true"]):hover {
    background-color: var(--action-hover);
    background-image: var(--face-action-hover);
    color: var(--on-action);
  }
}
:root:not([data-theme="light"]) :is(.hero-button, .movement-banner .button-light, .woocommerce .single_add_to_cart_button, .woocommerce .checkout-button, .woocommerce #place_order, .jay-account-form-panel .button, .filter-form .button, .woocommerce-form-coupon .button, .coupon .button, .comment-form input[type="submit"]):not(:disabled):not(.disabled):not([aria-disabled="true"]):active {
  background-image: var(--face-action-pressed);
  box-shadow: 0 2px 4px rgb(5 8 13 / .50), 0 5px 10px -4px rgb(5 8 13 / .55);
  transform: translateY(1px) scale(.99);
}
:root:not([data-theme="light"]) .site-header .search-row[data-open],
:root:not([data-theme="light"]) .commerce-feedback {
  background-color: var(--surface);
  background-image: var(--face-graphite);
  box-shadow: var(--elevation-floating);
}
:root:not([data-theme="light"]) .jcc-analytics-panel {
  --text: var(--foreground);
  --text-muted: var(--muted);
  --border: var(--field-border);
  --accent: var(--accent-light);
  background-color: var(--surface);
  background-image: var(--face-graphite);
  box-shadow: var(--elevation-overlay);
}
/* Keep the native SelectWoo cascade equal to the other graphite fields. */
:root:not([data-theme="light"]) .select2-container .select2-selection--single {
  height: 52px !important;
  min-height: 52px;
  background: var(--field) !important;
  background-image: var(--face-control) !important;
  border: 1px solid var(--field-border) !important;
  box-shadow: var(--elevation-control);
}
:root:not([data-theme="light"]) .select2-container .select2-selection--single .select2-selection__rendered {
  color: var(--foreground) !important;
  padding: 11px 40px 11px 14px !important;
  line-height: 28px !important;
  font-size: 16px !important;
}
:root:not([data-theme="light"]) .select2-container .select2-selection--single .select2-selection__placeholder { color: var(--muted); }
:root:not([data-theme="light"]) .select2-container .select2-selection--single .select2-selection__arrow { height: 50px !important; right: 12px !important; top: 0 !important; }
:root:not([data-theme="light"]) .select2-dropdown,
:root:not([data-theme="light"]) .select2-container--default .select2-search--dropdown .select2-search__field {
  background: var(--field) !important;
  background-image: var(--face-control) !important;
  border-color: var(--field-border) !important;
  color: var(--foreground);
  font-size: 16px;
}
:root:not([data-theme="light"]) .select2-dropdown { box-shadow: var(--elevation-floating); }
:root:not([data-theme="light"]) .select2-container--default .select2-search--dropdown .select2-search__field { min-height: 44px; }
:root:not([data-theme="light"]) .select2-container:not(.select2-container--disabled) .select2-selection--single:hover,
:root:not([data-theme="light"]) .select2-container--open .select2-selection--single,
:root:not([data-theme="light"]) .select2-container .select2-selection--single:focus-visible,
:root:not([data-theme="light"]) .select2-container--default .select2-search--dropdown .select2-search__field:focus { border-color: var(--focus) !important; }
:root:not([data-theme="light"]) .woocommerce .woocommerce-invalid .select2-selection--single { border-color: var(--danger) !important; }
:root:not([data-theme="light"]) .select2-results__option[aria-selected="true"],
:root:not([data-theme="light"]) .select2-results__option[data-selected="true"],
:root:not([data-theme="light"]) .select2-results__option--highlighted[aria-selected],
:root:not([data-theme="light"]) .select2-results__option--highlighted[data-selected] {
  background: #353f50 !important;
  color: var(--accent-light);
  font-weight: 600;
}
:root:not([data-theme="light"]) .select2-container--disabled .select2-selection--single {
  background: var(--disabled-surface) !important;
  box-shadow: none;
}
:root:not([data-theme="light"]) .select2-container--disabled .select2-selection--single .select2-selection__rendered { color: var(--disabled-ink) !important; }
:root:not([data-theme="light"]) .woocommerce :is(input.input-text, textarea, select):is(:disabled, [readonly]) {
  color: var(--disabled-ink);
  -webkit-text-fill-color: var(--disabled-ink);
  background: var(--disabled-surface);
  box-shadow: none;
  opacity: 1;
}
:root:not([data-theme="light"]) :is(.button, .woocommerce a.button, .woocommerce button.button, .woocommerce input.button):is(:disabled, .disabled, [aria-disabled="true"]) {
  color: var(--disabled-ink);
  background: var(--disabled-surface);
  border-color: var(--field-border);
  box-shadow: none;
  opacity: 1;
  transform: none;
}
:root:not([data-theme="light"]) :is(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 4px;
}
@media (max-width: 960px) {
  :root:not([data-theme="light"]) .site-header .primary-navigation {
    background-color: #252b34;
    background-image: var(--face-identity);
    border-color: #495362;
    box-shadow: var(--elevation-floating);
  }
}
