/**
 * Mobile commerce presentation.
 *
 * Breakpoint: max-width 47.99rem (mobile phones).
 * Generic shell rules live in mobile.css.
 */

@media (max-width: 47.99rem) {
	.faradoran-main--woocommerce,
	.adonis-main--woocommerce {
		padding-block: var(--faradoran-theme-space-6) var(--faradoran-theme-space-8);
	}

	/* Rails — controlled edge bleed for carousel peek */
	.faradoran-main.faradoran-home .faradoran-home-products,
	.faradoran-main.faradoran-home .faradoran-home-categories,
	.faradoran-main.faradoran-home .faradoran-home-price-ranges,
	.adonis-main.faradoran-home .adonis-home-products,
	.adonis-main.faradoran-home .adonis-home-categories,
	.adonis-main.faradoran-home .adonis-home-price-ranges {
		padding-inline: 0;
	}

	.faradoran-main.faradoran-home .faradoran-home-products .faradoran-container,
	.faradoran-main.faradoran-home .faradoran-home-categories .faradoran-container,
	.faradoran-main.faradoran-home .faradoran-home-price-ranges .faradoran-container,
	.adonis-main.faradoran-home .adonis-home-products .adonis-container,
	.adonis-main.faradoran-home .adonis-home-categories .adonis-container,
	.adonis-main.faradoran-home .adonis-home-price-ranges .adonis-container {
		inline-size: 100%;
		max-inline-size: none;
		margin-inline: 0;
		padding-inline: var(--faradoran-theme-mobile-rail-bleed);
	}

	.faradoran-home-products__carousel,
	.adonis-home-products__carousel {
		--adonis-carousel-gap: var(--faradoran-theme-space-3);
		--adonis-carousel-peek: 0.15;
	}

	.faradoran-home-products__track,
	.adonis-home-products__track {
		scroll-padding-inline: var(--faradoran-theme-mobile-rail-bleed);
		padding-inline-end: var(--faradoran-theme-mobile-rail-bleed);
	}

	/* ------------------------------------------------------------------ */
	/* Archive header + mobile toolbar                                    */
	/* ------------------------------------------------------------------ */

	.faradoran-archive-hero,
	.adonis-archive-hero {
		margin-block-end: var(--faradoran-theme-space-4);
	}

	.faradoran-archive-hero__panel,
	.adonis-archive-hero__panel {
		padding: var(--faradoran-theme-space-4);
	}

	.faradoran-archive-hero__title,
	.adonis-archive-hero__title {
		font-size: clamp(1.125rem, 1rem + 0.5vw, 1.375rem);
	}

	.faradoran-archive-hero__count,
	.adonis-archive-hero__count {
		font-size: var(--faradoran-theme-font-size-sm);
	}

	.woocommerce .faradoran-main--woocommerce .faradoran-archive-mobile-actions__button,
	.woocommerce .adonis-main--woocommerce .adonis-archive-mobile-actions__button {
		min-block-size: var(--faradoran-theme-touch-target);
		font-size: var(--faradoran-theme-font-size-body);
		border-radius: var(--faradoran-theme-radius-md);
	}

	.faradoran-archive-sheet__panel,
	.adonis-archive-sheet__panel {
		border-radius: var(--faradoran-theme-radius-lg) var(--faradoran-theme-radius-lg) 0 0;
	}

	.faradoran-archive-sheet__footer,
	.adonis-archive-sheet__footer {
		position: sticky;
		inset-block-end: 0;
	}

	.faradoran-archive-sheet__apply,
	.adonis-archive-sheet__apply,
	.faradoran-archive-sheet__reset,
	.adonis-archive-sheet__reset {
		min-block-size: var(--faradoran-theme-touch-target);
	}

	.faradoran-archive-sort-options__label,
	.adonis-archive-sort-options__label {
		min-block-size: var(--faradoran-theme-touch-target);
	}

	/* ------------------------------------------------------------------ */
	/* Product grid                                                       */
	/* ------------------------------------------------------------------ */

	.faradoran-main--woocommerce ul.products,
	.adonis-main--woocommerce ul.products {
		gap: var(--faradoran-theme-space-3);
	}

	.faradoran-main--woocommerce ul.products li.product,
	.adonis-main--woocommerce ul.products li.product {
		padding: var(--faradoran-theme-space-3);
		gap: var(--faradoran-theme-space-2);
		border-radius: var(--faradoran-theme-radius-md);
	}

	.faradoran-main--woocommerce ul.products li.product .woocommerce-loop-product__title,
	.adonis-main--woocommerce ul.products li.product .woocommerce-loop-product__title {
		font-size: 0.8125rem;
		min-block-size: 0;
	}

	.faradoran-main--woocommerce ul.products li.product .price,
	.adonis-main--woocommerce ul.products li.product .price {
		font-size: 0.8125rem;
	}

	.faradoran-main--woocommerce ul.products li.product .button,
	.adonis-main--woocommerce ul.products li.product .button {
		min-block-size: var(--faradoran-theme-touch-target);
		font-size: var(--faradoran-theme-font-size-xs);
		padding-inline: var(--faradoran-theme-space-3);
	}

	.faradoran-main--woocommerce ul.products li.product .faradoran-product-wishlist,
	.adonis-main--woocommerce ul.products li.product .adonis-product-wishlist {
		min-block-size: var(--faradoran-theme-touch-target);
		min-inline-size: var(--faradoran-theme-touch-target);
	}

	/* 320px: keep 1 column; 360px+ uses existing 2-col rule in woocommerce.css */
	@media (max-width: 22.49rem) {
		.faradoran-main--woocommerce ul.products,
		.adonis-main--woocommerce ul.products {
			grid-template-columns: 1fr;
			gap: var(--faradoran-theme-space-4);
		}

		.faradoran-main--woocommerce ul.products li.product,
		.adonis-main--woocommerce ul.products li.product {
			padding: var(--faradoran-theme-space-4);
		}

		.faradoran-main--woocommerce ul.products li.product .woocommerce-loop-product__title,
		.adonis-main--woocommerce ul.products li.product .woocommerce-loop-product__title {
			font-size: var(--faradoran-theme-font-size-sm);
			min-block-size: 0;
		}
	}

	/* ------------------------------------------------------------------ */
	/* Single product                                                     */
	/* ------------------------------------------------------------------ */

	.woocommerce.single-product .faradoran-main--woocommerce,
	.woocommerce.single-product .adonis-main--woocommerce {
		padding-block: var(--faradoran-theme-space-4) var(--faradoran-theme-space-6);
	}

	.woocommerce.single-product .faradoran-main--woocommerce div.product,
	.woocommerce.single-product .adonis-main--woocommerce div.product {
		gap: var(--faradoran-theme-space-4);
	}

	.woocommerce.single-product .faradoran-main--woocommerce div.product .product_title,
	.woocommerce.single-product .adonis-main--woocommerce div.product .product_title {
		font-size: clamp(1.125rem, 1rem + 0.6vw, 1.375rem);
		line-height: var(--faradoran-theme-line-height-heading);
	}

	.woocommerce.single-product .faradoran-main--woocommerce div.product p.price,
	.woocommerce.single-product .adonis-main--woocommerce div.product p.price,
	.woocommerce.single-product .faradoran-main--woocommerce div.product span.price,
	.woocommerce.single-product .adonis-main--woocommerce div.product span.price {
		font-size: clamp(1.0625rem, 0.95rem + 0.4vw, 1.25rem);
		font-variant-numeric: tabular-nums;
	}

	.faradoran-gold-specs,
	.adonis-gold-specs {
		padding: var(--faradoran-theme-space-3);
		border-radius: var(--faradoran-theme-radius-md);
	}

	.faradoran-gold-specs__item,
	.adonis-gold-specs__item {
		display: flex;
		justify-content: space-between;
		align-items: baseline;
		gap: var(--faradoran-theme-space-3);
		padding-block: var(--faradoran-theme-space-2);
		border-block-end: var(--faradoran-theme-border-width) solid var(--faradoran-theme-color-border);
	}

	.faradoran-gold-specs__item:last-child,
	.adonis-gold-specs__item:last-child {
		border-block-end: 0;
	}

	.woocommerce.single-product .faradoran-main--woocommerce div.product form.cart .variations select,
	.woocommerce.single-product .adonis-main--woocommerce div.product form.cart .variations select,
	.woocommerce.single-product .faradoran-main--woocommerce div.product form.cart .variations .value,
	.woocommerce.single-product .adonis-main--woocommerce div.product form.cart .variations .value {
		min-block-size: var(--faradoran-theme-touch-target);
		font-size: var(--faradoran-theme-form-font-size-mobile);
	}

	.woocommerce.single-product .faradoran-main--woocommerce div.product form.cart .quantity .qty,
	.woocommerce.single-product .adonis-main--woocommerce div.product form.cart .quantity .qty {
		min-block-size: var(--faradoran-theme-touch-target);
		min-inline-size: 3rem;
		font-size: var(--faradoran-theme-form-font-size-mobile);
	}

	.woocommerce.single-product .faradoran-main--woocommerce div.product form.cart .single_add_to_cart_button,
	.woocommerce.single-product .adonis-main--woocommerce div.product form.cart .single_add_to_cart_button {
		inline-size: 100%;
		min-block-size: var(--faradoran-theme-touch-target);
		font-size: var(--faradoran-theme-font-size-body);
	}

	.faradoran-sticky-purchase__inner,
	.adonis-sticky-purchase__inner {
		padding: var(--faradoran-theme-space-2) var(--faradoran-theme-space-3);
		gap: var(--faradoran-theme-space-2);
	}

	.faradoran-sticky-purchase__button,
	.adonis-sticky-purchase__button {
		min-inline-size: min(9rem, 42vw);
		font-size: var(--faradoran-theme-font-size-xs);
	}

	.faradoran-sticky-purchase,
	.adonis-sticky-purchase {
		box-shadow: 0 -2px 12px rgb(0 0 0 / 6%);
	}

	/* Mobile stacked product tabs (accordion presentation) */
	.faradoran-product-tabs--mobile-stacked ul.tabs,
	.adonis-product-tabs--mobile-stacked ul.tabs {
		position: absolute;
		inline-size: 1px;
		block-size: 1px;
		margin: -1px;
		padding: 0;
		overflow: hidden;
		clip: rect(0, 0, 0, 0);
		clip-path: inset(50%);
		white-space: nowrap;
		border: 0;
	}

	.faradoran-product-tabs--mobile-stacked .woocommerce-Tabs-panel,
	.adonis-product-tabs--mobile-stacked .woocommerce-Tabs-panel {
		display: block !important;
		margin-block-end: var(--faradoran-theme-space-3);
		padding: var(--faradoran-theme-space-4);
		border: var(--faradoran-theme-border-width) solid var(--faradoran-theme-color-border);
		border-radius: var(--faradoran-theme-radius-md);
		background-color: var(--faradoran-theme-color-white);
	}

	.faradoran-product-tabs--mobile-stacked .woocommerce-Tabs-panel > h2:first-child,
	.adonis-product-tabs--mobile-stacked .woocommerce-Tabs-panel > h2:first-child {
		margin-block: 0 var(--faradoran-theme-space-3);
		font-size: var(--faradoran-theme-font-size-sm);
		font-weight: var(--faradoran-theme-font-weight-semibold);
		color: var(--faradoran-theme-color-green);
	}

	.woocommerce.single-product .faradoran-main--woocommerce div.product .related.products ul.products,
	.woocommerce.single-product .adonis-main--woocommerce div.product .related.products ul.products {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: var(--faradoran-theme-space-3);
	}

	/* ------------------------------------------------------------------ */
	/* Cart + checkout                                                    */
	/* ------------------------------------------------------------------ */

	.woocommerce-cart .faradoran-main--woocommerce,
	.woocommerce-checkout .faradoran-main--woocommerce,
	.woocommerce-cart .adonis-main--woocommerce,
	.woocommerce-checkout .adonis-main--woocommerce {
		padding-block: var(--faradoran-theme-space-6);
	}

	.woocommerce-cart .faradoran-main--woocommerce table.shop_table tbody tr,
	.woocommerce-cart .adonis-main--woocommerce table.shop_table tbody tr {
		padding: var(--faradoran-theme-space-4);
		border: var(--faradoran-theme-border-width) solid var(--faradoran-theme-color-border);
		border-radius: var(--faradoran-theme-radius-md);
		margin-block-end: var(--faradoran-theme-space-3);
		background-color: var(--faradoran-theme-color-white);
	}

	.woocommerce-cart .faradoran-main--woocommerce .cart_totals,
	.woocommerce-cart .adonis-main--woocommerce .cart_totals {
		padding: var(--faradoran-theme-space-4);
		border: var(--faradoran-theme-border-width) solid var(--faradoran-theme-color-border);
		border-radius: var(--faradoran-theme-radius-md);
		background-color: var(--faradoran-theme-color-white);
	}

	.woocommerce-cart .faradoran-main--woocommerce .wc-proceed-to-checkout .checkout-button,
	.woocommerce-cart .adonis-main--woocommerce .wc-proceed-to-checkout .checkout-button {
		min-block-size: var(--faradoran-theme-touch-target);
		font-size: var(--faradoran-theme-font-size-body);
	}

	.woocommerce-cart .faradoran-main--woocommerce .coupon .input-text,
	.woocommerce-cart .adonis-main--woocommerce .coupon .input-text,
	.woocommerce-checkout .faradoran-main--woocommerce input.input-text,
	.woocommerce-checkout .adonis-main--woocommerce input.input-text,
	.woocommerce-checkout .faradoran-main--woocommerce select,
	.woocommerce-checkout .adonis-main--woocommerce select,
	.woocommerce-checkout .faradoran-main--woocommerce textarea,
	.woocommerce-checkout .adonis-main--woocommerce textarea {
		font-size: var(--faradoran-theme-form-font-size-mobile);
		min-block-size: var(--faradoran-theme-touch-target);
	}

	.woocommerce-checkout .faradoran-main--woocommerce #customer_details,
	.woocommerce-checkout .adonis-main--woocommerce #customer_details,
	.woocommerce-checkout .faradoran-main--woocommerce .col2-set,
	.woocommerce-checkout .adonis-main--woocommerce .col2-set {
		display: grid;
		grid-template-columns: 1fr;
		gap: var(--faradoran-theme-space-4);
	}

	.woocommerce-checkout .faradoran-main--woocommerce .woocommerce-billing-fields,
	.woocommerce-checkout .adonis-main--woocommerce .woocommerce-billing-fields,
	.woocommerce-checkout .faradoran-main--woocommerce .woocommerce-shipping-fields,
	.woocommerce-checkout .adonis-main--woocommerce .woocommerce-shipping-fields,
	.woocommerce-checkout .faradoran-main--woocommerce #order_review,
	.woocommerce-checkout .adonis-main--woocommerce #order_review {
		padding: var(--faradoran-theme-space-4);
		border: var(--faradoran-theme-border-width) solid var(--faradoran-theme-color-border);
		border-radius: var(--faradoran-theme-radius-md);
		background-color: var(--faradoran-theme-color-white);
	}

	.woocommerce-checkout .faradoran-main--woocommerce #payment,
	.woocommerce-checkout .adonis-main--woocommerce #payment {
		padding: var(--faradoran-theme-space-3);
	}

	.woocommerce-checkout .faradoran-main--woocommerce #payment ul.payment_methods li,
	.woocommerce-checkout .adonis-main--woocommerce #payment ul.payment_methods li {
		padding: var(--faradoran-theme-space-3);
	}

	.woocommerce-checkout .faradoran-main--woocommerce #payment ul.payment_methods li label,
	.woocommerce-checkout .adonis-main--woocommerce #payment ul.payment_methods li label {
		display: flex;
		align-items: flex-start;
		gap: var(--faradoran-theme-space-3);
		min-block-size: var(--faradoran-theme-touch-target);
		font-size: var(--faradoran-theme-font-size-sm);
	}

	.woocommerce-checkout .faradoran-main--woocommerce #place_order,
	.woocommerce-checkout .adonis-main--woocommerce #place_order {
		inline-size: 100%;
		min-block-size: var(--faradoran-theme-touch-target);
		font-size: var(--faradoran-theme-font-size-body);
	}

	/* ------------------------------------------------------------------ */
	/* My Account                                                         */
	/* ------------------------------------------------------------------ */

	.woocommerce-account .faradoran-main--woocommerce,
	.woocommerce-account .adonis-main--woocommerce {
		padding-block: var(--faradoran-theme-space-6);
	}

	.woocommerce-account .faradoran-main--woocommerce .entry-title,
	.woocommerce-account .adonis-main--woocommerce .entry-title {
		font-size: clamp(1.25rem, 1.1rem + 0.5vw, 1.5rem);
		margin-block-end: var(--faradoran-theme-space-5);
	}

	.woocommerce-account .faradoran-main--woocommerce .woocommerce-MyAccount-navigation,
	.woocommerce-account .adonis-main--woocommerce .woocommerce-MyAccount-navigation {
		padding: var(--faradoran-theme-space-3);
	}

	.woocommerce-account .faradoran-main--woocommerce .woocommerce-MyAccount-navigation a,
	.woocommerce-account .adonis-main--woocommerce .woocommerce-MyAccount-navigation a {
		min-block-size: var(--faradoran-theme-touch-target);
		font-size: var(--faradoran-theme-font-size-sm);
	}

	.woocommerce-account .faradoran-main--woocommerce .woocommerce-MyAccount-content,
	.woocommerce-account .adonis-main--woocommerce .woocommerce-MyAccount-content {
		padding: var(--faradoran-theme-space-4);
		border: var(--faradoran-theme-border-width) solid var(--faradoran-theme-color-border);
		border-radius: var(--faradoran-theme-radius-md);
		background-color: var(--faradoran-theme-color-white);
	}

	/* ------------------------------------------------------------------ */
	/* Search drawer + forms                                              */
	/* ------------------------------------------------------------------ */

	.faradoran-mobile-panel .faradoran-product-search .faradoran-product-search__field,
	.adonis-mobile-panel .adonis-product-search .adonis-product-search__field {
		min-block-size: var(--faradoran-theme-touch-target);
		font-size: var(--faradoran-theme-form-font-size-mobile);
	}

	.faradoran-mobile-panel .faradoran-product-search .faradoran-product-search__submit,
	.adonis-mobile-panel .adonis-product-search .adonis-product-search__submit {
		inline-size: var(--faradoran-theme-touch-target);
		block-size: var(--faradoran-theme-touch-target);
	}

	/* ------------------------------------------------------------------ */
	/* Notices                                                            */
	/* ------------------------------------------------------------------ */

	.woocommerce-message,
	.woocommerce-error,
	.woocommerce-info,
	.woocommerce-notice {
		padding: var(--faradoran-theme-space-3) var(--faradoran-theme-space-4);
		font-size: var(--faradoran-theme-font-size-sm);
		line-height: var(--faradoran-theme-line-height-base);
		overflow-wrap: anywhere;
	}

	.woocommerce-message .button,
	.woocommerce-error .button,
	.woocommerce-info .button {
		min-block-size: var(--faradoran-theme-touch-target);
		margin-block-start: var(--faradoran-theme-space-2);
	}

	/* ------------------------------------------------------------------ */
	/* Coarse pointer / hover cleanup                                     */
	/* ------------------------------------------------------------------ */

	@media (pointer: coarse) {
		.faradoran-main--woocommerce ul.products li.product:hover,
		.adonis-main--woocommerce ul.products li.product:hover {
			box-shadow: var(--faradoran-theme-shadow-sm);
			border-color: var(--faradoran-theme-color-border);
		}

		.faradoran-home-product:hover,
		.adonis-home-product:hover {
			transform: none;
		}
	}
}

@media (prefers-reduced-motion: reduce) {
	.faradoran-home-products__track,
	.adonis-home-products__track {
		scroll-behavior: auto;
	}
}
