/* =============================================================================
   Śrubex.pl — motyw potomny Classic
   Stal + żółty ostrzegawczy. Katalog techniczny, nie butik.

   Nadpisujemy arkusz Classic (ładowany wcześniej, patrz priority w theme.yml).
   Zmienne CSS zamiast twardych wartości — zmiana akcentu to jedna linia.
   ========================================================================== */

:root {
  --sx-bg: #14161a;
  --sx-surface: #1f232a;
  --sx-surface-2: #262b34;
  --sx-line: #333a45;
  --sx-line-strong: #454e5c;

  --sx-text: #e8ebef;
  --sx-text-dim: #a7b0bd;
  --sx-text-faint: #6e7885;

  --sx-yellow: #f5b301;
  --sx-yellow-dark: #d29a00;
  --sx-yellow-soft: rgba(245, 179, 1, 0.12);
  --sx-signal: #7dd3fc;

  --sx-radius: 3px; /* precyzja, nie zabawa */
}

/* ---------------------------------------------------------------- podstawy */

body,
body#checkout,
.page-wrapper,
#wrapper {
  background-color: var(--sx-bg);
  color: var(--sx-text);
}

body {
  font-family: "Archivo", "Inter", -apple-system, "Segoe UI", sans-serif;
}

h1, h2, h3, h4, h5,
.h1, .h2, .h3, .h4, .h5,
.page-header h1,
#main .page-header h1 {
  color: var(--sx-text);
  font-weight: 800;
  letter-spacing: -0.02em;
  text-transform: none; /* Classic krzyczy wersalikami — my nie */
}

a {
  color: var(--sx-signal);
}
a:hover,
a:focus {
  color: var(--sx-yellow);
}

/* Numery katalogowe, wymiary i ceny w cyfrach tabelarycznych — kolumny
   w tabeli parametrów muszą się zgadzać co do piksela. */
.product-reference,
.product-price,
.price,
.regular-price,
.product-quantity,
.facet-label,
.tnum {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}

/* ------------------------------------------------------------------ header */

#header {
  background: var(--sx-surface);
  border-bottom: 2px solid var(--sx-yellow);
  box-shadow: none;
}

#header .header-nav {
  background: var(--sx-bg);
  border-bottom: 1px solid var(--sx-line);
  margin-bottom: 0;
  padding: 0.35rem 0;
}

#header .header-nav a,
#header .header-nav .expand-more,
#header .header-top a {
  color: var(--sx-text-dim);
}
#header .header-nav a:hover,
#header .header-top a:hover {
  color: var(--sx-yellow);
}

#header .header-top {
  padding-bottom: 1rem;
}

/* Koszyk w nagłówku — jedyny element, który ma krzyczeć */
#header .blockcart {
  background: var(--sx-yellow);
  border-radius: var(--sx-radius);
}
#header .blockcart a,
#header .blockcart .cart-products-count {
  color: #14161a;
  font-weight: 700;
}
#header .blockcart.inactive {
  background: var(--sx-surface-2);
}
#header .blockcart.inactive a {
  color: var(--sx-text-faint);
}

/* ------------------------------------------------------------------- menu */

#_desktop_top_menu .top-menu a[data-depth="0"] {
  color: var(--sx-text);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
}
#_desktop_top_menu .top-menu a[data-depth="0"]:hover {
  color: var(--sx-yellow);
  border-bottom: 2px solid var(--sx-yellow);
}
.top-menu .sub-menu {
  background: var(--sx-surface);
  border: 1px solid var(--sx-line);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
}

/* --------------------------------------------------------------- wyszukiwarka */

#search_widget form input[type="text"],
.search-widget form input[type="text"] {
  background: var(--sx-bg);
  border: 1px solid var(--sx-line-strong);
  border-radius: var(--sx-radius);
  color: var(--sx-text);
}
#search_widget form input[type="text"]::placeholder {
  color: var(--sx-text-faint);
}
#search_widget form input[type="text"]:focus {
  border-color: var(--sx-yellow);
  outline: none;
  box-shadow: 0 0 0 2px var(--sx-yellow-soft);
}
#search_widget form button[type="submit"] .search,
#search_widget form button[type="submit"] i {
  color: var(--sx-yellow);
}

/* ------------------------------------------------------------ karty i bloki */

.card,
.block-category,
#products .product-miniature .thumbnail-container,
.products .product-miniature .thumbnail-container,
.featured-products .thumbnail-container,
#js-product-list-top,
#js-product-list-bottom,
.block-categories,
#search_filters,
#search_filters_wrapper,
.product-add-to-cart,
.product-information,
.tabs {
  background: var(--sx-surface);
  border: 1px solid var(--sx-line);
  border-radius: var(--sx-radius);
  box-shadow: none;
  color: var(--sx-text);
}

.card-block,
.card-header,
.card-footer {
  background: transparent;
  border-color: var(--sx-line);
}

/* ------------------------------------------------------------ kafelki produktu */

#products .product-miniature .thumbnail-container:hover,
.products .product-miniature .thumbnail-container:hover {
  border-color: var(--sx-yellow);
  box-shadow: 0 0 0 1px var(--sx-yellow);
}

.product-title a,
#products .product-title a,
.products .product-title a {
  color: var(--sx-text);
  font-weight: 600;
  font-size: 0.86rem;
  line-height: 1.35;
  text-transform: none; /* Classic robi Title Case z nazw norm — brzydzi */
}
.product-title a:hover {
  color: var(--sx-yellow);
}

.product-price-and-shipping,
.product-miniature .product-price-and-shipping .price {
  color: var(--sx-yellow);
  font-weight: 800;
  font-size: 1.05rem;
}

.product-description,
.product-miniature .product-description {
  background: transparent;
}

/* Rysunki mają ciemne tło — biała ramka Classic rozbijałaby siatkę */
.product-miniature .thumbnail-container .product-thumbnail img,
.product-cover img {
  background: var(--sx-bg);
  border-radius: 0;
}

/* Plakietki — "NOWY" na wszystkim to szum. Zostaje tylko rabat. */
.product-flags .product-flag.new,
.product-flags .product-flag.pack,
.product-flags .product-flag.online-only {
  display: none;
}
.product-flags .product-flag {
  background: var(--sx-yellow);
  color: #14161a;
  font-weight: 700;
  border-radius: var(--sx-radius);
  text-transform: uppercase;
  font-size: 0.65rem;
  letter-spacing: 0.06em;
}
.product-flags .product-flag.discount,
.product-flags .product-flag.on-sale {
  background: #e2483d;
  color: #fff;
}

/* Serduszko "do ulubionych" nie ma sensu w hurtowni złącznej */
.product-miniature .highlighted-informations,
.wishlist-button-add {
  display: none;
}

/* ---------------------------------------------------------------- filtry */

#search_filters .facet .facet-title,
#search_filters_wrapper .facet-title,
.block-categories .h6,
#search_filters h4 {
  color: var(--sx-yellow);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
}

#search_filters .facet .facet-label a,
#search_filters .facet .facet-label {
  color: var(--sx-text-dim);
  font-size: 0.84rem;
}
#search_filters .facet .facet-label a:hover {
  color: var(--sx-yellow);
}

#search_filters .custom-checkbox input[type="checkbox"] + span {
  border: 1px solid var(--sx-line-strong);
  border-radius: 2px;
}
#search_filters .custom-checkbox input[type="checkbox"]:checked + span {
  background: var(--sx-yellow);
  border-color: var(--sx-yellow);
}
#search_filters .custom-checkbox input[type="checkbox"] + span .checkbox-checked {
  color: #14161a;
}

/* Suwak ceny/wagi */
.ui-slider .ui-slider-range,
#search_filters .ui-widget-header {
  background: var(--sx-yellow);
}
.ui-slider .ui-slider-handle,
#search_filters .ui-state-default {
  background: var(--sx-text);
  border: 2px solid var(--sx-yellow);
  border-radius: 50%;
}
.ui-widget-content,
#search_filters .ui-slider {
  background: var(--sx-line);
  border: none;
}

/* Aktywne filtry */
.filter-block,
.active_filters .filter-block {
  background: var(--sx-yellow-soft);
  border: 1px solid var(--sx-yellow);
  color: var(--sx-yellow);
  border-radius: var(--sx-radius);
}

/* ---------------------------------------------------------------- przyciski */

.btn-primary,
.btn-primary:not(:disabled):not(.disabled),
#add-to-cart-or-refresh .add-to-cart {
  background: var(--sx-yellow);
  border-color: var(--sx-yellow);
  color: #14161a;
  font-weight: 700;
  border-radius: var(--sx-radius);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.btn-primary:hover,
.btn-primary:focus,
#add-to-cart-or-refresh .add-to-cart:hover {
  background: var(--sx-yellow-dark);
  border-color: var(--sx-yellow-dark);
  color: #14161a;
}
.btn-primary:disabled,
.add-to-cart:disabled {
  background: var(--sx-line-strong);
  border-color: var(--sx-line-strong);
  color: var(--sx-text-faint);
}

.btn-secondary,
.btn-tertiary,
.btn-outline-secondary {
  background: transparent;
  border: 1px solid var(--sx-line-strong);
  color: var(--sx-text-dim);
  border-radius: var(--sx-radius);
}
.btn-secondary:hover {
  border-color: var(--sx-yellow);
  color: var(--sx-yellow);
}

/* --------------------------------------------------------- strona produktu */

.product-prices .current-price span,
.product-price .current-price,
.current-price span[itemprop="price"] {
  color: var(--sx-yellow);
  font-weight: 800;
}

.product-variants .control-label,
.product-actions .control-label,
.product-quantity .qty {
  color: var(--sx-text-dim);
}

/* Wybór wariantu — u nas to materiał i opakowanie, czyli sedno zakupu */
.product-variants > .product-variants-item select,
.input-group.bootstrap-touchspin input,
.form-control,
select.form-control {
  background: var(--sx-bg);
  border: 1px solid var(--sx-line-strong);
  color: var(--sx-text);
  border-radius: var(--sx-radius);
}
.form-control:focus {
  border-color: var(--sx-yellow);
  box-shadow: 0 0 0 2px var(--sx-yellow-soft);
}

.product-information .product-description,
#product-details .product-reference,
#product-details .product-quantities {
  color: var(--sx-text-dim);
}

.tabs .nav-tabs .nav-link {
  color: var(--sx-text-faint);
  border: none;
}
.tabs .nav-tabs .nav-link.active {
  color: var(--sx-yellow);
  border-bottom: 2px solid var(--sx-yellow);
}

/* Tabela parametrów — najważniejszy element karty produktu w hurtowni */
.product-features > dl.data-sheet dd.value,
.product-features > dl.data-sheet dt.name,
table.table-product-discounts th,
table.table-product-discounts td {
  background: var(--sx-surface-2);
  color: var(--sx-text);
  border-color: var(--sx-line);
}
.product-features > dl.data-sheet dt.name {
  color: var(--sx-text-faint);
  font-weight: 600;
}

/* ------------------------------------------------------------------ stopka */

#footer {
  background: var(--sx-surface);
  border-top: 1px solid var(--sx-line);
  padding-top: 2rem;
}
#footer .h3,
#footer .myaccount-title,
.block-contact .block-contact-title,
#footer .block_newsletter .h3 {
  color: var(--sx-yellow);
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
}
#footer a,
#footer li a,
.block-contact,
#footer p {
  color: var(--sx-text-dim);
}
#footer a:hover {
  color: var(--sx-yellow);
}
.footer-container {
  background: transparent;
  border: none;
  box-shadow: none;
}

/* --------------------------------------------------------------- breadcrumb */

#wrapper .breadcrumb {
  background: transparent;
  padding-left: 0;
}
#wrapper .breadcrumb li a,
#wrapper .breadcrumb li::after {
  color: var(--sx-text-faint);
}
#wrapper .breadcrumb li:last-child a,
#wrapper .breadcrumb li:last-child span {
  color: var(--sx-text);
}

/* ------------------------------------------------------------- paginacja */

.pagination .page-list li a,
.pagination .current a {
  color: var(--sx-text-dim);
  border-radius: var(--sx-radius);
}
.pagination .current a {
  background: var(--sx-yellow);
  color: #14161a;
  font-weight: 700;
}
.pagination a:hover {
  color: var(--sx-yellow);
}

/* ---------------------------------------------------------- sortowanie/licznik */

#js-product-list-top .total-products p,
.products-selection .sort-by,
.products-sort-order .select-title {
  color: var(--sx-text-dim);
}
.products-sort-order .select-list {
  color: var(--sx-text);
}
.products-sort-order .dropdown-menu {
  background: var(--sx-surface-2);
  border: 1px solid var(--sx-line);
}

/* --------------------------------------------------------------- dostępność */

*:focus-visible {
  outline: 2px solid var(--sx-yellow);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ------------------------------------------------- kontrast: dobicie reszty

   Classic wymusza ciemny tekst na jasnym tle w kilkunastu miejscach, których
   nie łapią selektory wyżej. Na ciemnym motywie znikają one całkowicie —
   to nie kosmetyka, tylko czytelność. Wyłapane oglądaniem strony w
   przeglądarce, nie zgadywaniem z dokumentacji.
*/

/* Opis kategorii — ciemny tekst na ciemnym tle */
#category-description,
#category-description p,
.block-category .category-description,
.block-category p,
#main .block-category {
  color: var(--sx-text-dim);
}

/* Menu kategorii w lewej kolumnie — linki były niewidoczne */
.block-categories a,
.block-categories .category-sub-menu a,
.block-categories li a,
#left-column .block-categories a {
  color: var(--sx-text-dim);
}
.block-categories a:hover,
.block-categories li a:hover {
  color: var(--sx-yellow);
}
.block-categories .category-sub-menu li[data-depth="0"] > a {
  color: var(--sx-text);
  font-weight: 600;
  border-bottom: 1px solid var(--sx-line);
}

/* Bloki marek i dostawców zostawały białe */
#left-column .block-brands,
#left-column .block-suppliers,
#left-column > div,
#right-column > div,
.block_newsletter,
.linklist,
#footer .links,
.block-social {
  background: var(--sx-surface);
  border: 1px solid var(--sx-line);
  border-radius: var(--sx-radius);
  color: var(--sx-text-dim);
}
#left-column .text-muted,
.block-brands p,
.block-suppliers p {
  color: var(--sx-text-faint);
}

/* Lista rozwijana sortowania — biała na ciemnym */
.products-sort-order .select-title,
.products-selection .btn-unstyle,
.dropdown-menu,
.dropdown-item {
  background: var(--sx-surface-2);
  color: var(--sx-text);
  border-color: var(--sx-line);
}
.dropdown-item:hover,
.dropdown-item:focus {
  background: var(--sx-line);
  color: var(--sx-yellow);
}

/* Serce "do ulubionych" — w hurtowni złącznej nikt nie kolekcjonuje śrub */
.product-miniature .wishlist-button-add,
.wishlist-button-product,
.product-actions .wishlist-button-add,
[data-button-action="add-to-wishlist"] {
  display: none !important;
}

/* Koszyk, checkout, tabele */
.cart-grid-body,
.cart-summary,
.cart-item,
.checkout-step,
.card-body,
#checkout .card,
.order-confirmation-table,
#order-items,
.table {
  background: var(--sx-surface);
  color: var(--sx-text);
  border-color: var(--sx-line);
}
.table thead th,
.table td,
.table th {
  border-color: var(--sx-line);
  color: var(--sx-text);
}

/* Modale */
.modal-content,
.modal-header,
.modal-body,
.modal-footer {
  background: var(--sx-surface);
  color: var(--sx-text);
  border-color: var(--sx-line);
}

/* Bootstrapowe .text-muted to na jasnym Classicu szary, a u nas prawie
   czarny na prawie czarnym. PrestaShop wiesza je m.in. na opisie kategorii. */
.text-muted,
#category-description.text-muted,
#category-description.text-muted p,
.block-category .text-muted,
.product-comments-additional-info .text-muted {
  color: var(--sx-text-dim) !important;
}
