/* =========================================================
   SZOM KART – PRODUCT PAGE LAYOUT + GALLERY + FULL WIDTH BODY
   Cél:
   - csak termékoldalon tűnjön el a bal sidebar
   - felül 2 oszlop legyen: bal galéria, jobb termékadatok
   - alul a body teljes szélességben jelenjen meg
   - a külső layout ne tartson fenn üres bal oldali sávot
   ========================================================= */

/* ---------------------------------------------------------
   1) TERMÉKOLDALON BAL SIDEBAR ELTÜNTETÉSE
   --------------------------------------------------------- */

body.path-product #sidebar-left,
body.path-product .sidebar-left,
body.path-product aside.sidebar-left,
body.path-product .layout-sidebar-first,
body.path-product .region-sidebar-first,
body.path-product .column.sidebar,
body.path-product .block-region-sidebar-first,
body.path-product aside[role="complementary"] {
  display: none !important;
}

/* A külső layout ne tartson fenn sidebaros oszlopot */
body.path-product .main-container,
body.path-product .layout,
body.path-product .layout-wrapper,
body.path-product .content-layout,
body.path-product .page-wrapper,
body.path-product .site-content,
body.path-product .has-sidebar-left,
body.path-product .with-sidebar-first,
body.path-product .sidebar-first,
body.path-product .two-column,
body.path-product .layout--sidebar-first,
body.path-product .layout--with-sidebar,
body.path-product .page-with-sidebar {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  grid-template-columns: 1fr !important;
}

/* A fő tartalom vegye át a teljes helyet */
body.path-product .main,
body.path-product main.main,
body.path-product main,
body.path-product #main,
body.path-product .content,
body.path-product .region-content,
body.path-product .layout-content,
body.path-product .primary-content {
  width: 100% !important;
  max-width: 100% !important;
  float: none !important;
  flex: 0 0 100% !important;
  margin-left: 0 !important;
  padding-left: 0 !important;
  box-sizing: border-box;
}

/* ---------------------------------------------------------
   2) A TERMÉKOLDAL VALÓS STRUKTÚRÁJA
   article
     - .product-top
         - .product-image
         - .product-details
     - .product-body
   --------------------------------------------------------- */

body.path-product article.product-content-full {
  display: block !important;
  width: 100%;
  max-width: 100%;
  margin: 0;
  box-sizing: border-box;
}

/* EZ A KULCS: a product-top a kétoszlopos wrapper */
body.path-product article.product-content-full > .product-top {
  display: flex !important;
  flex-wrap: nowrap !important;
  align-items: flex-start;
  justify-content: space-between;
  gap: 36px;
  width: 100%;
  max-width: 100%;
  margin: 0;
  box-sizing: border-box;
}

/* Bal oszlop: galéria */
body.path-product article.product-content-full > .product-top > .product-image {
  flex: 0 0 calc(62% - 18px);
  max-width: calc(62% - 18px);
  min-width: 0;
  width: calc(62% - 18px);
  box-sizing: border-box;
}

/* Jobb oszlop: adatok */
body.path-product article.product-content-full > .product-top > .product-details {
  flex: 0 0 calc(38% - 18px);
  max-width: calc(38% - 18px);
  min-width: 0;
  width: calc(38% - 18px);
  box-sizing: border-box;
}

/* Alsó body teljes szélességben */
body.path-product article.product-content-full > .product-body {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  margin-top: 32px !important;
  box-sizing: border-box;
}

body.path-product article.product-content-full > .product-body .field,
body.path-product article.product-content-full > .product-body .field-item,
body.path-product article.product-content-full > .product-body .field-name-body {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box;
}

/* Biztonsági korlátok */
body.path-product .product-image,
body.path-product .product-details,
body.path-product .product-body {
  overflow-wrap: break-word;
}

/* ---------------------------------------------------------
   3) GALÉRIA BLOKK
   --------------------------------------------------------- */

body.path-product .product-variation-image {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

body.path-product .product-variation-image > .swiper-container,
body.path-product .product-variation-image .slide-single,
body.path-product .product-variation-image .product-gallery {
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  min-height: auto !important;
  box-sizing: border-box;
}

body.path-product .product-variation-image .swiper-wrapper {
  align-items: stretch;
}

body.path-product .product-variation-image .swiper-slide {
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}

body.path-product .product-variation-image .swiper-slide img,
body.path-product .product-variation-image .swiper-slide .image-field {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto !important;
  object-fit: contain;
  border-radius: 10px;
  box-sizing: border-box;
}

/* ---------------------------------------------------------
   4) SWIPER VEZÉRLŐK
   --------------------------------------------------------- */

body.path-product .product-variation-image .swiper-pagination {
  position: static !important;
  margin: 8px 0 0 0 !important;
}

body.path-product .product-variation-image .swiper-scrollbar {
  margin: 6px 0 0 0 !important;
}

body.path-product .product-variation-image .swiper-button-prev,
body.path-product .product-variation-image .swiper-button-next {
  color: #8b0000;
}

/* ---------------------------------------------------------
   5) THUMBNAIL SÁV
   ezt a JS generálja .product-thumbs néven
   --------------------------------------------------------- */

body.path-product .product-thumbs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  width: 100%;
  margin: 12px 0 0 0 !important;
  padding: 0;
  box-sizing: border-box;
}

body.path-product .product-thumb {
  appearance: none;
  -webkit-appearance: none;
  display: block;
  width: 100%;
  padding: 0;
  margin: 0;
  background: #ffffff;
  border: 2px solid #b22222;
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  line-height: 0;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
  box-sizing: border-box;
}

body.path-product .product-thumb:hover {
  transform: translateY(-1px);
  border-color: #7a0000;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
}

body.path-product .product-thumb.is-active {
  border-color: #7a0000;
  box-shadow: 0 0 0 2px rgba(122, 0, 0, 0.15);
}

body.path-product .product-thumb img {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  height: auto;
}

/* ---------------------------------------------------------
   6) TERMÉKADATOK BLOKK
   --------------------------------------------------------- */

body.path-product .product-title,
body.path-product .product-fields {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

body.path-product .product-fields .field {
  margin-bottom: 16px;
}

body.path-product .product-details form,
body.path-product .product-details .form-item,
body.path-product .product-details input,
body.path-product .product-details select {
  max-width: 100%;
  box-sizing: border-box;
}

/* ---------------------------------------------------------
   7) MOBIL / TABLET NÉZET
   --------------------------------------------------------- */

@media (max-width: 991px) {
  body.path-product article.product-content-full > .product-top {
    flex-direction: column !important;
    gap: 24px;
  }

  body.path-product article.product-content-full > .product-top > .product-image,
  body.path-product article.product-content-full > .product-top > .product-details,
  body.path-product article.product-content-full > .product-body {
    flex: 0 0 100% !important;
    max-width: 100% !important;
    width: 100% !important;
  }
}

@media (max-width: 640px) {
  body.path-product .product-thumbs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
}
