/*
 * Daygas site stylesheet. The only custom CSS on the site.
 *
 * Colours come from the Blocksy global palette (Customizer > Colors), exposed as
 * --theme-palette-color-1 ... 8. Do not hardcode brand colours here; reference the palette.
 *   1 accent #EE7900 · 2 accent hover · 3 text · 4 headings/dark · 5 borders · 6-7 light backgrounds · 8 white
 *
 * Sections: 1 tokens · 2 base · 3 header/footer · 4 components · 5 shop · 6 product · 7 checkout · 8 motion
 */

/* 1. Font: Rubik variable (OFL), self-hosted, Cyrillic + Latin only. Rounded corners match the Daygas wordmark. */
@font-face {
	font-family: 'Rubik';
	font-style: normal;
	font-weight: 300 900;
	font-display: swap;
	src: url('../fonts/rubik-cyrillic.woff2') format('woff2');
	unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
	font-family: 'Rubik';
	font-style: normal;
	font-weight: 300 900;
	font-display: swap;
	src: url('../fonts/rubik-latin.woff2') format('woff2');
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/*
 * Blocksy typography stays on "System Default", which resolves to --theme-font-stack-default
 * (defined in Blocksy main.min.css, loaded before this file). Pointing it at Rubik keeps one place for the family.
 */
:root {
	--theme-font-stack-default: 'Rubik', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
	--dg-radius: 10px;
	--dg-radius-lg: 18px;
	--dg-shadow: 0 1px 2px rgb(0 0 0 / 0.06), 0 8px 24px rgb(0 0 0 / 0.06);
	--dg-ease: cubic-bezier(0.2, 0.7, 0.2, 1);
	--dg-dur: 600ms;
}

/*
 * 3. Header and footer: Blocksy Header and Footer Builders. Structure and sizes are set in the Customizer; the
 * colours are light since 20.10.2026 (block right below); this section adds only what the builders lack.
 */

/*
 * Light header and footer (Daygas, 20.10.2026: white everywhere, the dark theme goes). The Header and Footer
 * Builders still hold the graphite colours of 02.10.2026; these rules sit over them with the same selectors plus
 * "html", so they win whatever the load order. To return to graphite, delete this block.
 */
html [data-header*="type-1"] .ct-header [data-row*="middle"] {
	background-color: var(--theme-palette-color-8);
}

html [data-header*="type-1"] .ct-header [data-row*="middle"] > div {
	--theme-border-bottom: 1px solid var(--theme-palette-color-5);
}

/* Hover and active menu text: the accent for small text (components.css), palette 2 is 3.2-3.6:1 on white. */
html [data-header*="type-1"] .ct-header [data-id="menu"] > ul > li > a,
html [data-header*="type-1"] [data-id="mobile-menu"] {
	--theme-link-initial-color: var(--theme-palette-color-4);
	--theme-link-hover-color: var(--dg-accent-text);
	--theme-link-active-color: var(--dg-accent-text);
}

html [data-header*="type-1"] [data-id="mobile-menu"] {
	--mobile-menu-divider: 1px solid var(--theme-palette-color-5);
}

html [data-header*="type-1"] .ct-header [data-id="text"] {
	--theme-text-color: var(--theme-palette-color-4);
	--theme-link-initial-color: var(--theme-palette-color-4);
	--theme-link-hover-color: var(--dg-accent-text);
}

html [data-header*="type-1"] :is([data-id="search"], [data-id="trigger"]),
html [data-header*="type-1"] [data-id="cart"] .ct-cart-item {
	--theme-icon-color: var(--theme-palette-color-4);
	--theme-icon-hover-color: var(--theme-palette-color-2);
	--theme-link-initial-color: var(--theme-palette-color-4);
	--theme-link-hover-color: var(--theme-palette-color-2);
}

html [data-header*="type-1"] [data-id="cart"] .ct-cart-content,
html [data-header*="type-1"] [data-id="cart"] .ct-cart-content .total {
	--theme-text-color: var(--theme-palette-color-3);
	--mini-cart-background-color: var(--theme-palette-color-8);
}

html [data-header*="type-1"] #offcanvas .ct-panel-inner {
	background-color: var(--theme-palette-color-8);
}

html [data-header*="type-1"] #offcanvas .ct-panel-actions,
html [data-header*="type-1"] #offcanvas .ct-toggle-close {
	--theme-icon-color: var(--theme-palette-color-4);
}

html [data-header*="type-1"] #search-modal {
	background-color: color-mix(in srgb, var(--theme-palette-color-8) 98%, transparent);
}

html [data-header*="type-1"] #search-modal .ct-search-form {
	--theme-link-initial-color: var(--theme-palette-color-4);
	--theme-form-text-initial-color: var(--theme-palette-color-4);
	--theme-form-text-focus-color: var(--theme-palette-color-4);
	--theme-form-field-border-initial-color: var(--theme-palette-color-5);
	--theme-button-text-initial-color: var(--theme-palette-color-4);
	--theme-button-text-hover-color: var(--theme-palette-color-4);
}

html [data-header*="type-1"] #search-modal .ct-toggle-close {
	--theme-icon-color: var(--theme-palette-color-4);
}

html [data-footer*="type-1"] .ct-footer :is([data-row*="middle"], [data-row*="bottom"]) {
	background-color: var(--theme-palette-color-6);
}

html [data-footer*="type-1"] .ct-footer [data-row*="bottom"] > div {
	--theme-border-top: 1px solid var(--theme-palette-color-5);
}

html [data-footer*="type-1"] .ct-footer :is([data-row*="middle"], [data-row*="bottom"]) .ct-widget,
html [data-footer*="type-1"] [data-id="copyright"] {
	--theme-text-color: var(--theme-palette-color-3);
	--theme-link-initial-color: var(--theme-palette-color-4);
	--theme-link-hover-color: var(--theme-palette-color-2);
}

html #footer {
	border-top: 1px solid var(--theme-palette-color-5);
}

/* Desktop header stays on screen (sticky is a Pro feature in Blocksy). */
@media (min-width: 1000px) {
	#header {
		position: sticky;
		top: 0;
		z-index: 50;
	}

	.admin-bar #header {
		top: 32px;
	}
}

/*
 * Seven menu items, the phone, WhatsApp, Viber, email, search and cart on one row. The row stops at the 1290px
 * container and the menu needs 683px at 14px, so the contacts are icons only on the desktop header; the space left
 * between the menu and the icons is 71px at 1440px and up, 30px at 1366px and below zero at 1280px (measured 21.10).
 * 1000-1359px: the tablet header with the off-canvas menu, where the phone shows its number.
 */
@media (min-width: 1000px) and (max-width: 1359.98px) {
	:is(#header, #offcanvas) [data-device="desktop"] {
		display: none;
	}

	:is(#header, #offcanvas) [data-device="mobile"] {
		display: block;
	}
}

@media (min-width: 1360px) {
	#header [data-id="menu"] {
		--menu-items-spacing: 10px;
	}

	#header [data-id="menu"] > ul > li > .ct-menu-link {
		--theme-font-size: 14px;
	}
}

@media (min-width: 1366px) and (max-width: 1439.98px) {
	#header [data-id="menu"] {
		--menu-items-spacing: 16px;
	}
}

@media (min-width: 1440px) {
	#header [data-id="menu"] {
		--menu-items-spacing: 12px;
	}
}

/* Phone in the header ([daygas_phone] in the HTML element). Icon only on phones. */
#header [data-id="text"] p {
	margin: 0;
}

.dg-icon {
	width: 22px;
	height: 22px;
	flex: none;
}

.dg-icon--s {
	width: 16px;
	height: 16px;
}

/* Header contacts (21.10.2026): the phone with its number, then WhatsApp, Viber and email as round icons. */
.dg-head-contacts {
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

.dg-head-contacts .dg-contacts--header {
	flex-wrap: nowrap;
}

@media (max-width: 689.98px) {
	/* Phones: the header keeps the call icon and WhatsApp; Viber and email are in the menu and the footer. */
	.dg-head-contacts .dg-contacts--header .dg-contacts__item:nth-child(n+2) {
		display: none;
	}

	.dg-head-contacts {
		gap: 0;
	}
}

.mobile-menu .dg-contacts--menu {
	margin-block-start: 10px;
}

.dg-phone {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	color: var(--theme-palette-color-4);
	text-decoration: none;
}

.dg-phone .dg-icon {
	color: var(--theme-palette-color-2);
}

.dg-phone__text {
	display: flex;
	flex-direction: column;
	line-height: 1.15;
	white-space: nowrap;
}

.dg-phone__text small {
	font-size: 12px;
	font-weight: 500;
	letter-spacing: 0.02em;
	color: var(--theme-palette-color-3);
}

.dg-phone__text strong {
	font-size: 16px;
	font-weight: 600;
	transition: color 0.2s;
}

.dg-phone:hover strong,
.dg-phone:focus-visible strong {
	color: var(--theme-palette-color-2);
}

@media (max-width: 689.98px), (min-width: 1360px) {
	/* Phones and the desktop header: icon only (the number is in its label). A 40x44 tap target; the negative margin keeps the icon on the same rhythm as cart and menu. */
	.dg-phone {
		justify-content: center;
		width: 40px;
		height: 44px;
		margin-inline: -10px;
	}

	.dg-phone .dg-icon {
		width: 20px;
		height: 20px;
	}

	.dg-phone__text {
		position: absolute;
		width: 1px;
		height: 1px;
		overflow: hidden;
		clip-path: inset(50%);
		white-space: nowrap;
	}
}

/*
 * Phones and tablets: the cart and menu icons are 18px, 20px apart. An invisible layer gives each a 38x44 tap target
 * without moving anything: the header builder spaces its items with margins, so padding would shift them.
 */
@media (max-width: 999.98px) {
	#header :is(.ct-cart-item, .ct-header-trigger) {
		position: relative;
	}

	#header :is(.ct-cart-item, .ct-header-trigger)::after {
		content: "";
		position: absolute;
		inset: -13px -10px;
	}

	#header .site-logo-container {
		padding-block: 5px;
		margin-block: -5px;
	}
}

/* Group headings inside the shop dropdown (menu items with the dg-menu-label class). */
#header .sub-menu .dg-menu-label > .ct-menu-link {
	padding-bottom: 2px;
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: color-mix(in srgb, var(--theme-palette-color-3) 75%, transparent);
	pointer-events: none;
}

#header .sub-menu :is(.dg-menu-label:not(:first-child), .dg-menu-all) {
	margin-top: 6px;
	border-top: 1px solid var(--theme-palette-color-5);
	padding-top: 6px;
}

#header .sub-menu .dg-menu-all > .ct-menu-link {
	font-weight: 600;
}

/*
 * Off-canvas search: Blocksy free has no search box element, so the search toggle (label on) is drawn as a field.
 * Blocksy sets padding, border and background of every toggle with !important through these variables.
 */
#offcanvas [data-id="search"] {
	--toggle-button-padding: 13px 14px;
	--toggle-button-border-width: 1px;
	--toggle-button-border-color: var(--theme-palette-color-5);
	--toggle-button-radius: var(--dg-radius);
	--toggle-button-background: var(--theme-palette-color-7);
	justify-content: flex-start;
	gap: 12px;
	width: 100%;
	height: auto;
	margin-bottom: 10px;
	cursor: text;
}

#offcanvas [data-id="search"] .ct-label {
	font-size: 15px;
	font-weight: 400;
	letter-spacing: 0;
	text-transform: none;
	color: var(--theme-palette-color-3);
}

/* Mobile menu (off-canvas): headings, call row first. */
.mobile-menu .dg-menu-label > a {
	padding-top: 10px;
	padding-bottom: 2px;
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--theme-palette-color-3);
	pointer-events: none;
}

.mobile-menu .dg-menu-call {
	margin-bottom: 10px;
}

.dg-call {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 12px 14px;
	border: 1px solid var(--theme-palette-color-5);
	border-radius: var(--dg-radius);
	background: var(--theme-palette-color-7);
	color: var(--theme-palette-color-4);
	text-decoration: none;
}

.dg-call .dg-icon {
	color: var(--theme-palette-color-2);
}

.dg-call__text {
	display: flex;
	flex-direction: column;
	line-height: 1.2;
}

.dg-call__text small {
	font-size: 12px;
	font-weight: 500;
	color: var(--theme-palette-color-3);
}

.dg-call__text strong {
	font-size: 19px;
	font-weight: 600;
}

/* Cart and checkout: same header, without the paths out of the order. */
:is(.woocommerce-cart, .woocommerce-checkout:not(.woocommerce-order-received)) #header :is([data-id="menu"], [data-id="search"], [data-id="trigger"]) {
	display: none;
}

/*
 * Footer: light since 20.10.2026, no warm edge and no watermark (Daygas: no decoration). Colours: the light block in
 * section 3.
 */
#footer {
	position: relative;
	isolation: isolate;
	overflow: hidden;
	font-size: 15px;
	line-height: 1.6;
}

#footer [data-row="middle"] > .ct-container {
	position: relative;
	z-index: 1;
}

#footer a {
	text-decoration: none;
	transition: color 0.2s;
}

/*
 * Tablet and narrow desktop: the merchant block spans the row (logo beside the data),
 * the four link columns sit below it, two by two on tablets and in one row at 1000-1179px.
 */
@media (min-width: 690px) and (max-width: 1179.98px) {
	#footer [data-column="widget-area-1"] {
		grid-column: 1 / -1;
	}

	.dg-merchant:has(> .dg-merchant__logo) {
		display: grid;
		grid-template-columns: auto 1fr;
		column-gap: 48px;
	}

	.dg-merchant:has(> .dg-merchant__logo) .dg-merchant__logo {
		grid-row: span 2;
		margin-bottom: 0;
	}
}

@media (min-width: 1000px) and (max-width: 1179.98px) {
	#footer [data-row="middle"] > .ct-container {
		--grid-template-columns: repeat(4, 1fr);
	}
}

/* Desktop bottom row: the copyright keeps its natural width on one line, the legal line takes the rest. */
@media (min-width: 1000px) {
	#footer [data-row="bottom"] > .ct-container {
		--grid-template-columns: 1fr auto;
	}
}

#footer :is(.widget-title, .dg-footer-title) {
	margin: 0 0 12px;
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--dg-accent-text);
}

#footer .widget_nav_menu ul {
	margin: 0;
	padding: 0;
	list-style: none;
}

#footer .widget_nav_menu li {
	margin: 0 0 7px;
}

#footer .dg-menu-strong > a {
	font-weight: 600;
	color: var(--theme-palette-color-4);
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 3px;
}

.dg-merchant__logo {
	margin-bottom: 22px;
}

.dg-merchant__logo img {
	display: block;
	width: auto;
	height: 40px;
}

.dg-merchant__data {
	font-style: normal;
	line-height: 1.7;
}

.dg-nowrap {
	white-space: nowrap;
}

#footer .dg-merchant__data :is(strong, a) {
	font-weight: 600;
	color: var(--theme-palette-color-4);
}

#footer .dg-merchant__data a:is(:hover, :focus-visible) {
	color: var(--theme-palette-color-2);
}

.dg-merchant__data a {
	display: inline-flex;
	align-items: center;
	gap: 7px;
}

/* Touch screens: phone and e-mail are the last two lines; each gets its own 44px row to tap. */
@media (max-width: 1024px), (pointer: coarse) {
	.dg-merchant__data a {
		min-height: 44px;
		vertical-align: middle;
	}
}

/* Payment and delivery: two groups that wrap as whole lines before they wrap inside. */
.dg-footer-legal {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px 28px;
}

.dg-chips {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px 8px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.dg-chips li {
	padding: 3px 9px;
	border: 1px solid var(--theme-palette-color-5);
	border-radius: 999px;
	font-size: 12.5px;
	color: var(--theme-palette-color-3);
}

.dg-chips .dg-chips__title {
	padding: 0 2px 0 8px;
	border: 0;
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--theme-palette-color-3);
}

.dg-chips .dg-chips__title:first-child {
	padding-left: 0;
}

.dg-chips .dg-chips__set {
	padding: 0;
	border: 0;
	border-radius: 0;
}

/* .dg-chips in front: Blocksy indents ".ct-widget li ul" by 25px. */
.dg-chips .dg-chips__set ul {
	display: flex;
	flex-wrap: wrap;
	gap: 6px 8px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.dg-chips .dg-chips__icon {
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

/* Card marks: the official files unchanged, on one visual height. */
.dg-chips .dg-pay {
	display: flex;
	padding: 0;
	border: 0;
	border-radius: 0;
}

.dg-pay img {
	display: block;
	width: auto;
	max-width: none;
	height: 24px;
}

.dg-pay--apple-pay img {
	height: 25px;
}

.dg-pay--google-pay img {
	height: 26px;
}

.dg-pay--stripe img {
	width: 38px;
	object-fit: contain;
	border-radius: 2px;
	background: #fff;
}

#footer .ct-footer-copyright {
	font-size: 13px;
}

/* Footer link columns fold into an accordion on phones (site.js adds .dg-acc and the button). */
.dg-acc__btn {
	all: unset;
	display: flex;
	align-items: center;
	justify-content: space-between;
	width: 100%;
	cursor: default;
}

.dg-acc__btn .dg-icon {
	display: none;
}

@media (max-width: 689.98px) {
	/* The link columns stack edge to edge as one list; only the merchant block keeps its distance. */
	#footer [data-row="middle"] > .ct-container {
		row-gap: 0;
	}

	#footer [data-column="widget-area-1"] {
		margin-bottom: 28px;
	}

	#footer .dg-acc {
		border-top: 1px solid var(--theme-palette-color-5);
	}

	#footer .dg-acc--last {
		border-bottom: 1px solid var(--theme-palette-color-5);
	}

	#footer .dg-acc .widget-title {
		margin: 0;
		font-size: 15px;
		letter-spacing: 0;
		text-transform: none;
		color: var(--theme-palette-color-4);
	}

	.dg-acc__btn {
		padding: 15px 0;
		cursor: pointer;
	}

	.dg-acc__btn .dg-icon {
		display: block;
		width: 16px;
		height: 16px;
		transition: transform 0.2s;
	}

	.dg-acc.is-open .dg-acc__btn .dg-icon {
		transform: rotate(45deg);
	}

	#footer .dg-acc:not(.is-open) ul {
		display: none;
	}

	#footer .dg-acc.is-open ul {
		padding-bottom: 12px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.dg-phone__text strong,
	.entry-content a:not([class]),
	#footer a,
	.dg-acc__btn .dg-icon {
		transition: none;
	}
}

/*
 * Links in page text (legal pages, editor content, checkout notes): the text colour with the accent underline.
 * The accent itself is 2.7:1 on the page background, too low for text; the underline carries the colour.
 */
.entry-content a:not([class]) {
	color: inherit;
	text-decoration: underline;
	text-decoration-color: var(--theme-palette-color-1);
	text-decoration-thickness: 2px;
	text-underline-offset: 3px;
	transition: text-decoration-thickness 0.15s;
}

.entry-content a:not([class]):is(:hover, :focus-visible) {
	text-decoration-thickness: 3px;
}

/* Text pages (legal pages and other plain editor content): a reading measure, not the full container. */
.entry-content:not(:has(> .alignfull)) > :is(p, ul, ol, h2, h3, h4, blockquote) {
	max-width: 72ch;
}

/* Touch screens: a link alone in a list item gets a 42px hit area. The link stays inline, so a wrapped
   link keeps its bullet on the first line and a link inside a sentence keeps the sentence's flow. The contact
   and product-group lists draw their own 44px targets and spacing. */
@media (max-width: 1024px), (pointer: coarse) {
	:is(.entry-content, .dg-archive-prose__body) li:not(.dg-contacts__item, .dg-solbox) > a:only-child {
		padding-block: 11px;
	}
	:is(.entry-content, .dg-archive-prose__body) li:has(> a:only-child) + li:not(.dg-contacts__item, .dg-solbox) {
		margin-top: 16px;
	}
}

/* Breadcrumbs: the accent is 2.7:1 as text, so the links take the text colour and the accent on hover. */
.ct-breadcrumbs a {
	color: var(--dg-text);
}

.ct-breadcrumbs a:is(:hover, :focus-visible) {
	color: var(--dg-accent-text);
}

/* Touch screens: each crumb gets a 44px tall target without changing the line. */
@media (max-width: 1024px), (pointer: coarse) {
	.ct-breadcrumbs a {
		display: inline-block;
		padding-block: 12px;
		margin-block: -12px;
	}
}

/* 404 title on the scale of the other page titles (the Blocksy page hero, 30px); the theme h1 default is 40px. */
.error404 .hero-section .page-title {
	--theme-font-size: 30px;
}

/* Search form in page content (404): a 46px field, so its button is a 44px target. */
.entry-content .ct-search-form {
	--theme-form-field-height: 46px;
}

/* "incl. VAT" after every price (inc/product-data.php daygas_vat_label_html). */
.dg-vat {
	color: var(--dg-muted, #6b6763);
	font-size: 0.8125rem;
	font-weight: 400;
	white-space: nowrap;
}

/* Content tables on tablets and desktop: no column narrower than 9em, so a long first cell is not a sliver. */
@media (min-width: 600px) {
	.entry-content figure.wp-block-table:not(.dg-pagetable) :is(th, td) {
		min-width: 9em;
	}
}

/* Content tables on phones (legal and info pages): each row is a card, the column heading above each value
   (data-label from inc/tables.php). Three and four columns do not fit 360px without squeezing the text. */
@media (max-width: 599px) {
	.entry-content figure.wp-block-table:not(.dg-pagetable) {
		overflow: visible;
	}

	.entry-content figure.wp-block-table:not(.dg-pagetable) :is(table, tbody, tr, td) {
		display: block;
		width: 100%;
	}

	.entry-content figure.wp-block-table:not(.dg-pagetable) table {
		border: 0;
	}

	.entry-content figure.wp-block-table:not(.dg-pagetable) thead {
		position: absolute;
		width: 1px;
		height: 1px;
		overflow: hidden;
		clip-path: inset(50%);
		white-space: nowrap;
	}

	.entry-content figure.wp-block-table:not(.dg-pagetable) tr {
		box-sizing: border-box;
		padding: var(--dg-space-3) var(--dg-space-4);
		border: 1px solid var(--dg-line);
		border-radius: var(--dg-radius);
	}

	.entry-content figure.wp-block-table:not(.dg-pagetable) tr + tr {
		margin-top: var(--dg-space-3);
	}

	.entry-content figure.wp-block-table:not(.dg-pagetable) td {
		box-sizing: border-box;
		padding: var(--dg-space-1) 0;
		border: 0;
		text-align: start;
	}

	.entry-content figure.wp-block-table:not(.dg-pagetable) td:first-child {
		color: var(--dg-ink);
		font-weight: 700;
	}

	.entry-content figure.wp-block-table:not(.dg-pagetable) td[data-label]:not(:first-child)::before {
		content: attr(data-label);
		display: block;
		color: var(--dg-muted);
		font-size: var(--dg-fs-sm);
		font-weight: 600;
	}
}
