/*
Theme Name:   VitalGel
Description:  Child theme of WoodMart for VitalGel.bg
Template:     woodmart
Version:      0.3.15
Requires PHP: 8.0
Text Domain:  vitalgel
*/

/* Keep WoodMart's own files untouched: everything in this child theme survives WoodMart updates. */

/* Quantity stepper (product page, sticky add-to-cart bar, cart).
   WoodMart has no setting for its look, so it is styled here: one outlined box with
   quiet minus/plus buttons drawn as icons. The buttons keep WoodMart's own Bulgarian
   labels for screen readers. Height follows WoodMart's form field height. */
body div.quantity {
	display: inline-flex;
	align-items: stretch;
	height: var(--wd-form-height, 42px);
	border: 1px solid #8794A5;
	border-radius: 3px;
	background: #fff;
	overflow: hidden;
	vertical-align: middle;
	transition: border-color .15s ease, box-shadow .15s ease;
}

body div.quantity:focus-within {
	border-color: #0550A2;
	box-shadow: 0 0 0 1px #0550A2;
}

body div.quantity :is(.minus, .plus) {
	flex: none;
	width: 38px;
	height: auto;
	min-height: 0;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	background-color: transparent;
	background-position: center;
	background-size: 14px 14px;
	background-repeat: no-repeat;
	box-shadow: none;
	color: transparent;
	font-size: 0;
	cursor: pointer;
	transition: background-color .15s ease;
}

body div.quantity .minus {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Cpath d='M2.5 7h9' fill='none' stroke='%230E1B2C' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
}

body div.quantity .plus {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Cpath d='M2.5 7h9M7 2.5v9' fill='none' stroke='%230E1B2C' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
}

body div.quantity :is(.minus, .plus):active { background-color: #E6EAEE; }

body div.quantity :is(.minus, .plus):focus-visible {
	outline: 2px solid #0550A2;
	outline-offset: -2px;
}

@media (hover: hover) and (pointer: fine) {
	body div.quantity :is(.minus, .plus):hover { background-color: #F2F4F6; }
}

body div.quantity input.qty {
	width: 40px;
	height: auto;
	min-height: 0;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: transparent;
	box-shadow: none;
	color: #0E1B2C;
	font-size: 19px;
	font-weight: 700;
	text-align: center;
	-moz-appearance: textfield;
	appearance: textfield;
}

body div.quantity input.qty:focus { outline: none; }

body div.quantity input.qty::-webkit-outer-spin-button,
body div.quantity input.qty::-webkit-inner-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

@media (prefers-reduced-motion: reduce) {
	body div.quantity,
	body div.quantity :is(.minus, .plus) { transition: none; }
}

/* Labelled prices (printed by functions.php): „Цена“ on the first line, quieter;
   „Цена след регистрация“ below it, carrying the price colour and size the context
   already uses (38px on the product page). A product with one price shows only
   „Цена“ at full size. */
body .price .vg-price {
	display: inline-flex;
	flex-direction: column;
	gap: 2px;
}

body .price .vg-price__row {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	column-gap: .35em;
}

body .price .vg-price__label {
	font-family: "Sofia Sans", sans-serif;
	font-size: 17px;
	font-weight: 400;
	line-height: 1.3;
	color: #3A4757;
}

body .price .vg-price__row--regular,
body .price .vg-price__row--regular .amount {
	font-size: 17px;
	font-weight: 600;
	line-height: 1.3;
	color: #5D6978;
}

/* Product page: slightly larger labels next to the 38px price. */
body .elementor-widget-wd_single_product_price .price .vg-price { gap: 6px; }

body .elementor-widget-wd_single_product_price .price .vg-price__label,
body .elementor-widget-wd_single_product_price .price .vg-price__row--regular,
body .elementor-widget-wd_single_product_price .price .vg-price__row--regular .amount {
	font-size: 19px;
}

/* Category texts under the products: WoodMart's „Extra description“ of each category
   (Products → Categories → the category), placed in the shop layout with the CSS class
   „vg-cat-text“. H2 sections, lists, and the questions as fold-open rows. */
.vg-cat-text .wd-term-desc {
	max-width: 760px;
	margin-top: 40px;
}

.vg-cat-text .wd-term-desc h2 {
	margin: 40px 0 12px;
	font-size: 29px;
	line-height: 1.2;
}

.vg-cat-text .wd-term-desc h2:first-child { margin-top: 0; }

.vg-cat-text .wd-term-desc :is(p, li) {
	font-size: 19px;
	line-height: 1.6;
	color: #3A4757;
}

.vg-cat-text .wd-term-desc ul {
	margin: 0 0 16px;
	padding-left: 20px;
}

.vg-cat-text .wd-term-desc li + li { margin-top: 6px; }

.vg-cat-text .wd-term-desc a,
.wd-shop-desc a,
.term-description a {
	color: #0550A2;
	text-decoration: underline;
	text-underline-offset: 2px;
}

.vg-faq { border-top: 1px solid #DCE1E7; }

.vg-faq details { border-bottom: 1px solid #DCE1E7; }

.vg-faq summary {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 16px 0;
	cursor: pointer;
	list-style: none;
	font-family: "Sofia Sans", sans-serif;
	font-size: 20px;
	font-weight: 700;
	line-height: 1.35;
	color: #0E1B2C;
	transition: color .15s ease;
}

.vg-faq summary::-webkit-details-marker { display: none; }

.vg-faq summary::after {
	content: "";
	flex: none;
	width: 14px;
	height: 14px;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Cpath d='M2.5 7h9M7 2.5v9' fill='none' stroke='%230550A2' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") center / 14px 14px no-repeat;
	transition: transform .2s cubic-bezier(.23, 1, .32, 1);
}

.vg-faq details[open] > summary::after { transform: rotate(45deg); }

.vg-faq summary:focus-visible {
	outline: 2px solid #0550A2;
	outline-offset: 2px;
}

@media (hover: hover) and (pointer: fine) {
	.vg-faq summary:hover { color: #0550A2; }
}

.vg-cat-text .wd-term-desc .vg-faq details > p { margin: 0 0 18px; }

@media (max-width: 767px) {
	.vg-cat-text .wd-term-desc { margin-top: 32px; }
	.vg-cat-text .wd-term-desc h2 { font-size: 25px; margin-top: 32px; }
}

@media (prefers-reduced-motion: reduce) {
	.vg-faq summary,
	.vg-faq summary::after { transition: none; }
}

/* Homepage hero slider (WoodMart „Nested carousel“ on Начало, element hero-slider): the
   slide indicators and the arrows sit on the photo along the bottom of the content area,
   indicators under the text and arrows at the right, so they never cover the headline.
   In the widget: arrows position „Together“, pagination on. WoodMart's own places for them
   (above the slider, or outside its edges and only on hover, with the dots under it) do
   not suit a full-width hero. */
.elementor-element-hero-slider .wd-carousel-container {
	--vg-hero-edge: max(15px, calc((100% - 1192px) / 2));
	/* WoodMart pads the carousel 15px above and below the slides; bottoms below add it. */
	--vg-hero-bottom: 15px;
}

/* WoodMart sets every carousel slide's padding to 0, which hid the slides' own Elementor
   padding (15px left and right on desktop, so the text never touches the screen edge on
   narrow laptops). This gives the Elementor value back. */
.elementor-element-hero-slider .wd-carousel-item.e-con {
	padding-inline: var(--padding-inline-start) var(--padding-inline-end);
}

/* All slides as tall as the tallest one. On phones the slides differ in height, and a
   shorter slide left a white band under its photo (with the white indicators in it). */
.elementor-element-hero-slider .wd-carousel-item { height: auto; }

.elementor-element-hero-slider .wd-nav-pagin-wrap {
	position: absolute;
	inset-inline-start: var(--vg-hero-edge);
	bottom: calc(var(--vg-hero-bottom) + 26px);
	z-index: 250;
	min-height: 0;
	margin: 0;
	--wd-pagin-gap: 8px;
}

.elementor-element-hero-slider .wd-nav-pagin li { padding: 10px 0; }

.elementor-element-hero-slider .wd-nav-pagin-wrap[class*="wd-style-shape"] span {
	width: 28px;
	height: 3px;
	border: 0;
	border-radius: 0;
	background-color: rgba(255, 255, 255, .45);
	transition: background-color .2s ease;
}

.elementor-element-hero-slider .wd-nav-pagin-wrap[class*="wd-style-shape"] li.wd-active span { background-color: #fff; }

@media (hover: hover) and (pointer: fine) {
	.elementor-element-hero-slider .wd-nav-pagin-wrap[class*="wd-style-shape"] li:not(.wd-active):hover span { background-color: rgba(255, 255, 255, .8); }
}

.elementor-element-hero-slider .wd-nav-pagin li:focus-visible,
.elementor-element-hero-slider .wd-btn-arrow:focus-visible {
	outline: 2px solid #fff;
	outline-offset: 2px;
}

.elementor-element-hero-slider .wd-nav-arrows.wd-pos-together {
	top: auto;
	bottom: calc(var(--vg-hero-bottom) + 14px);
	inset-inline-end: var(--vg-hero-edge);
	--wd-arrow-size: 44px;
	--wd-arrow-icon-size: 16px;
	--wd-arrow-gap: 8px;
	--wd-arrow-color: #fff;
	--wd-arrow-color-hover: #0550A2;
	--wd-arrow-bg: transparent;
	--wd-arrow-bg-hover: #fff;
	--wd-arrow-brd: 1px solid;
	--wd-arrow-brd-color: rgba(255, 255, 255, .7);
	--wd-arrow-brd-color-hover: #fff;
	--wd-arrow-radius: 3px;
}

.elementor-element-hero-slider .wd-btn-arrow:active .wd-arrow-inner { transform: scale(.96); }

/* Phones: the same layout, lined up with the slide text (16px from the edge). */
@media (max-width: 767px) {
	.elementor-element-hero-slider .wd-carousel-container { --vg-hero-edge: 16px; }
}

@media (prefers-reduced-motion: reduce) {
	.elementor-element-hero-slider .wd-nav-pagin-wrap span,
	.elementor-element-hero-slider .wd-arrow-inner { transition: none; }
}

/* Text 3px larger everywhere (11 Nov 2026, client's request). The sizes set in Elementor's
   global fonts, WoodMart Theme Settings → Typography and the Elementor widgets were raised
   there. These are the WoodMart built-in sizes that have no setting, each WoodMart's own
   value + 3px. „body“ in front lets them win over WoodMart's styles, which load later. */
body h1 { font-size: 31px; }
body h2 { font-size: 27px; }
body h3 { font-size: 25px; }
body h4 { font-size: 21px; }
body h5 { font-size: 19px; }
body h6 { font-size: 15px; }

body :is(input[type], input, select, textarea) { font-size: 17px; }

/* Not the header menu: its size is WoodMart → Theme Settings → Typography → „Main navigation“. */
body .wd-nav:not(.wd-nav-header) > li > a { font-size: 16px; }
body .wd-sub-menu li > a { font-size: 17px; }

body .wd-product.wd-hover-fw-button .wd-add-btn .wd-action-text { font-size: 16px; }
body .wd-add-btn-replace .wd-action-text { font-size: 15px; }

body .wd-filter-list .count { font-size: 15px; }
body .required { font-size: 19px; }

body .wd-sticky-btn .wd-entities-title { font-size: 17px; }
body .wd-sticky-btn .price { font-size: 19px; }

body .wd-checkout-steps { font-size: 25px; }
body .wd-empty-block-title { font-size: 27px; }
body .wd-empty-block-title.wc-empty-cart-message { font-size: 43px; }

body .wd-page-title { --wd-title-font-s: 39px; }

@media (min-width: 1025px) {
	body .wd-page-title.title-size-small { --wd-title-font-s: 47px; }
	body .wd-page-title.title-size-default { --wd-title-font-s: 71px; }
	body .wd-page-title.title-size-large { --wd-title-font-s: 81px; }
}

body .wd-accordion-title-text { font-size: calc(var(--wd-accordion-font-size, 16px) + 3px); }
body .wd-empty-mini-cart .btn { font-size: 15px; }

/* Phones: two product cards per row leave too little room for „Добави в количката“ at the
   larger size, so the button keeps less side padding there (no „…“). */
@media (max-width: 767px) {
	body .wd-product.wd-hover-fw-button .wd-add-btn .wd-action-text {
		font-size: 15px;
		padding-inline: 6px;
	}
}

/* Homepage service strip: when some items wrap to two lines (narrow laptops, phones), the
   one-line items are centred in the row too, while the divider lines keep the row's height. */
body .elementor-element-services .elementor-widget-icon-box {
	display: flex;
	align-items: center;
}

/* Blog cards (Блог and its categories, and WoodMart Blog widgets such as „Статии за Вертера“
   on the homepage): every card shows its picture in the same 4:3 frame, the whole picture
   visible on the pale green (many pictures are posters with text, which a crop would cut), and
   cards in a row end on the same line with „Продължи четенето“ at the bottom. WoodMart has no
   setting for either; columns are in Theme Settings → Blog (or the widget's own settings). */
body .wd-blog-element .wd-carousel-item {
	height: auto;
	align-self: stretch;
	display: flex;
	flex-direction: column;
}
body :is(.wd-blog-holder, .wd-blog-element) .blog-design-masonry .wd-post-img {
	aspect-ratio: 4 / 3;
	background: #F1F7EA;
}
body :is(.wd-blog-holder, .wd-blog-element) .blog-design-masonry .wd-post-img img {
	width: 100%;
	height: 100%;
	object-fit: contain;
}
body :is(.wd-blog-holder, .wd-blog-element) .blog-design-masonry.wd-post {
	flex: 1 1 auto;
	display: flex;
	flex-direction: column;
}
body :is(.wd-blog-holder, .wd-blog-element) .blog-design-masonry .wd-post-inner {
	flex: 1 1 auto;
	display: flex;
	flex-direction: column;
}
body :is(.wd-blog-holder, .wd-blog-element) .blog-design-masonry .wd-post-content {
	flex: 1 1 auto;
	display: flex;
	flex-direction: column;
	align-items: center;
}
body :is(.wd-blog-holder, .wd-blog-element) .blog-design-masonry .wd-post-read-more {
	margin-top: auto;
}

/* Header cart: the number of products in the cart is a larger blue badge (#023E80) with a white
   number, ringed in white so it stands out next to the green cart button. It widens for 10+ items.
   WoodMart has no setting for the badge. */
body .whb-header .wd-header-cart .wd-tools-count {
	box-sizing: border-box;
	min-width: 24px;
	width: auto;
	height: 24px;
	padding: 0 6px;
	border-radius: 12px;
	background-color: #023E80;
	color: #fff;
	font-size: 15px;
	font-weight: 700;
	line-height: 24px;
	text-align: center;
	box-shadow: 0 0 0 2px #fff;
	top: -10px;
	inset-inline-end: -10px;
}
@media (max-width: 1024px) {
	body .whb-header .wd-header-cart .wd-tools-count {
		min-width: 21px;
		height: 21px;
		padding: 0 5px;
		border-radius: 11px;
		font-size: 13px;
		line-height: 21px;
		top: -8px;
		inset-inline-end: -10px;
	}
}

/* Blog text, a size up from the rest of the site (client, 13 Nov 2026): the article page and the
   blog cards. Reading text +2px, headings and small labels +1-3px. */
body.single-post .post-single-page h1.wd-entities-title { font-size: 34px; line-height: 1.3; }
body.single-post .post-single-page .wd-entry-content :is(p, li, blockquote, pre) { font-size: 21px; line-height: 1.6; }
body.single-post .post-single-page .wd-entry-content td { font-size: 21px; line-height: 1.4; }
body.single-post .post-single-page .wd-entry-content th { font-size: 18px; line-height: 1.4; }
body.single-post .post-single-page .wd-entry-content h2 { font-size: 30px; line-height: 1.35; }
body.single-post .post-single-page .wd-entry-content h3 { font-size: 27px; line-height: 1.35; }
body.single-post .post-single-page .wd-entry-content h4 { font-size: 23px; line-height: 1.4; }
body.single-post .post-single-page .wd-entry-content figcaption { font-size: 16px; }
body.single-post .post-single-page .wd-post-meta,
body.single-post .post-single-page .wd-post-meta :is(span, a, time) { font-size: 20px; }
body.single-post .wd-page-nav :is(.wd-label, .wd-entities-title) { font-size: 20px; }
body .wd-post-cat a { font-size: 16px; }

body :is(.wd-blog-holder, .wd-blog-element) .wd-post .wd-post-title { font-size: 24px; line-height: 1.35; }
body :is(.wd-blog-holder, .wd-blog-element) .wd-post :is(.wd-post-excerpt, .wd-post-meta) { font-size: 20px; }
body :is(.wd-blog-holder, .wd-blog-element) .wd-post .wd-post-meta :is(span, a) { font-size: 20px; }
body :is(.wd-blog-holder, .wd-blog-element) .wd-post .wd-post-read-more a { font-size: 18px; }
body :is(.wd-blog-holder, .wd-blog-element) .wd-post .wd-post-date .post-date-day { font-size: 24px; line-height: 1; }
body :is(.wd-blog-holder, .wd-blog-element) .wd-post .wd-post-date .post-date-month { font-size: 13px; }

@media (max-width: 767px) {
	body.single-post .post-single-page h1.wd-entities-title { font-size: 25px; }
	body.single-post .post-single-page .wd-entry-content :is(p, li, blockquote, pre, td) { font-size: 20px; }
	body.single-post .post-single-page .wd-entry-content th { font-size: 17px; }
	body.single-post .post-single-page .wd-entry-content h2 { font-size: 28px; }
	body.single-post .post-single-page .wd-entry-content h3 { font-size: 26px; }
	body.single-post .post-single-page .wd-entry-content h4 { font-size: 22px; }
	body :is(.wd-blog-holder, .wd-blog-element) .wd-post .wd-post-title { font-size: 23px; }
}
