/*
Theme Name: Rota Mağaza
Theme URI: https://www.wpdenizi.com/rota-magaza
Author: WP Denizi
Author URI: https://www.wpdenizi.com
Description: A WooCommerce block theme for Turkish online stores: campaign slider, category tiles, trust badges, product grids, a clean product page with delivery and return info, free shipping bar, and contract pages. Works with the Rota Mağaza Core plugin for the store panel, slides, banners, statistics, SEO and KVKK tools.
Requires at least: 6.6
Tested up to: 7.1
Requires PHP: 8.0
Version: 0.4.1
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: rota-magaza
Tags: e-commerce, block-patterns, full-site-editing, wide-blocks, translation-ready, custom-colors, custom-logo, one-column, two-columns
Update URI: https://www.wpdenizi.com/rota-magaza
*/

/* Accessibility: visible focus everywhere. */
:where(a, button, input, select, textarea, summary):focus-visible {
	outline: 2px solid var(--wp--preset--color--primary);
	outline-offset: 2px;
}

.screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

/* Header */
.rota-store-header {
	position: relative;
	z-index: 20;
}

.rota-header-main {
	gap: var(--wp--preset--spacing--50);
}

.rota-header-brand .wp-block-site-title {
	white-space: nowrap;
}

.rota-header-search {
	flex: 1 1 auto;
	max-width: 560px;
}

.rota-header-search .wp-block-search__inside-wrapper {
	border: 1px solid var(--wp--preset--color--line) !important;
	border-radius: var(--wp--custom--radius--pill);
	background: var(--wp--preset--color--base-2);
	padding: 4px !important;
}

.rota-header-search .wp-block-search__input {
	border: 0 !important;
	background: transparent;
	padding-left: 16px !important;
	font-size: var(--wp--preset--font-size--medium);
}

.rota-header-search .wp-block-search__button {
	border-radius: var(--wp--custom--radius--pill) !important;
	background: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--on-primary);
	margin-left: 0;
	min-width: 44px;
	min-height: 40px;
}

.rota-header-tools .wc-block-mini-cart__button,
.rota-header-tools .wc-block-customer-account a {
	min-width: 44px;
	min-height: 44px;
}

.rota-header-tools .wc-block-mini-cart__badge {
	background: var(--wp--preset--color--accent);
	color: var(--wp--preset--color--on-accent);
	border-color: var(--wp--preset--color--base);
}

.rota-header-nav .wp-block-navigation a {
	text-decoration: none;
}

.rota-header-nav .wp-block-navigation a:hover {
	color: var(--wp--preset--color--primary);
}

.rota-header-contact {
	font-size: var(--wp--preset--font-size--small);
	color: var(--wp--preset--color--contrast-2);
}

@media (max-width: 781px) {
	.rota-header-main {
		flex-wrap: wrap !important;
		row-gap: var(--wp--preset--spacing--30) !important;
	}

	.rota-header-brand {
		flex: 1 1 0;
		min-width: 0;
	}

	.rota-header-brand .wp-block-site-title {
		font-size: var(--wp--preset--font-size--x-large) !important;
		white-space: normal;
	}

	.rota-header-brand .wp-block-site-logo img {
		width: 34px !important;
	}

	.rota-header-tools {
		flex: 0 0 auto;
	}

	.rota-header-nav {
		padding-top: var(--wp--preset--spacing--20) !important;
		padding-bottom: var(--wp--preset--spacing--20) !important;
	}

	.rota-header-search {
		order: 3;
		flex-basis: 100%;
		max-width: none;
	}

	.rota-header-contact {
		display: none !important;
	}
}

/* Tablet and small laptop: the menu row keeps the menu only. With the phone
   numbers next to it the row is so tight that it breaks onto two lines until
   the web fonts arrive, and the whole page jumps. */
@media (min-width: 782px) and (max-width: 1199px) {
	.rota-header-contact {
		display: none !important;
	}
}

/* Section helpers */
.rota-see-all a {
	font-weight: 600;
	text-decoration: none;
	border-bottom: 1px solid currentColor;
}

.is-style-rota-eyebrow {
	font-size: var(--wp--preset--font-size--small);
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--wp--preset--color--accent);
}

.wp-block-group.is-style-rota-card,
.wp-block-column.is-style-rota-card {
	background: var(--wp--preset--color--base);
	border: 1px solid var(--wp--preset--color--line);
	border-radius: var(--wp--custom--radius--lg);
	box-shadow: var(--wp--preset--shadow--card);
	overflow: hidden;
}

.wp-block-button.is-style-rota-accent .wp-block-button__link {
	background: var(--wp--preset--color--accent);
	color: var(--wp--preset--color--on-accent);
}

.wp-block-button.is-style-outline .wp-block-button__link {
	border: 1.5px solid currentColor;
	background: transparent;
	color: var(--wp--preset--color--contrast);
}

/* Product cards */
.rota-products .wc-block-product {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 6px;
	text-align: left;
}

.rota-products .wc-block-components-product-image {
	margin-bottom: 4px !important;
	border-radius: var(--wp--custom--radius--lg);
	overflow: hidden;
	background: var(--wp--preset--color--base-3);
}

.rota-products .wc-block-components-product-image img {
	transition: transform 0.35s ease;
}

.rota-products .wc-block-product:hover .wc-block-components-product-image img {
	transform: scale(1.04);
}

.rota-products .wp-block-post-title {
	line-height: 1.35;
}

.rota-products .wp-block-post-title a {
	text-decoration: none;
	color: var(--wp--preset--color--contrast);
}

.rota-products .wc-block-components-product-price {
	color: var(--wp--preset--color--contrast);
}

.rota-products .wc-block-components-product-price del {
	color: var(--wp--preset--color--contrast-3);
	font-weight: 400;
	font-size: 0.9em;
}

.rota-products .wc-block-components-product-price ins {
	text-decoration: none;
	color: var(--wp--preset--color--sale);
}

.rota-products .wc-block-components-product-button {
	margin-top: auto !important;
}

.rota-products .wc-block-components-product-button .wp-block-button__link,
.rota-products .wc-block-components-product-button .wc-block-components-product-button__button {
	width: 100%;
	border-radius: var(--wp--custom--radius--pill);
	background: var(--wp--preset--color--base);
	color: var(--wp--preset--color--contrast);
	border: 1.5px solid var(--wp--preset--color--line-strong);
	font-weight: 600;
	min-height: 44px;
}

.rota-products .wc-block-components-product-button .wp-block-button__link:hover,
.rota-products .wc-block-components-product-button .wc-block-components-product-button__button:hover {
	background: var(--wp--preset--color--primary);
	border-color: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--on-primary);
}

.wc-block-components-product-sale-badge {
	border-radius: var(--wp--custom--radius--pill) !important;
	padding: 4px 10px !important;
	margin: 12px !important;
}

.rota-products .wc-block-components-product-rating__stars,
.wc-block-components-product-rating .wc-block-components-product-rating__stars {
	color: #c58b1c;
}

/* Shop */
.rota-shop-bar .woocommerce-ordering select {
	border: 1px solid var(--wp--preset--color--line);
	border-radius: var(--wp--custom--radius--pill);
	padding: 8px 14px;
	background: var(--wp--preset--color--base);
}

.woocommerce-breadcrumb,
.wc-block-breadcrumbs {
	color: var(--wp--preset--color--contrast-3);
}

.woocommerce-breadcrumb a,
.wc-block-breadcrumbs a {
	color: inherit;
}

/* Product page */
.rota-product-main .wp-block-woocommerce-product-image-gallery {
	max-width: none !important;
}

.rota-product-main .woocommerce-product-gallery {
	width: 100% !important;
	max-width: none !important;
	position: relative;
}

.rota-product-main .woocommerce-product-gallery__image img {
	width: 100%;
	height: auto;
}

.rota-product-main span.onsale,
.wc-block-components-product-sale-badge {
	background: var(--wp--preset--color--sale) !important;
	color: #fff !important;
	border: 0 !important;
	border-radius: var(--wp--custom--radius--pill) !important;
	font-size: var(--wp--preset--font-size--x-small) !important;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	line-height: 1 !important;
	min-height: 0 !important;
	min-width: 0 !important;
	padding: 7px 12px !important;
}

.rota-product-main span.onsale {
	position: absolute;
	top: 16px !important;
	left: 16px !important;
	z-index: 9;
	margin: 0 !important;
}

.rota-product-main .woocommerce-product-gallery__trigger {
	top: 16px !important;
	right: 16px !important;
	background: var(--wp--preset--color--base) !important;
	border-radius: 50% !important;
}

.rota-product-summary .wc-block-components-product-price del,
.rota-product-summary .price del {
	color: var(--wp--preset--color--contrast-3);
	font-size: 0.7em;
	font-weight: 400;
}

.rota-product-summary .wc-block-components-product-price ins,
.rota-product-summary .price ins {
	text-decoration: none;
	color: var(--wp--preset--color--sale);
}

.woocommerce-Tabs-panel > h2:first-child {
	display: none;
}

.woocommerce-Tabs-panel h2 {
	font-size: var(--wp--preset--font-size--x-large);
	margin-top: var(--wp--preset--spacing--50);
}

.rota-product-main .woocommerce-product-gallery__wrapper img,
.rota-product-main .woocommerce-product-gallery .flex-viewport {
	border-radius: var(--wp--custom--radius--lg);
}

.rota-product-main .woocommerce-product-gallery .flex-control-thumbs {
	display: grid !important;
	grid-template-columns: repeat(5, 1fr);
	gap: 10px;
	margin-top: 10px !important;
}

.rota-product-main .woocommerce-product-gallery .flex-control-thumbs img {
	border-radius: var(--wp--custom--radius--md);
}

.rota-product-cat a {
	color: var(--wp--preset--color--accent);
	text-decoration: none;
	font-weight: 600;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

.rota-product-summary .wp-block-add-to-cart-form form.cart {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	align-items: stretch;
}

.rota-product-summary .wp-block-add-to-cart-form .quantity .qty {
	min-height: 52px;
	width: 84px;
	border: 1px solid var(--wp--preset--color--line-strong);
	border-radius: var(--wp--custom--radius--pill);
	text-align: center;
	background: var(--wp--preset--color--base);
}

.rota-product-summary .wp-block-add-to-cart-form .single_add_to_cart_button {
	flex: 1 1 220px;
	min-height: 52px;
	border-radius: var(--wp--custom--radius--pill) !important;
	background: var(--wp--preset--color--primary) !important;
	color: var(--wp--preset--color--on-primary) !important;
	font-weight: 700;
	font-size: var(--wp--preset--font-size--large);
}

.rota-product-summary .wp-block-add-to-cart-form .single_add_to_cart_button:hover {
	background: var(--wp--preset--color--primary-strong) !important;
}

.rota-product-summary .stock.out-of-stock {
	color: var(--wp--preset--color--sale);
	font-weight: 600;
}

.wp-block-woocommerce-product-details .wc-tabs {
	border-bottom: 1px solid var(--wp--preset--color--line) !important;
}

.wp-block-woocommerce-product-details .wc-tabs li a {
	font-weight: 600;
}

/* WooCommerce buttons outside blocks (My account, notices). */
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button {
	display: inline-block;
	background: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--on-primary);
	border: 0;
	border-radius: var(--wp--custom--radius--pill);
	padding: 10px 20px;
	font-weight: 600;
	font-size: var(--wp--preset--font-size--small);
	line-height: 1.4;
	text-decoration: none;
}

.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce input.button:hover {
	background: var(--wp--preset--color--primary-strong);
	color: var(--wp--preset--color--on-primary);
}

/* Cart and checkout */
.wc-block-cart .wc-block-cart__submit-button,
.wc-block-components-checkout-place-order-button {
	border-radius: var(--wp--custom--radius--pill) !important;
	min-height: 52px;
}

/* Footer */
.rota-pay {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin: 0;
}

.rota-pay span {
	display: inline-flex;
	align-items: center;
	padding: 4px 10px;
	border: 1px solid rgba(255, 255, 255, 0.2);
	border-radius: var(--wp--custom--radius--sm);
	color: var(--wp--preset--color--on-dark-2);
	font-weight: 600;
	letter-spacing: 0.02em;
}

.rota-footer-contact .rota-contact-label {
	color: var(--wp--preset--color--on-dark-2);
}

.rota-footer-contact .rota-contact-icon {
	background: rgba(255, 255, 255, 0.08);
	color: var(--wp--preset--color--on-dark);
}

/* Posts */
.wp-block-post-featured-image img {
	transition: transform 0.35s ease;
}

.wp-block-post-template .wp-block-post-featured-image {
	overflow: hidden;
	border-radius: var(--wp--custom--radius--lg);
}

.wp-block-post-template li:hover .wp-block-post-featured-image img {
	transform: scale(1.03);
}

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

.rota-plain-list {
	list-style: none;
	padding-left: 0;
}

/* While the cookie notice is open (its height comes from Rota Mağaza Core as
   --rota-cookie-h), the WhatsApp button and the phone checkout button sit
   above it instead of under it. */
.rota-wa {
	bottom: calc(20px + var(--rota-cookie-h, 0px)) !important;
}

.wc-block-cart__submit-container--sticky {
	bottom: var(--rota-cookie-h, 0px) !important;
}

.rota-top {
	bottom: calc(20px + var(--rota-cookie-h, 0px)) !important;
}
