/* =========================================================================
   NEO DISCOTECH — custom CSS (child theme)
   Klasy wielokrotnego użytku. Kolory z tokenów theme.json (fallbacky poniżej).
   Bez ciężkich animacji. Mobile-first korekty na końcu.
   ========================================================================= */

:root{
  --nd-base:#080A0D; --nd-surface:#0D1117; --nd-surface2:#11161D;
  --nd-text:#FFFFFF; --nd-muted:#9BA3AE; --nd-soft:#C2C9D4; --nd-line:rgba(255,255,255,.10);
  --nd-accent:#22D3EE; --nd-accent-strong:#06B6D4; --nd-accent-ink:#04121A;
}

/* ---------- Wspólne odznaki / meta ---------- */
.nd-badge{
  display:inline-flex; align-items:center; font-size:.7rem; line-height:1; text-transform:uppercase;
  letter-spacing:.07em; padding:.35em .6em; border-radius:999px; border:1px solid; white-space:nowrap; font-weight:600;
}
.nd-badge.is-in{ color:var(--nd-accent); border-color:rgba(34,211,238,.4); background:rgba(34,211,238,.06); }
.nd-badge.is-out{ color:var(--nd-muted); border-color:var(--nd-line); }
.nd-ppl,.nd-cap{ color:var(--nd-muted); font-size:.85rem; }

/* =========================================================================
   ETAP 5 — siatka i wzbogacone karty produktów (wersja premium)
   ========================================================================= */
ul.products{
  list-style:none; margin:0; padding:0;
  display:grid; grid-template-columns:repeat(3,1fr); gap:1.5rem; align-items:start;
}
ul.products::before,ul.products::after{ content:none !important; } /* kasuje floaty motywu */

li.product.nd-card{
  width:auto !important; margin:0 !important; float:none !important;
  background:var(--nd-surface2); border:1px solid var(--nd-line);
  border-radius:16px; overflow:hidden; display:flex; flex-direction:column;
  transition:border-color .18s ease, box-shadow .18s ease;
}
/* subtelny hover: cyan border + delikatne podświetlenie, bez ruchu */
li.product.nd-card:hover{
  border-color:rgba(34,211,238,.55);
  box-shadow:0 0 0 1px rgba(34,211,238,.25), 0 10px 30px rgba(0,0,0,.35);
}

.nd-card__link{ display:flex; flex-direction:column; color:inherit; text-decoration:none; }
.nd-card__media{ display:block; background:var(--nd-base); }
.nd-card__media img{ width:100%; height:auto; display:block; aspect-ratio:1/1; object-fit:cover; }

.nd-card__body{ display:flex; flex-direction:column; gap:.4rem; padding:1.1rem 1.1rem .35rem; }
.nd-card__title{ font-size:1.3rem; font-weight:700; color:var(--nd-text); line-height:1.25; letter-spacing:-.01em; }
.nd-card__desc{
  color:var(--nd-soft); font-size:1rem; line-height:1.55; margin:0;
  display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden;
}

/* meta: cena wyraźna, cena/litr drugorzędna, status subtelny */
.nd-card__meta{ display:flex; align-items:center; gap:.6rem; flex-wrap:wrap; margin-top:.35rem; }
.nd-card__price{ color:var(--nd-accent); font-weight:800; font-size:1.45rem; letter-spacing:-.01em; line-height:1; }
.nd-card__price .woocommerce-Price-amount{ color:inherit; }
.nd-card__ppl{ color:var(--nd-muted); font-size:.8rem; }
.nd-card__meta .nd-badge{ align-self:center; margin-left:auto; }

/* CTA: jedna akcja główna (Zobacz produkt) + druga lekka (Dodaj do koszyka) */
.nd-card__cta{ padding:.6rem 1.1rem 1.1rem; display:flex; flex-direction:column; gap:.45rem; }
.nd-card__view{
  display:flex; align-items:center; justify-content:center; text-align:center; border-radius:10px;
  padding:.6rem 1rem; min-height:42px; line-height:1; font-size:.95rem;
  font-weight:700; text-decoration:none; background:var(--nd-accent); color:var(--nd-accent-ink) !important; border:1px solid var(--nd-accent);
}
.nd-card__view:hover{ background:var(--nd-accent-strong); border-color:var(--nd-accent-strong); }
.nd-card__cta .button.add_to_cart_button,
.nd-card__cta a.added_to_cart{
  display:flex; align-items:center; justify-content:center; text-align:center; border-radius:10px;
  padding:.55rem 1rem; min-height:40px; line-height:1; font-size:.9rem;
  font-weight:600; text-decoration:none; background:transparent; color:var(--nd-soft) !important;
  border:1px solid var(--nd-line);
}
.nd-card__cta .button.add_to_cart_button:hover{ border-color:var(--nd-accent); color:var(--nd-accent) !important; }
.nd-card__cta .added_to_cart{ display:none; } /* własne CTA wystarcza */

/* ---------- Select sortowania (dark) ---------- */
.woocommerce-ordering{ margin-bottom:1.5rem; }
.woocommerce-ordering select,
select.orderby{
  appearance:none; -webkit-appearance:none; -moz-appearance:none;
  background-color:var(--nd-surface2); color:var(--nd-text);
  border:1px solid var(--nd-line); border-radius:10px;
  padding:.6rem 2.4rem .6rem .95rem; font-size:.95rem; line-height:1.2; cursor:pointer;
  background-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2322D3EE' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>");
  background-repeat:no-repeat; background-position:right .85rem center; background-size:.8rem;
}
.woocommerce-ordering select:hover{ border-color:rgba(34,211,238,.5); }
.woocommerce-ordering select:focus{ outline:none; border-color:var(--nd-accent); box-shadow:0 0 0 2px rgba(34,211,238,.25); }
.woocommerce-ordering select option{ background:var(--nd-surface2); color:var(--nd-text); }
.woocommerce-result-count{ color:var(--nd-muted); }

/* =========================================================================
   ETAP 6 — strona pojedynczego produktu
   ========================================================================= */
.nd-pdp-gallery img{ border-radius:14px; }
.nd-pdp-summary .wp-block-post-title{ margin-top:0; }
.nd-pdp-summary .wc-block-components-product-price,
.nd-pdp-summary .price{ color:var(--nd-accent); font-weight:700; font-size:1.6rem; }
.nd-pdp-summary .price .woocommerce-Price-amount{ color:inherit; }
.nd-pdp-metaline{ display:flex; align-items:center; gap:.75rem; flex-wrap:wrap;
  padding:.75rem 0; border-top:1px solid var(--nd-line); border-bottom:1px solid var(--nd-line); }
.nd-pdp-summary .quantity input{ background:var(--nd-surface2); color:var(--nd-text);
  border:1px solid var(--nd-line); border-radius:8px; padding:.5rem; }
.nd-pdp-summary .single_add_to_cart_button.button{
  background:var(--nd-accent) !important; color:var(--nd-accent-ink) !important; border:none !important;
  border-radius:10px !important; padding:.9rem 1.6rem !important; font-weight:700 !important; min-height:48px;
}
.nd-pdp-summary .single_add_to_cart_button.button:hover{ background:var(--nd-accent-strong) !important; }
.nd-pdp-usp{ display:flex; gap:1.25rem; flex-wrap:wrap; color:var(--nd-muted); font-size:.85rem; margin-top:.5rem; }

.nd-section-heading{ margin-top:0; }
.nd-shipping{ color:var(--nd-muted); }
.related.products ul.products,.up-sells ul.products{ margin-top:1rem; }

/* =========================================================================
   ETAP 7 — tabela porównawcza "Dobierz płyn"
   ========================================================================= */
.nd-compare{ overflow-x:auto; }
.nd-compare table{ width:100%; border-collapse:collapse; background:var(--nd-surface2);
  border:1px solid var(--nd-line); border-radius:12px; overflow:hidden; }
.nd-compare th,.nd-compare td{ padding:.9rem 1rem; text-align:left; vertical-align:top;
  border-bottom:1px solid var(--nd-line); }
.nd-compare thead th{ background:var(--nd-surface); color:var(--nd-muted);
  text-transform:uppercase; letter-spacing:.06em; font-size:.78rem; }
.nd-compare tbody tr:last-child td{ border-bottom:none; }
.nd-compare tbody th,.nd-compare td:first-child a{ color:var(--nd-text); font-weight:600; text-decoration:none; }
.nd-compare td:first-child a:hover{ color:var(--nd-accent); }
.nd-compare .nd-inline-price{ color:var(--nd-accent); font-weight:700; white-space:nowrap; }
.nd-compare .nd-inline-price .woocommerce-Price-amount{ color:inherit; }
@media (max-width:600px){
  .nd-compare th,.nd-compare td{ padding:.7rem .6rem; font-size:.9rem; }
}

/* =========================================================================
   RESPONSYWNOŚĆ — 3 / 2 / 1 kolumny; mobile projektowany osobno
   ========================================================================= */
@media (max-width:900px){
  ul.products{ grid-template-columns:repeat(2,1fr); gap:1.25rem; }
}
@media (max-width:600px){
  ul.products{ grid-template-columns:1fr; gap:1.1rem; }
  li.product.nd-card{ border-radius:14px; }
  .nd-card__body{ padding:1rem 1rem .35rem; }
  .nd-card__title{ font-size:1.2rem; }
  .nd-card__price{ font-size:1.35rem; }
  /* karta produktu: sekcje ciaśniej, CTA pełna szerokość, duże pola dotyku */
  .nd-pdp-summary{ margin-top:1.25rem; }
  .nd-pdp-summary .single_add_to_cart_button.button{ width:100%; }
  .nd-pdp-metaline{ gap:.5rem; }
  .nd-pdp-usp{ gap:.75rem; }
}

/* =========================================================================
   Toast po dodaniu do koszyka (subtelny)
   ========================================================================= */
.nd-toast{
  position:fixed; right:1.25rem; bottom:1.25rem; z-index:9999; max-width:320px;
  background:var(--nd-surface2); color:var(--nd-text); border:1px solid var(--nd-line);
  border-radius:14px; padding:1rem 1.1rem; box-shadow:0 12px 40px rgba(0,0,0,.5);
  opacity:0; transform:translateY(12px); pointer-events:none;
  transition:opacity .18s ease, transform .18s ease;
}
.nd-toast.is-visible{ opacity:1; transform:translateY(0); pointer-events:auto; }
.nd-toast__msg{ display:flex; align-items:center; gap:.55rem; font-weight:600; margin-bottom:.75rem; }
.nd-toast__dot{ width:.5rem; height:.5rem; border-radius:999px; background:var(--nd-accent);
  box-shadow:0 0 0 4px rgba(34,211,238,.15); }
.nd-toast__actions{ display:flex; gap:.5rem; flex-wrap:wrap; }
.nd-toast__go{ flex:1; text-align:center; background:var(--nd-accent); color:var(--nd-accent-ink) !important;
  border-radius:9px; padding:.55rem .8rem; font-weight:700; text-decoration:none; font-size:.9rem; }
.nd-toast__go:hover{ background:var(--nd-accent-strong); }
.nd-toast__close{ flex:1; background:transparent; color:var(--nd-soft); border:1px solid var(--nd-line);
  border-radius:9px; padding:.55rem .8rem; font-weight:600; font-size:.9rem; cursor:pointer; }
.nd-toast__close:hover{ border-color:var(--nd-accent); color:var(--nd-accent); }
@media (max-width:600px){
  .nd-toast{ left:1rem; right:1rem; bottom:1rem; max-width:none; }
}

/* Ukryty kontener i18n dla toasta (wykrywalny przez TranslatePress) */
.nd-i18n{ position:absolute!important; width:1px; height:1px; overflow:hidden;
  clip:rect(0 0 0 0); white-space:nowrap; border:0; padding:0; margin:-1px; }
/* toast odsunięty, by nie kolidował z przełącznikiem języka TranslatePress */
.nd-toast{ bottom:4.75rem; }
@media (max-width:600px){ .nd-toast{ bottom:4.75rem; } }
