/*
 * Pirladent mobile storefront refinements.
 * Mobile/tablet-only layer over native WoodMart components (bottom toolbar, floating
 * block, cart/checkout builder widgets). Every rule is inside a max-width query so the
 * desktop experience is unchanged.
 */

/* ==========================================================================
   Bottom toolbar and floating controls (WoodMart shows the toolbar <= 1024px)
   ========================================================================== */

@media (max-width: 1024px) {
	/* Native toolbar height (55px) is kept: WoodMart offsets its sticky add-to-cart bar by it. */
	.wd-toolbar {
		border-top: 1px solid var(--el-color-border-soft);
		background: rgba(255, 255, 255, 0.97);
		box-shadow: 0 -6px 24px rgba(43, 37, 49, 0.08);
		-webkit-backdrop-filter: saturate(160%) blur(10px);
		backdrop-filter: saturate(160%) blur(10px);
	}

	.wd-toolbar > div > a {
		color: var(--el-color-text-muted);
		-webkit-tap-highlight-color: transparent;
	}

	.wd-toolbar .wd-tools-icon {
		color: var(--el-color-text-primary);
	}

	.wd-toolbar .wd-toolbar-label {
		margin-top: 3px;
		color: var(--el-color-text-muted);
		font-size: 11px;
		font-weight: 600;
		letter-spacing: 0;
	}

	.wd-toolbar .wd-tools-count {
		background-color: var(--el-color-brand-primary);
		color: var(--el-color-text-inverse);
	}

	/* Current destination state for the toolbar items that map to a page. */
	.home .wd-toolbar-home > a,
	.woocommerce-cart .wd-toolbar .wd-header-cart > a,
	.woocommerce-account .wd-toolbar .wd-header-my-account > a {
		position: relative;
	}

	.home .wd-toolbar-home > a :is(.wd-tools-icon, .wd-toolbar-label),
	.woocommerce-cart .wd-toolbar .wd-header-cart > a :is(.wd-tools-icon, .wd-toolbar-label),
	.woocommerce-account .wd-toolbar .wd-header-my-account > a :is(.wd-tools-icon, .wd-toolbar-label) {
		color: var(--el-color-brand-primary);
	}

	.home .wd-toolbar-home > a::before,
	.woocommerce-cart .wd-toolbar .wd-header-cart > a::before,
	.woocommerce-account .wd-toolbar .wd-header-my-account > a::before {
		position: absolute;
		top: -1px;
		left: 50%;
		width: 28px;
		height: 3px;
		border-radius: 0 0 3px 3px;
		background: var(--el-color-brand-primary);
		content: "";
		transform: translateX(-50%);
	}

	/* WhatsApp floating block and cookie settings sit above the toolbar, below drawers. */
	body.sticky-toolbar-on .wd-fb-holder {
		bottom: 55px;
	}

	#pirladent-consent-trigger.pirladent-consent-trigger-btn {
		z-index: 340;
		bottom: 67px;
		left: 12px;
		width: 40px;
		height: 40px;
		justify-content: center;
		padding: 0;
		border-radius: 50%;
		background: rgba(255, 255, 255, 0.96);
	}

	#pirladent-consent-trigger.pirladent-consent-trigger-btn > span {
		position: absolute;
		width: 1px;
		height: 1px;
		overflow: hidden;
		clip: rect(0 0 0 0);
		white-space: nowrap;
	}

	/* The native sticky add-to-cart bar already sits above the toolbar; avoid stacking. */
	body:has(.wd-sticky-btn.wd-sticky-btn-shown) #pirladent-consent-trigger.pirladent-consent-trigger-btn {
		bottom: 109px;
	}

	body.sticky-toolbar-on:has(.wd-sticky-btn.wd-sticky-btn-shown) .wd-fb-holder {
		bottom: 97px;
	}

	/* Floating controls should never cover open drawers, filters or popups. */
	body:has(.wd-side-hidden.wd-opened, .mfp-ready, .wd-close-side.wd-close-side-opened) :is(.pirladent-consent-trigger-btn, .wd-fb-holder) {
		visibility: hidden;
		opacity: 0;
	}
}

/* Desktop: while WoodMart's sticky add-to-cart bar is shown, the floating cookie button sat on its product title. */
@media (min-width: 1025px) {
	body:has(.wd-sticky-btn.wd-sticky-btn-shown) #pirladent-consent-trigger.pirladent-consent-trigger-btn {
		bottom: calc(var(--wd-sticky-btn-height, 95px) + 14px);
	}
}

@media (max-width: 767px) {
	/* The toolbar, header and WhatsApp already cover navigation; drop the extra back-to-top bubble. */
	.sticky-toolbar-on .scrollToTop {
		display: none;
	}

	/*
	 * Phones: the floating cookie-settings bubble covered prices and buttons. The footer's native
	 * "Yasal" list now carries a "Çerez Ayarları" link (pirladent-storefront-ux.js opens the same
	 * dialog from it and flags <html> once bound). Until then, or without JS, the trigger returns
	 * to normal flow as a labelled row after the footer: one tap away, never over content.
	 */
	.pirladent-consent-link-ready #pirladent-consent-trigger.pirladent-consent-trigger-btn {
		display: none;
	}

	html:not(.pirladent-consent-link-ready) #pirladent-consent-trigger.pirladent-consent-trigger-btn {
		position: static;
		display: flex;
		width: 100%;
		height: auto;
		min-height: 48px;
		align-items: center;
		justify-content: center;
		gap: 8px;
		margin: 0;
		padding: 0 16px;
		border: 0;
		border-top: 1px solid var(--el-color-border-soft);
		border-radius: 0;
		background: var(--el-color-surface-section-soft);
		box-shadow: none;
		color: var(--el-color-text-muted);
		font-size: 13px;
		font-weight: 600;
	}

	html:not(.pirladent-consent-link-ready) #pirladent-consent-trigger.pirladent-consent-trigger-btn > span {
		position: static;
		width: auto;
		height: auto;
		overflow: visible;
		clip: auto;
	}
}

/* ==========================================================================
   Header live search: results align with the field and use the screen height
   ========================================================================== */

@media (max-width: 767px) {
	.wd-search-form .wd-dropdown-results {
		right: 0 !important;
		left: 0 !important;
		margin-top: 6px;
		overflow: hidden;
		border: 1px solid var(--el-color-border-soft);
		border-radius: var(--el-radius-md);
		box-shadow: var(--el-shadow-card-hover);
	}

	.wd-search-form .wd-dropdown-results .wd-scroll-content {
		max-height: min(64vh, 560px);
		overscroll-behavior: contain;
	}
}

/* ==========================================================================
   Product grids: honest card height and aligned price/action rows
   ========================================================================== */

@media (max-width: 767px) {
	:is(.woocommerce-shop, .tax-product_cat, .tax-product_tag, .tax-product_brand, .post-type-archive-product, .search-results.woocommerce) .wd-products .product-element-bottom {
		min-height: 0;
		padding: 10px 10px 12px;
	}

	:is(.woocommerce-shop, .tax-product_cat, .tax-product_tag, .tax-product_brand, .post-type-archive-product, .search-results.woocommerce) .wd-products .product-element-bottom > .price,
	:is(.woocommerce-shop, .tax-product_cat, .tax-product_tag, .tax-product_brand, .post-type-archive-product, .search-results.woocommerce) .wd-products .product-element-bottom > .wrap-price {
		margin-top: auto;
		padding-top: 6px;
	}

	:is(.woocommerce-shop, .tax-product_cat, .tax-product_tag, .tax-product_brand, .post-type-archive-product, .search-results.woocommerce) .wd-products .wd-add-btn {
		margin-top: 10px;
	}

	:is(.woocommerce-shop, .tax-product_cat, .tax-product_tag, .tax-product_brand, .post-type-archive-product, .search-results.woocommerce) .wd-products .wd-entities-title {
		min-height: 0;
		margin-bottom: 4px;
	}

	:is(.woocommerce-shop, .tax-product_cat, .tax-product_tag, .tax-product_brand, .post-type-archive-product, .search-results.woocommerce) .wd-products .wd-product-cats {
		min-height: 0;
		margin-bottom: 0;
	}

	:is(.woocommerce-shop, .tax-product_cat, .tax-product_tag, .tax-product_brand, .post-type-archive-product, .search-results.woocommerce) .wd-products .price {
		font-size: 14px;
		line-height: 1.35;
	}

	:is(.woocommerce-shop, .tax-product_cat, .tax-product_tag, .tax-product_brand, .post-type-archive-product, .search-results.woocommerce) .wd-products .price del {
		display: block;
		font-size: 11.5px;
	}

	/* Card shell: the photo fills the card instead of sitting in a second inset frame. */
	:is(.woocommerce-shop, .tax-product_cat, .tax-product_tag, .tax-product_brand, .post-type-archive-product, .search-results.woocommerce) .wd-products .wd-product-wrapper {
		padding: 0;
		border-radius: var(--el-radius-md);
	}

	:is(.woocommerce-shop, .tax-product_cat, .tax-product_tag, .tax-product_brand, .post-type-archive-product, .search-results.woocommerce) .wd-products .wd-product-thumb {
		border-radius: 0;
	}

	:is(.woocommerce-shop, .tax-product_cat, .tax-product_tag, .tax-product_brand, .post-type-archive-product, .search-results.woocommerce) .wd-products .wd-product-thumb img {
		padding: 8px;
	}

	:is(.woocommerce-shop, .tax-product_cat, .tax-product_tag, .tax-product_brand, .post-type-archive-product, .search-results.woocommerce) .wd-products .wd-entities-title {
		font-weight: 600;
		line-height: 1.4;
	}

	/* Pill action matching the homepage, product page and cart buttons; 40px keeps the tap target. */
	:is(.woocommerce-shop, .tax-product_cat, .tax-product_tag, .tax-product_brand, .post-type-archive-product, .search-results.woocommerce) .wd-products .wd-add-btn .button {
		height: 40px;
		min-height: 40px;
		padding: 0 10px;
		border-radius: var(--el-radius-pill);
		font-size: 12.5px;
		line-height: 1.2;
	}

	/* Guests: the native "login to see prices" link reads as an action, not body text. */
	.wd-products .price .login-to-prices-msg {
		display: flex;
		min-height: 40px;
		align-items: center;
		justify-content: center;
		margin-top: 4px;
		padding: 7px 10px;
		border: 1px solid var(--el-color-border-strong);
		border-radius: var(--el-radius-sm);
		background: var(--el-color-surface-section-soft);
		color: var(--el-color-brand-deep);
		font-size: 12px;
		font-weight: 700;
		line-height: 1.3;
		text-align: center;
	}

	/* Search results: the H1 already names the query; the generic breadcrumb only scrolls sideways. */
	.search-results.woocommerce .woocommerce-breadcrumb {
		display: none;
	}

	/* Archive pagination keeps every target reachable, wrapping when the row is full. */
	:is(.woocommerce-shop, .tax-product_cat, .tax-product_tag, .post-type-archive-product, .search-results.woocommerce) .wd-pagination ul.page-numbers {
		display: flex;
		flex-wrap: wrap;
		align-items: center;
		justify-content: center;
		gap: 4px;
		margin: 0 auto;
		padding: 0;
	}

	:is(.woocommerce-shop, .tax-product_cat, .tax-product_tag, .post-type-archive-product, .search-results.woocommerce) .wd-pagination :is(a, .current, .dots) {
		display: inline-flex;
		min-width: 36px;
		min-height: 36px;
		align-items: center;
		justify-content: center;
		padding: 0 6px;
		font-size: 13px;
	}
}

@media (max-width: 380px) {
	:is(.woocommerce-shop, .tax-product_cat, .tax-product_tag, .post-type-archive-product, .search-results.woocommerce) .wd-pagination ul.page-numbers {
		gap: 2px;
	}

	:is(.woocommerce-shop, .tax-product_cat, .tax-product_tag, .post-type-archive-product, .search-results.woocommerce) .wd-pagination :is(a, .current, .dots) {
		min-width: 30px;
		padding: 0 3px;
		font-size: 12px;
	}
}

/* Off-canvas filters: the drawer already scrolls, so drop the nested 320px scroller in filter lists. */
@media (max-width: 1024px) {
	:is(.wd-col-offcanvas-sm, .wd-col-offcanvas-md-sm).wd-side-hidden :is(.woodmart-woocommerce-layered-nav, .woocommerce-widget-layered-nav, .widget_product_categories) .wd-scroll-content {
		max-height: none;
	}

	/* Archives whose shared filter sidebar renders no widget (e.g. brand pages) would open an empty drawer. */
	:is(.woocommerce-shop, .tax-product_cat, .tax-product_tag, .tax-product_brand, .post-type-archive-product, .search-results.woocommerce):not(:has(.wd-col-offcanvas-sm .widget)) .wd-off-canvas-btn {
		display: none;
	}
}

/* ==========================================================================
   Product page
   ========================================================================== */

@media (max-width: 767px) {
	/*
	 * Phones keep the native thumbnail strip, five 64px previews per slide instead of three 123px
	 * ones. WoodMart's carousel reads this column variable (the template writes it inline, hence
	 * !important; the gallery widget's own "per slide" control cannot be saved through the staging
	 * tooling). With previews and 40px arrows shown, the 10px dots repeat them as tiny targets.
	 */
	.single-product .woocommerce-product-gallery .wd-gallery-thumb .wd-carousel {
		--wd-col-sm: 5 !important;
	}

	.single-product .woocommerce-product-gallery.wd-has-thumb .wd-gallery-images .wd-nav-pagin-wrap {
		display: none;
	}

	.single-product .elementor-widget-wd_single_product_add_to_cart form.cart {
		display: flex;
		flex-wrap: wrap;
		align-items: stretch;
		gap: 10px;
	}

	.single-product .elementor-widget-wd_single_product_add_to_cart form.variations_form.cart {
		display: block;
	}

	.single-product .elementor-widget-wd_single_product_add_to_cart .woocommerce-variation-add-to-cart {
		display: flex;
		flex-wrap: wrap;
		align-items: stretch;
		gap: 10px;
	}

	.single-product .elementor-widget-wd_single_product_add_to_cart .quantity {
		display: inline-flex;
		height: 48px;
		margin: 0;
		overflow: hidden;
		border: 1px solid var(--el-color-border-strong);
		border-radius: var(--el-radius-pill);
		background: var(--el-color-surface-card);
	}

	.single-product .elementor-widget-wd_single_product_add_to_cart .quantity :is(.minus, .plus) {
		width: 42px;
		height: 100%;
		border: 0;
		background: transparent;
		color: var(--el-color-brand-deep);
		font-size: 18px;
	}

	.single-product .elementor-widget-wd_single_product_add_to_cart .quantity input.qty {
		width: 36px;
		height: 100%;
		border: 0;
		font-size: 15px;
		font-weight: 650;
	}

	.single-product .elementor-widget-wd_single_product_add_to_cart :is(.single_add_to_cart_button, .wd-buy-now-btn) {
		flex: 1 1 0;
		min-width: 0;
		min-height: 48px;
		margin: 0;
		padding-inline: 12px;
		border-radius: var(--el-radius-pill);
		font-size: 14px;
	}

	/* Buy-now gets its own full-width row so neither button truncates. */
	.single-product .elementor-widget-wd_single_product_add_to_cart .wd-buy-now-btn {
		flex-basis: 100%;
	}

	.single-product .elementor-widget-wd_single_product_price .login-to-prices-msg {
		display: flex;
		min-height: 48px;
		align-items: center;
		justify-content: center;
		padding: 10px 16px;
		border-radius: var(--el-radius-pill);
		background: var(--el-color-brand-primary);
		color: var(--el-color-text-inverse);
		font-size: 15px;
		font-weight: 700;
	}

	.single-product .elementor-element-0a078a2 .wd-social-icons {
		justify-content: flex-start;
	}

	/* Description and reviews: one card inset instead of two nested paddings. */
	.single-product .elementor .elementor-element.elementor-element-d2275d8 > .elementor-widget-container {
		padding: 18px 16px;
		border-radius: var(--el-radius-md);
	}

	.single-product .wd-rating-summary-wrap:has(.wd-rating-summary-total) {
		margin-bottom: 18px;
	}

	/* No reviews yet: show the score line, not five empty bars. */
	.single-product .wd-rating-summary:has(.star-rating span[style="width:0%"]) .wd-rating-summary-cont {
		display: none;
	}

	.single-product .woocommerce-Reviews .wd-rating-summary-heading {
		margin-bottom: 0;
	}
}

/* ==========================================================================
   Cart
   ========================================================================== */

/* Tablet: the 66/42 cart columns leave the cart table too narrow; stack them as on phones. */
@media (min-width: 768px) and (max-width: 1024px) {
	.woocommerce-cart .elementor-916 .elementor-element.elementor-element-c70bd0b {
		--flex-direction: column;
		flex-direction: column;
	}

	.woocommerce-cart .elementor-916 .elementor-element:is(.elementor-element-e31b5b9, .elementor-element-7297cca) {
		--width: 100%;
		width: 100%;
	}
}

@media (max-width: 768.98px) {
	/* Coupon field and button on one row, matching the existing desktop treatment. */
	.woocommerce-cart .cart-actions .wd-coupon-form,
	.woocommerce-cart-form .coupon.wd-coupon-form {
		display: flex !important;
		flex-direction: row !important;
		flex-wrap: nowrap !important;
		align-items: center;
		gap: 8px;
		padding: 0 !important;
		border: 0 !important;
	}

	.woocommerce-cart .wd-coupon-form .input-text {
		flex: 1 1 auto;
		width: auto !important;
		min-width: 0;
		height: 44px;
		margin: 0 !important;
	}

	.woocommerce-cart .wd-coupon-form button[name="apply_coupon"] {
		flex: 0 0 auto;
		width: auto !important;
		height: 44px;
		margin: 0 !important;
		white-space: nowrap;
	}
}

@media (max-width: 767px) {
	/* The coupon row was 32px wider than its card and clipped the apply button. */
	.woocommerce-cart .actions .cart-actions,
	.woocommerce-cart .actions .wd-coupon-form {
		width: 100%;
		max-width: 100%;
	}

	/* Cart and order-review steppers: 36px controls instead of 25x30. */
	:is(.woocommerce-cart-form, .woocommerce-checkout-review-order-table) .quantity {
		height: 36px;
	}

	:is(.woocommerce-cart-form, .woocommerce-checkout-review-order-table) .quantity :is(.minus, .plus) {
		width: 34px;
		height: 36px;
		font-size: 16px;
	}

	:is(.woocommerce-cart-form, .woocommerce-checkout-review-order-table) .quantity input.qty {
		width: 38px;
		height: 36px;
		font-size: 15px;
	}
}

/* Empty cart: "new products" suggestions two-up instead of one huge card per row. */
@media (max-width: 767px) {
	/* Must out-rank WooCommerce's later-loaded <=480px ".wc-block-grid.has-4-columns" display:block. */
	.wp-block-woocommerce-empty-cart-block .wc-block-grid.wc-block-product-new .wc-block-grid__products {
		display: grid;
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 12px;
		margin: 0;
	}

	.wp-block-woocommerce-empty-cart-block .wc-block-grid__product {
		max-width: none !important;
		margin: 0 !important;
		padding: 10px 10px 12px !important;
		border: 1px solid var(--el-color-border-soft) !important;
		border-radius: var(--el-radius-md);
		background: var(--el-color-surface-card);
	}

	.wp-block-woocommerce-empty-cart-block .wc-block-grid__product-image img {
		aspect-ratio: 1 / 1;
		object-fit: contain;
	}

	.wp-block-woocommerce-empty-cart-block .wc-block-grid__product-title {
		display: -webkit-box;
		overflow: hidden;
		font-size: 12.5px;
		line-height: 1.4;
		-webkit-box-orient: vertical;
		-webkit-line-clamp: 2;
	}

	/* Card buttons match the site's sentence-case "Sepete Ekle"; the main CTA keeps style.css's uppercase. */
	.wp-block-woocommerce-empty-cart-block .wc-block-grid__product .wp-block-button__link {
		letter-spacing: 0 !important;
		text-transform: none !important;
		min-height: 38px;
		padding: 8px 10px !important;
		font-size: 12px !important;
		box-shadow: none !important;
	}
}

/* ==========================================================================
   Free gift picker (cart + checkout): horizontal strip instead of a long list
   ========================================================================== */

@media (max-width: 767px) {
	.wd-cart-free-gifts .wd-fg {
		margin-top: 8px;
		padding: 16px 0 6px;
		border-top: 1px solid var(--el-color-border-soft);
	}

	.wd-cart-free-gifts .wd-fg > .title {
		margin-bottom: 4px;
		font-size: 17px;
	}

	.wd-cart-free-gifts .wd-fg-table,
	.wd-cart-free-gifts .wd-fg-table tbody {
		display: block;
		margin: 0;
		border: 0;
	}

	.wd-cart-free-gifts .wd-fg-table tbody {
		display: flex;
		gap: 10px;
		margin-inline: -15px;
		padding: 8px 15px 10px;
		overflow-x: auto;
		overscroll-behavior-x: contain;
		scroll-padding-inline: 15px;
		scroll-snap-type: x mandatory;
		scrollbar-width: none;
	}

	.wd-cart-free-gifts .wd-fg-table tbody::-webkit-scrollbar {
		display: none;
	}

	.wd-cart-free-gifts .wd-fg-table tr {
		display: flex;
		flex: 0 0 136px;
		flex-direction: column;
		margin: 0;
		padding: 10px;
		border: 1px solid var(--el-color-border-soft);
		border-radius: var(--el-radius-md);
		background: var(--el-color-surface-card);
		scroll-snap-align: start;
	}

	.wd-cart-free-gifts .wd-fg-table td {
		display: block;
		padding: 0 !important;
		border: 0 !important;
		text-align: left !important;
	}

	.wd-cart-free-gifts .wd-fg-table td::before {
		display: none !important;
	}

	.wd-cart-free-gifts .wd-fg-table .product-thumbnail {
		position: static !important;
		width: 100% !important;
		max-width: none !important;
	}

	.wd-cart-free-gifts .wd-fg-table .product-thumbnail img {
		width: 100%;
		max-width: none;
		height: 96px;
		object-fit: contain;
	}

	.wd-cart-free-gifts .wd-fg-table td.product-name {
		display: -webkit-box !important;
		min-height: 36px;
		margin: 8px 0 8px;
		overflow: hidden;
		font-size: 12.5px;
		font-weight: 650;
		line-height: 1.4;
		-webkit-box-orient: vertical;
		-webkit-line-clamp: 2;
	}

	.wd-cart-free-gifts .wd-fg-table .product-btn {
		margin-top: auto;
	}

	.wd-cart-free-gifts .wd-fg-table .product-btn .button {
		width: 100%;
		min-height: 38px;
		padding: 6px 8px;
		border-radius: var(--el-radius-pill);
		font-size: 12px;
	}
}

/* ==========================================================================
   Checkout
   ========================================================================== */

@media (max-width: 767px) {
	/* Shipping choices read left-to-right with the radio first. */
	.woocommerce-checkout .woocommerce-shipping-methods li,
	.woocommerce-cart .woocommerce-shipping-methods li {
		display: flex;
		align-items: flex-start;
		justify-content: flex-start;
		gap: 8px;
		margin-bottom: 10px;
		text-align: left;
	}

	.woocommerce-checkout .woocommerce-shipping-methods input.shipping_method,
	.woocommerce-cart .woocommerce-shipping-methods input.shipping_method {
		order: -1;
		float: none;
		flex: 0 0 auto;
		margin: 3px 0 0 !important;
	}

	.woocommerce-checkout .woocommerce-shipping-methods label,
	.woocommerce-cart .woocommerce-shipping-methods label {
		margin: 0;
		text-align: left;
	}

	.woocommerce-checkout .shop_table tr.woocommerce-shipping-totals {
		flex-direction: column;
		align-items: stretch;
		gap: 10px;
	}

	.woocommerce-checkout .shop_table tr.woocommerce-shipping-totals :is(th, td) {
		width: 100%;
		padding-inline: 0;
		text-align: left;
	}

	.woocommerce-checkout #place_order {
		min-height: 52px;
		font-size: 15px;
	}

	.woocommerce-checkout :is(.woocommerce-terms-and-conditions-wrapper, .in-sozlesme-onay-checkbox) input[type="checkbox"] {
		width: 20px;
		height: 20px;
	}

	/* Contract links (Ön Bilgilendirme / Mesafeli Satış) in the brand colour, not the plugin's link blue. */
	.woocommerce-checkout :is(.woocommerce-terms-and-conditions-wrapper a, .in-sozlesme-onay-checkbox .contract-modal-link) {
		color: var(--el-color-brand-primary);
		font-weight: 600;
		text-underline-offset: 2px;
	}

	/* Prevent iOS zoom on focus: inputs at 16px. */
	.woocommerce-checkout :is(input.input-text, select, textarea),
	.woocommerce-account :is(input.input-text, select, textarea),
	.woocommerce-cart .wd-coupon-form .input-text {
		font-size: 16px !important;
	}
}

/* ==========================================================================
   Order received: compact label/value rows; long e-mails wrap instead of overflowing
   ========================================================================== */

@media (max-width: 767px) {
	.woocommerce-order ul.woocommerce-order-overview {
		margin-bottom: 20px;
		padding: 4px 16px;
		border: 1px solid var(--el-color-border-soft);
		border-radius: var(--el-radius-md);
		background: var(--el-color-surface-card);
	}

	.woocommerce-order ul.woocommerce-order-overview > li {
		display: flex;
		flex-flow: row nowrap;
		align-items: baseline;
		justify-content: space-between;
		gap: 12px;
		margin: 0;
		padding: 11px 0;
		color: var(--el-color-text-muted);
		font-size: 13px;
		text-align: left;
		white-space: nowrap;
	}

	.woocommerce-order ul.woocommerce-order-overview > li > strong {
		white-space: normal;
		display: block;
		flex: 0 1 auto;
		width: auto;
		min-width: 0;
		margin: 0;
		color: var(--el-color-text-primary);
		font-size: 14px;
		text-align: right;
		overflow-wrap: anywhere;
	}
}

/* ==========================================================================
   My account dashboard shortcuts: two-up grid instead of full-width tiles
   ========================================================================== */

@media (max-width: 767px) {
	.woocommerce-account .wd-my-account-links {
		--wd-col: 2;
		--wd-gap: 10px;
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 10px;
	}

	.woocommerce-account .wd-my-account-links > li > a {
		min-height: 88px;
		padding: 14px 8px;
		font-size: 13px;
	}

	.woocommerce-account .wd-my-account-links .wd-nav-icon {
		font-size: 30px;
	}
}

@media (max-width: 767px) {
	/* Dashboard: the shortcut tiles already list every section; skip the duplicate link list. */
	.woocommerce-dashboard .wd-my-account-sidebar {
		display: none;
	}

	/* Other account pages and the wishlist (same sidebar): the page header already names the page. */
	body:not(.woocommerce-dashboard) .wd-my-account-sidebar .woocommerce-MyAccount-title {
		display: none;
	}

	/*
	 * Other account pages and the wishlist: every section stays visible as wrapping chips (no hidden overflow),
	 * with the current one filled, so the content still starts well above the old link list.
	 */
	body:not(.woocommerce-dashboard) .wd-my-account-sidebar .woocommerce-MyAccount-navigation ul {
		display: flex;
		flex-wrap: wrap;
		gap: 8px;
		margin: 0;
		padding: 0;
	}

	body:not(.woocommerce-dashboard) .wd-my-account-sidebar .woocommerce-MyAccount-navigation li {
		flex: 0 0 auto;
		margin: 0;
	}

	body:not(.woocommerce-dashboard) .wd-my-account-sidebar .woocommerce-MyAccount-navigation li > a {
		display: inline-flex;
		min-height: 40px;
		align-items: center;
		padding: 0 14px;
		border: 1px solid var(--el-color-border-soft);
		border-radius: var(--el-radius-pill);
		background: var(--el-color-surface-card);
		font-size: 13px;
		white-space: nowrap;
	}

	/* WooCommerce renders the order number as a row <th> and its responsive CSS hides it on phones. */
	.woocommerce-orders-table tbody th.woocommerce-orders-table__cell-order-number {
		display: flex;
		align-items: center;
		padding: 0 0 5px;
		border-bottom: 1px dashed rgba(0, 0, 0, 0.106);
		font-size: 15px;
	}

	.woocommerce-orders-table tbody th.woocommerce-orders-table__cell-order-number::before {
		margin-inline-end: auto;
		color: #333;
		font-weight: 600;
		content: attr(data-title);
	}

	.woocommerce-orders-table tbody th.woocommerce-orders-table__cell-order-number a {
		color: var(--el-color-brand-primary);
		font-weight: 700;
	}

	.woocommerce-customer-details address {
		overflow-wrap: anywhere;
	}

	body:not(.woocommerce-dashboard) .wd-my-account-sidebar .woocommerce-MyAccount-navigation li.is-active > a {
		border-color: var(--el-color-brand-primary);
		background: var(--el-color-brand-primary);
		color: var(--el-color-text-inverse);
	}
}

/* ==========================================================================
   Notices: neutral info messages ("no orders yet", coupon hints) read calmly
   ========================================================================== */

@media (max-width: 767px) {
	/* WoodMart paints info notices with its warning variables (loaded later); retint those. */
	.woocommerce-info {
		--notices-warning-bg: var(--el-color-surface-section-soft);
		--notices-warning-color: var(--el-color-text-primary);
		padding: 14px 16px 14px 48px;
		border: 1px solid var(--el-color-border-strong);
		border-radius: var(--el-radius-md);
		font-size: 14px;
		line-height: 1.5;
	}

	.woocommerce-info::before {
		left: 16px;
		color: var(--el-color-brand-primary);
	}

	.woocommerce-info :is(a, .button) {
		color: var(--el-color-brand-deep);
		font-weight: 700;
	}

	/*
	 * Errors (e.g. checkout validation) used the same white-on-mustard warning colours (3.6:1).
	 * Keep them distinct from info with a rose tint of the sale token and dark text.
	 */
	.woocommerce-error {
		--notices-warning-bg: color-mix(in srgb, var(--el-color-sale) 8%, #ffffff);
		--notices-warning-color: var(--el-color-text-primary);
		padding: 14px 16px 14px 48px;
		border: 1px solid color-mix(in srgb, var(--el-color-sale) 35%, #ffffff);
		border-radius: var(--el-radius-md);
		font-size: 14px;
		line-height: 1.5;
	}

	.woocommerce-error::before {
		left: 16px;
		color: var(--el-color-sale);
	}

	.woocommerce-error :is(a, strong) {
		color: var(--el-color-text-primary);
		font-weight: 700;
	}
}

/* ==========================================================================
   Footer (Pirladent Footer HTML block)
   ========================================================================== */

@media (max-width: 767px) {
	.elementor-element-f001001 {
		row-gap: 26px;
	}

	.elementor-element-f001001 > :is(.elementor-element-f001201, .elementor-element-f001401) {
		--width: calc(50% - 10px);
		width: calc(50% - 10px);
	}

	.elementor-element-f001001 > .elementor-element-f001201 {
		order: 1;
	}

	.elementor-element-f001001 > .elementor-element-f001401 {
		order: 2;
	}

	.elementor-element-f001001 > .elementor-element-f001301 {
		order: 3;
	}

	.elementor-element-f001001 :is(.elementor-element-f001211, .elementor-element-f001311, .elementor-element-f001411) .title {
		margin-bottom: 0;
		font-size: 16px;
	}

	.elementor-element-f001001 > :is(.elementor-element-f001201, .elementor-element-f001301, .elementor-element-f001401) {
		--gap: 6px;
		--row-gap: 6px;
		gap: 6px;
	}

	.elementor-element-f001001 :is(.elementor-element-f001212, .elementor-element-f001312, .elementor-element-f001412) li {
		margin-bottom: 0;
	}

	.elementor-element-f001001 :is(.elementor-element-f001212, .elementor-element-f001312, .elementor-element-f001412) li a,
	.elementor-element-f001001 :is(.elementor-element-f001212, .elementor-element-f001312, .elementor-element-f001412) li > span {
		display: inline-flex;
		min-height: 32px;
		align-items: center;
		font-size: 14px;
	}
}

/* ==========================================================================
   Carousels (all widths): Swiper's screen-reader announcement ("Sonraki slayt")
   is unstyled in WoodMart and appears on screen after keyboard navigation.
   Keep it announced, but visually hidden.
   ========================================================================== */

.wd-carousel .swiper-notification {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
	pointer-events: none;
}

/* ==========================================================================
   Product tabs (homepage "Öne Çıkan Ürünler"): all tab titles visible on phones.
   WoodMart's 30px gap pushed the third title past the edge at 360px, so it only
   showed as a clipped word.
   ========================================================================== */

@media (max-width: 767px) {
	.wd-tabs-header .wd-nav-tabs.products-tabs-title {
		--nav-gap: 18px;
	}

	/* The titles now fit, so WoodMart's static right-edge swipe fade only made the last one look cut off. */
	.wd-tabs-header .wd-nav-tabs-wrapper:has(> .products-tabs-title) {
		-webkit-mask-image: none;
		mask-image: none;
	}
}

@media (max-width: 359px) {
	.wd-tabs-header .wd-nav-tabs.products-tabs-title {
		--nav-gap: 14px;
	}

	.wd-tabs-header .wd-nav-tabs.products-tabs-title > li > a {
		font-size: 14px;
	}
}
