/* Tutokupisz – Product Detail Page Layout (PDP)
   Cel:
   - nowoczesny układ "galeria + panel zakupowy"
   - 1 duże zdjęcie + rząd miniaturek
   - brak zoomu w oknie – powiększenie tylko w pełnoekranowym podglądzie
   - płynne przejście między zdjęciami
   - własny pełnoekranowy lightbox z nawigacją (strzałki / przyciski)
   - dopieszczony panel zakupu (kolumna 2) – UX/SEO/WCAG
*/

/* Podstawowa klasa artykułu produktu */
.single-product .pdp{
  display:block;
}

/* Góra karty – breadcrumbs itd. */
.pdp__header{
  margin-bottom:1.5rem;
}

/* Główny układ: lewa kolumna (media), prawa (panel zakupowy) */
.pdp__main{
  display:grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap:3rem;
  align-items:flex-start;
}

.pdp__media,
.pdp__summary{
  min-width:0;
}

/* Sekcja poniżej "above the fold" (trust, zakładki, produkty powiązane) */
.pdp__below{
  margin-top:3rem;
}

.pdp__below > * + *{
  margin-top:2.5rem;
}

/* ==========================================================
   ZAKŁADKI POD KARTĄ PRODUKTU (OPIS / INFO / OPINIE)
   ========================================================== */

/* Wrapper zakładek pod kartą produktu */
.single-product .pdp__below .woocommerce-tabs{
  margin:0;
  padding:1.75rem 1.5rem 1.75rem;
  border-radius:14px;
  background:#ffffff;
  border:1px solid #e5e7eb;
  box-shadow:0 14px 35px rgba(15, 23, 42, 0.06);
}

/* Lista zakładek (Opis / Dodatkowe informacje / Opinie) */
.single-product .pdp__below .woocommerce-tabs .wc-tabs{
  display:flex;
  flex-wrap:wrap;
  align-items:flex-end;
  gap:.4rem;
  list-style:none;
  margin:0 0 1.25rem;
  padding:0 0 .75rem;
  border-bottom:1px solid #e5e7eb;
}

/* Pojedyncza zakładka – li */
.single-product .pdp__below .woocommerce-tabs .wc-tabs li{
  margin:0;
  padding:0;
}

/* Link zakładki – „pigułka” */
.single-product .pdp__below .woocommerce-tabs .wc-tabs li a{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:.4rem 1.2rem;
  border-radius:999px;
  font-size:.9rem;
  font-weight:500;
  text-decoration:none;
  border:1px solid transparent;
  background:transparent;
  color:#4b5563;
  transition:
    background-color .15s ease-out,
    color .15s ease-out,
    border-color .15s ease-out,
    box-shadow .15s ease-out,
    transform .1s ease-out;
}

/* Hover – delikatne podniesienie i tło */
.single-product .pdp__below .woocommerce-tabs .wc-tabs li a:hover{
  background:#f3f4f6;
  color:#111827;
  border-color:#e5e7eb;
  transform:translateY(-1px);
}

/* Zakładka aktywna (Woo dodaje .active na li) */
.single-product .pdp__below .woocommerce-tabs .wc-tabs li.active a{
  background:#2563eb;
  color:#ffffff;
  border-color:#2563eb;
  box-shadow:0 10px 25px rgba(37, 99, 235, 0.45);
}

/* Stany klawiatury – WCAG */
.single-product .pdp__below .woocommerce-tabs .wc-tabs li a:focus-visible{
  outline:3px solid #f97316;
  outline-offset:2px;
}

.single-product .pdp__below .woocommerce-tabs .wc-tabs li.active a:focus-visible{
  outline:3px solid #f97316;
  outline-offset:2px;
}

/* Usuwamy domyślne obramowania Woo na zakładkach (jeśli są) */
.single-product .pdp__below .woocommerce-tabs .wc-tabs::before{
  display:none !important;
}

/* Panele treści zakładek */
.single-product .pdp__below .woocommerce-tabs .woocommerce-Tabs-panel{
  margin:0;
  padding:0;
  font-size:.95rem;
  line-height:1.7;
  color:#374151;
}

/* Nagłówki wewnątrz paneli (Woo zwykle generuje <h2>) */
.single-product .pdp__below .woocommerce-tabs .woocommerce-Tabs-panel > h2{
  font-size:1.05rem;
  line-height:1.4;
  margin:0 0 .75rem;
  color:#111827;
}

/* Tekst akapitów w panelach */
.single-product .pdp__below .woocommerce-tabs .woocommerce-Tabs-panel p{
  margin:0 0 .75rem;
}

/* Listy w opisach – lekko „oddychające” */
.single-product .pdp__below .woocommerce-tabs .woocommerce-Tabs-panel ul,
.single-product .pdp__below .woocommerce-tabs .woocommerce-Tabs-panel ol{
  padding-left:1.2rem;
  margin:0 0 .85rem;
}

.single-product .pdp__below .woocommerce-tabs .woocommerce-Tabs-panel li + li{
  margin-top:.25rem;
}

/* ----------------------------------------------------------
   OPIS – „CZYTAJ WIĘCEJ” W ZAKŁADCE OPIS
   ---------------------------------------------------------- */

/* Wrapper logiki "czytaj więcej" w zakładce OPIS */
.single-product .pdp__below .woocommerce-tabs .woocommerce-Tabs-panel--description .pdp-desc{
  position:relative;
}

/* Kontener na właściwą treść (bez nagłówka <h2>) */
.single-product .pdp__below .woocommerce-tabs .woocommerce-Tabs-panel--description .pdp-desc__content{
  margin-top:.5rem;
}

/* Stan ZWINIĘTY: ograniczenie wysokości + ucięcie treści */
.single-product .pdp__below .woocommerce-tabs .woocommerce-Tabs-panel--description .pdp-desc.pdp-desc--collapsed .pdp-desc__content{
  max-height:18rem;
  overflow:hidden;
}

/* Gradient w kolorystyce nawiązującej do aktywnej zakładki (brand blue) */
.single-product .pdp__below .woocommerce-tabs .woocommerce-Tabs-panel--description .pdp-desc.pdp-desc--collapsed::after{
  content:'';
  position:absolute;
  left:0;
  right:0;
  bottom:2.6rem;
  height:4rem;
  background:linear-gradient(
    to bottom,
    rgba(239, 246, 255, 0),
    #eff6ff
  );
  pointer-events:none;
}

/* Przycisk "Czytaj cały opis" / "Zwiń opis" – w kolorystyce zakładki */
.single-product .pdp__below .woocommerce-tabs .woocommerce-Tabs-panel--description .pdp-desc__toggle{
  margin-top:.75rem;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:.3rem;
  font-size:.88rem;
  font-weight:500;
  border-radius:999px;
  border:1px solid #bfdbfe;       /* blue-200 */
  padding:.35rem .9rem;
  background:#eff6ff;              /* blue-50 */
  color:#1d4ed8;                   /* blue-700 */
  cursor:pointer;
  transition:
    background-color .15s ease-out,
    border-color .15s ease-out,
    box-shadow .15s ease-out,
    transform .1s ease-out;
  box-shadow:0 6px 18px rgba(37, 99, 235, 0.18);
}

/* Hover – mocniejsze nawiązanie do niebieskiej zakładki */
.single-product .pdp__below .woocommerce-tabs .woocommerce-Tabs-panel--description .pdp-desc__toggle:hover{
  background:#dbeafe;              /* blue-100 */
  border-color:#93c5fd;            /* blue-300 */
  color:#1d4ed8;
  box-shadow:0 10px 28px rgba(37, 99, 235, 0.28);
  transform:translateY(-1px);
}

/* Focus – WCAG, zostawiamy mocny kontrastowy outline */
.single-product .pdp__below .woocommerce-tabs .woocommerce-Tabs-panel--description .pdp-desc__toggle:focus-visible{
  outline:3px solid #f97316;
  outline-offset:2px;
}

/* Dodatkowe informacje – tabela parametrów */
.single-product .pdp__below .woocommerce-tabs .woocommerce-Tabs-panel table.shop_attributes{
  width:100%;
  border-collapse:collapse;
  border-spacing:0;
  margin:0;
  font-size:.9rem;
}

.single-product .pdp__below .woocommerce-tabs .woocommerce-Tabs-panel table.shop_attributes tr:nth-child(odd){
  background:#f9fafb;
}

.single-product .pdp__below .woocommerce-tabs .woocommerce-Tabs-panel table.shop_attributes th,
.single-product .pdp__below .woocommerce-tabs .woocommerce-Tabs-panel table.shop_attributes td{
  padding:.55rem .7rem;
  border:1px solid #e5e7eb;
  vertical-align:top;
}

.single-product .pdp__below .woocommerce-tabs .woocommerce-Tabs-panel table.shop_attributes th{
  width:32%;
  font-weight:600;
  color:#374151;
}

.single-product .pdp__below .woocommerce-tabs .woocommerce-Tabs-panel table.shop_attributes td{
  color:#4b5563;
}

/* Opinie – podstawowe uporządkowanie */
.single-product .pdp__below .woocommerce-tabs #reviews{
  margin:0;
}

/* Nagłówek sekcji opinii */
.single-product .pdp__below .woocommerce-tabs #reviews > h2{
  font-size:1.05rem;
  margin:0 0 .75rem;
}

/* Lista opinii */
.single-product .pdp__below .woocommerce-tabs #reviews #comments{
  margin:0 0 1.25rem;
}

/* Formularz opinii – oddech od listy */
.single-product .pdp__below .woocommerce-tabs #reviews #review_form_wrapper{
  margin-top:1.25rem;
  padding-top:1.1rem;
  border-top:1px solid #e5e7eb;
}

/* Etykiety / komunikaty w sekcji opinii */
.single-product .pdp__below .woocommerce-tabs #reviews .woocommerce-verification-required,
.single-product .pdp__below .woocommerce-tabs #reviews .comment-respond .comment-form-rating label{
  font-size:.9rem;
  font-weight:500;
  color:#374151;
}

/* Mobile – pasek zakładek przewijany poziomo */
@media (max-width:768px){
  .single-product .pdp__below .woocommerce-tabs{
    padding:1.5rem 1.1rem 1.6rem;
    border-radius:12px;
  }

  .single-product .pdp__below .woocommerce-tabs .wc-tabs{
    overflow-x:auto;
    overflow-y:hidden;
    -webkit-overflow-scrolling:touch;
    padding-bottom:.5rem;
    margin-bottom:1rem;
    scrollbar-width:thin;
  }

  .single-product .pdp__below .woocommerce-tabs .wc-tabs li{
    flex:0 0 auto;
  }

  .single-product .pdp__below .woocommerce-tabs .wc-tabs li a{
    white-space:nowrap;
    padding:.35rem 1rem;
    font-size:.88rem;
  }
}

/* Bardzo małe ekrany – minimalne dostosowanie */
@media (max-width:480px){
  .single-product .pdp__below .woocommerce-tabs{
    padding:1.3rem .9rem 1.4rem;
  }

  .single-product .pdp__below .woocommerce-tabs .woocommerce-Tabs-panel > h2{
    font-size:1rem;
  }

  .single-product .pdp__below .woocommerce-tabs .woocommerce-Tabs-panel--description .pdp-desc__content{
    margin-top:.4rem;
  }

  .single-product .pdp__below .woocommerce-tabs .woocommerce-Tabs-panel--description .pdp-desc__toggle{
    font-size:.86rem;
    padding:.3rem .8rem;
  }
}

/* ----------------------------------------------------------
   KOLUMNA 2 – panel informacji i zakupu
   ---------------------------------------------------------- */

.pdp__summary{
  background:#ffffff;
  border-radius:14px;
  padding:1.75rem 1.75rem 1.5rem;
  box-shadow:0 18px 45px rgba(15, 23, 42, 0.08);
  border:1px solid rgba(148, 163, 184, 0.35);
}

/* ==========================
   NAGŁÓWEK PRAWEJ KOLUMNY
   ========================== */

.pdp__summary-header{
  display:flex;
  flex-direction:column;
  gap:.4rem;
  margin:0 0 1rem;
}

/* Tytuł produktu – wyśrodkowany */
.pdp__summary .product_title.entry-title{
  font-size:clamp(1.4rem, 2vw, 1.7rem);
  line-height:1.25;
  margin:0;
  letter-spacing:-0.01em;
  text-align:center;
}

/* Wiersz: producent (lewa) + ocena (prawa) */
.pdp__meta-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:.75rem;
}

/* Producent (z logo) – lewa strona wiersza */
.pdp__meta-line{
  display:inline-flex;
  align-items:center;
  gap:.45rem;
  font-size:.83rem;
  color:#6b7280;
}

.pdp__meta-logo{
  display:inline-flex;
  align-items:center;
  justify-content:center;
}

.pdp__meta-logo-img{
  display:block;
  max-height:42px;
  max-width:140px;
  height:auto;
  width:auto;
  object-fit:contain;
  border-radius:6px;
}

.pdp__meta-item{
  display:inline-flex;
  gap:.25rem;
  align-items:center;
}

.pdp__meta-item strong{
  font-weight:600;
  color:#374151;
}

.pdp__meta-item a{
  color:#111827;
  text-decoration:none;
  border-bottom:1px dotted currentColor;
}

.pdp__meta-item a:hover{
  border-bottom-style:solid;
}

/* Ocena + link do opinii – prawa strona wiersza */
.single-product .pdp__summary .woocommerce-product-rating{
  display:inline-flex;
  align-items:center;
  gap:.4rem;
  margin:0;
  font-size:.875rem;
  color:#4b5563;
}

/* Gwiazdki – złote, z szarym tłem */
.single-product .pdp__summary .woocommerce-product-rating .star-rating{
  margin:0;
  font-size:1rem;
  line-height:1;
}

.single-product .pdp__summary .woocommerce-product-rating .star-rating::before{
  color:#d1d5db !important;
}

.single-product .pdp__summary .woocommerce-product-rating .star-rating span::before{
  color:#fbbf24 !important;
}

/* Tekst/link z liczbą opinii / "Napisz opinię" */
.single-product .pdp__summary .woocommerce-review-link{
  color:#4b5563;
  text-decoration:none;
  border-bottom:1px dotted currentColor;
  text-underline-offset:2px;
  font-size:.8rem;
}

.single-product .pdp__summary .woocommerce-review-link:hover{
  color:#111827;
  border-bottom-style:solid;
}

/* Mobile – rating ciut mniejszy */
@media (max-width:480px){
  .single-product .pdp__summary .woocommerce-product-rating{
    font-size:.8125rem;
  }
  .single-product .pdp__summary .woocommerce-product-rating .star-rating{
    font-size:.9rem;
  }
}

/* ==========================
   CENY: BRUTTO + JEDNOSTKA
   ========================== */

/* Wiersz: cena brutto + jednostka ("Cena dotyczy: 1 szt.") */
.pdp__price-row{
  display:flex;
  flex-wrap:wrap;
  align-items:baseline;
  justify-content:center;
  gap:.5rem;
  margin:.1rem 0 .4rem;
}

/* Cena – chip BRUTTO (główna cena w nagłówku) */
.pdp__price-row > .price{
  display:inline-flex;
  align-items:baseline;
  flex-wrap:wrap;
  gap:.35rem .6rem;
  margin:0;
  padding:.4rem .85rem;
  border-radius:999px;
  background:#f3f4f6;
  font-size:clamp(1.18rem, 1.6vw, 1.4rem);
  font-weight:600;
  color:#111827;
}

/* Jedno, własne BRUTTO – pseudo-element tylko na p.price */
.pdp__price-row > .price::after{
  content:' BRUTTO';
  font-size:.72rem;
  font-weight:600;
  text-transform:uppercase;
  letter-spacing:.08em;
  color:#6b7280;
}

/* Na PDP ukrywamy sufiks Woo, żeby nie dublować BRUTTO */
.single-product .pdp__summary .price .woocommerce-price-suffix{
  display:none !important;
}

.pdp__price-row > .price del{
  order:2;
  font-size:.9rem;
  color:#9ca3af;
}

.pdp__price-row > .price ins{
  order:1;
  text-decoration:none;
}

/* Jednostka ceny – w tym samym wierszu co cena, czerwony akcent */
.pdp__price-unit{
  font-size:.8rem;
  font-weight:600;
  color:#b91c1c;
}

/* ==========================
   BLOK LOGISTYKI (jeśli używany)
   ========================== */

.pdp__logistics{
  margin:.1rem 0 1rem;
  padding:.7rem .9rem;
  border-radius:12px;
  background:#f9fafb;
  border:1px dashed #e5e7eb;
  font-size:.86rem;
  color:#4b5563;
}

.pdp__logistics-list{
  list-style:none;
  padding:0;
  margin:0;
  display:flex;
  flex-direction:column;
  gap:.25rem;
}

.pdp__logistics-item{
  display:flex;
  flex-wrap:wrap;
  gap:.25rem;
}

.pdp__logistics-label{
  font-weight:600;
  color:#374151;
}

.pdp__logistics-value{
  flex:1 1 auto;
}

/* ==========================
   KRÓTKI OPIS – ACCORDION
   ========================== */

.pdp__summary .woocommerce-product-details__short-description{
  margin:1rem 0 1.25rem;
  font-size:.92rem;
  line-height:1.6;
  color:#4b5563;
}

.pdp-shortdesc{
  margin:1rem 0 1.25rem;
  border-radius:12px;
  border:1px solid #e5e7eb;
  background:#f9fafb;
  overflow:hidden;
}

.pdp-shortdesc__toggle{
  width:100%;
  padding:.6rem .9rem;
  background:transparent;
  border:0;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:.5rem;
  font-size:.9rem;
  font-weight:600;
  text-align:left;
  cursor:pointer;
}

.pdp-shortdesc__toggle::after{
  content:'▾';
  font-size:.85rem;
  transition:transform .18s ease-out;
}

.pdp-shortdesc.pdp-shortdesc--open .pdp-shortdesc__toggle::after{
  transform:rotate(-180deg);
}

.pdp-shortdesc__panel{
  padding:.4rem .9rem .85rem;
  border-top:1px solid #e5e7eb;
  font-size:.9rem;
  line-height:1.6;
  color:#4b5563;
}

.pdp-shortdesc__panel .woocommerce-product-details__short-description{
  margin:.25rem 0 0;
}

/* ==========================
   WARIANTY PRODUKTU
   ========================== */

.pdp__summary .variations_form{
  margin:0 0 1.25rem;
}

.pdp__summary table.variations{
  width:100%;
  border-collapse:separate;
  border-spacing:0;
  background:#f9fafb;
  border-radius:12px;
  padding:.75rem .9rem;
  display:block;
}

.pdp__summary table.variations tbody,
.pdp__summary table.variations tr{
  display:block;
}

.pdp__summary table.variations td{
  display:block;
  padding:0;
}

.pdp__summary table.variations td.label{
  margin-bottom:.25rem;
  font-size:.8rem;
  font-weight:600;
  text-transform:uppercase;
  letter-spacing:.06em;
  color:#6b7280;
}

.pdp__summary table.variations td.value{
  margin-bottom:.65rem;
}

.pdp__summary table.variations select{
  width:100%;
  border-radius:999px;
  border:1px solid rgba(148, 163, 184, 0.9);
  padding:.45rem 2.1rem .45rem .9rem;
  font-size:.9rem;
  background-color:#ffffff;
  background-image:
    linear-gradient(45deg, transparent 50%, #6b7280 50%),
    linear-gradient(135deg, #6b7280 50%, transparent 50%);
  background-position:
    calc(100% - 12px) 50%,
    calc(100% - 7px) 50%;
  background-size:6px 6px;
  background-repeat:no-repeat;
  -webkit-appearance:none;
  -moz-appearance:none;
  appearance:none;
  transition:
    border-color .18s ease-out,
    box-shadow .18s ease-out,
    background-color .18s ease-out;
}

.pdp__summary table.variations select:hover{
  border-color:rgba(37, 99, 235, 0.6);
  background-color:#f9fafb;
}

.pdp__summary table.variations select:focus-visible{
  outline:0;
  border-color:#2563eb;
  box-shadow:0 0 0 1px #2563eb33, 0 0 0 3px #bfdbfe;
}

.pdp__summary table.variations select option{
  padding:.3rem .5rem;
  font-size:.9rem;
}

.pdp__summary .woocommerce-variation-price{
  display:none !important;
}

.pdp__summary .single_variation .stock{
  margin:0;
  font-size:.8rem;
}

.pdp__summary .reset_variations{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  margin-top:.3rem;
  padding:.25rem .9rem;
  border-radius:999px;
  border:1px solid #e5e7eb;
  background:#f9fafb;
  font-size:.8rem;
  font-weight:500;
  color:#6b7280;
  text-decoration:none;
  cursor:pointer;
}

.pdp__summary .reset_variations:hover{
  background:#e5e7eb;
  color:#374151;
}

/* ==========================
   KOSZYK – ILOŚĆ + PRZYCISK
   ========================== */

.pdp__summary form.cart:not(.variations_form){
  display:flex;
  flex-wrap:wrap;
  align-items:stretch;
  gap:.75rem 1rem;
  margin:1rem 0 1.25rem;
}

.pdp__summary .single_variation_wrap .variations_button{
  display:flex;
  flex-wrap:wrap;
  align-items:stretch;
  gap:.75rem 1rem;
  margin-top:.9rem;
}

.pdp__summary form.cart .quantity,
.pdp__summary .single_variation_wrap .variations_button .quantity{
  max-width:7.5rem;
}

.pdp__summary form.cart .quantity input[type="number"],
.pdp__summary .single_variation_wrap .variations_button .quantity input[type="number"]{
  width:100%;
  min-height:2.7rem;
  border-radius:999px;
  border:1px solid rgba(148, 163, 184, 0.9);
  text-align:center;
  padding:.35rem .75rem;
  font-size:.9rem;
  font-weight:500;
  background:#ffffff;
  -moz-appearance:textfield;
}

.pdp__summary form.cart .quantity input[type="number"]::-webkit-inner-spin-button,
.pdp__summary form.cart .quantity input[type="number"]::-webkit-outer-spin-button,
.pdp__summary .single_variation_wrap .variations_button .quantity input[type="number"]::-webkit-inner-spin-button,
.pdp__summary .single_variation_wrap .variations_button .quantity input[type="number"]::-webkit-outer-spin-button{
  -webkit-appearance:none;
  margin:0;
}

.pdp__summary form.cart .quantity input[type="number"]:focus-visible,
.pdp__summary .single_variation_wrap .variations_button .quantity input[type="number"]:focus-visible{
  outline:0;
  border-color:#2563eb;
  box-shadow:0 0 0 1px #2563eb33, 0 0 0 3px #bfdbfe;
}

.pdp__summary .single_add_to_cart_button{
  flex:1 1 auto;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:.4rem;
  min-height:2.9rem;
  border-radius:9999px;
  font-size:.94rem;
  font-weight:600;
  text-transform:uppercase;
  letter-spacing:.04em;
  padding:0 1.8rem;
  background:#2563eb;
  border:1px solid #2563eb;
  color:#ffffff;
  box-shadow:0 14px 35px rgba(37, 99, 235, 0.35);
  transition:
    background-color .18s ease-out,
    box-shadow .18s ease-out,
    transform .12s ease-out;
  cursor:pointer;
}

.pdp__summary .single_add_to_cart_button:hover{
  background:#1d4ed8;
  border-color:#1d4ed8;
  box-shadow:0 18px 45px rgba(37, 99, 235, 0.50);
  transform:translateY(-1px);
}

.pdp__summary .single_add_to_cart_button:focus-visible{
  outline:0;
  box-shadow:0 0 0 1px #fefefe, 0 0 0 3px #f97316;
}

.pdp__benefits{
  margin:.35rem 0 0;
  font-size:.86rem;
  color:#4b5563;
}

.pdp__benefits-list{
  list-style:none;
  padding:0;
  margin:0;
  display:flex;
  flex-direction:column;
  gap:.25rem;
}

.pdp__benefits-item{
  position:relative;
  padding-left:1rem;
}

.pdp__benefits-item::before{
  content:'•';
  position:absolute;
  left:.1rem;
  top:.1rem;
  font-size:.8rem;
  color:#2563eb;
}

.pdp__summary .yith-wcwl-add-to-wishlist,
.pdp__summary .compare,
.pdp__summary .tuto-pdp-secondary-actions{
  margin-top:.25rem;
  font-size:.86rem;
}

.pdp__summary .product_meta{
  display:none;
}

/* ----------------------------------------------------------
   Galeria produktu – 1 duże zdjęcie + rząd miniaturek
   ---------------------------------------------------------- */

.single-product .pdp__media .woocommerce-product-gallery{
  width:100%;
  display:flex;
  flex-direction:column;
  gap:0.75rem;
}

.single-product .pdp__media .woocommerce-product-gallery__wrapper{
  width:100%;
}

.single-product .pdp__media .woocommerce-product-gallery__image{
  opacity:0;
  transition:opacity .3s ease-in-out;
}

.single-product .pdp__media .woocommerce-product-gallery__image.flex-active-slide{
  opacity:1;
}

.single-product .pdp__media .woocommerce-product-gallery__image img{
  display:block;
  width:100%;
  max-width:70%;
  height:auto;
  margin:0 auto;
  border-radius:10px;
  background:#ffffff;
  cursor:pointer;
  box-shadow:0 14px 35px rgba(15, 23, 42, 0.12);
  padding:8px;
}

.single-product .pdp__media .zoomImg{
  display:none !important;
}

.single-product .pdp__media .flex-viewport{
  margin:0;
}

.single-product .pdp__media .flex-control-nav{
  list-style:none;
  padding:0;
  margin:0;
}

.single-product .pdp__media .flex-control-thumbs{
  display:flex;
  flex-wrap:wrap;
  justify-content:center;
  gap:0.5rem;
}

.single-product .pdp__media .flex-control-thumbs li{
  margin:0;
  flex:0 1 22%;
  max-width:110px;
}

.single-product .pdp__media .flex-control-thumbs img{
  display:block;
  width:100%;
  height:auto;
  aspect-ratio:1 / 1;
  object-fit:contain;
  border-radius:8px;
  cursor:pointer;
  background:#ffffff;
  padding:4px;
  box-shadow:0 6px 18px rgba(15, 23, 42, 0.10);
  transition:
    box-shadow .18s ease-out,
    transform .18s ease-out,
    border-color .18s ease-out;
  border:1px solid rgba(148, 163, 184, 0.5);
}

.single-product .pdp__media .flex-control-thumbs img:hover{
  box-shadow:0 10px 28px rgba(15, 23, 42, 0.18);
  transform:translateY(-1px);
  border-color:rgba(37, 99, 235, 0.55);
}

.single-product .pdp__media .flex-control-thumbs li img.flex-active,
.single-product .pdp__media .flex-control-thumbs li.flex-active img{
  box-shadow:0 12px 32px rgba(37, 99, 235, 0.30);
  border-color:rgba(37, 99, 235, 0.9);
}

.single-product .pdp__media .woocommerce-product-gallery__trigger{
  display:none !important;
}

/* ==========================================================
   LIGHTBOX – pełnoekranowy podgląd zdjęcia z nawigacją
   ========================================================== */

html.tuto-pdp-lightbox-open{
  overflow:hidden;
}

.tuto-pdp-lightbox{
  position:fixed;
  inset:0;
  z-index:9999;
  display:flex;
  align-items:center;
  justify-content:center;
  font-family:inherit;
}

.tuto-pdp-lightbox__backdrop{
  position:absolute;
  inset:0;
  background:rgba(15, 23, 42, 0.85);
  cursor:zoom-out;
}

.tuto-pdp-lightbox__inner{
  position:relative;
  z-index:1;
  max-width:90vw;
  max-height:90vh;
  display:flex;
  align-items:center;
  justify-content:center;
}

.tuto-pdp-lightbox__img{
  max-width:100%;
  max-height:100%;
  border-radius:10px;
  box-shadow:0 20px 45px rgba(15, 23, 42, 0.55);
  background:#ffffff;
}

.tuto-pdp-lightbox__close{
  position:absolute;
  top:-2.5rem;
  right:-0.25rem;
  border:0;
  background:transparent;
  color:#e5e7eb;
  font-size:1.75rem;
  line-height:1;
  cursor:pointer;
}

.tuto-pdp-lightbox__close:hover{
  color:#ffffff;
}

.tuto-pdp-lightbox__nav{
  position:absolute;
  top:50%;
  transform:translateY(-50%);
  width:2.75rem;
  height:2.75rem;
  border-radius:999px;
  border:0;
  background:rgba(15, 23, 42, 0.5);
  color:#e5e7eb;
  display:flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
  font-size:1.6rem;
  line-height:1;
}

.tuto-pdp-lightbox__nav:hover{
  background:rgba(15, 23, 42, 0.7);
  color:#ffffff;
}

.tuto-pdp-lightbox__nav--prev{
  left:1rem;
}

.tuto-pdp-lightbox__nav--next{
  right:1rem;
}

/* ==========================================================
   RESPONSYWNOŚĆ
   ========================================================== */

@media (max-width:1024px){
  .pdp__main{
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    gap:2rem;
  }

  .single-product .pdp__media .woocommerce-product-gallery__image img{
    max-width:80%;
  }
}

@media (max-width:768px){
  .pdp__main{
    display:block;
  }

  .pdp__media{
    margin-bottom:1.75rem;
  }

  .pdp__summary{
    max-width:40rem;
    margin:0 auto;
    padding:1.25rem 1.25rem 1.5rem;
    box-shadow:0 10px 25px rgba(15, 23, 42, 0.06);
    border-radius:12px;
  }

  .pdp__below{
    margin-top:2.5rem;
  }

  .single-product .pdp__media .woocommerce-product-gallery__image img{
    max-width:100%;
  }

  .single-product .pdp__media .flex-control-thumbs{
    gap:0.45rem;
  }

  .tuto-pdp-lightbox__inner{
    max-width:94vw;
    max-height:80vh;
  }

  .tuto-pdp-lightbox__close{
    top:0.75rem;
    right:0.75rem;
  }

  .tuto-pdp-lightbox__nav{
    width:2.25rem;
    height:2.25rem;
    font-size:1.4rem;
  }

  .tuto-pdp-lightbox__nav--prev{
    left:0.75rem;
  }

  .tuto-pdp-lightbox__nav--next{
    right:0.75rem;
  }
}

@media (max-width:480px){
  .pdp__header{
    margin-bottom:0.75rem;
  }

  .pdp__summary{
    padding:1.15rem 1rem 1.35rem;
  }

  .pdp__summary .product_title.entry-title{
    font-size:1.25rem;
  }

  .single-product .pdp__media .flex-control-thumbs{
    gap:0.4rem;
  }
}

/* ==========================================================
   TWARDY OVERRIDE KOLORU PRZYCISKU "DO KOSZYKA"
   ========================================================== */

.single-product .pdp__summary .single_add_to_cart_button{
  background:#2563eb !important;
  border-color:#2563eb !important;
  box-shadow:0 14px 35px rgba(37, 99, 235, 0.35);
}

.single-product .pdp__summary .single_add_to_cart_button:hover{
  background:#1d4ed8 !important;
  border-color:#1d4ed8 !important;
  box-shadow:0 18px 45px rgba(37, 99, 235, 0.50);
  transform:translateY(-1px);
}

.single-product .pdp__summary .single_add_to_cart_button:focus-visible{
  outline:0;
  box-shadow:0 0 0 1px #fefefe, 0 0 0 3px #f97316;
}

/* ==========================================================
   PDP – sekcje "Może spodoba Ci się również" / "Podobne produkty"
   w stylu product-grids (spójne z modules/product-grids/grids.css)
   ========================================================== */

/* Wrapper sekcji grids pod kartą produktu */
.single-product .pdp__below .tuto-pgrids{
  position:relative;
  width:100%;
  max-width:var(--container);
  margin-inline:auto;
  padding-inline:16px;
}

/* Tytuł sekcji na PDP – dokładnie jak w grids.css */
.single-product .pdp__below .tuto-pgrids.tuto-pgrids--pdp .tuto-pgrids__title{
  margin:0 0 10px;
  text-align:center;
  font:800 18px/1.2 system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;
}

/* Siatka produktów – logika jak w grids.css */
.single-product .pdp__below .tuto-pgrids ul.products{
  display:grid;
  gap:var(--gap-sm);
  margin:0;
  padding:0;
  list-style:none;
  grid-template-columns:repeat(auto-fit, var(--card-w));
  justify-content:center;
}

/* Tylko na PDP wyłączamy equal-height i „pompowanie” kart */
.single-product .pdp__below .tuto-pgrids.tuto-pgrids--pdp ul.products{
  align-items:flex-start;      /* zamiast globalnego stretch + min-height */
}

/* Mobile – 2 kolumny jak na stronie głównej */
@media (max-width:479.98px){
  .single-product .pdp__below .tuto-pgrids{
    padding-inline:8px;
  }
  .single-product .pdp__below .tuto-pgrids ul.products{
    gap:10px;
    grid-template-columns:repeat(2, minmax(200px, 1fr));
  }
  .single-product .pdp__below .tuto-pgrids ul.products li.product{
    width:auto;
  }
}

/* Desktop (≥1024px) – szerzej, tak by komfortowo zmieścić 4 karty */
@media (min-width:1024px){
  .single-product .pdp__below .tuto-pgrids.tuto-pgrids--pdp{
    position:relative;
    width:100vw;
    max-width:none;
    left:50%;
    right:50%;
    margin-left:-50vw;
    margin-right:-50vw;
    padding-inline:32px;
  }
}

/* Karta produktu w sekcji PDP grids:
   - brak wymuszonego min-height (wysokość po treści)
   - mniejszy odstęp między ikonami a dolną krawędzią karty */
.single-product .pdp__below .tuto-pgrids.tuto-pgrids--pdp ul.products li.product{
  min-height:auto;   /* nadpisuje min-height:100% z grids.css */
  height:auto;
  padding-bottom:6px; /* było 12px w grids.css – mniej pustego dołu */
}

/* Zachowany odstęp NAD ikonami (między ceną a ikonami) */
.single-product .pdp__below .tuto-pgrids.tuto-pgrids--pdp .tuto-actions{
  margin-top:10px;  /* jak w grids.css */
  margin-bottom:0;
}
/* PDP – tytuł w kartach powiązanych: jak w grids.css, z dopasowaniem na mobile */
.single-product .pdp__below .tuto-pgrids.tuto-pgrids--pdp
ul.products li.product .woocommerce-loop-product__title{
  margin:8px 0 0;
  font:700 13.6px/1.32 system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;
  color:var(--title-accent);

  /* identyczna logika jak w modules/product-grids/grids.css */
  display:-webkit-box;
  -webkit-box-orient:vertical;
  -webkit-line-clamp:2;
  overflow:hidden;

  /* minimalna wysokość na dwie linie – cena nigdy nie „wchodzi” w tytuł */
  min-height:calc(1em * 1.32 * 2);
}

/* Bardzo wąski mobile – pozwalamy na 3 linie, ale dalej blokujemy wysokość,
   więc tytuł nie dotyka ceny i karty trzymają równe wysokości */
@media (max-width:480px){
  .single-product .pdp__below .tuto-pgrids.tuto-pgrids--pdp
  ul.products li.product .woocommerce-loop-product__title{
    -webkit-line-clamp:3;
    min-height:calc(1em * 1.32 * 3);
  }
}
/* ==========================================================
   PDP – komunikaty WooCommerce (dodano do koszyka / błędy)
   Spójne z kartą PDP i siatką produktów
   ========================================================== */

.single-product .woocommerce-notices-wrapper{
  margin:0 0 1.5rem;
}

/* Wspólna baza: układ „chip + tekst + przycisk” */
.single-product .woocommerce-notices-wrapper .woocommerce-message,
.single-product .woocommerce-notices-wrapper .woocommerce-error,
.single-product .woocommerce-notices-wrapper .woocommerce-info{
  position:relative;
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:.75rem 1.75rem;

  padding:.8rem 1.25rem .8rem 2.7rem;
  border-radius:999px;
  border-width:1px;
  border-style:solid;

  font-size:.88rem;
  line-height:1.5;
  box-shadow:0 10px 25px rgba(15, 23, 42, 0.06);
  margin:0;              /* kasujemy marginesy Woo */
}

/* Ikona po lewej stronie – zgodna z naszym stylem „kółeczek” */
.single-product .woocommerce-notices-wrapper .woocommerce-message::before,
.single-product .woocommerce-notices-wrapper .woocommerce-error::before,
.single-product .woocommerce-notices-wrapper .woocommerce-info::before{
  content:'';
  position:absolute;
  left:1rem;
  top:50%;
  transform:translateY(-50%);

  width:22px;
  height:22px;
  border-radius:999px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  box-shadow:0 6px 16px rgba(15, 23, 42, 0.18);
}

/* Właściwy znak w środku kółka */
.single-product .woocommerce-notices-wrapper .woocommerce-message::after,
.single-product .woocommerce-notices-wrapper .woocommerce-error::after,
.single-product .woocommerce-notices-wrapper .woocommerce-info::after{
  position:absolute;
  left:1rem;
  top:50%;
  transform:translate(0, -50%);
  width:22px;
  height:22px;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:13px;
  font-weight:700;
  color:#ffffff;
}

/* Kolory dla success / error / info */
.single-product .woocommerce-notices-wrapper .woocommerce-message{
  background:#f0fdf4;     /* green-50 */
  border-color:#bbf7d0;   /* green-200 */
  color:#166534;          /* green-700 */
}
.single-product .woocommerce-notices-wrapper .woocommerce-message::before{
  background:radial-gradient(circle at 30% 30%, #bbf7d0, #16a34a);
}
.single-product .woocommerce-notices-wrapper .woocommerce-message::after{
  content:'✓';
}

.single-product .woocommerce-notices-wrapper .woocommerce-error{
  background:#fef2f2;     /* red-50 */
  border-color:#fecaca;   /* red-200 */
  color:#b91c1c;          /* red-700 */
}
.single-product .woocommerce-notices-wrapper .woocommerce-error::before{
  background:radial-gradient(circle at 30% 30%, #fecaca, #ef4444);
}
.single-product .woocommerce-notices-wrapper .woocommerce-error::after{
  content:'!';
}

.single-product .woocommerce-notices-wrapper .woocommerce-info{
  background:#eff6ff;     /* blue-50 */
  border-color:#bfdbfe;   /* blue-200 */
  color:#1d4ed8;          /* blue-700 */
}
.single-product .woocommerce-notices-wrapper .woocommerce-info::before{
  background:radial-gradient(circle at 30% 30%, #bfdbfe, #2563eb);
}
.single-product .woocommerce-notices-wrapper .woocommerce-info::after{
  content:'i';
}

/* Linki w treści komunikatów */
.single-product .woocommerce-notices-wrapper .woocommerce-message a,
.single-product .woocommerce-notices-wrapper .woocommerce-error a,
.single-product .woocommerce-notices-wrapper .woocommerce-info a{
  color:inherit;
  text-decoration:underline;
  text-underline-offset:2px;
}

/* Przycisk „Zobacz koszyk” – stylistycznie jak przycisk koszyka,
   ale w wersji „secondary” żeby nie krzyczał bardziej niż główny CTA */
.single-product .woocommerce-notices-wrapper .woocommerce-message .button,
.single-product .woocommerce-notices-wrapper .woocommerce-error .button,
.single-product .woocommerce-notices-wrapper .woocommerce-info .button{
  margin-left:auto;
  border-radius:999px;
  padding:.4rem 1.4rem;
  font-size:.8rem;
  font-weight:600;
  text-transform:uppercase;
  letter-spacing:.06em;

  background:#ffffff;
  border:1px solid #2563eb;
  color:#2563eb;
  box-shadow:0 10px 25px rgba(37, 99, 235, 0.25);
  text-decoration:none;
  white-space:nowrap;

  transition:
    background-color .18s ease-out,
    color .18s ease-out,
    box-shadow .18s ease-out,
    transform .12s ease-out;
}

.single-product .woocommerce-notices-wrapper .woocommerce-message .button:hover,
.single-product .woocommerce-notices-wrapper .woocommerce-error .button:hover,
.single-product .woocommerce-notices-wrapper .woocommerce-info .button:hover{
  background:#2563eb;
  color:#ffffff;
  box-shadow:0 14px 35px rgba(37, 99, 235, 0.45);
  transform:translateY(-1px);
}

.single-product .woocommerce-notices-wrapper .woocommerce-message .button:focus-visible,
.single-product .woocommerce-notices-wrapper .woocommerce-error .button:focus-visible,
.single-product .woocommerce-notices-wrapper .woocommerce-info .button:focus-visible{
  outline:0;
  box-shadow:0 0 0 1px #fefefe, 0 0 0 3px #f97316;
}

/* Mobile – komunikat łamie się w kolumnę, przycisk na pełną szerokość */
@media (max-width:640px){
  .single-product .woocommerce-notices-wrapper .woocommerce-message,
  .single-product .woocommerce-notices-wrapper .woocommerce-error,
  .single-product .woocommerce-notices-wrapper .woocommerce-info{
    border-radius:14px;
    padding:.85rem .9rem .9rem 2.7rem;
  }

  .single-product .woocommerce-notices-wrapper .woocommerce-message .button,
  .single-product .woocommerce-notices-wrapper .woocommerce-error .button,
  .single-product .woocommerce-notices-wrapper .woocommerce-info .button{
    width:100%;
    justify-content:center;
    margin-left:0;
  }
}
