/**
 * Tablet commerce presentation (48rem–63.99rem).
 *
 * Generic shell rules live in tablet.css.
 * Desktop rules activate at ≥64rem.
 */

@media (min-width: 48rem) and (max-width: 63.99rem) {
	/* Gold bar — show update time when space allows */
	html.has-mobile-secondary-bar .faradoran-gold-rate-bar__content,
	html.has-mobile-secondary-bar .adonis-gold-rate-bar__content {
		justify-content: center;
		flex-wrap: wrap;
		gap: var(--faradoran-theme-space-2) var(--faradoran-theme-space-4);
		font-size: var(--faradoran-theme-font-size-sm);
	}

	html.has-mobile-secondary-bar .faradoran-gold-rate-bar__timestamp,
	html.has-mobile-secondary-bar .adonis-gold-rate-bar__timestamp {
		display: inline-flex;
	}

	html.has-mobile-secondary-bar .faradoran-gold-rate-bar__separator,
	html.has-mobile-secondary-bar .adonis-gold-rate-bar__separator,
	html.has-mobile-secondary-bar .faradoran-gold-rate-bar__updated,
	html.has-mobile-secondary-bar .adonis-gold-rate-bar__updated {
		display: inline;
		flex: 0 0 auto;
		font-size: var(--faradoran-theme-font-size-xs);
	}

	.faradoran-home-products__carousel:not(.faradoran-rail):not(.adonis-rail),
	.adonis-home-products__carousel:not(.faradoran-rail):not(.adonis-rail) {
		--adonis-carousel-visible: 3;
		--adonis-carousel-peek: 0.12;
	}

	.faradoran-rail.faradoran-home-products__carousel,
	.adonis-rail.adonis-home-products__carousel {
		--faradoran-rail-visible: 4;
	}

	.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 {
		padding-inline: var(--faradoran-theme-layout-gutter);
	}

	/* ------------------------------------------------------------------ */
	/* Archive                                                            */
	/* ------------------------------------------------------------------ */

	.faradoran-archive-hero__layout,
	.adonis-archive-hero__layout {
		grid-template-columns: minmax(0, 1fr) auto;
		align-items: end;
		gap: var(--faradoran-theme-space-4);
	}

	.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 {
		inline-size: min(100%, 40rem);
		margin-inline: auto;
		border-radius: var(--faradoran-theme-radius-lg);
	}

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

	.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;
	}

	.faradoran-main--woocommerce ul.products li.product .price,
	.adonis-main--woocommerce ul.products li.product .price {
		font-size: var(--faradoran-theme-font-size-sm);
	}

	/* ------------------------------------------------------------------ */
	/* PDP — jewelry-forward column ratio                                 */
	/* ------------------------------------------------------------------ */

	.woocommerce.single-product .faradoran-main--woocommerce div.product,
	.woocommerce.single-product .adonis-main--woocommerce div.product {
		grid-template-columns: minmax(0, 0.56fr) minmax(0, 0.44fr);
		column-gap: var(--faradoran-theme-space-8);
	}

	.woocommerce.single-product .faradoran-main--woocommerce div.product .product_title,
	.woocommerce.single-product .adonis-main--woocommerce div.product .product_title {
		font-size: clamp(1.25rem, 1rem + 0.6vw, 1.5rem);
	}

	.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(3, minmax(0, 1fr));
	}

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

	.woocommerce-cart .faradoran-main--woocommerce .faradoran-container,
	.woocommerce-cart .adonis-main--woocommerce .adonis-container {
		grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
	}

	.woocommerce-checkout .faradoran-main--woocommerce form.checkout,
	.woocommerce-checkout .adonis-main--woocommerce form.checkout {
		grid-template-columns: minmax(0, 1fr);
	}

	.woocommerce-checkout .faradoran-main--woocommerce #customer_details,
	.woocommerce-checkout .adonis-main--woocommerce #customer_details,
	.woocommerce-checkout .faradoran-main--woocommerce #order_review_heading,
	.woocommerce-checkout .adonis-main--woocommerce #order_review_heading,
	.woocommerce-checkout .faradoran-main--woocommerce #order_review,
	.woocommerce-checkout .adonis-main--woocommerce #order_review {
		grid-column: 1;
		grid-row: auto;
	}

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

	.woocommerce-account .faradoran-main--woocommerce .woocommerce:has(.woocommerce-MyAccount-navigation),
	.woocommerce-account .adonis-main--woocommerce .woocommerce:has(.woocommerce-MyAccount-navigation) {
		gap: var(--faradoran-theme-space-6);
	}
}

/* Wider tablet checkout — two-column summary from ~900px within tablet band */
@media (min-width: 56.25rem) and (max-width: 63.99rem) {
	.woocommerce-checkout .faradoran-main--woocommerce form.checkout,
	.woocommerce-checkout .adonis-main--woocommerce form.checkout {
		grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
		align-items: start;
	}

	.woocommerce-checkout .faradoran-main--woocommerce #customer_details,
	.woocommerce-checkout .adonis-main--woocommerce #customer_details {
		grid-column: 1;
		grid-row: 1;
	}

	.woocommerce-checkout .faradoran-main--woocommerce #order_review_heading,
	.woocommerce-checkout .adonis-main--woocommerce #order_review_heading {
		grid-column: 2;
		grid-row: 1;
		align-self: end;
		margin-block-end: var(--faradoran-theme-space-4);
	}

	.woocommerce-checkout .faradoran-main--woocommerce #order_review,
	.woocommerce-checkout .adonis-main--woocommerce #order_review {
		grid-column: 2;
		grid-row: 2;
	}
}

/* Fine-pointer rails on tablet */
@media (min-width: 48rem) and (max-width: 63.99rem) and (hover: hover) and (pointer: fine) {
	.faradoran-home-products__carousel:not(.faradoran-rail):not(.adonis-rail):has(li.product:nth-child(5)):not(.faradoran-home-products__carousel--static),
	.adonis-home-products__carousel:not(.adonis-rail):not(.adonis-rail):has(li.product:nth-child(5)):not(.adonis-home-products__carousel--static) {
		grid-template-columns: var(--adonis-carousel-nav-slot) minmax(0, 1fr) var(--adonis-carousel-nav-slot);
		column-gap: var(--adonis-carousel-nav-gap);
	}

	.faradoran-home-products__carousel:not(.faradoran-rail):not(.adonis-rail):has(li.product:nth-child(5)):not(.faradoran-home-products__carousel--static) .faradoran-home-products__nav-zone,
	.adonis-home-products__carousel:not(.adonis-rail):not(.adonis-rail):has(li.product:nth-child(5)):not(.adonis-home-products__carousel--static) .adonis-home-products__nav-zone {
		display: flex;
	}

	.faradoran-rail.faradoran-rail--nav-enabled:has(.faradoran-rail__item:nth-child(5)) {
		grid-template-columns: var(--adonis-carousel-nav-slot) minmax(0, 1fr) var(--adonis-carousel-nav-slot);
	}

	.faradoran-rail.faradoran-rail--nav-enabled:has(.faradoran-rail__item:nth-child(5)) .faradoran-home-products__nav-zone {
		display: flex;
	}
}

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