/* =========================================================
   FM24 PRODUCT PAGE — v3
   Zmiany: prostokątne zdjęcie, płynne skalowanie buyboxa,
   breakpoint mobile na 908px
   Plik: assets/css/fm-product.css
========================================================= */

.fm-product-skin,
.fm-product-skin * {
  box-sizing: border-box;
}

.fm-product-skin {
  --fm-page-max: 130rem;
  --fm-gap: 2.4rem;

  --fm-left-col: 43rem;
  --fm-right-col: 33rem;

  --fm-bg: #171920;
  --fm-bg-2: #1d2028;
  --fm-surface: #232734;
  --fm-surface-2: #2b3040;

  --fm-line: rgba(255, 255, 255, 0.08);
  --fm-line-strong: rgba(255, 255, 255, 0.14);

  --fm-text: #f5f7fc;
  --fm-text-soft: #a3adc4;
  --fm-text-muted: #7d879e;

  --fm-yellow: #ffdd44;
  --fm-yellow-hover: #ffe66a;
  --fm-yellow-2: #ffe45a;
  --fm-green: #37d17c;

  --fm-radius: 1.6rem;
  --fm-radius-sm: 1.2rem;
  --fm-shadow-card: 0 2rem 5rem rgba(0, 0, 0, 0.16);

  --fm-transition-fast: 180ms ease;
  --fm-transition-smooth: 320ms cubic-bezier(0.22, 1, 0.36, 1);

  width: 100%;
  padding: 3rem 0 5rem;
  color: var(--fm-text);
  font-family: 'Montserrat', sans-serif;
}

.fm-product-skin .fm-page-width {
  max-width: var(--fm-page-max);
  margin: 0 auto;
  padding: 0 2.4rem;
}

/* =========================
   Layout produktu — STAŁA SZEROKOŚĆ kolumn (rem)
========================= */

.fm-product-grid {
  display: grid;
  grid-template-columns: minmax(28rem, 12fr) minmax(22rem, 10fr);
  align-items: start;
  justify-content: center;
  gap: 1.8rem !important;
  max-width: 90%;
  margin: auto;
}

/* =========================
   Galeria — PROSTOKĄTNA (4:3) zamiast kwadratowej
========================= */

.fm-gallery {
  width: 100%;
  max-width: var(--fm-left-col);
  min-width: 0;
  height: auto;
}

.fm-gallery__main {
  position: relative;
  width: 100%;
  border: 1px solid var(--fm-line);
  border-radius: var(--fm-radius);
  overflow: hidden;
  background: linear-gradient(180deg, #303955 0%, #283149 100%);
  aspect-ratio: 3 / 4;
}

.fm-gallery__slide {
  position: absolute;
  inset: 0;
  display: none;
}

.fm-gallery__slide.is-active {
  display: block;
}

.fm-gallery__slide img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.fm-gallery__thumbs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-top: 1rem;
}

.fm-gallery__thumb {
  position: relative;
  aspect-ratio: 4 / 3;
  border: 1px solid var(--fm-line);
  border-radius: var(--fm-radius-sm);
  overflow: hidden;
  background: var(--fm-surface);
  cursor: pointer;
  padding: 0;
  transition: border-color var(--fm-transition-fast), opacity var(--fm-transition-fast);
}

.fm-gallery__thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.fm-gallery__thumb:hover {
  opacity: 0.85;
}

.fm-gallery__thumb.is-active {
  border-color: var(--fm-yellow);
}

/* =========================
   Buybox — STAŁA szerokość
========================= */

.fm-buybox {
  width: 100%;
  max-width: var(--fm-right-col);
  padding: 1.6rem;
  position: sticky;
  top: 2rem;
  border: 1px solid var(--fm-line);
  border-radius: var(--fm-radius);
  background: linear-gradient(180deg, rgba(37, 42, 57, 0.98) 0%, rgba(31, 35, 47, 0.98) 100%);
}

.fm-meta-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.fm-meta-top__logo {
  font-size: 1.1rem;
  line-height: 1;
  font-weight: 900;
  letter-spacing: -0.05em;
  color: var(--fm-text);
}

.fm-meta-top__logo-last-letter {
  color: var(--fm-yellow);
}

.fm-meta-top__status {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  white-space: nowrap;
  color: #dfe9df;
  font-size: 0.8rem !important;
}

.fm-meta-top__dot {
  width: 0.5rem !important;
  height: 0.5rem !important;
  border-radius: 50%;
  background: var(--fm-green);
  box-shadow: 0 0 0 0.4rem rgba(55, 209, 124, 0.1);
}

.fm-title {
  margin: 0 0 1rem;
  color: var(--fm-text);
  font-size: clamp(1.4rem, 1.6vw, 1.8rem);
  line-height: 1.15;
  letter-spacing: -0.01em;
  font-weight: 800;
}

.fm-price {
  margin: 0 0 1.4rem;
}

.fm-price .price,
.fm-price .woocommerce-Price-amount,
.fm-price span.amount {
  color: var(--fm-yellow) !important;
  font-family: Montserrat, sans-serif;
  font-size: clamp(1.4rem, 1.5vw, 1.7rem) !important;
  line-height: 1;
  letter-spacing: -.02em;
  font-weight: 800 !important;
}

.fm-price del .woocommerce-Price-amount {
  color: var(--fm-text-soft) !important;
  font-size: 1rem !important;
  font-weight: 800 !important;
  text-decoration: line-through;
}

.fm-price ins {
  text-decoration: none;
}

.fm-sku {
  margin: 0 0 1rem;
  color: var(--fm-text-soft);
  font-size: 0.7rem;
}

.fm-buybox form.cart {
  margin: 0 0 0.8rem !important;
}

.fm-buybox table.variations {
  width: 100%;
  border: 0;
  margin: 0 0 1rem;
}

.fm-buybox table.variations tr {
  display: block;
  margin-bottom: 1rem;
}

.fm-buybox table.variations th,
.fm-buybox table.variations td {
  display: block;
  padding: 0;
  border: 0;
}

.fm-buybox table.variations label {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--fm-text);
  font-size: 0.8rem;
  font-weight: 700;
}

.fm-buybox table.variations select {
  width: 100%;
  min-height: 4rem;
  border: 1px solid var(--fm-line);
  border-radius: 1rem;
  background: var(--fm-surface);
  color: var(--fm-text);
  font-size: 0.9rem;
  padding: 0 1.2rem;
  appearance: none;
}

.fm-buybox table.variations select:focus-visible {
  outline: none;
  box-shadow: 0 0 0 0.3rem rgba(255, 221, 68, 0.12);
}

.fm-buybox .woocommerce-variation-price {
  margin: 0.8rem 0;
}

.fm-buybox .reset_variations {
  color: var(--fm-text-soft);
  font-size: 0.7rem;
}

/* CHOWAMY WYBÓR ILOŚCI */
.fm-buybox .quantity {
  display: none !important;
}

/* =========================
   Przycisk "Dodaj do koszyka" — WERSJA ULEPSZONA
   Grubszy gradient, wyraźniejszy cień, animacja "pulsującej"
   poświaty przy hover, mikro-podniesienie (scale + translateY),
   subtelny błysk (shine) przesuwający się po przycisku.
========================= */

.fm-buybox .single_add_to_cart_button {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  width: 100%;
  min-height: 3.6rem;
  overflow: hidden;
  border: 0 !important;
  border-radius: 22px !important;
  background: linear-gradient(135deg, #ffe867 0%, #ffdd44 55%, #ffc93c 100%) !important;
  color: #241d08 !important;
  font-size: 1.2rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.01em;
  cursor: pointer;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.35) inset,
    0 -2px 0 rgba(0, 0, 0, 0.08) inset,
    0 10px 20px rgba(255, 221, 68, 0.22),
    0 2px 6px rgba(0, 0, 0, 0.18);
  transition:
    transform var(--fm-transition-fast),
    box-shadow var(--fm-transition-fast),
    background var(--fm-transition-fast);
}

.fm-buybox .single_add_to_cart_button:hover {
  transform: translateY(-2px) scale(1.01);
  background: linear-gradient(135deg, #fff08a 0%, #ffe45a 55%, #ffd24d 100%) !important;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.4) inset,
    0 -2px 0 rgba(0, 0, 0, 0.08) inset,
    0 10px 20px rgba(255, 221, 68, 0.32),
    0 4px 10px rgba(0, 0, 0, 0.22);
}

.fm-buybox .single_add_to_cart_button:active {
  transform: translateY(0) scale(0.99);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.25) inset,
    0 6px 14px rgba(255, 221, 68, 0.22);
}

.fm-buybox .single_add_to_cart_button:focus-visible {
  outline: none !important;
  box-shadow:
    0 0 0 3px rgba(255, 221, 68, 0.28),
    0 14px 30px rgba(255, 221, 68, 0.28) !important;
}

.fm-buybox .single_add_to_cart_button.disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

.fm-buybox .single_add_to_cart_button.disabled::after {
  display: none;
}

.fm-activation-notice {
  display: flex;
  gap: 0.6rem;
  margin: 1.2rem 0 0;
  padding: 1rem 1.2rem;
  background-color: #151a26;
  border: 1px solid #4a4a49;
  border-left: 4px solid #e53e3e;
  border-radius: 0.6rem;
}

.fm-activation-notice__icon {
  flex-shrink: 0;
  color: #e53e3e;
  font-size: 1rem;
}

.fm-activation-notice__text {
  color: #fadb7d;
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: 0.5px;
}

.fm-trust-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1.4rem;
  padding-top: 1.4rem;
  border-top: 1px solid var(--fm-line);
}

.fm-trust-item {
  text-align: center;
  font-size: 1rem;
  line-height: 1.3;
  font-weight: bold;
  color: #edf1fb;
}

.fm-trust-item svg {
  display: block;
  width: 1.5rem;
  height: 1.5rem;
  margin: 0 auto 0.5rem;
  color: var(--fm-yellow);
}

.fm-includes-box {
  margin-top: 1.4rem;
  padding-top: 1.4rem;
  border-top: 1px solid var(--fm-line);
}

.fm-includes-box h3 {
  margin: 0 0 1rem;
  color: var(--fm-text);
  font-size: 1.2rem;
  line-height: 1.15;
  font-weight: 800;
}

.fm-includes-box ul {
  display: grid;
  gap: 0.6rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.fm-includes-box li {
  position: relative;
  padding-left: 1.5rem;
  color: #edf1fb;
  font-size: 1rem;
  line-height: 1.4;
}

.fm-includes-box li::before {
  content: "✓";
  position: absolute;
  top: 0;
  left: 0;
  color: var(--fm-yellow);
  font-weight: 900;
}

.fm-buybox-links {
  margin-top: 1.4rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--fm-line);
  display: grid;
  gap: 0.8rem;
}

.fm-buybox-links__trustpilot {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.6rem 0.9rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 1rem;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.025) 0%, rgba(255, 255, 255, 0.015) 100%);
  text-decoration: none;
  transition: border-color var(--fm-transition-fast), transform var(--fm-transition-fast), box-shadow var(--fm-transition-fast);
}

.fm-buybox-links__trustpilot:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 221, 68, 0.22);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.16);
}

.fm-buybox-links__trustpilot img {
  display: block;
  width: 100%;
  max-width: 6rem;
  height: auto;
  opacity: 0.96;
}

.fm-buybox-links__faq {
  margin: 0;
  text-align: center;
  color: var(--fm-text-soft);
  font-size: 0.9rem;
  line-height: 1.4;
}

.fm-buybox-links__faq a {
  color: var(--fm-yellow);
  font-weight: 700;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color var(--fm-transition-fast), border-color var(--fm-transition-fast);
}

.fm-buybox-links__faq a:hover {
  color: var(--fm-yellow-hover);
  border-color: currentColor;
}

.fm-product-extra {
  width: 100%;
  margin-top: 2rem;
}

.fm-product-tabs {
  width: 100%;
  max-width: 130rem;
  margin: 0 auto;
  padding: 1.4rem 1.6rem 1.8rem;
  border: 1px solid var(--fm-line);
  border-radius: 1.4rem;
  background: linear-gradient(180deg, rgba(35, 39, 52, 0.98) 0%, rgba(27, 30, 40, 0.98) 100%);
  box-shadow: var(--fm-shadow-card);
}

.fm-product-tabs__nav {
  display: flex;
  gap: 1.4rem;
  margin-bottom: 1.4rem;
  padding: 0 0.2rem;
  border-bottom: 1px solid var(--fm-line);
}

.fm-product-tabs__btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 3.6rem;
  padding: 0 0 0.4rem;
  border: 0;
  background: transparent !important;
  color: var(--fm-yellow);
  font: inherit;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  appearance: none;
  transition: color var(--fm-transition-fast);
}

/* Wymuszamy żółty kolor tekstu i przezroczyste tło w KAŻDYM
   stanie przycisku (hover, focus, active, po kliknięciu,
   oraz gdy zakładka jest aktywna .is-active), żeby przeglądarka
   nie zmieniała koloru na czarny / nie dodawała tła po kliknięciu. */
.fm-product-tabs__btn:hover,
.fm-product-tabs__btn:focus,
.fm-product-tabs__btn:focus-visible,
.fm-product-tabs__btn:active,
.fm-product-tabs__btn.is-active {
  background: transparent !important;
  color: var(--fm-yellow) !important;
  outline: none;
}


.fm-product-tabs__btn:hover,
.fm-product-tabs__btn:focus-visible {
  color: var(--fm-yellow-hover) !important;
}

.fm-product-tabs__btn::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 100%;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: bottom right;
  transition: transform 240ms ease;
}

.fm-product-tabs__btn:hover::after,
.fm-product-tabs__btn:focus-visible::after,
.fm-product-tabs__btn.is-active::after {
  transform: scaleX(1);
  transform-origin: bottom left;
}

.fm-product-tabs__panel {
  height: 0;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity var(--fm-transition-smooth), transform var(--fm-transition-smooth), visibility var(--fm-transition-smooth);
}

.fm-product-tabs__panel.is-active {
  height: auto;
  overflow: visible;
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.fm-product-rte {
  max-width: 74rem;
  color: #ccd3e6;
  font-size: 1.15rem;
  line-height: 1.75;
}

.fm-product-rte h1,
.fm-product-rte h2,
.fm-product-rte h3,
.fm-product-rte h4 {
  margin: 0 0 0.9rem;
  color: #ffffff;
  line-height: 1.2;
}

.fm-product-rte a {
  color: var(--fm-yellow);
  text-decoration: none;
}

.fm-product-rte img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  margin: 1.6rem auto;
  border: 1px solid var(--fm-line);
  border-radius: 1rem;
}

.fm-product-desc-gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  max-width: 130rem;
  margin: 1.4rem auto 0;
}

.fm-product-desc-gallery__item {
  min-height: 16rem;
  overflow: hidden;
  border: 1px solid var(--fm-line);
  border-radius: 1rem;
  background: #2a3350;
}

.fm-product-desc-gallery__image {
  display: block;
  width: 100%;
  height: 16rem;
  object-fit: cover;
}

.fm-system-requirements {
  display: grid;
  gap: 0.6rem;
  margin-top: 0.8rem;
}

.fm-system-requirements__heading {
  margin-top: 1.1rem;
  font-size: 1rem;
  font-weight: 800;
  color: #ffffff;
}

.fm-system-requirements__heading:first-child {
  margin-top: 0;
}

.fm-system-requirements__spec,
.fm-system-requirements__row {
  display: grid;
  grid-template-columns: 10rem 1fr;
  gap: 0.8rem;
  padding: 0.7rem 0.8rem;
  border: 1px solid var(--fm-line);
  border-radius: 0.8rem;
  background: rgba(255, 255, 255, 0.025);
}

.fm-system-requirements__label {
  color: #f5cc35;
  font-weight: 700;
  font-size: 1rem;
}

.fm-system-requirements__value,
.fm-system-requirements__row {
  color: #dbe1f3;
  line-height: 1.5;
  font-size: 0.9rem;
}

@media screen and (max-width: 1921px) {
  .fm-product-grid {
    max-width: 82%;
    gap: 0.6rem !important;
  }

  .fm-gallery {
    max-width: 32rem;
  }

  .fm-buybox {
    max-width: 30rem;
  }
}

/* =========================================================
   RESPONSYWNOŚĆ — breakpoint mobile na 908px
   Powyżej 908px: dwie kolumny płynnie skalujące się razem.
   Poniżej 908px: układ jednokolumnowy (mobile).
========================================================= */

@media screen and (max-width: 908px) {
  .fm-page-width {
    padding: 0 !important;
    width: 100% !important;
  }
  
  .ast-container{
    padding: 0 !important;
    
  }

  .fm-product-skin, .ast-container{
    width: 100% !important;
  }

  .fm-product-grid {
    grid-template-columns: 1fr;
    gap: 0.6rem;
    width: 100% !important;
  }

  .fm-gallery,
  .fm-buybox {
    max-width: 92vw;
    margin: 0 auto;
    width: 92vw !important;
  }

  .fm-gallery__main {
    aspect-ratio: 3 / 4;
  }

  .fm-buybox {
    position: static;
  }

  .fm-product-tabs {
    max-width: 95%;
    margin: 0 auto;
    padding: 1.1rem 1.1rem 1.4rem;
  }

  .fm-title {
    font-size: 1.4rem;
  }
  .fm-buybox {
    padding: 1.2rem;
  }
  .fm-trust-item {
    font-size: 0.9rem;
  }

  .fm-price .price {
    font-size: 2rem !important;
  }

  .fm-product-tabs__nav {
    gap: 0.8rem;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .fm-product-tabs__nav::-webkit-scrollbar {
    display: none;
  }

  .fm-product-tabs__btn {
    white-space: nowrap;
  }

  .fm-product-desc-gallery {
    grid-template-columns: 1fr;
  }

  .fm-system-requirements__spec,
  .fm-system-requirements__row {
    grid-template-columns: 1fr;
  }
}