/*
Theme Name: Rawaq Store
Theme URI: https://rawaqstudio.com
Author: Rawaq Studio
Author URI: https://rawaqstudio.com
Description: القالب الأساسي لمتاجر رِواق: عربي من اليمين لليسار، بأربعة أنماط جاهزة (كتان وطين، ليل وذهب، ورد وعاج، جرافيت وكهرمان) تغيّرها من المظهر > المحرر > الأنماط، مع ألوان وخطوط وشعار لكل علامة.
Requires at least: 6.6
Tested up to: 6.9
Requires PHP: 8.0
Version: 1.0.0
License: Proprietary (Rawaq Studio)
Text Domain: rawaq-store
Tags: rtl-language-support, e-commerce, block-styles, full-site-editing, style-variations
*/

/* Rawaq rule: content never fades in or out; it slides or is revealed by a mask. Headers stay solid (no blur). */

:root { --rq-ease: cubic-bezier(.22, 1, .36, 1); --rq-ease-x: cubic-bezier(.16, 1, .3, 1); --rq-card: var(--wp--custom--radius--card, 4px); --rq-ctl: var(--wp--custom--radius--control, 2px); }
html { overflow-x: clip; scroll-padding-top: 96px; }
body { overflow-x: clip; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
img { max-width: 100%; height: auto; }
:where(.wp-site-blocks) :focus-visible { outline: 2px solid var(--wp--preset--color--accent); outline-offset: 3px; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-stopped { overflow: clip; }

/* ---------- header ---------- */
.rq-ann p { margin: 0; font-weight: 500; line-height: 1.5; }
.rq-hd { position: sticky; top: 0; z-index: 50; background: var(--wp--preset--color--bg); border-bottom: 1px solid var(--wp--preset--color--line); transition: box-shadow .3s; }
.admin-bar .rq-hd { top: 32px; }
@media (max-width: 782px) { .admin-bar .rq-hd { top: 0; } }
.rq-hd.is-scrolled { box-shadow: 0 10px 30px -22px rgba(0, 0, 0, .35); }
.rq-hd__in { min-height: 72px; gap: 24px; }
.rq-hd .wp-block-site-title a { text-decoration: none; }
.rq-hd .wp-block-navigation a { position: relative; color: var(--wp--preset--color--ink-2); padding-block: 10px; }
.rq-hd .wp-block-navigation a:hover, .rq-hd .wp-block-navigation .current-menu-item > a { color: var(--wp--preset--color--ink); }
.rq-hd .wp-block-navigation-item__content::after { content: ""; position: absolute; inset-inline: 0; bottom: 4px; height: 1.5px; background: var(--wp--preset--color--accent); transform: scaleX(0); transform-origin: right; transition: transform .35s var(--rq-ease); }
.rq-hd .wp-block-navigation-item__content:hover::after, .rq-hd .current-menu-item > .wp-block-navigation-item__content::after { transform: scaleX(1); }
.rq-hd__tools { gap: 6px; }
.wc-block-mini-cart__button, .wc-block-customer-account__account-link { min-width: 44px; min-height: 44px; }
.wc-block-mini-cart__badge { background: var(--wp--preset--color--accent) !important; color: var(--wp--preset--color--on-accent) !important; }
.wp-block-navigation__responsive-container.is-menu-open { background: var(--wp--preset--color--bg) !important; color: var(--wp--preset--color--ink) !important; }

/* ---------- hero (cover block): the photo is revealed by a mask, never faded ---------- */
.rq-hero.wp-block-cover { min-height: min(82svh, 780px); padding-block: clamp(48px, 7vw, 110px); }
.rq-hero .wp-block-cover__image-background { animation: rq-wipe 1.6s var(--rq-ease-x) both; }
.rq-hero .wp-block-cover__inner-container { max-width: 1240px; margin-inline: auto; width: 100%; }
.rq-hero__copy { max-width: 40rem; }
.rq-hero h1 { font-size: clamp(2.25rem, 4.1vw, 3.6rem); line-height: 1.3; }
.rq-hero .rq-eyebrow { color: var(--wp--preset--color--accent); font-weight: 600; font-size: .875rem; margin: 0 0 .6rem; }
.rq-hero h1 { margin: 0 0 1rem; }
.rq-hero .rq-sub { color: var(--wp--preset--color--ink-2); font-size: 1.125rem; margin: 0 0 1.6rem; }
.rq-hero__copy > * { animation: rq-rise 1s var(--rq-ease-x) both; }
.rq-hero__copy > *:nth-child(2) { animation-delay: .12s; } .rq-hero__copy > *:nth-child(3) { animation-delay: .24s; } .rq-hero__copy > *:nth-child(4) { animation-delay: .36s; }
@keyframes rq-wipe { from { clip-path: inset(0 0 100% 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes rq-rise { from { clip-path: inset(100% 0 0 0); transform: translateY(16px); } to { clip-path: inset(0 0 0 0); transform: none; } }
@media (max-width: 781px) {
  .rq-hero.wp-block-cover { display: block; min-height: 0 !important; padding: 0; }
  .rq-hero .wp-block-cover__image-background { position: relative; height: auto; aspect-ratio: 4 / 3.3; object-position: 30% 50%; }
  .rq-hero .wp-block-cover__inner-container { padding: 28px max(20px, env(safe-area-inset-left, 0px)) 40px; }
}

/* ---------- buttons ---------- */
.wp-element-button, .wp-block-button__link, .wc-block-components-button:not(.is-link), .woocommerce a.button, .woocommerce button.button, .woocommerce input.button, .single_add_to_cart_button {
  min-height: 50px; border-radius: var(--rq-ctl) !important; font-weight: 600; transition: background-color .22s, color .22s, border-color .22s, box-shadow .3s var(--rq-ease); }
.woocommerce a.button, .woocommerce button.button, .single_add_to_cart_button, .woocommerce #respond input#submit, .woocommerce #place_order {
  background: var(--wp--preset--color--accent) !important; color: var(--wp--preset--color--on-accent) !important; border: 0; padding: 0 1.6rem; display: inline-flex; align-items: center; justify-content: center; }
.woocommerce a.button:hover, .woocommerce button.button:hover, .single_add_to_cart_button:hover { background: color-mix(in srgb, var(--wp--preset--color--accent) 84%, var(--wp--preset--color--ink)) !important; }
.is-style-outline > .wp-block-button__link { border: 1px solid color-mix(in srgb, var(--wp--preset--color--ink) 30%, transparent); color: var(--wp--preset--color--ink); background: transparent; }
.is-style-outline > .wp-block-button__link:hover { border-color: var(--wp--preset--color--ink); background: color-mix(in srgb, var(--wp--preset--color--ink) 6%, transparent); }

/* ---------- section heads, chips ---------- */
.rq-shead { align-items: flex-end; }
.rq-shead h2 { margin: 0; }
.rq-lnk a, a.rq-lnk { color: var(--wp--preset--color--ink); font-weight: 600; text-decoration-color: var(--wp--preset--color--accent); text-decoration-thickness: 1.5px; text-underline-offset: .35em; }
.rq-cats { border-block: 1px solid var(--wp--preset--color--line); }
.rq-cats p { margin: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 0 32px; }
.rq-cats a { display: inline-flex; align-items: center; min-height: 48px; color: var(--wp--preset--color--ink-2); font-weight: 500; text-decoration: none; }
.rq-cats a:hover { color: var(--wp--preset--color--accent); }

/* ---------- product grid ---------- */
.wc-block-product-template { gap: clamp(16px, 2vw, 30px) clamp(12px, 1.6vw, 26px) !important; }
.wc-block-product, .wc-block-product-template > li { text-align: start !important; }
.wc-block-components-product-image { position: relative; overflow: hidden; border-radius: var(--rq-card); background: var(--wp--preset--color--surface-2); }
.wc-block-components-product-image img { aspect-ratio: 4 / 5; object-fit: cover; width: 100%; }
.wc-block-components-product-image::after { content: ""; position: absolute; inset-inline: 0; bottom: 0; height: 3px; background: var(--wp--preset--color--accent); transform: scaleX(0); transform-origin: right; transition: transform .5s var(--rq-ease); }
.wc-block-product:hover .wc-block-components-product-image::after, li.product:hover .wc-block-components-product-image::after { transform: scaleX(1); }
.wc-block-product .wp-block-post-title { font-family: var(--wp--preset--font-family--tajawal, inherit); font-size: 1rem !important; font-weight: 600; line-height: 1.55; margin-top: .9rem !important; text-align: start !important; }
.wc-block-product .wp-block-post-title a:hover { color: var(--wp--preset--color--accent); }
.wc-block-product .wc-block-components-product-price { text-align: start !important; justify-content: flex-start; }
.wc-block-components-product-sale-badge { border-radius: 999px !important; background: var(--wp--preset--color--accent) !important; color: var(--wp--preset--color--on-accent) !important; border: 0 !important; font-weight: 600; }
del .woocommerce-Price-amount, .wc-block-components-product-price del { color: var(--wp--preset--color--muted); font-weight: 400; }

/* ---------- single product ---------- */
.single-product .wp-block-woocommerce-product-image-gallery img, .woocommerce-product-gallery__image img { border-radius: var(--rq-card); }
.single-product .wp-block-post-title { font-weight: var(--wp--custom--d-weight, inherit); }
table.variations { border: 0; margin-bottom: 1rem; }
table.variations th, table.variations td { padding: 0 0 .9rem; border: 0; text-align: start; }
table.variations label { font-weight: 600; }
table.variations select, .wc-block-components-select select, .woocommerce .quantity .qty {
  min-height: 48px; height: 48px; line-height: 1.4; font-size: 1rem !important; padding: 0 14px; border: 1px solid var(--wp--preset--color--line); border-radius: var(--rq-ctl); background: var(--wp--preset--color--surface); color: var(--wp--preset--color--ink); font: inherit; }
.woocommerce .quantity .qty { width: 72px; text-align: center; }
form.cart { display: flex; flex-wrap: wrap; gap: 12px; align-items: stretch; }
form.cart .woocommerce-variation-add-to-cart { display: flex; flex-wrap: wrap; gap: 12px; width: 100%; }
.reset_variations { display: inline-block; margin-top: 6px; font-size: .875rem; color: var(--wp--preset--color--muted); }
.woocommerce-variation-price { margin-bottom: .8rem; font-size: 1.25rem; font-weight: 700; }
.stock.out-of-stock { color: #A8321E; font-weight: 600; }

table.variations select, .woocommerce div.product form.cart .variations select { min-width: 220px; height: 48px; padding: 0 14px; padding-inline-end: 44px; line-height: 46px; margin: 0;
  background-position: left 14px center !important; }
.single-product .wp-block-post-title { font-size: clamp(1.75rem, 2.6vw, 2.6rem) !important; line-height: 1.35; }

/* ---------- classic checkout: form on the start side, order summary beside it ---------- */
.woocommerce-checkout .col2-set .col-1, .woocommerce-checkout .col2-set .col-2 { float: none; width: 100%; }
.woocommerce-checkout h3, #order_review_heading { font-family: inherit; font-size: 1.25rem; font-weight: 700; margin: 0 0 1rem; }
@media (min-width: 960px) {
  form.woocommerce-checkout { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); grid-template-rows: auto auto 1fr; column-gap: clamp(32px, 4vw, 64px); align-items: start; }
  form.woocommerce-checkout > * { grid-column: 1 / -1; }
  form.woocommerce-checkout > .col2-set { grid-column: 1; grid-row: 2 / span 2; }
  form.woocommerce-checkout > #order_review_heading { grid-column: 2; grid-row: 2; }
  form.woocommerce-checkout > #order_review { grid-column: 2; grid-row: 3; position: sticky; top: 24px; }
}
.woocommerce-checkout #order_review { padding: 4px; }
.wc-block-components-notice-banner { border-radius: var(--rq-card) !important; border-color: var(--wp--preset--color--line) !important; background: var(--wp--preset--color--surface) !important; color: var(--wp--preset--color--ink) !important; }
.wc-block-components-notice-banner > svg { background: var(--wp--preset--color--accent) !important; fill: var(--wp--preset--color--on-accent) !important; }
.wc-block-components-notice-banner a { color: var(--wp--preset--color--accent) !important; }
.wc-block-components-notice-banner.is-error > svg { background: #A8321E !important; }

/* ---------- forms (classic checkout) ---------- */
.woocommerce form .form-row input.input-text, .woocommerce form .form-row textarea, .woocommerce form .form-row select, .select2-container .select2-selection--single {
  min-height: 52px; padding: 12px 14px; border: 1px solid var(--wp--preset--color--line); border-radius: min(var(--rq-ctl), 14px); background: var(--wp--preset--color--surface); color: var(--wp--preset--color--ink); font: inherit; }
.woocommerce form .form-row label { font-weight: 600; margin-bottom: 6px; }
.woocommerce form .form-row { margin-bottom: 16px; }
.woocommerce-checkout #payment, .woocommerce-checkout-review-order { background: var(--wp--preset--color--surface) !important; border: 1px solid var(--wp--preset--color--line); border-radius: var(--rq-card); }
.woocommerce-checkout #payment ul.payment_methods { border-color: var(--wp--preset--color--line); }
.woocommerce-checkout #payment div.payment_box { background: var(--wp--preset--color--surface-2) !important; color: var(--wp--preset--color--ink-2) !important; }
.woocommerce-checkout #payment div.payment_box::before { border-bottom-color: var(--wp--preset--color--surface-2) !important; }
.woocommerce table.shop_table { border-color: var(--wp--preset--color--line); border-radius: var(--rq-card); }
.woocommerce-info, .woocommerce-message, .woocommerce-error { border-top-color: var(--wp--preset--color--accent); background: var(--wp--preset--color--surface); }

/* ---------- story + perks ---------- */
.rq-story .wp-block-media-text__media img { border-radius: var(--rq-card); aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
.rq-story .rq-eyebrow { color: var(--wp--preset--color--accent); font-weight: 700; font-size: .875rem; margin: 0 0 .5rem; }
.rq-perks .wp-block-column { position: relative; padding-inline-start: 58px; min-height: 42px; }
.rq-perks .rq-ic::before { content: ""; position: absolute; inset-inline-start: 0; top: 0; width: 42px; height: 42px; border-radius: 999px; background: color-mix(in srgb, var(--wp--preset--color--accent) 14%, transparent); }
.rq-perks .rq-ic::after { content: ""; position: absolute; inset-inline-start: 11px; top: 11px; width: 20px; height: 20px; background: var(--wp--preset--color--accent);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat; }
.rq-perks h3 { font-family: inherit; font-size: 1rem; font-weight: 700; margin: 0 0 2px; padding-top: 2px; }
.rq-perks p { margin: 0; color: var(--wp--preset--color--muted); font-size: .9375rem; line-height: 1.65; }
@media (max-width: 781px) { .rq-perks .wp-block-columns { gap: 22px; } }

/* ---------- content pages (size guide, policies) ---------- */
.rq-lead { font-size: 1.125rem; color: var(--wp--preset--color--ink-2); }
.rq-sizes { overflow-x: auto; margin-block: 1.6rem 2.4rem; }
.rq-sizes table { border-collapse: collapse; width: 100%; min-width: 420px; font-variant-numeric: tabular-nums; }
.rq-sizes th, .rq-sizes td { padding: 13px 14px; border: 0; border-bottom: 1px solid var(--wp--preset--color--line); text-align: start; }
.rq-sizes thead th { background: var(--wp--preset--color--surface-2); font-weight: 700; font-size: .9375rem; }
.rq-sizes tbody td:first-child { font-weight: 700; color: var(--wp--preset--color--accent); }

/* ---------- footer ---------- */
.rq-ft { border-top: 1px solid var(--wp--preset--color--line); }
.rq-ft a { color: var(--wp--preset--color--ink-2); text-decoration: none; }
.rq-ft a:hover { color: var(--wp--preset--color--accent); }
.rq-ft h2 { font-family: inherit; font-size: .8125rem; font-weight: 700; color: var(--wp--preset--color--muted); }
.rq-credit a { color: var(--wp--preset--color--ink) !important; font-weight: 700; }

/* ---------- scroll reveal: a slide, never a fade ---------- */
.js .rq-rv { transform: translateY(26px); transition: transform .95s var(--rq-ease); }
.js .rq-rv.in { transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .rq-rv { transform: none; }
}
