/*
Theme Name: Kiosko
Theme URI: https://wordpress.com/theme/kiosko/
Author: Automattic
Author URI: https://automattic.com/
Description: Kiosko is a store theme for WooCommerce.
Requires at least: 5.8
Tested up to: 6.6
Requires PHP: 5.7
Version: 1.0.31
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Template: 
Text Domain: kiosko
Tags: e-commerce, four-columns, wide-blocks, block-patterns, block-styles, featured-images, full-site-editing, rtl-language-support, sticky-post, template-editing, threaded-comments, translation-ready
*/

/*
 * Control the hover stylings of outline block style.
 * Unnecessary once block styles are configurable via theme.json
 * https://github.com/WordPress/gutenberg/issues/42794
 */
.wp-block-button.is-style-outline>.wp-block-button__link:not(.has-background):hover {
	background-color: var(--wp--preset--color--contrast);
	color: var(--wp--preset--color--base);
	border-color: var(--wp--preset--color--contrast);
}

/*
 * Link styles
 * https://github.com/WordPress/gutenberg/issues/42319
 */
a {
	text-decoration-color: var(--wp--preset--color--primary);
	text-decoration-thickness: 0.5px !important;
	text-underline-offset: 0.05em;
}

/* Reset browser default margins for blockquote element */
.wp-block-pullquote blockquote {
	margin: 0;
}

/* Search button inside style */
.wp-block-search__button-inside .wp-block-search__inside-wrapper {
	padding: 4px;
}

/* Adjust font size for comment reply title */
.wp-block-post-comments-form .comment-reply-title {
	font-size: var(--wp--preset--font-size--large);
}

/* Remove the bottom margin from the button */
.wp-block-post-comments-form .form-submit {
	margin-bottom: 0;
}

/*
 * Responsive menu container padding.
 * This ensures the responsive container inherits the same
 * spacing defined above. This behavior may be built into
 * the Block Editor in the future.
 */
.wp-block-navigation__responsive-container.is-menu-open {
	padding: var(--wp--preset--spacing--50);
}

/* Adjust the top padding for the submenu items */
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content .wp-block-navigation__submenu-container {
	padding-top: var(--wp--preset--spacing--30);
}

/* Override the Gutenberg style to theme style */
.wp-block-post-author__byline,
.wp-block-post-author__bio {
	font-size: inherit;
}

/* Round the avatar and reset the vertical alignment */
.wp-block-post-author__avatar img {
	border-radius: 999px;
	line-height: 0;
}

/* Style tag cloud outline style  */
.wp-block-tag-cloud.is-style-outline a {
	border-color: var(--wp--preset--color--tertiary);
	border-radius: 999px;
	padding: 0 0.5rem;
}

.wp-block-tag-cloud.is-style-outline a:hover {
	color: var(--wp--preset--color--base);
	background-color: var(--wp--preset--color--primary);
}

/* Remove the default margin from author bio */
.wp-block-post-author__bio {
	margin: 0;
}

/* Remove the default margin from term description. */
.wp-block-term-description p:first-child {
	margin-top: 0;
}

.wp-block-term-description p:last-child {
	margin-bottom: 0;
}

/* Normalise font sizes for the latest comments and latest posts widgets */
.wp-block-latest-comments__comment-excerpt p,
.wp-block-latest-comments__comment-date,
.wp-block-latest-posts__post-author,
.wp-block-latest-posts__post-date {
	font-size: inherit;
}

/* Adjust font colour in the Calendar widget */
.wp-block-calendar table:where(:not(.has-text-color)) {
	color: var(--wp--preset--color--foreground);
}

/* Fix border radius setting for the avatar block */
.wp-block-avatar a,
.wp-block-avatar img {
	border-radius: inherit;
	vertical-align: middle;
}

/* Fix line height for various fields */
.wp-block-search__input,
.wp-block-post-comments-form .comment-form input:not([type=submit]):not([type=checkbox]),
.wp-block-post-comments-form .comment-form textarea {
	line-height: inherit;
}

/* Style  border colour for search and Jetpack subscription blocks */
.wp-block-search__input,
.wp-block-search__button-inside .wp-block-search__inside-wrapper,
.wp-block-jetpack-subscriptions.wp-block-jetpack-subscriptions__supports-newline form input[type="email"] {
	border-color: var(--wp--preset--color--tertiary);
}

/* Needed to style input field for various Jetpack blocks */
.wp-block-jetpack-contact-form input:not([type="submit"]):not([type="checkbox"]),
.wp-block-jetpack-contact-form select,
.wp-block-jetpack-contact-form textarea,
.wp-block-jetpack-mailchimp input:not([type="submit"]):not([type="checkbox"]),
.wp-block-jetpack-revue input:not([type="submit"]):not([type="checkbox"]) {
	background-color: #fff;
	border: 1px solid var(--wp--preset--color--tertiary);
	font-size: inherit;
	line-height: inherit;
	padding: 0.5rem;
}

.wp-block-jetpack-contact-form.contact-form label {
	font-weight: 400;
}

.wp-block-jetpack-contact-form.contact-form label span {
	opacity: 0.7;
}

.wp-block-jetpack-contact-form.contact-form select {
	padding: 0.5rem;
}

.wp-block-jetpack-contact-form.contact-form textarea {
	margin-bottom: var(--wp--preset--spacing--40);
}

/* Style the feedback you get after submitting the contact form */
div[id^="contact-form-"] h4 {
	font-size: var(--wp--preset--font-size--medium);
	font-weight: inherit;
	line-height: 1.555555556;
}

div[id^="contact-form-"] .contact-form-submission {
	margin: 0;
	padding: 0;
}

/* Adjust vertical margins in the mailchimp block */
.wp-block-jetpack-mailchimp .wp-block-jetpack-button,
.wp-block-jetpack-mailchimp p {
	margin: var(--wp--preset--spacing--40) 0;
}

/* Adjust the size of the consent text in mailchimp block */
#wp-block-jetpack-mailchimp_consent-text {
	font-size: var(--wp--preset--font-size--small);
	margin-bottom: 0;
}

/* Remove underline from the price after discounted */
ins {
	text-decoration: none;
}

/* Fix the hardcoded 1000px width from WooCommerce's twenty-twenty-three.css (`.woocommerce-page main`).
 * Cart and Checkout only have the `woocommerce-page` body class, and that stylesheet loads after
 * this one, so the selector needs `body` for higher specificity. */
.woocommerce.woocommerce-page main,
body.woocommerce-page main {
	max-width: calc(var(--wp--style--global--wide-size) + var(--wp--style--root--padding-right) + var(--wp--style--root--padding-left));
}

/* Same 1000px cap from woocommerce-blocktheme.css on the page title and content of Account/Cart/Checkout */
body.woocommerce-account .wp-block-post-title,
body.woocommerce-account main .woocommerce,
body.woocommerce-cart .wp-block-post-title,
body.woocommerce-cart main .woocommerce,
body.woocommerce-checkout .wp-block-post-title,
body.woocommerce-checkout main .woocommerce {
	max-width: var(--wp--style--global--wide-size);
}

/* Uniform product thumbnails in grids */
.wc-block-components-product-image {
	aspect-ratio: 1 / 1;
	overflow: hidden;
}

/* The image sits inside a link; it needs a definite height for img height:100% to resolve */
.wc-block-components-product-image > a {
	display: block;
	height: 100%;
}

.wc-block-components-product-image img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
}

/* Add spacing between stacked checkout/billing address fields so they don't look merged */
.wc-block-components-address-form > * {
	margin-bottom: 16px !important;
}

.wc-block-components-address-form > *:last-child {
	margin-bottom: 0 !important;
}

/* Pagination: square buttons matching the input style */
.wp-block-query-pagination {
	gap: 8px;
	align-items: center;
	margin-top: var(--wp--preset--spacing--60);
}

.wp-block-query-pagination-numbers {
	display: flex;
	gap: 8px;
}

.wp-block-query-pagination .page-numbers,
.wp-block-query-pagination-previous,
.wp-block-query-pagination-next {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	min-width: 40px;
	height: 40px;
	margin: 0;
	padding: 0 12px;
	border: 1px solid var(--wp--preset--color--primary);
	border-radius: 4px;
	color: var(--wp--preset--color--primary);
	font-size: 15px;
	line-height: 1;
	text-decoration: none;
	transition: background-color 0.15s, color 0.15s;
}

/* Arrow buttons: same 40×40 square as the page numbers */
.wp-block-query-pagination-previous,
.wp-block-query-pagination-next {
	width: 40px;
	padding: 0;
}

.wp-block-query-pagination a.page-numbers:hover,
.wp-block-query-pagination-previous:hover,
.wp-block-query-pagination-next:hover,
.wp-block-query-pagination .page-numbers.current {
	background-color: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--base);
}

.wp-block-query-pagination .page-numbers.dots {
	min-width: auto;
	padding: 0 4px;
	border: none;
}

/* Two classes to beat core's `.wp-block-query-pagination .wp-block-query-pagination-*-arrow { margin-*: 1ch }` */
.wp-block-query-pagination .wp-block-query-pagination-previous-arrow,
.wp-block-query-pagination .wp-block-query-pagination-next-arrow {
	display: inline-flex;
	margin: 0;
}

/* Iconoteka chevrons injected by the melkom-icons mu-plugin */
.wp-block-query-pagination-previous-arrow svg,
.wp-block-query-pagination-next-arrow svg {
	display: block;
	width: 18px;
	height: 18px;
}

/* Product cards in grids.
 * !important on font-size/margins: block attributes emit inline margins and
 * core .has-*-font-size preset classes, which are themselves !important. */
.wp-block-post-template li.product .wc-block-components-product-image {
	border-radius: 4px;
	background-color: #f6f4f1;
}

.wp-block-post-template li.product .wc-block-components-product-image img {
	transition: transform 0.3s ease;
}

.wp-block-post-template li.product:hover .wc-block-components-product-image img {
	transform: scale(1.04);
}

.wp-block-post-template li.product .wp-block-post-title {
	display: -webkit-box;
	overflow: hidden;
	min-height: calc(1.35em * 2);
	margin: 12px 0 0 !important;
	font-family: var(--wp--preset--font-family--roboto);
	font-size: 15px !important;
	font-weight: 400;
	line-height: 1.35;
	text-transform: none;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
}

/* inline, not inline-block: line-clamp cannot truncate inside an inline-block */
.wp-block-post-template li.product .wp-block-post-title a {
	display: inline;
	color: inherit;
	text-decoration: none;
}

.wp-block-post-template li.product .wc-block-components-product-button__button {
	white-space: nowrap;
}

.wp-block-post-template li.product .wp-block-post-title a:hover {
	text-decoration: underline;
	text-underline-offset: 3px;
}

.wp-block-post-template li.product .wp-block-woocommerce-product-price {
	margin-top: 6px !important;
	font-size: 16px !important;
	font-weight: 600;
}

@media (prefers-reduced-motion: reduce) {
	.wp-block-post-template li.product .wc-block-components-product-image img {
		transition: none;
	}

	.wp-block-post-template li.product:hover .wc-block-components-product-image img {
		transform: none;
	}
}

/* Single product: short description as a muted subtitle under the title */
.melkom-product-tagline {
	margin-top: 8px;
	color: #6b6b6b;
	font-family: var(--wp--preset--font-family--roboto);
	font-size: 16px;
	line-height: 1.5;
}

.melkom-product-tagline .wp-block-post-excerpt__excerpt {
	margin: 0;
}

/* Single product: tablet & mobile layout.
 * Extra .alignwide / !important: core stacks columns below 782px with
 * `.wp-block-columns:not(.is-not-stacked-on-mobile) > .wp-block-column { flex-basis: 100% !important }`,
 * and the gallery column / page wrapper carry inline flex-basis and margin. */
@media (max-width: 1023px) {
	.melkom-product-layout .wc-block-add-to-cart-form form.cart {
		display: flex;
		gap: 8px;
		align-items: stretch;
	}

	.melkom-product-layout .wc-block-add-to-cart-form form.cart .quantity,
	.melkom-product-layout .wc-block-add-to-cart-form form.cart .single_add_to_cart_button {
		margin: 0;
	}

	.melkom-product-layout .wc-block-add-to-cart-form form.cart .single_add_to_cart_button {
		flex: 1;
	}
}

@media (min-width: 600px) and (max-width: 1023px) {
	.wp-block-columns.alignwide.melkom-product-layout {
		flex-wrap: nowrap !important;
	}

	.wp-block-columns.alignwide.melkom-product-layout > .wp-block-column {
		flex-basis: 50% !important;
		flex-grow: 1;
		min-width: 0;
	}
}

@media (max-width: 1023px) {
	.wp-block-woocommerce-related-products .wp-block-post-template.is-layout-grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

@media (max-width: 599px) {
	.wp-block-woocommerce-related-products .wp-block-post-template.is-layout-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.wp-block-group.melkom-product-page {
		margin-top: var(--wp--preset--spacing--40) !important;
	}
}

/* Search and price filter inputs look like the account/login inputs:
 * 1px rgba(32,7,7,.8) border, 4px radius, white background, Roboto 14px. */
.wp-block-search .wp-block-search__input,
.wc-block-components-price-slider .wc-block-components-price-slider__amount {
	border: 1px solid rgba(32, 7, 7, 0.8);
	border-radius: 4px;
	background-color: #fff;
	color: var(--wp--preset--color--primary);
	font-family: var(--wp--preset--font-family--roboto);
	font-size: 14px;
	font-weight: 400;
}

.wp-block-search .wp-block-search__input {
	padding: 14.4px 17.6px;
}

/* !important: price-filter.css forces `border: inherit !important; border-radius: inherit !important`
 * on `.wc-block-price-filter__controls input`, which would give these inputs the parent's square border. */
.wc-block-components-price-slider .wc-block-components-price-slider__amount {
	padding: 10px 12px;
	border: 1px solid rgba(32, 7, 7, 0.8) !important;
	border-radius: 4px !important;
}

/* Price filter: hide the "Мин. цена" / "Макс. цена" captions visually.
 * Kept for screen readers (visually-hidden), the inputs also carry their own aria-label. */
.wc-block-components-price-slider__label {
	position: absolute !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	clip-path: inset(50%);
	white-space: nowrap;
}

/* Sidebar product categories: plain full-width rows */
.wc-block-product-categories.is-list .wc-block-product-categories-list {
	margin: 8px 0 0;
	padding: 0;
	list-style: none;
}

.wc-block-product-categories.is-list .wc-block-product-categories-list-item {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin: 0;
	padding: 10px 0;
	font-size: 16px;
	line-height: 1.4;
}

.wc-block-product-categories.is-list .wc-block-product-categories-list-item > a {
	flex: 1;
	color: var(--wp--preset--color--primary);
	text-decoration: none;
}

/* Stretch the link over the whole row so the entire row is clickable */
.wc-block-product-categories.is-list .wc-block-product-categories-list-item > a::after {
	position: absolute;
	inset: 0;
	content: "";
}

.wc-block-product-categories.is-list .wc-block-product-categories-list-item:hover > a {
	text-decoration: underline;
	text-underline-offset: 3px;
}

/* Header: account icon in the same color as the menu links and the mini-cart */
.wc-block-customer-account__link {
	color: var(--wp--preset--color--contrast);
}

/* Cart/Checkout: the mini-cart is rendered as a plain link (melkom-store-tweaks) without its scripts,
 * which normally set the badge colors inline; use the same colors here. */
a.wc-block-mini-cart__button {
	color: var(--wp--preset--color--contrast);
}

a.wc-block-mini-cart__button .wc-block-mini-cart__badge {
	background-color: var(--wp--preset--color--contrast);
	color: var(--wp--preset--color--base);
}

/* My Account columns: 20% menu / 80% content (WooCommerce default is 30% / 68%).
 * Only above 768px: below that woocommerce-smallscreen.css stacks both columns at 100%. */
@media (min-width: 769px) {
	body.woocommerce-account .woocommerce-MyAccount-navigation {
		float: left;
		width: 20%;
	}

	body.woocommerce-account .woocommerce-MyAccount-content {
		float: right;
		width: 80%;
	}
}

body.woocommerce-account .woocommerce .woocommerce-MyAccount-navigation li.is-active a {
	font-weight: 500;
}

/* Active My Account menu item: Iconoteka gem instead of the "> " text from twenty-twenty-three.css */
body.woocommerce-account .woocommerce .woocommerce-MyAccount-navigation li.is-active a::before {
	display: inline-block;
	width: 1em;
	height: 1em;
	margin-right: 0.3em;
	background-color: currentColor;
	content: "";
	vertical-align: -0.15em;
	-webkit-mask: url("../../mu-plugins/melkom-icons/gem-medium.svg") center / contain no-repeat;
	mask: url("../../mu-plugins/melkom-icons/gem-medium.svg") center / contain no-repeat;
}

/* Product page quantity: − [n] + in a rounded box, like the Cart block's quantity selector.
 * Buttons are added by mu-plugins/melkom-quantity/quantity.js. Height stretches to the Add to cart button. */
.quantity.melkom-qty {
	display: flex;
	align-items: stretch;
	box-sizing: border-box;
	width: 107px;
	overflow: hidden;
	border: 1px solid rgba(59, 59, 59, 0.3);
	border-radius: 4px;
	background-color: transparent;
}

.quantity.melkom-qty .melkom-qty__button {
	flex: 0 0 30px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: transparent;
	color: var(--wp--preset--color--contrast);
	font-family: inherit;
	font-size: 16px;
	line-height: 1;
	cursor: pointer;
}

.quantity.melkom-qty .melkom-qty__button:hover:not(:disabled) {
	background-color: #f6f4f1;
}

.quantity.melkom-qty .melkom-qty__button:disabled {
	opacity: 0.4;
	cursor: default;
}

.quantity.melkom-qty input.qty {
	flex: 1 1 auto;
	width: 45px;
	min-width: 0;
	margin: 0;
	padding: 6px 0;
	border: 0;
	border-radius: 0;
	background: transparent;
	color: var(--wp--preset--color--contrast);
	font-family: var(--wp--preset--font-family--roboto);
	font-size: 15px;
	text-align: center;
	-moz-appearance: textfield;
	appearance: textfield;
}

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

.quantity.melkom-qty:focus-within {
	border-color: rgba(59, 59, 59, 0.7);
}

.quantity.melkom-qty input.qty:focus {
	outline: none;
}
