/* ==========================================================================
   Single product (PDP) styles
   ========================================================================== */

.single-product-page {
  /* No bottom padding — the inner sections (.pd-layout, .pd-crosssell)
     each carry their own bottom spacing. Adding it here would create
     a white gap before the footer (after the grey crosssell band). */
  padding-bottom: 0;
}
/* When there's no crosssell section, .pd-layout's bottom padding
   provides the breathing room before the footer (56px). */

.pd-layout {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 56px;
  padding: 32px 0 56px;
}

/* ==========================================================================
   GALLERY (left)
   ========================================================================== */

.pd-gallery {
  position: sticky;
  top: 160px;
  align-self: flex-start;
}

/* Override WC default gallery markup with our look */
.pd-gallery .woocommerce-product-gallery {
  margin: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
  float: none !important;
  opacity: 1 !important;
}
.pd-gallery .woocommerce-product-gallery__wrapper {
  background: #fff;
  border: 1px solid var(--c-border);
  border-radius: var(--r-xl);
  overflow: hidden;
  position: relative;
  margin: 0 0 12px !important;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}
.pd-gallery .woocommerce-product-gallery__image {
  width: 100% !important;
  height: 100% !important;
  display: flex;
  align-items: center;
  justify-content: center;
}
.pd-gallery .woocommerce-product-gallery__image:not(:first-child) {
  display: none;
}
.pd-gallery .woocommerce-product-gallery__image a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}
.pd-gallery .woocommerce-product-gallery__image img {
  display: block;
  max-width: 82% !important;
  max-height: 82% !important;
  width: auto !important;
  height: auto !important;
  object-fit: contain;
  background: transparent;
  margin: 0 auto;
  /* Eliminate white box behind product photos on the white card. */
  mix-blend-mode: multiply;
}
.pd-gallery .flex-control-thumbs {
  display: grid !important;
  grid-template-columns: repeat(5, 1fr) !important;
  gap: 8px !important;
  margin: 0 !important;
  list-style: none !important;
  padding: 0 !important;
  overflow: visible !important;
}
.pd-gallery .flex-control-thumbs li {
  width: 100% !important;
  margin: 0 !important;
  float: none !important;
  list-style: none;
  aspect-ratio: 1;
}
.pd-gallery .flex-control-thumbs img {
  border-radius: var(--r-md);
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: border-color 0.15s ease;
  width: 100% !important;
  height: 100% !important;
  object-fit: contain;
  background: var(--c-bg-cool);
  padding: 6px;
  box-sizing: border-box;
  opacity: 0.6;
}
.pd-gallery .flex-control-thumbs img:hover,
.pd-gallery .flex-control-thumbs img.flex-active {
  border-color: var(--c-anthracite);
  opacity: 1 !important;
}

/* Hide WC's "View larger" magnifier glass overlay if present */
.pd-gallery .woocommerce-product-gallery__trigger {
  display: none !important;
}

.pd-gallery .onsale {
  position: absolute;
  top: 16px;
  left: 16px;
  background: var(--c-orange);
  color: #fff;
  font-family: var(--f-mono);
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 3px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  z-index: 5;
}

/* ==========================================================================
   INFO (right)
   ========================================================================== */

.pd-info {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.pd-brand-line {
  display: flex;
  gap: 12px;
  align-items: center;
  font-family: var(--f-mono);
  font-size: 12px;
  flex-wrap: wrap;
}
.pd-brand {
  background: var(--c-anthracite);
  color: #fff;
  padding: 4px 10px;
  border-radius: var(--r-sm);
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.pd-sku {
  color: var(--c-steel);
}

.pd-h1 {
  font-size: 32px;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--c-anthracite);
}

.pd-tagline {
  font-size: 15px;
  color: var(--c-graphite);
  line-height: 1.55;
}
.pd-tagline p { margin: 0; }
.pd-tagline p + p { margin-top: 8px; }

/* ==========================================================================
   KEY SPECS GRID
   ========================================================================== */

.pd-specs-key {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  background: var(--c-bg-soft);
  border-radius: var(--r-lg);
  padding: 16px;
}
.pd-spec-key {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 8px;
}
.pd-spec-key-icon {
  width: 32px;
  height: 32px;
  background: #fff;
  border-radius: var(--r-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--c-anthracite);
  flex-shrink: 0;
}
.pd-spec-key-icon svg {
  width: 18px;
  height: 18px;
  stroke-width: 1.8;
}
.pd-spec-key-label {
  font-size: 11px;
  color: var(--c-steel);
  font-family: var(--f-mono);
  margin-bottom: 2px;
}
.pd-spec-key-value {
  font-size: 13px;
  font-weight: 600;
  color: var(--c-anthracite);
  line-height: 1.3;
}

/* ==========================================================================
   PRICE BLOCK
   ========================================================================== */

.pd-price-block {
  border: 1.5px solid var(--c-border);
  border-radius: var(--r-xl);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.pd-price-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  flex-wrap: wrap;
}
.pd-price {
  font-family: var(--f-mono);
  font-size: 32px;
  font-weight: 600;
  color: var(--c-anthracite);
  letter-spacing: -0.03em;
  line-height: 1;
}
.pd-price del {
  color: var(--c-silver);
  font-size: 0.7em;
  font-weight: 400;
  margin-right: 4px;
}
.pd-price ins {
  text-decoration: none;
  background: transparent;
}
.pd-price-vat {
  font-family: var(--f-mono);
  font-size: 11px;
  color: var(--c-steel);
  margin-top: 6px;
}

.pd-stock-block {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: var(--c-lime-soft);
  border-radius: var(--r-md);
  border-left: 3px solid var(--c-lime);
  flex-shrink: 0;
}
.pd-stock-block.backorder {
  background: #FFF7ED;
  border-left-color: var(--c-orange);
}
.pd-stock-icon {
  width: 24px;
  height: 24px;
  background: var(--c-lime);
  color: var(--c-anthracite);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-weight: 700;
  font-size: 14px;
}
.pd-stock-block.backorder .pd-stock-icon {
  background: var(--c-orange);
  color: #fff;
}
.pd-stock-text strong {
  font-size: 13px;
  color: var(--c-anthracite);
  display: block;
  line-height: 1.2;
}
.pd-stock-text span {
  font-size: 11px;
  color: var(--c-graphite);
  font-family: var(--f-mono);
  margin-top: 2px;
  display: inline-block;
}

/* WC add-to-cart form override */
.pd-actions form.cart {
  margin: 0 !important;
  display: flex;
  align-items: stretch;
  gap: 8px;
  flex-wrap: wrap;
}
/* Hide WooCommerce's native stock/availability text inside the cart form.
   We render our own .pd-stock-block above, so WC's "X in stock",
   "Na sklade už len 1 ks", "Available on backorder" etc. would duplicate it. */
.pd-info .stock,
.pd-info p.stock,
.pd-actions .stock,
.pd-actions p.stock,
.pd-info .wc-availability,
.single-product div.product p.stock {
  display: none !important;
}
.pd-actions .quantity {
  display: flex;
  align-items: center;
  border: 1.5px solid var(--c-border);
  border-radius: var(--r-md);
  overflow: hidden;
  background: #fff;
}
.pd-actions .quantity .qty {
  border: none;
  outline: none;
  background: transparent;
  width: 56px;
  height: 48px;
  text-align: center;
  font-family: var(--f-mono);
  font-size: 15px;
  font-weight: 600;
  color: var(--c-anthracite);
  -moz-appearance: textfield;
}
.pd-actions .quantity .qty::-webkit-outer-spin-button,
.pd-actions .quantity .qty::-webkit-inner-spin-button {
  -webkit-appearance: none;
}

/* Add-to-cart button — use !important to defeat WC default theme/plugin CSS.
   Also targeting .button.alt which is the WC default class. */
.pd-actions .single_add_to_cart_button,
.pd-actions button.single_add_to_cart_button,
.pd-actions .single_add_to_cart_button.button.alt,
.woocommerce .pd-actions .single_add_to_cart_button {
  flex: 1 !important;
  min-width: 200px !important;
  background: var(--c-lime) !important;
  background-color: var(--c-lime) !important;
  color: var(--c-anthracite) !important;
  border: none !important;
  padding: 14px 24px !important;
  border-radius: var(--r-md) !important;
  font-family: var(--f-sans) !important;
  font-weight: 600 !important;
  font-size: 14px !important;
  text-transform: uppercase !important;
  letter-spacing: 0.02em !important;
  cursor: pointer !important;
  transition: background 0.15s ease !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  height: auto !important;
  line-height: 1 !important;
  text-shadow: none !important;
  box-shadow: none !important;
}
.pd-actions .single_add_to_cart_button:hover,
.woocommerce .pd-actions .single_add_to_cart_button:hover {
  background: var(--c-lime-light) !important;
  background-color: var(--c-lime-light) !important;
  color: var(--c-anthracite) !important;
}
.pd-actions .single_add_to_cart_button.disabled,
.pd-actions .single_add_to_cart_button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.pd-trust-micro {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  padding-top: 16px;
  border-top: 1px solid var(--c-border);
}
.pd-trust-mini {
  display: flex;
  gap: 6px;
  align-items: center;
  font-size: 12px;
  color: var(--c-graphite);
}
.pd-trust-mini svg {
  width: 16px;
  height: 16px;
  color: var(--c-lime-dark);
  flex-shrink: 0;
}

/* Variations select */
.pd-actions table.variations {
  margin: 0 0 12px;
  width: 100%;
}
.pd-actions table.variations th,
.pd-actions table.variations td {
  padding: 8px 0;
  vertical-align: middle;
}
.pd-actions table.variations select {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--c-border);
  border-radius: var(--r-md);
  font-family: var(--f-sans);
  font-size: 14px;
  background: #fff;
  color: var(--c-anthracite);
}

/* ==========================================================================
   TABS (woocommerce_output_product_data_tabs)
   ========================================================================== */

.pd-tabs-wrap {
  border-top: 1px solid var(--c-border);
  padding-top: 56px;
  margin-top: 32px;
}

/* WC default tabs override */
.woocommerce-tabs .wc-tabs {
  display: flex;
  gap: 0;
  list-style: none;
  border-bottom: 1px solid var(--c-border);
  padding: 0;
  margin: 0 0 32px;
  overflow-x: auto;
  scrollbar-width: none;
}
.woocommerce-tabs .wc-tabs::-webkit-scrollbar { display: none; }
.woocommerce-tabs .wc-tabs li {
  margin: 0;
  padding: 0;
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
}
.woocommerce-tabs .wc-tabs li::before,
.woocommerce-tabs .wc-tabs li::after {
  display: none !important;
}
.woocommerce-tabs .wc-tabs li a {
  background: transparent !important;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 20px !important;
  font-family: var(--f-sans);
  font-size: 14px;
  font-weight: 500;
  color: var(--c-graphite);
  text-decoration: none !important;
  border-bottom: 2px solid transparent !important;
  white-space: nowrap;
  transition: all 0.15s ease;
}
.woocommerce-tabs .wc-tabs li a:hover {
  color: var(--c-anthracite);
}
.woocommerce-tabs .wc-tabs li.active a {
  color: var(--c-anthracite);
  font-weight: 600;
  border-bottom-color: var(--c-lime) !important;
}

.woocommerce-Tabs-panel {
  padding: 0;
  max-width: 880px;
}
.woocommerce-Tabs-panel h2 {
  font-size: 22px;
  font-weight: 600;
  color: var(--c-anthracite);
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}
.woocommerce-Tabs-panel p {
  font-size: 15px;
  line-height: 1.7;
  color: var(--c-graphite);
  margin-bottom: 12px;
}
.woocommerce-Tabs-panel h3 {
  font-size: 18px;
  font-weight: 600;
  color: var(--c-anthracite);
  margin: 24px 0 8px;
}
.woocommerce-Tabs-panel ul {
  margin: 12px 0 16px 24px;
}
.woocommerce-Tabs-panel li {
  font-size: 14px;
  line-height: 1.7;
  color: var(--c-graphite);
  margin-bottom: 4px;
}

/* Spec table — typically inside additional_information panel */
.shop_attributes,
.woocommerce-product-attributes {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.shop_attributes tr,
.woocommerce-product-attributes tr {
  border-bottom: 1px solid var(--c-border);
}
.shop_attributes th,
.woocommerce-product-attributes-item__label {
  padding: 12px 16px !important;
  text-align: left !important;
  font-family: var(--f-mono) !important;
  font-size: 12px !important;
  font-weight: 500 !important;
  color: var(--c-steel) !important;
  width: 240px !important;
  background: transparent !important;
}
.shop_attributes td,
.woocommerce-product-attributes-item__value {
  padding: 12px 16px !important;
  color: var(--c-anthracite) !important;
  font-weight: 500;
  background: transparent !important;
}
.woocommerce-product-attributes-item__value p {
  margin: 0 !important;
}

/* ==========================================================================
   CROSS-SELL / RELATED
   ========================================================================== */

.pd-crosssell {
  background: var(--c-bg-soft);
  margin: 56px 0 0 0;
  padding: 56px 0;
  /* Full-bleed effect — extend the grey background past the .container
     edges using box-shadow trick. Works reliably regardless of parent
     overflow/width constraints (unlike margin: -1000px hack which can
     leak as horizontal scrollbar or get clipped). */
  box-shadow: 0 0 0 100vmax var(--c-bg-soft);
  clip-path: inset(0 -100vmax);
}
/* Make sure the grey crosssell band touches the footer directly,
   with no white gap. */
.pd-crosssell:last-child {
  margin-bottom: 0;
  padding-bottom: 56px;
}
.pd-crosssell .section-head {
  border-bottom: 1px solid var(--c-border);
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */

@media (max-width: 980px) {
  .pd-layout {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .pd-gallery {
    position: relative;
    top: auto;
  }
  .pd-h1 { font-size: 26px; }
  .pd-price { font-size: 28px; }
  .pd-price-row { flex-direction: column; align-items: stretch; }
  .pd-stock-block { width: 100%; }
}

@media (max-width: 640px) {
  .pd-specs-key { grid-template-columns: 1fr; }
  .pd-trust-micro { grid-template-columns: 1fr 1fr; gap: 8px; }
  .pd-actions .single_add_to_cart_button { width: 100%; min-width: 0; }
}
