/*
Theme Name: ROKTY
Theme URI: https://rokty.com
Author: ROKTY
Description: ROKTY platform theme foundation. Arabic-first, RTL-native block theme. Owns presentation only — canonical product truth lives in governed data outside WordPress (D-005). No page builders, no external font dependencies.
Version: 0.1.0
Requires at least: 6.5
Tested up to: 6.5
Requires PHP: 8.1
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: rokty
Tags: block-theme, full-site-editing, rtl-language-support, translation-ready, e-commerce
*/

/* ---------------------------------------------------------------------------
 * ROKTY foundation styles (keep minimal — tokens live in theme.json)
 * RTL: only logical properties are used here; core renders dir="rtl".
 * ------------------------------------------------------------------------- */

/* Visible focus for keyboard users (WCAG 2.2 AA, ACCESSIBILITY.md). */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
.wp-block-button__link:focus-visible,
[tabindex]:focus-visible {
	outline: 3px solid var(--wp--preset--color--accent);
	outline-offset: 2px;
	border-radius: 2px;
}

/* Respect reduced-motion preferences (ACCESSIBILITY.md). */
@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
		scroll-behavior: auto !important;
	}
}

/* Empty states should read as deliberate, not broken. */
.rokty-empty-state {
	border-block: 1px solid var(--wp--preset--color--line);
}

/* Product media (D-022): fluid, RTL-safe, no layout shift (core emits
 * width/height + srcset). Cards keep thumbnails compact. */
.rokty-product-media {
	margin-block: var(--wp--preset--spacing--sm);
	max-inline-size: 640px;
}

.rokty-product-media img,
.rokty-product-media-card img {
	block-size: auto;
	max-inline-size: 100%;
}

.rokty-product-media-card {
	margin-block-end: var(--wp--preset--spacing--xs);
	max-inline-size: 150px;
}

/* Woo grid gutter compensation (margin: 0 -8px 16px shorthand) overflows
 * by 16px when the grid renders flush with the theme column (e.g. the
 * "newest products" block inside the empty cart). Neutralizing the
 * inline margins inside the theme keeps the grid within its container;
 * item layout is unchanged. Specificity beats the shorthand regardless
 * of enqueue order. ROKTY-owned correction — Woo core untouched, no
 * global overflow clip. */
.wp-site-blocks .wc-block-grid__products {
	margin-inline: 0;
}

/* Supplier-stated specifications (owner-approved 2026-09-17 display).
 * Definition list in a two-column grid; the source attribution sits with
 * each value so the supplier-stated nature stays visible in context. */
.wp-site-blocks .rokty-supplier-specs dl {
	display: grid;
	grid-template-columns: max-content 1fr;
	gap: var(--wp--preset--spacing--xs) var(--wp--preset--spacing--md);
	margin-block: var(--wp--preset--spacing--xs);
}

.wp-site-blocks .rokty-supplier-specs .rokty-supplier-spec {
	display: contents;
}

.wp-site-blocks .rokty-supplier-specs dt {
	font-weight: 600;
}

.wp-site-blocks .rokty-supplier-specs .rokty-supplier-source {
	display: inline-block;
	font-size: var(--wp--preset--font-size--small);
	color: var(--wp--preset--color--muted, #6b6b6b);
}

.wp-site-blocks .rokty-supplier-attribution {
	font-size: var(--wp--preset--font-size--small);
	color: var(--wp--preset--color--muted, #6b6b6b);
}
