/* =====================================================================
   06 – TERMÉKOLDAL (inc/product.php) – olasz felépítés
   Cím · kiszerelés · rövid leírás · [vásárlási kártya] · szállítás kártya ·
   Gyakran vásárolják együtt · lenyitható szakaszok
   ===================================================================== */

/* ---------- Elrendezés: kép ~46%, adatok ~54% ---------- */
/* Tableten (álló iPad) is két oszlop, különben a kép egy teljes képernyőt elfoglal.
   A rácsot mi kapcsoljuk be: a Blocksy 1000–1100 px között még flexet használ, ott a kép összeesett. */
@media (min-width: 700px) {
	.single-product .product-entry-wrapper {
		display: grid !important; align-items: start;
		grid-template-columns: minmax(0, 46fr) minmax(0, 54fr) !important;
		column-gap: max(24px, min(5vw, 110px)) !important;
	}
	.single-product .product-entry-wrapper > .woocommerce-product-gallery { width: 100% !important; }
	.single-product .product-entry-wrapper > .summary { width: 100% !important; max-width: 820px; }
}

/* ---------- Galéria ---------- */
.single-product .woocommerce-product-gallery .ct-media-container,
.single-product .flexy-items .ct-media-container {
	aspect-ratio: 1 / 1 !important; overflow: hidden; border-radius: 14px; background: var(--bv-white);
}
.single-product .woocommerce-product-gallery img,
.single-product .flexy-items img { object-fit: contain !important; }
.single-product .flexy-pills { gap: 10px; margin-top: 10px; }
.single-product .flexy-pills .ct-media-container { aspect-ratio: 1 / 1 !important; overflow: hidden; border-radius: 10px; background: var(--bv-white); }
.single-product .flexy-pills img { object-fit: contain !important; }
.single-product .flexy-pills .active img { outline: 2px solid var(--bv-brown); outline-offset: -2px; }
/* Régebbi böngészők (iOS 14 előtt): négyzetes képkeret aspect-ratio nélkül */
@supports not (aspect-ratio: 1 / 1) {
	.single-product .woocommerce-product-gallery .ct-media-container,
	.single-product .flexy-items .ct-media-container,
	.single-product .flexy-pills .ct-media-container { position: relative; }
	.single-product .woocommerce-product-gallery .ct-media-container::before,
	.single-product .flexy-items .ct-media-container::before,
	.single-product .flexy-pills .ct-media-container::before { content: ""; display: block; padding-top: 100%; }
	.single-product .woocommerce-product-gallery .ct-media-container img,
	.single-product .flexy-items .ct-media-container img,
	.single-product .flexy-pills .ct-media-container img { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
}
/* Kedvezmény a nagy képen (a listákban a .bv-badges van) */
.single-product .woocommerce-product-gallery .onsale,
.single-product div.product > .onsale {
	position: absolute; z-index: 5; top: 14px !important; left: 14px !important; right: auto !important;
	min-height: 0; padding: 3px 10px; border-radius: var(--bv-pill);
	background: var(--bv-brown); color: var(--bv-white); font-size: 13px; font-weight: 700; line-height: 1.6;
}

/* ---------- Cím, kiszerelés, rövid leírás ---------- */
.single-product .summary .product_title {
	margin: 0 0 2px !important;
	font-family: var(--bv-font-body); font-feature-settings: normal;
	font-size: max(20px, min(1.6vw, 24px)) !important; font-weight: 600; line-height: 1.3; color: var(--bv-text);
}
.bv-pd-sku { margin: 0 0 6px; font-size: 12px; letter-spacing: .02em; color: var(--bv-muted); }
.bv-pd-sku span { color: var(--bv-text); }
.bv-pd-size { margin: 0 0 10px; font-size: 14px; font-weight: 600; color: var(--bv-text); }
.bv-pd-desc-link { display: inline-block; margin: 0 0 16px; font-size: 14px; color: var(--bv-muted); text-decoration: underline; text-underline-offset: 3px; }
.bv-pd-desc-link:hover { color: var(--bv-brown); }
#leiras { scroll-margin-top: 140px; }

/* Elfogyott / Beszerzés alatt a vásárlási kártyában (inc/stock.php) */
.bv-stock { margin-top: 14px; padding: 16px 18px; border-radius: 12px; background: var(--bv-cream-light); }
.bv-stock__title { margin: 0 0 4px; font-size: 16px; font-weight: 700; color: var(--bv-text); }
.bv-stock__text, .bv-stock__ok { margin: 0; font-size: 14px; line-height: 1.5; }
.bv-stock__ok { color: #2F6E48; font-weight: 600; }
.bv-stock.is-preorder { margin: 0 0 14px; background: var(--bv-white); box-shadow: inset 0 0 0 1px var(--bv-brown); }
.bv-stock.is-preorder .bv-stock__title { color: var(--bv-brown); }
.bv-stock__error { margin: 8px 0 0; font-size: 13px; color: var(--bv-rust, #B55434); }
.bv-stock__form { display: flex; gap: 8px; margin-top: 12px; }
.bv-stock__form input[type=email] { flex: 1 1 auto; min-width: 0; height: 46px; padding: 0 16px; border: 1px solid var(--bv-cream); border-radius: var(--bv-pill); background: var(--bv-white); }
.bv-stock__form .button { flex: none; height: 46px; padding-left: 22px; padding-right: 22px; border-radius: var(--bv-pill); }
.bv-stock__trap { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.bv-stock__note { margin: 8px 0 0; font-size: 12px; color: var(--bv-muted); }
.single-product .out-of-stock-badge { display: none !important; }
.single-product .summary .woocommerce-product-details__short-description { margin: 0 0 14px; font-size: 15px; color: #4a3a33; }
.single-product .summary .woocommerce-product-details__short-description p { margin: 0; }
.single-product .product_meta { display: none; }

/* ---------- Vásárlási kártya ---------- */
.bv-buy { margin-bottom: 12px; padding: 16px 18px 18px; background: var(--bv-white); border: 1px solid var(--bv-cream); border-radius: 14px; }
/* A Blocksy a kártyán belül is kiírná a saját árát, leírását, elválasztóját */
.bv-buy .price,
.bv-buy .woocommerce-product-details__short-description,
.bv-buy .ct-product-divider,
.bv-buy hr { display: none !important; }

.bv-pr { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.bv-pr .woocommerce-Price-amount { color: inherit; font-weight: inherit; }
.bv-pr__now,
.bv-pr.is-reseller .bv-np__net { font-size: max(22px, min(1.9vw, 26px)); font-weight: 700; line-height: 1.1; color: var(--bv-brown); }
.bv-pr__was { font-size: 15px; font-weight: 400; color: #6f625b; }
.bv-pr__save { padding: 3px 10px; border-radius: var(--bv-pill); background: var(--bv-cream-light); font-size: 12px; font-weight: 500; color: var(--bv-text); }
.bv-pr__pct { margin-left: -6px; padding: 3px 10px; border-radius: var(--bv-pill); background: #6e2f20; font-size: 12px; font-weight: 700; color: var(--bv-white); }
.bv-pr__note { flex-basis: 100%; font-size: 12px; color: var(--bv-muted); }   /* 30 napos szabály (inc/omnibus.php) */

/* Ingyenes szállítás csík */
.bv-pd-meter { margin: 0 0 14px; }
.bv-pd-meter__bar { height: 8px; overflow: hidden; border-radius: 4px; background: var(--bv-cream-light); }
.bv-pd-meter__bar span { display: block; height: 100%; min-width: 6px; border-radius: 4px; background: var(--bv-brown); transition: width .5s ease; }
.bv-pd-meter__text { margin: 6px 0 0; text-align: right; font-size: 12px; color: var(--bv-muted); }
.bv-pd-meter__text strong, .bv-pd-meter__text .woocommerce-Price-amount { color: var(--bv-text); font-weight: 700; }

/* Mennyiség + Kosárba */
.single-product form.cart,
.single-product form.cart .ct-cart-actions,
.single-product form.cart .ct-product-add-to-cart {
	display: flex !important; align-items: stretch; gap: 10px; width: 100%;
	margin: 0 !important; padding: 0 !important; border: 0 !important;
}
.single-product form.cart .quantity {
	display: flex !important; align-items: center; justify-content: space-between;
	min-width: 132px; height: 48px; padding-left: 4px; padding-right: 4px; overflow: hidden;
	background: var(--bv-cream-light) !important; border: 0 !important; border-radius: var(--bv-pill) !important;
}
.single-product form.cart .quantity .ct-decrease { order: 1; }
.single-product form.cart .quantity input.qty { order: 2; }
.single-product form.cart .quantity .ct-increase { order: 3; }
.single-product form.cart .quantity input.qty {
	width: 40px !important; height: 48px; margin: 0 !important; padding: 0 !important;
	background: transparent !important; border: 0 !important;
	text-align: center; font-size: 16px !important; font-weight: 600; line-height: 48px;
	color: var(--bv-text) !important; -webkit-text-fill-color: var(--bv-text); -moz-appearance: textfield;
}
.single-product form.cart .quantity input.qty::-webkit-inner-spin-button,
.single-product form.cart .quantity input.qty::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.single-product form.cart .quantity .ct-increase,
.single-product form.cart .quantity .ct-decrease {
	position: static !important; display: inline-flex; align-items: center; justify-content: center;
	width: 38px !important; height: 100% !important; cursor: pointer;
	background: transparent !important; border: 0 !important; color: var(--bv-brown);
}
.single-product form.cart .single_add_to_cart_button {
	flex: 1 1 auto !important; width: auto !important;
	display: inline-flex !important; align-items: center; justify-content: center; gap: 8px;
	min-height: 48px; padding-left: 1.2em !important; padding-right: 1.2em !important; white-space: nowrap;
	font-size: 15px !important; font-weight: 600;
}
.single-product form.cart .single_add_to_cart_button::after {
	content: ""; flex: none; width: 18px; height: 18px; background: currentColor;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 8h14l-1 12H6z'/%3E%3Cpath d='M9 8V6a3 3 0 0 1 6 0v2'/%3E%3Cpath d='M12 12v4M10 14h4'/%3E%3C/svg%3E") center / contain no-repeat;
	        mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 8h14l-1 12H6z'/%3E%3Cpath d='M9 8V6a3 3 0 0 1 6 0v2'/%3E%3Cpath d='M12 12v4M10 14h4'/%3E%3C/svg%3E") center / contain no-repeat;
}
.single-product .summary .added_to_cart { display: none !important; }
.bv-wish--single { flex: none; width: 48px; height: 48px; border: 1px solid var(--bv-cream); }   /* kívánságlista a Kosárba mellett */
.bv-wish--single svg { width: 22px; height: 22px; }

/* ---------- Szállítás kártya ---------- */
.bv-svc { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 28px; padding: 14px 18px; background: var(--bv-white); border: 1px solid var(--bv-cream); border-radius: 14px; }
.bv-svc__icon { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; }
.bv-svc__title { margin: 0 0 2px; font-size: 14px; font-weight: 700; color: var(--bv-text); }
.bv-svc__text { margin: 0 0 4px; font-size: 12px; line-height: 1.45; color: var(--bv-muted); }
.bv-svc__link { font-size: 13px; font-weight: 700; color: var(--bv-text); text-decoration: none; }

/* ---------- Gyakran vásárolják együtt ---------- */
.bv-fbt { margin-bottom: 28px; }
.bv-fbt__title { margin: 0 0 12px; font-family: var(--bv-font-body); font-feature-settings: normal; font-size: 17px; font-weight: 700; color: var(--bv-text); }
.bv-fbt__track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; border-radius: 14px; cursor: grab; -webkit-user-select: none; user-select: none; }
.bv-fbt__track::-webkit-scrollbar { display: none; }
.bv-fbt__track.is-dragging { cursor: grabbing; scroll-snap-type: none; }
.bv-fbt__track img { pointer-events: none; }
.bv-fbt__card {
	flex: 0 0 100%; scroll-snap-align: start;
	display: grid; grid-template-columns: 110px 1fr; align-items: center; gap: 18px;
	padding: 16px 18px; background: var(--bv-white); border: 1px solid var(--bv-cream); border-radius: 14px;
}
.bv-fbt__img { position: relative; display: block; border-radius: 10px; background: var(--bv-card-bg); }
.bv-fbt__img img { display: block; width: 110px; height: 110px; object-fit: contain; mix-blend-mode: multiply; }
.bv-fbt__badge { position: absolute; top: 6px; left: 6px; z-index: 2; padding: 2px 8px; border-radius: var(--bv-pill); background: var(--bv-brown); color: var(--bv-white); font-size: 11px; font-weight: 700; }
.bv-fbt__info { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; min-width: 0; }
.bv-fbt__name {
	font-size: 15px; font-weight: 700; color: var(--bv-text); text-decoration: none;
	display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.bv-fbt__size { font-size: 13px; color: var(--bv-muted); }
.bv-fbt .bv-pr__now { font-size: 18px; }
.bv-fbt .bv-pr__pct { margin: 0; padding: 0; background: none; color: var(--bv-rust); font-size: 13px; }
.bv-fbt__add { margin-top: 8px; min-height: 40px; }
.bv-fbt__add.added { display: none; }
.bv-fbt__nav { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 12px; }
.bv-fbt__dots { display: flex; gap: 8px; }
.bv-fbt__dot { width: 9px; height: 9px; padding: 0; border: 1px solid var(--bv-text); border-radius: 50%; background: transparent; cursor: pointer; }
.bv-fbt__dot.is-active { background: var(--bv-text); }
.bv-fbt__arrow {
	display: inline-flex; align-items: center; justify-content: center;
	width: 32px; height: 32px; padding: 0; border: 1px solid var(--bv-cream); border-radius: 50%; cursor: pointer;
	background: var(--bv-white); color: var(--bv-text); font-size: 20px; line-height: 1;
}
.bv-fbt__arrow:hover { border-color: var(--bv-brown); color: var(--bv-brown); }

/* ---------- Lenyitható szakaszok ---------- */
.bv-acc__item { border-bottom: 1px solid var(--bv-cream); }
.bv-acc__item > summary {
	position: relative; list-style: none; cursor: pointer;
	padding: 16px 32px 16px 0; font-size: 15px; font-weight: 700; color: var(--bv-text);
}
.bv-acc__item > summary::-webkit-details-marker { display: none; }
.bv-acc__item > summary::after {
	content: ""; position: absolute; right: 6px; top: 50%; width: 8px; height: 8px;
	border-right: 1.8px solid var(--bv-text); border-bottom: 1.8px solid var(--bv-text);
	transform: translateY(-70%) rotate(45deg); transition: transform .2s ease;
}
.bv-acc__item[open] > summary::after { transform: translateY(-30%) rotate(-135deg); }
.bv-acc__item > summary:hover { color: var(--bv-brown); }
.bv-acc__body { padding: 0 0 20px; font-size: 14px; line-height: 1.7; color: #4a3a33; }
.bv-acc__body p { margin: 0 0 12px; }
.bv-acc__body ul { margin: 0; padding-left: 18px; }
.bv-acc__body li { margin-bottom: 8px; }
.bv-acc__body table.shop_attributes { margin: 0; border: 0; }
.bv-acc__body table.shop_attributes th,
.bv-acc__body table.shop_attributes td { padding: 10px 0; border: 0; border-bottom: 1px solid var(--bv-cream); background: none; font-size: 14px; font-style: normal; }
.bv-acc__body table.shop_attributes th { width: 40%; font-weight: 600; color: var(--bv-text); }
.bv-acc__body table.shop_attributes td p { margin: 0; }
.bv-acc__body .bv-ingredients { font-size: 13px; line-height: 1.6; overflow-wrap: anywhere; }

/* Apróbetűs megjegyzés a termék alatt */
.bv-product-note { clear: both; max-width: 760px; margin: 32px auto 0; padding: 0 16px; text-align: center; font-size: 12px; line-height: 1.6; color: #6b5a52; }

/* ---------- Kapcsolódó termékek ---------- */
.single-product .related.products { margin-top: 72px; }
.single-product .related.products > h2 {
	margin-bottom: 28px; text-align: center;
	font-family: var(--bv-font-body); font-feature-settings: normal;
	font-size: max(18px, min(13px + 0.6vw, 24px)); font-weight: 700; text-transform: uppercase; color: var(--bv-text);
}

/* ---------- Reszponzív ---------- */
@media (max-width: 600px) {
	.bv-buy { padding: 14px; }
	.bv-stock__form { flex-direction: column; }
	.single-product form.cart .quantity { min-width: 112px; }
	.bv-fbt__card { grid-template-columns: 84px 1fr; gap: 12px; padding: 12px; }
	.bv-fbt__img img { width: 84px; height: 84px; }
}
