/*
Theme Name: Arabic Shop
Author: Shop Team
Description: Arabic RTL WooCommerce theme aligned with the Decor Store design system (Tailwind + Amber/Gold + 3-step modal cart).
Version: 2.9.57
Requires at least: 6.4
Requires PHP: 8.0
Text Domain: ar-shop
Tags: e-commerce, rtl-language-support, custom-logo, woocommerce
*/

/* --------------------------------------------------------------------------
 * Base reset / typography.
 *
 * The bulk of the visual styling comes from Tailwind utilities used directly
 * inside the PHP templates (matching the class names from the design doc).
 * The CSS variables below are set as defaults; functions.php injects the
 * admin-controlled colors via wp_head() so they override these defaults.
 * -------------------------------------------------------------------------- */

:root {
  --primary: #d97706;
  --primary-hover: #b45309;
  --primary-dark: #92400e;
  --cart-primary: #c87171;
  --success: #059669;
  --danger: #ef4444;
  --background: #ffffff;
  --foreground: #1f2937;
  --muted: #ececf0;
  --muted-foreground: #717182;
  --border: rgba(0, 0, 0, 0.1);
}

/* Styled thin scrollbar storewide */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-button {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background-color: var(--primary);
  border-radius: 9999px;
}

::-webkit-scrollbar-thumb:hover {
  background-color: var(--primary-hover);
}

html {
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: var(--primary) transparent;
}

body {
  margin: 0;
  font-family: "Cairo", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  background: var(--background);
  color: var(--foreground);
  line-height: 1.7;
  direction: rtl;
  text-align: right;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a { color: inherit; text-decoration: none; }

input[type="checkbox"] {
  appearance: auto;
  -webkit-appearance: checkbox;
  inline-size: 18px;
  block-size: 18px;
  min-inline-size: 18px;
  margin: 0;
  padding: 0;
  border-radius: 3px;
  accent-color: var(--primary, #d97706);
  cursor: pointer;
  vertical-align: middle;
}

input[type="checkbox"]:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--primary, #d97706) 70%, transparent);
  outline-offset: 2px;
}

/* Hide native WooCommerce Cart/Checkout pieces we replace with the modal. */
.woocommerce-cart .woocommerce,
.woocommerce-checkout .woocommerce { display: none; }

/* Slick carousel RTL fixes for the hero slider. */
.slick-slide { direction: rtl; }
.hero-slider {
  width: 100%;
  overflow: hidden;
  border-radius: 14px;
  background: #f8f2e8;
  box-shadow: 0 8px 22px -18px rgba(15, 23, 42, 0.34);
}
.hero-slider,
.hero-slider .slick-list,
.hero-slider .slick-track,
.hero-slider .slick-slide,
.hero-slider .slick-slide > div {
  height: auto;
  min-height: 0;
}
.hero-slider__item,
.hero-slider__frame {
  position: relative;
  width: 100%;
  height: auto;
  min-height: 0;
}
.hero-slider__frame {
  display: grid;
  place-items: center;
  overflow: hidden;
  background-color: #f8f2e8;
}
.hero-slider__image {
  width: 100%;
  height: auto;
  max-height: none;
  object-fit: contain;
  object-position: center;
  background: #f8f2e8;
}
.hero-slider__badge {
  position: absolute;
  inset-block-start: 16px;
  inset-inline-start: 16px;
  z-index: 2;
  padding: 10px 16px;
  border-radius: 999px;
  background: #ef4444;
  color: #fff;
  font-weight: 900;
  box-shadow: 0 12px 24px -18px rgba(15, 23, 42, 0.5);
}
.hero-slider__content {
  position: absolute;
  inset: auto 0 0;
  z-index: 2;
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: 22px;
  text-align: center;
  color: #fff;
  background: linear-gradient(to top, rgba(15, 23, 42, 0.56), transparent);
}
.hero-slider__title {
  margin: 0;
  font-size: clamp(26px, 4vw, 48px);
  font-weight: 900;
  line-height: 1.2;
}
.hero-slider__subtitle {
  margin: 0;
  font-size: clamp(15px, 2vw, 20px);
  font-weight: 800;
}
.hero-slider__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 10px 24px;
  border-radius: 999px;
  background: #fff;
  color: #111827;
  font-weight: 900;
}
.slick-dots { bottom: 14px; }
.hero-slider .slick-dots li button:before {
  color: rgba(255, 255, 255, 0.86);
  font-size: 10px;
  opacity: 1;
}
.hero-slider .slick-dots li.slick-active button:before { color: #fff; opacity: 1; }
@media (max-width: 640px) {
  .hero-slider {
    border-radius: 12px;
  }
  .hero-slider__badge {
    inset-block-start: 10px;
    inset-inline-start: 10px;
    padding: 7px 12px;
    font-size: 12px;
  }
  .hero-slider__content {
    padding: 16px;
  }
}

/* ==========================================================================
 * Site header — two-row sticky bar
 *
 *  Row 1 (`.header__main`):
 *    Logo  ·  centered pill search  ·  action stacks (lang / account / ♥ / 🛒)
 *  Row 2 (`.header__nav`):
 *    Primary nav menu strip on a subtle bg-gray-50 band.
 *
 *  Every interactive accent uses `var(--primary)` so the header tracks the
 *  Customizer's brand color (same as cart modal / login form / wishlist).
 * ========================================================================== */

.flash-sale-banner {
  position: relative;
  z-index: 60;
  width: 100%;
  max-width: 100%;
  margin-inline: 0;
  padding: 0;
  overflow-x: clip;
}

.flash-sale-banner__inner {
  position: relative;
  width: 100%;
  margin: 0;
  min-height: 48px;
  padding: 10px max(18px, calc((100vw - 1280px) / 2 + 18px));
  border-radius: 0;
  border: 0;
  border-block-end: 1px solid rgba(255, 255, 255, 0.36);
  background: linear-gradient(135deg, #ff1414 0%, #ef2a24 52%, #d91616 100%);
  color: #fff;
  box-shadow:
    0 0 0 2px rgba(239, 68, 68, 0.18),
    0 12px 28px -18px rgba(127, 29, 29, 0.75),
    inset 0 1px 0 rgba(255, 255, 255, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  overflow: hidden;
  animation: flashBannerGlow 2.4s ease-in-out infinite;
}

html,
body {
  max-width: 100%;
  overflow-x: clip;
}

.flash-sale-banner__inner::before {
  content: "";
  position: absolute;
  inset-block: 0;
  inline-size: 120px;
  inset-inline-start: -140px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.35), transparent);
  transform: skewX(-18deg);
  animation: flashBannerSweep 3.8s ease-in-out infinite;
}

.flash-sale-banner__message {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-width: 0;
  text-align: center;
  font-size: 14px;
  font-weight: 900;
  line-height: 1.45;
  text-shadow: 0 1px 8px rgba(127, 29, 29, 0.35);
}

.flash-sale-banner__light {
  flex: 0 0 auto;
  inline-size: 10px;
  block-size: 10px;
  border-radius: 999px;
  background: #fff7ed;
  box-shadow: 0 0 0 5px rgba(255, 255, 255, 0.16), 0 0 18px rgba(255, 255, 255, 0.85);
  animation: flashLightBlink 1.25s ease-in-out infinite;
}

.flash-sale-banner__text {
  min-width: 0;
}

.flash-sale-banner__link {
  flex: 0 0 auto;
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 4px;
  white-space: nowrap;
}

.flash-sale-banner__timer {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
  font-weight: 900;
}

.flash-sale-banner__timer span {
  min-width: 30px;
  padding: 4px 6px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.18);
  text-align: center;
}

.flash-sale-banner[data-flash-theme="amber"] .flash-sale-banner__inner {
  background: linear-gradient(135deg, #f59e0b 0%, #ea580c 100%);
}

.flash-sale-banner[data-flash-theme="green"] .flash-sale-banner__inner {
  background: linear-gradient(135deg, #059669 0%, #0f766e 100%);
}

.flash-sale-banner[data-flash-theme="violet"] .flash-sale-banner__inner {
  background: linear-gradient(135deg, #7c3aed 0%, #4338ca 100%);
}

@keyframes flashBannerGlow {
  0%, 100% {
    filter: brightness(1);
    box-shadow:
      0 0 0 2px rgba(239, 68, 68, 0.18),
      0 12px 28px -18px rgba(127, 29, 29, 0.75),
      inset 0 1px 0 rgba(255, 255, 255, 0.35);
  }
  50% {
    filter: brightness(1.12);
    box-shadow:
      0 0 0 3px rgba(248, 113, 113, 0.28),
      0 16px 34px -16px rgba(220, 38, 38, 0.8),
      inset 0 1px 0 rgba(255, 255, 255, 0.5);
  }
}

@keyframes flashBannerSweep {
  0%, 42% {
    inset-inline-start: -140px;
    opacity: 0;
  }
  55% {
    opacity: 1;
  }
  78%, 100% {
    inset-inline-start: calc(100% + 40px);
    opacity: 0;
  }
}

@keyframes flashLightBlink {
  0%, 100% {
    opacity: 0.45;
    transform: scale(0.86);
  }
  50% {
    opacity: 1;
    transform: scale(1.18);
  }
}

@media (max-width: 640px) {
  .flash-sale-banner {
    padding: 6px 8px 0;
  }

  .flash-sale-banner__inner {
    min-height: 42px;
    padding: 8px 10px;
    border-radius: 8px;
    gap: 8px;
    flex-wrap: wrap;
  }

  .flash-sale-banner__message {
    width: 100%;
    font-size: 12px;
  }

  .flash-sale-banner__timer {
    font-size: 11px;
  }

  .flash-sale-banner__timer span {
    min-width: 26px;
    padding: 3px 5px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .flash-sale-banner__inner,
  .flash-sale-banner__inner::before,
  .flash-sale-banner__light {
    animation: none;
  }
}

.homepage-text-block--announcement {
  --text-block-bg: #ef2a24;
  --text-block-fg: #ffffff;
  --text-block-ring: #ffffff;
  --text-block-light: var(--text-block-fg);
  position: relative;
}

.homepage-text-block__inner {
  position: relative;
  min-height: 48px;
  padding: 10px 18px;
  border: 2px solid color-mix(in srgb, var(--text-block-ring) 72%, transparent);
  border-radius: 10px;
  background:
    radial-gradient(circle at 12% 0%, rgba(255, 255, 255, 0.2), transparent 28%),
    linear-gradient(135deg, var(--text-block-bg) 0%, color-mix(in srgb, var(--text-block-bg) 82%, #000 18%) 100%);
  color: var(--text-block-fg);
  box-shadow:
    0 0 0 2px color-mix(in srgb, var(--text-block-bg) 18%, transparent),
    0 12px 28px -18px color-mix(in srgb, var(--text-block-bg) 75%, #000 25%),
    inset 0 1px 0 rgba(255, 255, 255, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  overflow: hidden;
  animation: flashBannerGlow 2.4s ease-in-out infinite;
}

.homepage-text-block__inner::before {
  content: "";
  position: absolute;
  inset-block: 0;
  inline-size: 120px;
  inset-inline-start: -140px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.34), transparent);
  transform: skewX(-18deg);
  animation: flashBannerSweep 3.8s ease-in-out infinite;
}

.homepage-text-block__light {
  position: relative;
  z-index: 1;
  flex: 0 0 auto;
  inline-size: 10px;
  block-size: 10px;
  border-radius: 999px;
  background: var(--text-block-light);
  box-shadow: 0 0 0 5px rgba(255, 255, 255, 0.16), 0 0 18px color-mix(in srgb, var(--text-block-light) 82%, transparent);
  animation: flashLightBlink 1.25s ease-in-out infinite;
}

.homepage-text-block[data-animated="false"] .homepage-text-block__inner,
.homepage-text-block[data-animated="false"] .homepage-text-block__inner::before,
.homepage-text-block[data-animated="false"] .homepage-text-block__light {
  animation: none;
}

.homepage-text-block[data-animated="false"] .homepage-text-block__inner::before,
.homepage-text-block[data-light="false"] .homepage-text-block__light {
  display: none;
}

.homepage-text-block__content {
  position: relative;
  z-index: 1;
  flex: 1 1 auto;
  min-width: 0;
  width: 100%;
  color: var(--text-block-fg);
  font-size: 14px;
  font-weight: 900;
  line-height: 1.5;
  text-align: center;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.22);
}

.homepage-text-block[data-align="right"] .homepage-text-block__content { text-align: right; }
.homepage-text-block[data-align="center"] .homepage-text-block__content { text-align: center; }
.homepage-text-block[data-align="left"] .homepage-text-block__content { text-align: left; }

.homepage-text-block__title {
  margin: 0;
  color: inherit;
  font-size: inherit;
  font-weight: 950;
}

.homepage-text-block__body,
.homepage-text-block__body p {
  margin: 0;
  color: inherit;
}

.homepage-text-block__body a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 4px;
}

@media (max-width: 640px) {
  .homepage-text-block__inner {
    min-height: 42px;
    padding: 8px 10px;
    border-radius: 8px;
  }

  .homepage-text-block__content {
    font-size: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .homepage-text-block__inner,
  .homepage-text-block__inner::before,
  .homepage-text-block__light {
    animation: none;
  }
}

.header {
  background: #ffffff;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
}

/* ---------- Row 1 ---------- */
.header__main {
  background: #ffffff;
}
.header__main-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 18px;
}
@media (min-width: 768px) {
  .header__main-inner {
    padding: 12px 24px;
    gap: 24px;
  }
}

/* Brand / logo */
.header__brand {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  direction: ltr;
  text-decoration: none;
}
.header__brand .custom-logo-link { display: inline-flex; }
.header__brand-logo,
.header__brand .custom-logo {
  display: block;
  flex: 0 0 auto;
  max-width: 150px;
  max-height: 64px;
  width: auto;
  height: auto;
  object-fit: contain;
}
.header__brand-text {
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -0.01em;
  color: var(--primary, #d97706);
  white-space: nowrap;
  line-height: 1.1;
}
@media (max-width: 767px) {
  .header__brand {
    gap: 8px;
  }
  .header__brand-logo,
  .header__brand .custom-logo {
    max-width: 112px;
    max-height: 50px;
  }
  .header__brand-text {
    font-size: 18px;
  }
}

/* ============================================================ *
 * Pill search bar (centered, fills the available width).        *
 *                                                                *
 *  - 48px-tall pill on a soft slate background so it reads as    *
 *    a clear interactive zone against the white header.          *
 *  - The brand submit button is "tucked into" the pill with a    *
 *    4px inset, a brand-tinted shadow that mirrors the focus     *
 *    ring, and a slight scale on press for tactile feedback.     *
 *  - On focus the whole pill brightens to pure white, the border *
 *    swaps to brand color, and a soft brand glow appears — the   *
 *    button shadow disappears so the two effects don't fight.    *
 *  - Mobile inherits the same design at a slightly smaller scale.*
 * ============================================================ */
.header__search {
  flex: 1 1 0;
  max-width: 620px;
  margin-inline: auto;
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 9999px;
  padding: 4px;
  padding-inline-start: 16px;
  padding-inline-end: 4px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
.header__search:focus-within {
  border-color: color-mix(in srgb, var(--primary, #d97706) 55%, transparent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary, #d97706) 14%, transparent);
}
.header__search-icon {
  width: 18px;
  height: 18px;
  color: #9ca3af;
  flex-shrink: 0;
}
.header__search-input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  outline: none;
  font-family: inherit;
  font-size: 14.5px;
  font-weight: 600;
  color: #111827;
  padding-block: 8px;
}
.header__search-input::placeholder {
  color: #9ca3af;
  font-weight: 600;
}
.header__search-btn {
  background: var(--primary, #d97706);
  color: #ffffff !important;
  border: 0;
  border-radius: 9999px;
  padding: 8px 20px;
  font-weight: 700;
  font-size: 13.5px;
  cursor: pointer;
  transition: background-color 0.18s ease, transform 0.15s ease;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.header__search-btn:hover {
  background: var(--primary-hover, var(--primary, #b45309));
  transform: translateY(-1px);
}
.header__search-btn:active {
  transform: translateY(1px) scale(0.98);
}

/* Mobile search row (appears below row 1 on small screens). Slightly
   shorter pill + smaller button so it doesn't dominate the viewport. */
.header__search--mobile {
  max-width: none;
  width: calc(100% - 32px);
  margin: 10px 16px 14px;
  padding: 4px;
  padding-inline-start: 16px;
  padding-inline-end: 4px;
}
.header__search--mobile .header__search-input {
  /* iOS Safari zooms focused inputs below 16px and can leave the viewport
     enlarged after the keyboard closes. Keep mobile search at 16px. */
  font-size: 16px;
  padding-block: 6px;
}
.header__search--mobile .header__search-btn {
  padding: 6px 16px;
  font-size: 12.5px;
}

.header__mobile-tools {
  position: relative;
  z-index: 2147483000;
  display: none;
  align-items: center;
  gap: 8px;
  width: calc(100% - 32px);
  margin: 10px 16px 0;
  overflow: visible;
}
.header__mobile-brand {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 46px;
  min-height: 38px;
  max-width: 104px;
  text-decoration: none;
}
.header__mobile-logo {
  display: block;
  max-width: 96px;
  max-height: 42px;
  width: auto;
  height: auto;
  object-fit: contain;
}
.header__mobile-brand-text {
  max-width: 92px;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--primary, #d97706);
  font-size: 16px;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
}
.header__mobile-tool {
  appearance: none;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 38px;
  padding: 8px 12px;
  border: 1px solid #e5e7eb;
  border-radius: 999px;
  background: #ffffff;
  color: #374151;
  font: inherit;
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
  text-decoration: none;
  box-shadow: 0 8px 18px -18px rgba(15, 23, 42, 0.28);
}
.header__mobile-tool--account {
  border-color: color-mix(in srgb, var(--primary, #d97706) 18%, #e5e7eb);
  color: var(--primary, #d97706);
}
.header__mobile-tool--orders {
  border-color: color-mix(in srgb, var(--primary, #d97706) 20%, #e5e7eb);
  color: var(--primary-dark, #92400e);
}
.header__mobile-tool:hover,
.header__mobile-tool:focus-visible {
  border-color: color-mix(in srgb, var(--primary, #d97706) 26%, #e5e7eb);
  color: var(--primary, #d97706);
  outline: none;
}
.header__mobile-lang {
  flex: 0 0 auto;
  position: relative;
  margin-inline-start: auto;
}
.header__mobile-lang .lang-switcher__menu {
  inset-block-start: 100%;
  min-width: 156px;
  z-index: 2147483646 !important;
}
.header__mobile-lang-btn {
  min-height: 38px;
  padding: 8px 11px;
  font-weight: 900;
}
@media (max-width: 1023px) {
  .header__mobile-tools {
    display: flex;
  }
}
@media (max-width: 420px) {
  .header__mobile-tools {
    gap: 6px;
  }
  .header__mobile-logo {
    max-width: 82px;
    max-height: 38px;
  }
  .header__mobile-tool {
    padding-inline: 10px;
    font-size: 12.5px;
  }
  .header__mobile-tool--account span:last-child,
  .header__mobile-tool--orders span:last-child {
    display: none;
  }
}

/* Actions group on the trailing edge of row 1 */
.header__actions {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 4px;
}

.lang-switcher__link.is-loading,
.m-cat-sheet__lang-option.is-loading {
  opacity: 0.72;
  pointer-events: none;
}
.lang-loading-overlay {
  position: fixed;
  inset: 0;
  z-index: 2147483647;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, 0.38);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.lang-loading-overlay__box {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  border-radius: 16px;
  background: #ffffff;
  color: #111827;
  font-weight: 900;
  box-shadow: 0 20px 45px -18px rgba(15, 23, 42, 0.45);
}
.lang-loading-overlay__spinner {
  width: 20px;
  height: 20px;
  border-radius: 999px;
  border: 3px solid color-mix(in srgb, var(--primary, #d97706) 20%, #e5e7eb);
  border-top-color: var(--primary, #d97706);
  animation: lang-loading-spin 0.8s linear infinite;
}
@keyframes lang-loading-spin {
  to { transform: rotate(360deg); }
}
@media (min-width: 768px) {
  .header__actions { gap: 6px; }
}

/* Language switcher button — compact pill */
.header__lang-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid #e5e7eb;
  background: #ffffff;
  font-size: 13px;
  font-weight: 700;
  color: #374151;
  cursor: pointer;
  transition: background-color 0.15s, border-color 0.15s;
  font-family: inherit;
}
.header__lang-btn:hover {
  background: #f9fafb;
  border-color: #d1d5db;
}
.header__lang-flag {
  font-size: 16px;
  line-height: 1;
}
.header__lang-label { line-height: 1; }
.header__lang-chevron {
  width: 12px;
  height: 12px;
  opacity: 0.6;
}

/* Action stack — icon on top, small label below, badge floating on the icon. */
.header-action {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 6px 10px;
  border-radius: 10px;
  border: 0;
  background: transparent;
  color: #4b5563;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 0.15s, color 0.15s;
  font-family: inherit;
  min-width: 44px;
}
.header-action:hover {
  background: #f9fafb;
  color: var(--primary, #d97706);
}
.header-action__icon-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.header-action__icon {
  width: 22px;
  height: 22px;
}
.header-action__label {
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}
.header-action__badge {
  position: absolute;
  top: -7px;
  inset-inline-end: -10px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--primary, #d97706);
  color: #ffffff !important; /* keep readable on colored bg */
  font-size: 10px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  box-shadow: 0 0 0 2px #ffffff;
}
/* Wishlist + cart badges both follow the Customizer's brand color so the
   whole header re-themes itself when the admin changes brand color from
   the dashboard. (The modifier class is kept as a styling hook in case
   someone wants to override the wishlist tint specifically later.) */
.header-action__badge--wishlist {
  background: var(--primary, #d97706);
}
.header-action__badge.hidden { display: none; }

/* ---------- Row 2: primary nav strip ---------- */
.header__nav {
  background: #f9fafb;
  border-top: 1px solid rgba(0, 0, 0, 0.04);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}
.header__nav-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 16px;
}
@media (min-width: 768px) {
  .header__nav-inner { padding: 0 24px; }
}
.header__nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
}
.header__nav-list::-webkit-scrollbar { display: none; }
.header__nav-list li { flex-shrink: 0; }
.header__nav-list li a {
  display: inline-block;
  padding: 10px 14px;
  font-size: 14px;
  font-weight: 700;
  color: #4b5563;
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
  white-space: nowrap;
}
.header__nav-list li a:hover {
  color: var(--primary, #d97706);
}
.header__nav-list li.current-menu-item a,
.header__nav-list li.current_page_item a {
  color: var(--primary, #d97706);
  border-bottom-color: var(--primary, #d97706);
}

/* ==========================================================================
 * My Account — login + register + lost/reset password screens
 *
 * Design language matches the cart / product / wishlist modals:
 *   - White rounded panel with a 1px hairline border + soft shadow
 *   - Clean white header (no colored band) — title left, icon-badge right
 *   - Brand-primary CTA (`--primary`) for every action button, matching
 *     add-to-cart and "اتمام طلبك" buttons across the shop
 *   - Inputs use `--primary` focus ring, never a colored fill (we also
 *     defuse Chrome's blue autofill background)
 *
 * Markup overrides live at: wp-content/themes/ar-shop/woocommerce/myaccount/
 * ========================================================================== */

/* When logged-out on the my-account / lost-password page, drop the
   page.php "حسابي" title + wrapping article so the branded card stands
   alone on the page. */
.woocommerce-account:not(.logged-in) article > h1,
.woocommerce-account:not(.logged-in) article > .prose > h2,
.woocommerce-account:not(.logged-in) article > .prose > .u-columns,
.woocommerce-lost-password article > h1 { display: none; }

.woocommerce-account:not(.logged-in) article,
.woocommerce-lost-password article {
  background: transparent !important;
  box-shadow: none !important;
  padding: 0 !important;
  border: 0 !important;
}

.account-shell {
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 0;
}

.account-grid {
  display: grid;
  gap: 28px;
  width: 100%;
}
.account-grid--one {
  grid-template-columns: minmax(0, 440px);
  justify-content: center;
}
.account-grid--two {
  grid-template-columns: minmax(0, 1fr);
  max-width: 880px;
  margin-inline: auto;
}
@media (min-width: 820px) {
  .account-grid--two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Card — same chrome as the modal shells. */
.account-card {
  background: #ffffff;
  border-radius: 16px;
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.04),
    0 10px 30px -12px rgba(0, 0, 0, 0.12);
  border: 1px solid rgba(0, 0, 0, 0.05);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* Logo strip at the top of the card. */
.account-card__logo {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 22px 20px 14px;
  background: #ffffff;
}
.account-card__logo .custom-logo-link {
  display: inline-flex;
  max-width: 180px;
}
.account-card__logo .custom-logo {
  display: block;
  max-width: 180px;
  max-height: 56px;
  width: auto;
  height: auto;
  object-fit: contain;
}
.account-card__logo-text {
  font-size: 22px;
  font-weight: 900;
  color: var(--primary, #d97706);
  letter-spacing: -0.01em;
}

/* Header — plain white, hairline-bottom, icon badge + title/sub block.
   Matches .shell-modal__head from the cart/product/wishlist modals. */
.account-card__head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 22px;
  border-top: 1px solid #f3f4f6;
  border-bottom: 1px solid #f3f4f6;
  background: #ffffff;
}
.account-card__head-badge {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: color-mix(in srgb, var(--primary, #d97706) 12%, #ffffff);
  color: var(--primary, #d97706);
}
.account-card__head-badge--success {
  background: #ecfdf5;
  color: #059669;
}
.account-card__head-icon {
  width: 20px;
  height: 20px;
}
.account-card__head-title {
  font-size: 16px;
  font-weight: 800;
  color: #111827 !important; /* override global h2 color rule */
  margin: 0;
  line-height: 1.25;
}
.account-card__head-sub {
  font-size: 12px;
  color: #6b7280;
  margin: 2px 0 0;
  line-height: 1.4;
  font-weight: 500;
}

/* Form layout */
.account-form {
  padding: 20px 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Visually-hidden label (we use placeholders for compactness, but keep
   labels in the DOM for accessibility / autofill / screen readers). */
.account-form__label-sr {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}

.account-form__row {
  position: relative;
}

/* Inputs — clean white, no native blue autofill, brand-primary focus ring. */
.account-form__input {
  width: 100%;
  padding: 12px 14px;
  font-size: 14px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #ffffff;
  color: #1f2937;
  font-family: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  outline: none;
  box-shadow: none;
  /* Defuse any WC defaults that paint backgrounds/gradients on inputs. */
  background-image: none !important;
}
.account-form__input::placeholder {
  color: #9ca3af;
}
.account-form__input:focus {
  border-color: var(--primary, #d97706);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary, #d97706) 18%, transparent);
}
/* Kill Chrome's blue autofill background — keep our white card look. */
.account-form__input:-webkit-autofill,
.account-form__input:-webkit-autofill:hover,
.account-form__input:-webkit-autofill:focus,
.account-form__input:-webkit-autofill:active {
  -webkit-box-shadow: 0 0 0 1000px #ffffff inset !important;
  -webkit-text-fill-color: #1f2937 !important;
  caret-color: #1f2937;
  transition: background-color 9999s ease-in-out 0s;
}

/* Password reveal toggle pinned to the trailing edge (RTL-safe). */
.account-form__row--password { display: block; }
.account-form__row--password .account-form__input {
  padding-inline-start: 44px; /* leave space for the eye icon */
}
.account-form__toggle {
  position: absolute;
  top: 50%;
  inset-inline-start: 8px;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border: 0;
  background: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #9ca3af;
  cursor: pointer;
  border-radius: 6px;
  transition: color 0.15s ease, background-color 0.15s ease;
}
.account-form__toggle:hover {
  color: var(--primary, #d97706);
  background: #f3f4f6;
}
.account-form__toggle-icon { width: 18px; height: 18px; }
.account-form__toggle-icon.hidden { display: none; }

/* Remember-me row — soft inset matching the reference design. */
.account-form__remember {
  background: #f9fafb;
  border: 1px solid #f3f4f6;
  border-radius: 10px;
  padding: 10px 12px;
}
.account-form__check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 13px;
  color: #4b5563;
  font-weight: 700;
}
.account-form__check input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--primary, #d97706);
}

/* Submit CTA — brand primary, matches add-to-cart + "اتمام طلبك" buttons. */
.account-form__submit {
  width: 100%;
  padding: 12px 16px;
  font-size: 15px;
  font-weight: 800;
  color: #ffffff;
  background: var(--primary, #d97706);
  border: 0;
  border-radius: 10px;
  cursor: pointer;
  transition: background-color 0.15s ease, transform 0.05s ease, filter 0.15s ease;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
}
.account-form__submit:hover { background: var(--primary-hover, var(--primary, #b45309)); }
.account-form__submit:active { transform: translateY(1px); }
.account-form__submit--link {
  /* Ghost variant for "back to login" CTAs on confirmation pages. */
  background: #ffffff;
  color: var(--primary, #d97706);
  border: 1px solid var(--primary, #d97706);
}
.account-form__submit--link:hover {
  background: color-mix(in srgb, var(--primary, #d97706) 8%, #ffffff);
  color: var(--primary-hover, var(--primary, #b45309));
}

/* "Forgot password" / back-to-login link */
.account-form__lost {
  text-align: center;
  margin-top: 2px;
}
.account-form__lost a {
  color: var(--primary, #d97706);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}
.account-form__lost a:hover {
  color: var(--primary-hover, var(--primary, #b45309));
  text-decoration: underline;
}

.account-form__hint {
  font-size: 13px;
  color: #6b7280;
  margin: 0 0 4px;
  line-height: 1.7;
}

/* WooCommerce notice strip — center over the auth card. */
.woocommerce-account:not(.logged-in) .woocommerce-notices-wrapper,
.woocommerce-lost-password .woocommerce-notices-wrapper {
  max-width: 440px;
  margin: 0 auto 12px;
}
.woocommerce-account:not(.logged-in) .woocommerce-error,
.woocommerce-account:not(.logged-in) .woocommerce-message,
.woocommerce-account:not(.logged-in) .woocommerce-info,
.woocommerce-lost-password .woocommerce-error,
.woocommerce-lost-password .woocommerce-message,
.woocommerce-lost-password .woocommerce-info {
  border-radius: 10px;
  border: 1px solid rgba(0,0,0,0.08);
  padding: 10px 14px;
  font-size: 14px;
  font-weight: 600;
  list-style: none;
}
.woocommerce-account:not(.logged-in) .woocommerce-error,
.woocommerce-lost-password .woocommerce-error {
  background: #fef2f2;
  color: #b91c1c;
  border-color: #fecaca;
}
.woocommerce-account:not(.logged-in) .woocommerce-message,
.woocommerce-lost-password .woocommerce-message {
  background: #ecfdf5;
  color: #047857;
  border-color: #a7f3d0;
}
.woocommerce-account:not(.logged-in) .woocommerce-info,
.woocommerce-lost-password .woocommerce-info {
  background: #eff6ff;
  color: #1d4ed8;
  border-color: #bfdbfe;
}

/* ==========================================================================
 * My Account — logged-in layout (sidebar + content area)
 *
 *   Page wrapper:    .account-page              (full-width, neutral bg)
 *   Sidebar:         .account-nav               (user · group · group · logout)
 *   Content:         .woocommerce-MyAccount-content (cards, hero, sub-pages)
 *
 *  The dashboard shortcode renders inside .woocommerce-MyAccount-content for
 *  the store-management endpoints; the .account-dashboard block renders
 *  for the default "Dashboard" endpoint.
 * ========================================================================== */

.account-page {
  /* Match the shop archive's full-width container so the dashboard breathes
     on larger screens and is consistent with the rest of the storefront. */
  max-width: 1600px;
  margin: 0 auto;
  padding: 24px clamp(16px, 3vw, 40px);
  /* Belt-and-braces guard against the dashboard's home-builder cards or
     any rogue plugin output forcing a horizontal scroll on the my-account
     page when the viewport is narrow. */
  overflow-x: hidden;
}

/* WooCommerce wraps the content in .woocommerce > .woocommerce-MyAccount-content.
   We use grid-template-areas so that any stray child (notices wrapper,
   plugin output, etc.) doesn't break the 2-column layout — only the named
   areas are positioned. RTL-safe via logical CSS. */
.woocommerce-account.logged-in .account-page .woocommerce {
  display: grid;
  grid-template-columns: 1fr;
  grid-template-areas:
    "notices"
    "nav"
    "content";
  gap: 16px;
  align-items: start;
  /* CRITICAL: lets the `minmax(0, 1fr)` content column actually constrain
     its children — without this, long lines/buttons inside .dash__card
     blow out the grid track and push the sidebar off-screen. */
  min-width: 0;
  width: 100%;
}
@media (min-width: 880px) {
  .woocommerce-account.logged-in .account-page .woocommerce {
    grid-template-columns: 280px minmax(0, 1fr);
    grid-template-areas:
      "notices  notices"
      "nav      content";
    gap: 28px;
    /* CRITICAL: align both columns to the very top of the row so the
       user card sits at the exact same Y as the first content card. The
       previous `margin-top: 58px` push that tried to "line up" with the
       dashboard tab-title (`.dash__head`) instead made the sidebar look
       like it was floating in the middle of the page on the settings /
       reports tabs. Top-align is the universally correct choice for a
       sidebar layout, regardless of whether the content has a hero,
       breadcrumb, or starts straight with a card. */
    align-items: start;
  }
}
.woocommerce-account.logged-in .account-page .woocommerce-notices-wrapper {
  grid-area: notices;
  /* When the notices wrapper is empty (most page loads), collapse it to
     zero so it doesn't reserve a 28px gap row above the sidebar. Without
     this the grid keeps a phantom "notices" row, which made the sidebar
     visually start ~50px lower than the first content card. */
  margin: 0;
}
.woocommerce-account.logged-in .account-page .woocommerce-notices-wrapper:empty {
  display: none;
}
.woocommerce-account.logged-in .account-page .account-nav {
  grid-area: nav;
  /* Belt and braces: even though `align-items: start` is set on the grid
     container, some block-themes or plugins poke `align-self: stretch`
     on direct grid children which would silently re-stretch the sidebar.
     Anchoring `align-self: start` directly on the nav guarantees the
     "root" user card sits at the very top of its grid track, flush with
     the welcome hero on the content side. */
  align-self: start;
  margin-top: 0;
}
.woocommerce-account.logged-in .account-page .woocommerce-MyAccount-content {
  grid-area: content;
  align-self: start;   /* same reasoning as .account-nav */
  margin-top: 0;
  min-width: 0;        /* allow flex/grid children to shrink below intrinsic width */
  width: 100%;         /* take all available track width */
  max-width: 100%;     /* never exceed the track */
  overflow-x: hidden;  /* sandbox stray-wide content inside its own card */
}
/* The dashboard's own root (.dash) and its tab panels/cards should fill the
   available width — without these the SPA's tab pane sometimes sits at
   `width: max-content`, leaving large unused white space to the side.
   We use !important here specifically to defeat WooCommerce's RTL layout
   stylesheet which ships:
       .woocommerce-account .woocommerce-MyAccount-content { float:left; width:68%; }
   That floated 68% interacts badly with our CSS grid + dashboard SPA,
   collapsing the content track to roughly half of what it should be. The
   selectors below short-circuit that rule for every dashboard surface and
   restore the natural 100% grid-track width. */
body.woocommerce-account .account-page .woocommerce-MyAccount-content {
  width: 100% !important;
  max-width: 100% !important;
  float: none !important;
}
body.woocommerce-account .account-page .dash,
body.woocommerce-account .account-page .dash > *,
body.woocommerce-account .account-page .dash__panel,
body.woocommerce-account .account-page .dash__panel > .card,
body.woocommerce-account .account-page .dash__panel > .dash__card,
body.woocommerce-account .account-page .card.dash__card {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  float: none !important;
}
/* Sub-tabs row + sub-panels inside the settings card — also need to fill
   the 100% width track, otherwise the sub-panel inherits a `max-content`
   width when the active sub-tab's contents are narrow (e.g. the small
   "خيارات العرض والعملة" tab with only 2 dropdowns). */
body.woocommerce-account .account-page .settings-subtabs,
body.woocommerce-account .account-page .settings-subpanel,
body.woocommerce-account .account-page .settings-top-grid,
body.woocommerce-account .account-page .settings-bottom-grid {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
}

/* ---------- Sidebar ---------- */
/* ---------- Sidebar Redesign (Premium Glassmorphism & Modern SaaS Cards) ---------- */
.account-nav {
  background: #ffffff;
  border-radius: 20px;
  border: 1px solid rgba(229, 231, 235, 0.7);
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.04), 0 4px 6px -4px rgba(0, 0, 0, 0.02);
  padding: 16px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0;             /* never inherit a top margin from a parent block */
  transition: all 0.3s ease;
}
.account-nav__toggle {
  display: none;
}
@media (min-width: 880px) {
  .account-nav {
    position: sticky;
    /* Live just under the sticky header. The header's actual height is
       measured into the `--shop-header-h` CSS variable by the shop
       archive's tiny resize listener; we fall back to 88px so the sidebar
       still clears the header even on pages that don't run that script.
       Smaller offset (was 96+16) so the user card hugs the top once
       the page scrolls — visually anchoring "you are here". */
    top: calc(var(--shop-header-h, 88px) + 8px);
    /* Don't let an extremely tall sidebar overflow the viewport — keep
       it scrollable inside its own sticky container. */
    max-height: calc(100vh - var(--shop-header-h, 88px) - 24px);
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
  }
  .account-nav::-webkit-scrollbar { width: 6px; }
  .account-nav::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.08);
    border-radius: 999px;
  }
}

@media (max-width: 879px) {
  .account-nav {
    padding: 10px;
    border-radius: 16px;
    gap: 0;
  }

  .account-nav__toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
    min-height: 46px;
    padding: 10px 12px;
    border: 0;
    border-radius: 12px;
    background: color-mix(in srgb, var(--primary, #d97706) 9%, #ffffff);
    color: #1f2937;
    font-family: inherit;
    font-size: 14px;
    font-weight: 900;
    cursor: pointer;
  }

  .account-nav__toggle-icon {
    width: 18px;
    height: 18px;
    color: var(--primary, #d97706);
    transition: transform 0.18s ease;
  }

  .account-nav.is-open .account-nav__toggle-icon {
    transform: rotate(180deg);
  }

  .account-nav:not(.is-open) .account-nav__user,
  .account-nav:not(.is-open) .account-nav__group,
  .account-nav:not(.is-open) .account-nav__footer {
    display: none;
  }

  .account-nav.is-open {
    gap: 10px;
  }

  .account-nav.is-open .account-nav__user {
    margin-top: 10px;
  }
}

.account-nav__user {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 14px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--primary, #d97706) 8%, #ffffff) 0%, color-mix(in srgb, var(--primary, #d97706) 2%, #ffffff) 100%);
  border: 1px solid color-mix(in srgb, var(--primary, #d97706) 12%, transparent);
  margin-bottom: 8px;
  transition: all 0.25s ease;
  text-decoration: none !important;
  cursor: pointer;
  position: relative;
}
.account-nav__user:hover {
  border-color: color-mix(in srgb, var(--primary, #d97706) 35%, transparent);
  box-shadow: 0 6px 16px -8px color-mix(in srgb, var(--primary, #d97706) 25%, transparent);
  transform: translateY(-1px);
}
.account-nav__user:focus-visible {
  outline: 2px solid var(--primary, #d97706);
  outline-offset: 2px;
}

/* The little 2x2 grid SVG at the end of the user card — a visual hint
   that clicking the card opens the dashboard. Subtly fades in on hover
   so the resting state stays calm. */
.account-nav__user-cta {
  width: 18px;
  height: 18px;
  margin-inline-start: auto;        /* push to the end of the card */
  color: var(--primary, #d97706);
  opacity: 0.55;
  flex-shrink: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.account-nav__user:hover .account-nav__user-cta,
.account-nav__user:focus-visible .account-nav__user-cta {
  opacity: 1;
  transform: scale(1.06);
}
.account-nav__user.is-active .account-nav__user-cta,
.account-nav__user.woocommerce-MyAccount-navigation-link--is-active .account-nav__user-cta {
  opacity: 1;
}
.account-nav__user.is-active,
.account-nav__user.woocommerce-MyAccount-navigation-link--is-active {
  background: linear-gradient(135deg, color-mix(in srgb, var(--primary, #d97706) 12%, #ffffff) 0%, color-mix(in srgb, var(--primary, #d97706) 4%, #ffffff) 100%) !important;
  border-color: var(--primary, #d97706) !important;
  box-shadow: 0 4px 12px color-mix(in srgb, var(--primary, #d97706) 15%, transparent) !important;
}
.account-nav__avatar {
  width: 48px !important;
  height: 48px !important;
  border-radius: 12px;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05), inset 0 0 0 2px #ffffff;
  object-fit: cover;
}
.account-nav__user-meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
  text-align: start !important; /* Force start-align next to avatar instead of getting centered */
}
.account-nav__user-name {
  font-weight: 800;
  font-size: 15px;
  color: #1f2937;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.account-nav__user-role {
  font-size: 11.5px;
  font-weight: 800;
  color: var(--primary, #d97706);
  opacity: 0.9;
  letter-spacing: 0.02em;
  margin-top: 2px;
}

/* Force dashboard title header to right/start align rather than get centered by global rules */
.woocommerce-account.logged-in .woocommerce-MyAccount-content .dash__head,
.woocommerce-account.logged-in .woocommerce-MyAccount-content .dash__title,
.woocommerce-account.logged-in .woocommerce-MyAccount-content .dash__hint {
  text-align: start !important;
}

.account-nav__group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.account-nav__group-title {
  font-size: 11px;
  font-weight: 800;
  color: #9ca3af !important;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 12px 10px 4px;
  opacity: 0.8;
}
.account-nav__list {
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.account-nav__list li { list-style: none !important; margin: 0; padding: 0; }
.account-nav__list li a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  color: #4b5563;
  text-decoration: none;
  border-inline-start: 3px solid transparent;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.account-nav__list li a:hover {
  background: #f9fafb;
  color: var(--primary, #d97706);
  border-inline-start: 3px solid color-mix(in srgb, var(--primary, #d97706) 30%, transparent);
}
.account-nav__list li a:hover .account-nav__icon {
  transform: scale(1.08);
  color: var(--primary, #d97706);
}
.account-nav__list li.is-active a,
.account-nav__list li.woocommerce-MyAccount-navigation-link--is-active a {
  background: linear-gradient(90deg, color-mix(in srgb, var(--primary, #d97706) 8%, #ffffff) 0%, color-mix(in srgb, var(--primary, #d97706) 2%, #ffffff) 100%);
  color: var(--primary, #d97706);
  border-inline-start: 3.5px solid var(--primary, #d97706);
  box-shadow: inset 1px 0 6px rgba(0, 0, 0, 0.005);
}
.account-nav__list li.is-active a .account-nav__icon,
.account-nav__list li.woocommerce-MyAccount-navigation-link--is-active a .account-nav__icon {
  color: var(--primary, #d97706);
}
.account-nav__icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  color: #9ca3af;
  transition: transform 0.2s ease, color 0.2s ease;
}

.account-nav__footer {
  margin-top: 12px;
  padding-top: 14px;
  border-top: 1px dashed rgba(229, 231, 235, 0.8);
}
.account-nav__logout {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  color: #ef4444;
  text-decoration: none;
  border: 1px solid transparent;
  transition: all 0.25s ease;
}
.account-nav__logout .account-nav__icon {
  color: #ef4444;
}
.account-nav__logout:hover {
  background: #fef2f2;
  color: #dc2626;
  border-color: rgba(239, 68, 68, 0.15);
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.04);
}
.account-nav__logout:hover .account-nav__icon {
  transform: scale(1.08) translateX(-2px);
  color: #dc2626;
}

/* ---------- Dashboard view (cards) ---------- */
.account-dashboard {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.account-hero {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 24px;
  background: linear-gradient(135deg,
    color-mix(in srgb, var(--primary, #d97706) 8%, #ffffff) 0%,
    #ffffff 80%);
  border: 1px solid rgba(0, 0, 0, 0.05);
  border-radius: 16px;
}
.account-hero__avatar {
  width: 64px !important;
  height: 64px !important;
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}
.account-hero__text { min-width: 0; }
.account-hero__greeting {
  font-size: 22px;
  font-weight: 900;
  color: #111827 !important;
  margin: 0 0 4px;
  line-height: 1.2;
}
.account-hero__greeting span {
  color: var(--primary, #d97706);
}
.account-hero__sub {
  font-size: 14px;
  color: #4b5563;
  margin: 0;
  line-height: 1.6;
}

/* Admin stats row */
.account-stats {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}
@media (min-width: 640px) {
  .account-stats { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
  .account-stats { grid-template-columns: repeat(4, 1fr); }
}
.account-stat {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.05);
  border-radius: 14px;
}
.account-stat__icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.account-stat__icon svg { width: 22px; height: 22px; }
.account-stat--amber .account-stat__icon { background: #fef3c7; color: #b45309; }
.account-stat--green .account-stat__icon { background: #d1fae5; color: #047857; }
.account-stat--blue  .account-stat__icon { background: #dbeafe; color: #1d4ed8; }
.account-stat--red   .account-stat__icon { background: #fee2e2; color: #dc2626; }
.account-stat__value {
  font-size: 22px;
  font-weight: 900;
  color: #111827;
  line-height: 1.1;
}
.account-stat__label {
  font-size: 12px;
  font-weight: 700;
  color: #6b7280;
}

/* Section heading + cards grid */
.account-section { display: flex; flex-direction: column; gap: 14px; }
.account-section__head { padding: 0 4px; }
.account-section__title {
  font-size: 17px;
  font-weight: 900;
  color: #111827 !important;
  margin: 0 0 2px;
}
.account-section__sub {
  font-size: 13px;
  color: #6b7280;
  margin: 0;
}

/* ----------------------------------------------------------------------
 *  Dashboard "quick action" cards
 *
 *  Renamed from `.account-card` → `.quick-card` to stop it from
 *  cascading into the LOGIN page's `.account-card` (defined earlier
 *  in this file) — the two were stomping on each other's `flex-direction`
 *  and `border-radius`, which is why the dashboard cards rendered in an
 *  unexpected stacked layout with stuck-looking hover states.
 *
 *  Layout: vertical (icon-on-top), center-aligned, equal-height via
 *  CSS grid stretch + `min-height`. The grid is `auto-fit` so 3 cards
 *  fit as 3 columns on wide screens (no orphan card), 2 cards on mid,
 *  and 1 card per row on mobile.
 * ---------------------------------------------------------------------- */
.account-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  gap: 14px;
  align-items: stretch;
}
.account-cards--account {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 240px));
  justify-content: start;
}

.quick-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
  padding: 22px 18px 18px;
  min-height: 184px;
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 16px;
  text-decoration: none !important;
  color: inherit;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
  transition:
    transform 0.18s cubic-bezier(0.34, 1.56, 0.64, 1),
    box-shadow 0.18s ease,
    border-color 0.18s ease,
    background 0.18s ease;
  overflow: hidden;
  isolation: isolate;
}
/* A subtle brand-tinted glow that swells in on hover — clearly signals
   interactivity without flooding the card with color. */
.quick-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(
    circle at top,
    color-mix(in srgb, var(--primary, #d97706) 9%, transparent) 0%,
    transparent 60%
  );
  opacity: 0;
  transition: opacity 0.2s ease;
}
.quick-card:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--primary, #d97706) 55%, transparent);
  box-shadow: 0 14px 32px -14px color-mix(in srgb, var(--primary, #d97706) 35%, rgba(0, 0, 0, 0.18));
}
.quick-card:hover::before { opacity: 1; }
.quick-card:active { transform: translateY(-1px); }
.quick-card:focus-visible {
  outline: 2px solid var(--primary, #d97706);
  outline-offset: 2px;
}

/* Icon: bigger, centered, with a soft brand tint. Store cards use a
   deeper tint + darker stroke so the two card groups stay visually
   distinct while both flowing from `var(--primary)`. */
.quick-card__icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: color-mix(in srgb, var(--primary, #d97706) 14%, #ffffff);
  color: var(--primary, #d97706);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 0.2s ease, background 0.2s ease;
}
.quick-card__icon svg { width: 26px; height: 26px; }
.quick-card:hover .quick-card__icon {
  transform: scale(1.05);
  background: color-mix(in srgb, var(--primary, #d97706) 20%, #ffffff);
}
.quick-card--store .quick-card__icon {
  background: color-mix(in srgb, var(--primary, #d97706) 22%, #ffffff);
  color: var(--primary-hover, var(--primary, #b45309));
}
.quick-card--store:hover .quick-card__icon {
  background: color-mix(in srgb, var(--primary, #d97706) 30%, #ffffff);
}

/* Body grows to fill available space so the chevron always sits at the
   bottom edge regardless of how many lines the title/desc wrap to. */
.quick-card__body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  width: 100%;
}
.quick-card__title {
  font-size: 15.5px;
  font-weight: 900;
  color: #111827;
  line-height: 1.3;
  letter-spacing: -0.005em;
}
.quick-card__desc {
  font-size: 12.5px;
  color: #6b7280;
  line-height: 1.55;
  font-weight: 600;
  /* Clamp to 2 lines so longer Arabic descriptions don't unbalance heights. */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Chevron sits at the bottom-center; very subtle at rest, swells to the
   brand color on hover. Rotates inline with the reading direction. */
.quick-card__arrow {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #d1d5db;
  flex-shrink: 0;
  transition: color 0.18s ease, transform 0.2s ease;
}
.quick-card__arrow svg { width: 16px; height: 16px; }
[dir="rtl"] .quick-card__arrow svg { transform: scaleX(1); }
[dir="ltr"] .quick-card__arrow svg { transform: scaleX(-1); }
.quick-card:hover .quick-card__arrow {
  color: var(--primary, #d97706);
  transform: translateX(-2px); /* slight nudge in reading direction (RTL: left) */
}
[dir="ltr"] .quick-card:hover .quick-card__arrow {
  transform: translateX(2px);
}

/* ---------- WooCommerce sub-pages (Orders, Account details, etc.) ----------
   These render inside .woocommerce-MyAccount-content. Wrap them in a soft
   white card so they match the dashboard cards visually. */
.woocommerce-account.logged-in .woocommerce-MyAccount-content > * {
  /* No-op base; the children themselves are unstyled. */
}
.woocommerce-account.logged-in .woocommerce-MyAccount-content > p,
.woocommerce-account.logged-in .woocommerce-MyAccount-content > h2,
.woocommerce-account.logged-in .woocommerce-MyAccount-content > h3,
.woocommerce-account.logged-in .woocommerce-MyAccount-content > form,
.woocommerce-account.logged-in .woocommerce-MyAccount-content > table,
.woocommerce-account.logged-in .woocommerce-MyAccount-content > .woocommerce-Addresses,
.woocommerce-account.logged-in .woocommerce-MyAccount-content > .woocommerce-MyAccount-downloads,
.woocommerce-account.logged-in .woocommerce-MyAccount-content > .woocommerce-MyAccount-orders,
.woocommerce-account.logged-in .woocommerce-MyAccount-content > .woocommerce-EditAccountForm {
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.05);
  border-radius: 14px;
  padding: 18px 20px;
  margin: 0 0 14px;
}
/* The .account-details wrapper renders its own cards — strip the generic
   white-box treatment above so it doesn't double-card on the edit screen. */
.woocommerce-account.logged-in .woocommerce-MyAccount-content > .account-details {
  background: transparent !important;
  border: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
}
.account-details .account-details__form.woocommerce-EditAccountForm {
  background: transparent !important;
  border: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
}
.woocommerce-account.logged-in .woocommerce-MyAccount-content > h2,
.woocommerce-account.logged-in .woocommerce-MyAccount-content > h3 {
  font-size: 17px;
  font-weight: 900;
  color: #111827 !important;
  margin-bottom: 12px;
}

/* ==========================================================================
 * Shop archive — full-width layout
 *
 * Used by wp-content/themes/ar-shop/woocommerce/archive-product.php for the
 * main shop page and every product category / tag archive.
 *
 *   .shop-page
 *     .shop-hero            (gradient band: breadcrumb · title · search)
 *     .shop-page__body      (grid: filters | main)
 *       .shop-filters       (sticky sidebar with categories, price, etc.)
 *       .shop-main
 *         .shop-toolbar     (sort · per-page · column switcher)
 *         .shop-chips       (removable active-filter chips)
 *         .shop-grid        (responsive product grid)
 *         .shop-pagination
 *
 * All measurements use logical CSS properties so the layout flips cleanly
 * between RTL (default) and LTR locales — never hardcode left/right.
 * ========================================================================== */

.shop-page {
  width: 100%;
  background: #f9fafb;
  min-height: calc(100vh - 200px);
  padding-block-end: 48px;
  /* Live header height — written by archive-product.php's resize observer.
     The fallback covers both rows of the sticky header (.header__main +
     .header__nav) so sticky children never slide under it on first paint. */
  --shop-header-h: 132px;
  scroll-padding-block-start: var(--shop-header-h);
}

/* ---------- Hero band ---------- */
.shop-hero {
  background: linear-gradient(135deg,
    color-mix(in srgb, var(--primary, #d97706) 8%, #ffffff) 0%,
    #ffffff 60%);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  padding-block: 28px 24px;
  margin-bottom: 24px;
}
.shop-hero__inner {
  max-width: 1600px;
  margin-inline: auto;
  padding-inline: clamp(16px, 3vw, 40px);
}
.shop-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #6b7280;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.shop-breadcrumb a {
  color: #6b7280;
  transition: color 0.15s ease;
}
.shop-breadcrumb a:hover { color: var(--primary, #d97706); }
.shop-breadcrumb__current { color: #111827; font-weight: 700; }

.shop-hero__row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.shop-hero__heading { min-width: 0; flex: 1; }
.shop-hero__title {
  font-size: clamp(24px, 3vw, 34px);
  font-weight: 900;
  color: #111827;
  letter-spacing: -0.01em;
  margin: 0 0 6px;
  line-height: 1.2;
}
.shop-hero__count {
  font-size: 14px;
  color: #6b7280;
  margin: 0;
}

.shop-hero__search {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 999px;
  padding: 4px 4px 4px 16px;
  min-width: 280px;
  max-width: 460px;
  flex: 1 1 320px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}
.shop-hero__search:focus-within {
  border-color: color-mix(in srgb, var(--primary, #d97706) 55%, transparent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary, #d97706) 14%, transparent);
}
.shop-hero__search-icon {
  width: 18px;
  height: 18px;
  color: #9ca3af;
  flex-shrink: 0;
}
.shop-hero__search input[type="search"] {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  outline: none;
  font: inherit;
  font-size: 14px;
  color: #111827;
  padding-block: 8px;
}
.shop-hero__search input[type="search"]::placeholder { color: #9ca3af; }
.shop-hero__search-btn {
  background: var(--primary, #d97706);
  color: #ffffff;
  border: 0;
  border-radius: 999px;
  padding: 8px 18px;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease;
  flex-shrink: 0;
}
.shop-hero__search-btn:hover {
  background: var(--primary-hover, #b45309);
  transform: translateY(-1px);
}

@media (max-width: 767px) {
  .header__search-input,
  .shop-hero__search input[type="search"],
  .orders-filters__field input[type="search"] {
    font-size: 16px;
  }
}

/* ---------- Body grid ---------- */
.shop-page__body {
  max-width: 1600px;
  margin-inline: auto;
  padding-inline: clamp(16px, 3vw, 40px);
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}
@media (max-width: 1023px) {
  .shop-page__body { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- Filters sidebar ---------- */
.shop-filters {
  position: sticky;
  /* Sit just below the sticky site header (var is updated by JS so the
     offset stays correct when the header reflows / changes height). */
  top: calc(var(--shop-header-h, 132px) + 12px);
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03), 0 8px 24px -16px rgba(0, 0, 0, 0.08);
  max-height: calc(100vh - var(--shop-header-h, 132px) - 24px);
  overflow-y: auto;
  scrollbar-width: thin;
  /* Stay below the sticky header but above the chips/grid in stacking. */
  z-index: 1;
}
.shop-filters__sheet-head { display: none; }
.shop-filters__form { display: flex; flex-direction: column; gap: 20px; }
.shop-filters__group { display: flex; flex-direction: column; gap: 12px; }
.shop-filters__title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  font-size: 14px;
  font-weight: 800;
  color: #111827;
  margin: 0;
  padding-bottom: 8px;
  border-bottom: 1px solid #f3f4f6;
}
.shop-filters__title small {
  font-weight: 600;
  font-size: 11px;
  color: #9ca3af;
  white-space: nowrap;
}

/* Categories list */
.shop-filters__cats {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 260px;
  overflow-y: auto;
  scrollbar-width: thin;
}
.shop-filters__cat {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 10px;
  color: #4b5563;
  font-size: 13.5px;
  font-weight: 600;
  transition: background 0.15s ease, color 0.15s ease;
}
.shop-filters__cat:hover {
  background: #f9fafb;
  color: #111827;
}
.shop-filters__cat.is-active {
  background: color-mix(in srgb, var(--primary, #d97706) 12%, #ffffff);
  color: var(--primary-dark, #92400e);
  font-weight: 800;
}
.shop-filters__cat-icon { font-size: 17px; flex-shrink: 0; }
.shop-filters__cat-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.shop-filters__cat-count {
  font-size: 11px;
  font-weight: 700;
  color: #9ca3af;
  background: #f3f4f6;
  padding: 2px 8px;
  border-radius: 999px;
}
.shop-filters__cat.is-active .shop-filters__cat-count {
  background: color-mix(in srgb, var(--primary, #d97706) 18%, #ffffff);
  color: var(--primary-dark, #92400e);
}

/* Price range inputs */
.shop-filters__price {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.shop-filters__price-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.shop-filters__price-field span {
  font-size: 11px;
  font-weight: 700;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.shop-filters__price-field input {
  width: 100%;
  padding: 9px 10px;
  font: inherit;
  font-size: 13px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #ffffff;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.shop-filters__price-field input:focus {
  border-color: color-mix(in srgb, var(--primary, #d97706) 55%, transparent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary, #d97706) 18%, transparent);
}

/* Hide native number spinners (mainly for Firefox + WebKit) */
.shop-filters__price-field input[type="number"] { -moz-appearance: textfield; }
.shop-filters__price-field input[type="number"]::-webkit-outer-spin-button,
.shop-filters__price-field input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* Checkbox rows */
.shop-filters__check {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13.5px;
  color: #374151;
  cursor: pointer;
  padding: 6px 0;
}
.shop-filters__check input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--primary, #d97706);
  cursor: pointer;
}

/* Action buttons */
.shop-filters__actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 8px;
  border-top: 1px solid #f3f4f6;
}
.shop-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 10px 16px;
  font: inherit;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}
.shop-btn--primary {
  background: var(--primary, #d97706);
  color: #ffffff;
}
.shop-btn--primary:hover {
  background: var(--primary-hover, #b45309);
  transform: translateY(-1px);
}
.shop-btn--ghost {
  background: #ffffff;
  color: #4b5563;
  border-color: #e5e7eb;
}
.shop-btn--ghost:hover {
  background: #f9fafb;
  color: #111827;
  border-color: #d1d5db;
}

/* ---------- Main column ---------- */
.shop-main { min-width: 0; }

/* Toolbar */
.shop-toolbar {
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 14px;
  padding: 12px 16px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}
.shop-toolbar__group {
  display: flex;
  align-items: center;
  gap: 8px;
}
.shop-toolbar__label {
  font-size: 12px;
  font-weight: 700;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.shop-toolbar select {
  appearance: none;
  -webkit-appearance: none;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 8px 32px;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  color: #111827;
  cursor: pointer;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  /* Custom dropdown arrow positioned at the inline-end. */
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3e%3cpath fill='%236b7280' d='M6 8 0 0h12z'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: left 12px center;
  background-size: 10px 7px;
}
[dir="ltr"] .shop-toolbar select {
  background-position: right 12px center;
}
.shop-toolbar select:focus {
  border-color: color-mix(in srgb, var(--primary, #d97706) 55%, transparent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary, #d97706) 16%, transparent);
}

.shop-toolbar__cols { gap: 6px; margin-inline-start: auto; }
.shop-toolbar__col {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 7px 8px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #ffffff;
  color: #9ca3af;
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}
.shop-toolbar__col span {
  display: block;
  width: 4px;
  height: 14px;
  background: currentColor;
  border-radius: 2px;
}
.shop-toolbar__col:hover { color: #4b5563; border-color: #d1d5db; }
.shop-toolbar__col.is-active {
  color: var(--primary, #d97706);
  border-color: color-mix(in srgb, var(--primary, #d97706) 55%, transparent);
  background: color-mix(in srgb, var(--primary, #d97706) 8%, #ffffff);
}

.shop-toolbar__filters-btn {
  display: none;
  align-items: center;
  gap: 6px;
  background: var(--primary, #d97706);
  color: #ffffff;
  border: 0;
  padding: 9px 16px;
  border-radius: 999px;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
.shop-toolbar__filters-btn svg { width: 16px; height: 16px; }

/* Chips */
.shop-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}
.shop-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #ffffff;
  border: 1px solid color-mix(in srgb, var(--primary, #d97706) 30%, transparent);
  color: var(--primary-dark, #92400e);
  font-size: 12.5px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 999px;
  transition: background 0.15s ease, transform 0.15s ease;
}
.shop-chip:hover {
  background: color-mix(in srgb, var(--primary, #d97706) 10%, #ffffff);
  transform: translateY(-1px);
}
.shop-chip svg { width: 12px; height: 12px; }
.shop-chip--clear {
  background: transparent;
  border-color: transparent;
  color: #6b7280;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.shop-chip--clear:hover {
  background: transparent;
  color: #111827;
}

/* Product grid — responsive columns driven by .shop-grid--cols-N. */
.shop-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
}
@media (max-width: 639px) {
  .shop-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
  .shop-grid .product-card {
    border-radius: 14px;
  }
  .shop-grid .product-card .product-card__body {
    padding: 10px;
  }
  .shop-grid .product-card .product-card__title {
    font-size: 13px;
    line-height: 1.35;
    min-height: 2.3rem;
    margin-bottom: 6px;
  }
  .shop-grid .product-card .product-card__price {
    margin-bottom: 10px;
    font-size: 13px;
  }
  .product-card .product-card__btn {
    padding: 8px 10px;
    font-size: 12px;
    border-radius: 10px;
    gap: 0;
    min-height: 44px;
  }
  .product-card .product-card__btn svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
  }
  .product-card .product-card__btn span {
    display: none;
  }
}

/* ---------- Product card image fit ----------
 * The product-card markup (content-product.php) uses Tailwind utilities
 * `aspect-square` + `w-full h-full object-cover`, which can render
 * inconsistently when Tailwind's JIT is slow to load or when the image's
 * intrinsic size dominates. We hard-pin the contract here so every card
 * in the grid is identically sized, every image fully covers its frame,
 * and the empty-state SVG never stretches to fill the card. */
.shop-grid .product-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}
.product-card.is-in-cart {
  border-color: rgba(217, 119, 6, 0.45) !important;
  box-shadow: 0 14px 34px -24px rgba(217, 119, 6, 0.85);
}
.product-card--soldout {
  position: relative;
  border-color: rgba(239, 68, 68, 0.18) !important;
}
.product-card--soldout .product-card__media > img {
  filter: grayscale(0.72) saturate(0.72);
  transform: none !important;
}
.product-card__soldout-badge {
  position: absolute;
  inset-block-start: 12px;
  inset-inline-start: 12px;
  z-index: 12;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 6px 12px;
  border-radius: 999px;
  background: #111827;
  color: #ffffff;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
  box-shadow: 0 12px 24px rgba(17, 24, 39, 0.26);
}
.product-card__soldout-overlay {
  position: absolute;
  inset: 0;
  z-index: 8;
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, rgba(255,255,255,0.18), rgba(17,24,39,0.32));
  pointer-events: none;
}
.product-card__soldout-icon {
  display: inline-grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 999px;
  background: rgba(17, 24, 39, 0.82);
  color: #ffffff;
  box-shadow: 0 18px 36px rgba(17, 24, 39, 0.22);
}
.product-card__btn--soldout {
  background: #f3f4f6 !important;
  border: 1px solid #e5e7eb !important;
  color: #6b7280 !important;
}

.product-card .discount-badge {
  background: #16a34a !important;
  box-shadow: 0 10px 22px rgba(22, 163, 74, 0.28);
  direction: ltr;
  line-height: 1;
}

.product-card__price {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 7px;
  flex-wrap: wrap;
  color: #16a34a;
  font-weight: 900;
  line-height: 1.25;
}
.product-card__price del {
  color: #9ca3af;
  font-size: 0.86em;
  font-weight: 700;
  text-decoration-thickness: 2px;
}
.product-card__price ins {
  color: #16a34a;
  font-weight: 900;
  text-decoration: none;
}
.product-card__price--sale {
  color: #16a34a;
}

.product-card__variations {
  display: grid;
  gap: 7px;
  margin: -4px 0 12px;
}
.product-card__variation-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
  padding-block: 2px;
}
.product-card__variation-row::-webkit-scrollbar {
  display: none;
}
.product-card__variation-chip {
  flex: 0 0 auto;
  display: inline-grid;
  place-items: center;
  min-width: 32px;
  height: 32px;
  padding: 0 9px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #ffffff;
  color: #111827;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}
.product-card__variation-chip:hover:not(.is-soldout) {
  border-color: color-mix(in srgb, var(--primary, #d97706) 55%, #e5e7eb);
  box-shadow: 0 8px 18px rgba(17, 24, 39, 0.08);
  transform: translateY(-1px);
}
.product-card__variation-chip.is-active {
  border-color: var(--primary, #d97706);
  box-shadow: 0 0 0 2px rgba(217, 119, 6, 0.16);
}
.product-card__variation-chip img {
  width: 30px;
  height: 30px;
  object-fit: cover;
  border-radius: 8px;
}
.product-card__variation-chip.is-soldout {
  position: relative;
  color: #9ca3af;
  background: #f9fafb;
  opacity: 0.72;
}
.product-card__variation-chip.is-soldout::after {
  content: "";
  position: absolute;
  inset-inline: 7px;
  top: 50%;
  border-top: 2px solid rgba(220, 38, 38, 0.65);
  transform: rotate(-18deg);
}

.single-product .summary .price,
.single-product div.product p.price {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
  color: #16a34a;
  font-weight: 900;
}
.single-product .summary .price del,
.single-product div.product p.price del {
  color: #9ca3af;
  font-size: 0.86em;
  font-weight: 700;
  text-decoration-thickness: 2px;
}
.single-product .summary .price ins,
.single-product div.product p.price ins {
  color: #16a34a;
  font-weight: 900;
  text-decoration: none;
}
.product-card.is-in-cart .product-card__btn.is-in-cart {
  background: #059669 !important;
  border-color: #059669 !important;
  color: #ffffff !important;
}
.product-card.is-in-cart .product-card__btn.is-in-cart::after {
  content: "✓";
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
  font-size: 12px;
  font-weight: 900;
}
.shop-grid .product-card .product-card__media {
  display: block;
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: #f9fafb;
  flex-shrink: 0;
}
.shop-grid .product-card .product-card__media > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}
/* Placeholder wrapper (the div containing the "no image" SVG) — center
   the icon and keep it small so it doesn't try to fill the whole frame. */
.shop-grid .product-card .product-card__media > div.w-full.h-full,
.shop-grid .product-card .product-card__media > .product-card__placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #d1d5db;
}
.shop-grid .product-card .product-card__media > div.w-full.h-full > svg,
.shop-grid .product-card .product-card__media > .product-card__placeholder > svg {
  width: 64px;
  height: 64px;
}
/* Body fills remaining card height so the CTA always sits at the bottom. */
.shop-grid .product-card .product-card__body {
  flex: 1;
  display: flex;
  flex-direction: column;
}
@media (min-width: 640px) {
  .shop-grid--cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .shop-grid--cols-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .shop-grid--cols-4 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .shop-grid--cols-5 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 1024px) {
  .shop-grid--cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .shop-grid--cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .shop-grid--cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .shop-grid--cols-5 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (min-width: 1440px) {
  .shop-grid--cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .shop-grid--cols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}

/* Pagination — style WooCommerce's default markup so it sits inside the
   card system without restyling every template. */
.shop-pagination {
  margin-top: 28px;
  display: flex;
  justify-content: center;
}
.shop-pagination .woocommerce-pagination ul,
.shop-pagination ul.page-numbers {
  list-style: none;
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 6px;
  margin: 0;
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 12px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}
.shop-pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 12px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 13.5px;
  color: #4b5563;
  transition: background 0.15s ease, color 0.15s ease;
}
.shop-pagination a.page-numbers:hover {
  background: #f9fafb;
  color: var(--primary, #d97706);
}
.shop-pagination .page-numbers.current {
  background: var(--primary, #d97706);
  color: #ffffff;
}

/* Hide WooCommerce's default ordering bar + result count — we render our
   own controls in .shop-toolbar to avoid duplicates. */
.shop-main .woocommerce-result-count,
.shop-main .woocommerce-ordering { display: none !important; }

/* Empty state */
.shop-empty {
  text-align: center;
  padding: 56px 24px;
  background: #ffffff;
  border: 1px dashed #e5e7eb;
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.shop-empty svg {
  width: 56px;
  height: 56px;
  color: #d1d5db;
  margin-bottom: 4px;
}
.shop-empty h2 {
  font-size: 18px;
  font-weight: 800;
  color: #111827;
  margin: 0;
}
.shop-empty p {
  color: #6b7280;
  margin: 0 0 12px;
  font-size: 14px;
}

/* ---------- Mobile: filters bottom sheet ---------- */
@media (max-width: 1023px) {
  .shop-toolbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(86px, 0.55fr);
    gap: 10px;
    align-items: stretch;
  }
  .shop-toolbar__group {
    min-width: 0;
    justify-content: space-between;
    gap: 6px;
  }
  .shop-toolbar__group:nth-of-type(1),
  .shop-toolbar__group:nth-of-type(2) {
    grid-row: 1;
  }
  .shop-toolbar__label {
    font-size: 11px;
    letter-spacing: 0;
    white-space: nowrap;
  }
  .shop-toolbar select {
    min-width: 0;
    width: 100%;
    padding-block: 8px;
    padding-inline: 24px 10px;
    font-size: 12px;
    background-position: left 8px center;
  }
  .shop-toolbar__filters-btn {
    display: inline-flex;
    grid-column: 1 / -1;
    justify-self: start;
    min-width: 0;
    width: auto;
    padding-inline: 18px;
  }
  .shop-toolbar__cols { display: none; }

  .shop-filters {
    position: fixed;
    inset-inline: 0;
    inset-block: auto 0;
    width: 100%;
    max-height: min(82vh, 720px);
    margin: 0;
    border-radius: 24px 24px 0 0;
    box-shadow: 0 -24px 56px -18px rgba(15, 23, 42, 0.36);
    transform: translateY(100%);
    transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
    z-index: 2147483647;
    padding: 12px 18px calc(18px + env(safe-area-inset-bottom));
    overscroll-behavior: contain;
  }
  .shop-page--filters-open .shop-filters { transform: translateY(0); }
  .shop-page--filters-open .shop-page__body::before {
    content: "";
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.42);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    z-index: 2147483646;
  }
  .shop-filters__sheet-head {
    position: sticky;
    top: 0;
    z-index: 2;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 8px;
    margin: -2px -2px 12px;
    padding: 4px 0 14px;
    background: #ffffff;
  }
  .shop-filters__sheet-head::before {
    content: "";
    position: absolute;
    top: -4px;
    left: 50%;
    width: 44px;
    height: 5px;
    border-radius: 999px;
    background: #d1d5db;
    transform: translateX(-50%);
  }
  .shop-filters__sheet-head strong {
    font-size: 16px;
    font-weight: 900;
    color: #111827;
  }
  .shop-filters__sheet-reset {
    justify-self: start;
    appearance: none;
    border: 0;
    background: transparent;
    padding: 0;
    color: var(--primary, #d97706);
    font-weight: 800;
    font-size: 13px;
    cursor: pointer;
    font-family: inherit;
  }
  .shop-filters__sheet-close {
    justify-self: end;
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 999px;
    background: #f3f4f6;
    color: #6b7280;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
  }
  .shop-filters__form { gap: 18px; }
  .shop-filters__group {
    padding-block-end: 16px;
    border-bottom: 1px solid #f3f4f6;
  }
  .shop-filters__group:last-of-type { border-bottom: 0; }
  .shop-filters__actions {
    flex-direction: column-reverse;
    border-top: 0;
    padding-top: 0;
  }
  .shop-filters__actions .shop-btn {
    min-height: 44px;
    border-radius: 10px;
  }
}

/* ==========================================================================
 * Account details — edit account form
 *
 * Used by wp-content/themes/aui-ar-shop/woocommerce/myaccount/form-edit-account.php
 * Renders inside .woocommerce-MyAccount-content; the wrapper-stripping rule
 * above (`.account-details` block) ensures we don't double-card.
 *
 *   .account-details
 *     .account-details__hero       (gradient strip: avatar + name + email)
 *     .account-details__form
 *       .account-details__card     (profile section: 2-col grid)
 *       .account-details__card     (password section: 3 stacked rows)
 *       .account-details__actions  (sticky save bar: cancel + save)
 *
 * Every interactive accent uses `var(--primary)` so the screen tracks the
 * Customizer brand color along with the rest of the site.
 * ========================================================================== */

.account-details {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 980px;
  width: 100%;
}

/* ---------- Hero strip ---------- */
.account-details__hero {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 20px;
  background: #ffffff;
  border: 1px solid #f1eee9;
  border-radius: 16px;
  box-shadow: 0 10px 24px -22px rgba(15, 23, 42, 0.35);
}
.account-details__avatar {
  flex-shrink: 0;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  overflow: hidden;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary, #d97706);
  border: 2px solid #ffffff;
  box-shadow: 0 8px 18px -14px rgba(15, 23, 42, 0.65);
}
.account-details__avatar img { width: 100%; height: 100%; object-fit: cover; }
.account-details__avatar svg { width: 36px; height: 36px; }
.account-details__hero-text { min-width: 0; flex: 1; }
.account-details__eyebrow {
  margin: 0 0 2px;
  font-size: 12px;
  font-weight: 700;
  color: var(--primary-dark, #92400e);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.account-details__name {
  margin: 0 0 4px;
  font-size: clamp(18px, 2vw, 22px);
  font-weight: 900;
  color: #111827;
  letter-spacing: -0.01em;
  line-height: 1.2;
  word-break: break-word;
}
.account-details__sub {
  margin: 0;
  font-size: 14px;
  color: #4b5563;
  word-break: break-all;
}

/* ---------- Form (transparent wrapper, only the cards inside have chrome) -- */
.account-details__form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* ---------- Section cards ---------- */
.account-details__card {
  background: #ffffff;
  border: 1px solid #f1eee9;
  border-radius: 16px;
  padding: clamp(16px, 2.4vw, 22px);
  box-shadow: 0 10px 24px -22px rgba(15, 23, 42, 0.35);
}
.account-details__card-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid #f3f4f6;
}
.account-details__card-icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--primary, #d97706) 14%, #ffffff);
  color: var(--primary, #d97706);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.account-details__card-icon svg { width: 20px; height: 20px; }
.account-details__card-title {
  margin: 0 0 2px;
  font-size: 16px;
  font-weight: 800;
  color: #111827;
  line-height: 1.3;
}
.account-details__card-sub {
  margin: 0;
  font-size: 13px;
  color: #6b7280;
  line-height: 1.55;
}

/* ---------- Field grid ---------- */
.account-details__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.account-details__field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0;
  /* WC's default `.form-row` adds `padding: 3px` — null it. */
  padding: 0;
  /* These spans the full row by default; the --half modifier puts them
     in the two-column area. */
  grid-column: 1 / -1;
}
.account-details__field--half { grid-column: auto; }
.account-details__field--avatar { grid-column: 1 / -1; }
@media (max-width: 640px) {
  .account-details__grid { grid-template-columns: minmax(0, 1fr); }
  .account-details__field--half { grid-column: 1 / -1; }
}
.account-details__field > label {
  font-size: 13px;
  font-weight: 700;
  color: #374151;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.account-details__req {
  color: #ef4444;
  font-weight: 900;
  font-size: 13px;
  line-height: 1;
}
.account-details__hint {
  margin: 4px 0 0;
  font-size: 12px;
  color: #9ca3af;
  font-style: normal;
  line-height: 1.5;
}
.account-details__avatar-upload {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px;
  border: 1px dashed #e5e7eb;
  border-radius: 14px;
  background: #fbfaf8;
}
.account-details__avatar-preview {
  width: 64px;
  height: 64px;
  flex: 0 0 auto;
  border-radius: 16px;
  overflow: hidden;
  background: #ffffff;
  color: var(--primary, #d97706);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #f1eee9;
}
.account-details__avatar-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.account-details__avatar-preview svg {
  width: 30px;
  height: 30px;
}
.account-details__avatar-actions {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.account-details__file {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.account-details__upload-btn {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 9px 14px;
  border-radius: 10px;
  border: 1px solid color-mix(in srgb, var(--primary, #d97706) 28%, #e5e7eb);
  background: color-mix(in srgb, var(--primary, #d97706) 8%, #ffffff);
  color: var(--primary-dark, #92400e) !important;
  font-weight: 900;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}
.account-details__upload-btn:hover {
  background: color-mix(in srgb, var(--primary, #d97706) 14%, #ffffff);
  border-color: var(--primary, #d97706);
  transform: translateY(-1px);
}
.account-details__remove-avatar {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 0;
  color: #b91c1c;
  font-size: 12.5px;
  font-weight: 800;
  cursor: pointer;
}
.account-details__remove-avatar input {
  width: 16px;
  height: 16px;
  accent-color: #b91c1c;
}

/* ---------- Inputs ---------- */
.account-details__input,
.account-details__form input.input-text,
.account-details__form input[type="text"],
.account-details__form input[type="email"],
.account-details__form input[type="password"] {
  width: 100%;
  font: inherit;
  font-size: 14px;
  color: #111827;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 12px 14px;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  box-sizing: border-box;
}
.account-details__input::placeholder { color: #9ca3af; }
.account-details__input:hover { border-color: #d1d5db; }
.account-details__input:focus,
.account-details__form input.input-text:focus {
  border-color: color-mix(in srgb, var(--primary, #d97706) 55%, transparent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary, #d97706) 14%, transparent);
}
/* Defuse Chrome's blue autofill background. */
.account-details__input:-webkit-autofill {
  -webkit-text-fill-color: #111827;
  -webkit-box-shadow: 0 0 0 1000px #ffffff inset;
  caret-color: #111827;
}

/* Inputs with a leading icon */
.account-details__input-wrap {
  position: relative;
  display: block;
}
.account-details__field-icon {
  position: absolute;
  inset-inline-end: 12px;
  inset-block-start: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: #9ca3af;
  pointer-events: none;
}
.account-details__input--with-icon { padding-inline-end: 38px; }
[dir="ltr"] .account-details__field-icon {
  inset-inline-end: auto;
  inset-inline-start: 12px;
}
[dir="ltr"] .account-details__input--with-icon {
  padding-inline-end: 14px;
  padding-inline-start: 38px;
}

/* ---------- Password fieldset ---------- */
.account-details__fieldset {
  margin: 16px 0 0;
  padding: 0;
  border: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.account-details__summary {
  display: flex;
  align-items: center;
  gap: 12px;
  list-style: none;
  cursor: pointer;
  user-select: none;
}
.account-details__summary::-webkit-details-marker {
  display: none;
}
.account-details__summary-text {
  display: grid;
  gap: 2px;
  min-width: 0;
  flex: 1;
}
.account-details__summary-chevron {
  width: 20px;
  height: 20px;
  color: #9ca3af;
  flex: 0 0 auto;
  transition: transform 0.15s ease;
}
.account-details__card--password[open] .account-details__summary-chevron {
  transform: rotate(180deg);
}
.account-details__field--password .account-details__input-wrap--password {
  position: relative;
  display: block;
}
.account-details__input--password { padding-inline-end: 44px; }
[dir="ltr"] .account-details__input--password {
  padding-inline-end: 14px;
  padding-inline-start: 44px;
}
.account-details__pwd-toggle {
  position: absolute;
  inset-inline-end: 6px;
  inset-block-start: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 0;
  color: #6b7280;
  cursor: pointer;
  border-radius: 8px;
  transition: background 0.15s ease, color 0.15s ease;
}
[dir="ltr"] .account-details__pwd-toggle {
  inset-inline-end: auto;
  inset-inline-start: 6px;
}
.account-details__pwd-toggle svg { width: 18px; height: 18px; }
.account-details__pwd-toggle:hover {
  background: #f3f4f6;
  color: var(--primary, #d97706);
}
.account-details__pwd-toggle:focus-visible {
  outline: 2px solid var(--primary, #d97706);
  outline-offset: 1px;
}

/* ---------- Save bar ---------- */
.account-details__actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 18px;
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 14px;
  box-shadow: 0 10px 24px -22px rgba(15, 23, 42, 0.35);
  /* Stick to the bottom of the viewport so the action is always reachable
     even on tall forms. */
  position: sticky;
  bottom: 12px;
  z-index: 5;
}
/* ----- Save / Cancel buttons --------------------------------------
 * The save submit has THREE class names because Woo's form-edit-account.php
 * sticks `woocommerce-Button button` on every submit so its own theme
 * styles can hook in. That global `.button` cascade was washing our
 * primary brand color out to a flat gray rectangle. We use `:where()` on
 * the Woo selectors to keep our own selector specificity low (so a
 * theme/child override still wins) but stack them so we override Woo
 * AND any block-theme `.wp-element-button` defaults at the same level.
 * ----------------------------------------------------------------- */
.account-details__btn,
.account-details .account-details__btn:where(.woocommerce-Button, .button, .wp-element-button) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 12px 22px;
  min-height: 44px;                /* thumb-friendly */
  font: inherit;
  font-size: 14.5px;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
  text-decoration: none;
  text-shadow: none;
  letter-spacing: 0;
  background-image: none;          /* kill any Woo gradient */
  box-shadow: none;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}
.account-details__btn svg { width: 18px; height: 18px; flex-shrink: 0; }

.account-details__btn--ghost,
.account-details .account-details__btn--ghost:where(.woocommerce-Button, .button, .wp-element-button) {
  background: #ffffff !important;
  color: #4b5563 !important;
  border-color: #e5e7eb !important;
}
.account-details__btn--ghost:hover,
.account-details__btn--ghost:focus-visible {
  background: #f9fafb;
  color: #111827;
  border-color: #d1d5db;
  outline: none;
}

.account-details__btn--primary,
.account-details .account-details__btn--primary:where(.woocommerce-Button, .button, .wp-element-button) {
  background: var(--primary, #d97706) !important;
  color: #ffffff !important;
  border-color: var(--primary, #d97706) !important;
  box-shadow: 0 6px 16px -8px color-mix(in srgb, var(--primary, #d97706) 70%, transparent) !important;
}
.account-details__btn--primary:hover,
.account-details__btn--primary:focus-visible {
  background: var(--primary-hover, color-mix(in srgb, var(--primary, #d97706) 88%, #000));
  border-color: var(--primary-hover, color-mix(in srgb, var(--primary, #d97706) 88%, #000));
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 10px 22px -10px color-mix(in srgb, var(--primary, #d97706) 80%, transparent);
  outline: none;
}
.account-details__btn--primary:active { transform: translateY(0); }
.account-details__btn--primary:disabled,
.account-details__btn--primary[aria-disabled="true"] {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* Hide WC's legacy "clear" spacer used between rows — we use a grid now. */
.account-details__form .clear { display: none; }

/* If a plugin renders extra Woo form rows via the
   `woocommerce_edit_account_form_fields` hook, blend them with our grid. */
.account-details__form > .woocommerce-form-row {
  margin-block: 8px 0;
}

@media (max-width: 640px) {
  .account-details {
    gap: 12px;
  }
  .account-details__hero {
    align-items: center;
    padding: 14px;
  }
  .account-details__avatar {
    width: 50px;
    height: 50px;
  }
  .account-details__card {
    padding: 14px;
    border-radius: 14px;
  }
  .account-details__avatar-upload {
    align-items: flex-start;
  }
  .account-details__avatar-actions {
    flex-direction: column;
    align-items: stretch;
    flex: 1;
  }
  .account-details__upload-btn {
    width: 100%;
  }
  .account-details__card-head {
    margin-bottom: 14px;
    padding-bottom: 12px;
  }
  .account-details__summary {
    align-items: flex-start;
  }
  .account-details__actions {
    flex-direction: column-reverse;
    align-items: stretch;
    bottom: 8px;
    padding: 10px;
  }
  .account-details__btn { width: 100%; }
}

/* ==========================================================================
 * My Account ▸ Orders — design system
 *
 * Layout (top → bottom):
 *
 *   .orders-page
 *     .orders-hero              ← title + per-user stats
 *     .orders-filters           ← search + status + dates + per-page + chips
 *     .orders-list
 *       .order-card             ← head (id+date+status) · items · foot (meta+actions)
 *     .orders-pagination        ← OR .orders-empty (when no rows)
 *
 * All spacing/positioning uses logical properties (inset-inline-*,
 * margin-inline-*) so the same rules render correctly in RTL (Arabic, Hebrew)
 * and LTR (English) without overrides.
 * ========================================================================== */

.orders-page {
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: 100%;
  min-width: 0;
}

/* ---------- Hero ---------- */
.orders-hero {
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.05);
  border-radius: 18px;
  padding: 22px 24px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.orders-hero__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.orders-hero__heading { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.orders-hero__title {
  margin: 0;
  font-size: clamp(20px, 2.2vw, 26px);
  font-weight: 900;
  color: #111827;
  line-height: 1.2;
}
.orders-hero__sub {
  margin: 0;
  color: #6b7280;
  font-size: 14px;
  font-weight: 600;
}
.orders-hero__pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  background: color-mix(in srgb, var(--primary, #d97706) 12%, #ffffff);
  color: var(--primary, #d97706);
  border-radius: 999px;
  font-weight: 800;
  font-size: 13px;
  white-space: nowrap;
}

.orders-hero__stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
}
.orders-hero__stat {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px 16px;
  background: #f9fafb;
  border: 1px solid #f3f4f6;
  border-radius: 14px;
  min-width: 0;
}
.orders-hero__stat-label {
  font-size: 12px;
  font-weight: 700;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
.orders-hero__stat-value {
  font-size: 22px;
  font-weight: 900;
  color: #111827;
  line-height: 1;
  overflow-wrap: anywhere;
}
/* Colored left/right border accents per status (logical, RTL-safe). */
.orders-hero__stat--processing { border-inline-start: 3px solid #3b82f6; }
.orders-hero__stat--completed  { border-inline-start: 3px solid #10b981; }
.orders-hero__stat--pending    { border-inline-start: 3px solid #f59e0b; }
.orders-hero__stat--spent      { border-inline-start: 3px solid var(--primary, #d97706); }

/* ---------- Filters ---------- */
.orders-filters {
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.05);
  border-radius: 18px;
  padding: 16px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.orders-filters__row {
  display: grid;
  grid-template-columns: minmax(220px, 2fr) repeat(3, minmax(140px, 1fr)) minmax(120px, 0.8fr) auto;
  gap: 10px;
  align-items: end;
}
@media (max-width: 1100px) {
  .orders-filters__row {
    grid-template-columns: 1fr 1fr;
  }
  .orders-filters__field--search { grid-column: 1 / -1; }
  .orders-filters__actions       { grid-column: 1 / -1; justify-content: flex-end; }
}
@media (max-width: 560px) {
  .orders-filters__row { grid-template-columns: 1fr; }
  .orders-filters__actions { justify-content: stretch; }
}

.orders-filters__field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.orders-filters__label {
  font-size: 12px;
  font-weight: 800;
  color: #374151;
}
.orders-filters__field input[type="text"],
.orders-filters__field input[type="search"],
.orders-filters__field input[type="date"],
.orders-filters__field select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  background: #ffffff;
  font-size: 14px;
  color: #111827;
  font-weight: 600;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.orders-filters__field input:focus,
.orders-filters__field select:focus {
  outline: none;
  border-color: var(--primary, #d97706);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary, #d97706) 18%, transparent);
}

/* Search field gets a leading icon (logical position). */
.orders-filters__field--search { position: relative; }
.orders-filters__field--search input {
  padding-inline-start: 38px;
}
.orders-filters__icon {
  position: absolute;
  inset-inline-start: 12px;
  /* Sits flush with the input (label is above it); push the icon down so
     it centers vertically over the input control, not the whole column. */
  inset-block-end: 11px;
  width: 18px;
  height: 18px;
  color: #9ca3af;
  pointer-events: none;
}
.orders-filters__icon svg { width: 100%; height: 100%; display: block; }

.orders-filters__actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.orders-filters__chips {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 8px;
  padding-block-start: 8px;
  border-block-start: 1px dashed #e5e7eb;
}
.orders-filters__chips-label {
  font-size: 12px;
  font-weight: 800;
  color: #6b7280;
  margin-inline-end: 4px;
}
.orders-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  background: color-mix(in srgb, var(--primary, #d97706) 8%, #ffffff);
  color: var(--primary, #d97706);
  border: 1px solid color-mix(in srgb, var(--primary, #d97706) 25%, transparent);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
  transition: background .15s ease, transform .15s ease;
}
.orders-chip:hover { background: color-mix(in srgb, var(--primary, #d97706) 16%, #ffffff); transform: translateY(-1px); }
.orders-chip__x { font-size: 14px; line-height: 1; }

/* ---------- Buttons ---------- */
.orders-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 16px;
  border-radius: 10px;
  border: 1px solid transparent;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.2;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: background .15s ease, border-color .15s ease, color .15s ease, transform .15s ease;
}
.orders-btn--primary {
  background: var(--primary, #d97706);
  color: #ffffff;
  border-color: var(--primary-hover, #b45309);
}
.orders-btn--primary:hover { background: var(--primary-hover, #b45309); transform: translateY(-1px); color: #fff; }
.orders-btn--ghost {
  background: #ffffff;
  color: #374151;
  border-color: #e5e7eb;
}
.orders-btn--ghost:hover { background: #f9fafb; border-color: #d1d5db; color: #111827; }
/* WC's own action keys (e.g. .orders-btn--pay, --cancel, --view) get
   colored accents but inherit the same shape as --ghost above. */
.orders-btn--pay {
  background: #10b981;
  color: #ffffff;
  border-color: #059669;
}
.orders-btn--pay:hover { background: #059669; color: #ffffff; transform: translateY(-1px); }
.orders-btn--cancel {
  background: #ffffff;
  color: #b91c1c;
  border-color: #fecaca;
}
.orders-btn--cancel:hover { background: #fef2f2; border-color: #fca5a5; color: #991b1b; }

/* ---------- Orders list (cards) ---------- */
.orders-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.order-card {
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.05);
  border-radius: 16px;
  padding: 18px 20px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: box-shadow .15s ease, transform .15s ease;
}
.order-card:hover { box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06); transform: translateY(-1px); }

.order-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.order-card__primary {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
  min-width: 0;
}
.order-card__num {
  font-size: 16px;
  font-weight: 900;
  color: #111827;
  text-decoration: none;
  transition: color .15s ease;
}
.order-card__num:hover { color: var(--primary, #d97706); }
.order-card__hash { color: #9ca3af; font-weight: 700; }
.order-card__date {
  font-size: 13px;
  font-weight: 600;
  color: #6b7280;
}

.order-card__status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  background: #f3f4f6;
  color: #4b5563;
  white-space: nowrap;
}
.order-card__status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
}
/* Per-status palette — text + tinted bg. */
.order-card__status--pending     { background: #fef3c7; color: #92400e; }
.order-card__status--new         { background: #fef3c7; color: #92400e; }
.order-card__status--confirmed   { background: #dcfce7; color: #166534; }
.order-card__status--processing  { background: #dbeafe; color: #1e40af; }
.order-card__status--shipped     { background: #e0f2fe; color: #075985; }
.order-card__status--delivered   { background: #d1fae5; color: #065f46; }
.order-card__status--on-hold     { background: #e5e7eb; color: #374151; }
.order-card__status--completed   { background: #d1fae5; color: #065f46; }
.order-card__status--rejected    { background: #fee2e2; color: #991b1b; }
.order-card__status--cancelled   { background: #fee2e2; color: #991b1b; }
.order-card__status--refunded    { background: #ede9fe; color: #5b21b6; }
.order-card__status--failed      { background: #fee2e2; color: #991b1b; }

/* Items strip — small thumbnails laid out inline. */
.order-card__items {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.order-card__item {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: #f3f4f6;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #e5e7eb;
}
.order-card__item-img,
.order-card__item img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover;
  display: block;
}
.order-card__item--more {
  background: #f9fafb;
  color: #6b7280;
  font-weight: 800;
  font-size: 12px;
}

.order-card__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding-block-start: 12px;
  border-block-start: 1px solid #f3f4f6;
}
.order-card__meta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  color: #6b7280;
  font-weight: 700;
  font-size: 13px;
}
.order-card__sep { color: #d1d5db; }
.order-card__total {
  color: #111827;
  font-weight: 900;
  font-size: 15px;
}
.order-card__total .woocommerce-Price-amount,
.order-card__total bdi { font-weight: 900; }

.order-card__actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.orders-manager-notice {
  padding: 12px 14px;
  border: 1px solid #bbf7d0;
  border-radius: 14px;
  background: #ecfdf5;
  color: #065f46;
  font-weight: 900;
}
.order-card--manager .order-card__manager-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  padding-block: 12px;
  border-block: 1px solid #f3f4f6;
}
.order-card__customer {
  display: grid;
  gap: 3px;
  color: #6b7280;
  font-size: 13px;
  font-weight: 700;
}
.order-card__customer strong {
  color: #111827;
  font-size: 15px;
  font-weight: 900;
}
.order-card__status-form {
  display: flex;
  align-items: end;
  gap: 10px;
  flex-wrap: wrap;
}
.order-card__status-form label {
  display: grid;
  gap: 5px;
  min-width: min(240px, 100%);
  color: #4b5563;
  font-size: 12px;
  font-weight: 900;
}
.order-card__status-form select {
  min-height: 40px;
  border: 1px solid #d1d5db;
  border-radius: 12px;
  background: #ffffff;
  color: #111827;
  font: inherit;
  font-weight: 800;
  padding: 8px 12px;
}

/* ---------- Pagination ---------- */
.orders-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  padding-block: 12px;
}
.orders-pagination__pages {
  list-style: none;
  margin: 0;
  padding: 0;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.orders-pagination__page {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #ffffff;
  color: #374151;
  font-weight: 800;
  font-size: 13px;
  text-decoration: none;
  transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.orders-pagination__page:hover {
  background: #f9fafb;
  border-color: var(--primary, #d97706);
  color: var(--primary, #d97706);
}
.orders-pagination__page.is-active {
  background: var(--primary, #d97706);
  color: #ffffff;
  border-color: var(--primary-hover, #b45309);
  cursor: default;
}
.orders-pagination__nav {
  display: inline-flex;
  align-items: center;
  padding: 0 14px;
  height: 36px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #ffffff;
  color: #374151;
  font-weight: 800;
  font-size: 13px;
  text-decoration: none;
  transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.orders-pagination__nav:hover {
  background: #f9fafb;
  border-color: var(--primary, #d97706);
  color: var(--primary, #d97706);
}

/* ---------- Empty state ---------- */
.orders-empty {
  background: #ffffff;
  border: 1px dashed #e5e7eb;
  border-radius: 18px;
  padding: 40px 24px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.orders-empty__icon {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  background: color-mix(in srgb, var(--primary, #d97706) 10%, #ffffff);
  color: var(--primary, #d97706);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.orders-empty__icon svg { width: 32px; height: 32px; }
.orders-empty__title {
  margin: 0;
  font-size: 18px;
  font-weight: 900;
  color: #111827;
}
.orders-empty__sub {
  margin: 0;
  color: #6b7280;
  font-size: 14px;
  font-weight: 600;
  max-width: 480px;
}
.orders-empty .orders-btn { margin-block-start: 6px; }

/* The orders endpoint renders inside .woocommerce-MyAccount-content which
   we already wrap in soft cards via the generic block in the account
   section. When our `.orders-page` is present, strip that wrapper so we
   don't double-card. Same pattern as `.account-details`. */
.woocommerce-account.logged-in .woocommerce-MyAccount-content > .orders-page {
  background: transparent !important;
  padding: 0 !important;
  margin: 0 !important;
  border: 0 !important;
  box-shadow: none !important;
  border-radius: 0 !important;
}

/* WC's notice wrapper that occasionally appears above our hero (e.g. after
   a successful pay/cancel action). Push it into the page flow so it doesn't
   sit awkwardly against the soft wrapper. */
.orders-page + .woocommerce-notices-wrapper,
.orders-page .woocommerce-notices-wrapper { margin-block: 0 12px; }

@media (max-width: 640px) {
  .orders-hero { padding: 18px; }
  .order-card { padding: 16px; }
  .order-card__foot { flex-direction: column; align-items: stretch; }
  .order-card__actions { justify-content: flex-end; }
  .order-card--manager .order-card__manager-grid { grid-template-columns: 1fr; }
  .order-card__status-form,
  .order-card__status-form label,
  .order-card__status-form .orders-btn {
    width: 100%;
  }
}

/* Prevent background scrolling when modals are open */
html.no-scroll,
html.no-scroll body {
  overflow: hidden !important;
  height: 100vh !important;
}

/* ==========================================================================
 * Category product carousel (homepage `products` section)
 *
 * Visual structure (matches the design from the user's reference shot):
 *
 *   ┌─────────────────────────────────────────────────────────┐  ← brown bar
 *   │  أكواب ديزني                          ┌─ 29 منتج ─┐    │     (head)
 *   ├─────────────────────────────────────────────────────────┤
 *   │  ◀  [card] [card] [card] [card] [card]  ▶              │  ← carousel
 *   ├─────────────────────────────────────────────────────────┤     (body)
 *   │       «  أكواب ديزني  ⋯  عرض الكل                       │  ← footer
 *   └─────────────────────────────────────────────────────────┘     (link)
 *
 * The whole thing is one rounded card. Header background ties into the
 * shop primary palette so it adapts when the admin re-skins colors.
 * ========================================================================== */

.cat-carousel {
  /* Colors are wired to --primary (admin-controlled customizer color) so
     the whole header / badge / arrows / view-all bar restyle automatically
     when the admin picks a new brand color. Each variable still has a sane
     fallback that matches the warm-brown reference. */
  --cat-carousel-head-bg: var(--title-card, var(--primary, #5b3a29));
  --cat-carousel-head-text: #ffffff;
  --cat-carousel-body-bg: #ffffff;
  --cat-carousel-border: rgba(15, 23, 42, 0.08);
  --cat-carousel-badge-bg: #ffffff;
  --cat-carousel-badge-text: var(--primary-dark, var(--primary, #5b3a29));
  --cat-carousel-link-bg: #faf6f3;
  --cat-carousel-link-text: var(--primary-dark, var(--primary, #5b3a29));
  --cat-carousel-link-hover-bg: var(--primary, #5b3a29);
  --cat-carousel-arrow-bg: #ffffff;
  --cat-carousel-arrow-text: var(--primary, #5b3a29);
  --cat-carousel-arrow-hover-bg: var(--primary, #5b3a29);
  --cat-carousel-radius: 18px;

  display: block;
  margin: 0 0 32px;
  border-radius: var(--cat-carousel-radius);
  background: var(--cat-carousel-body-bg);
  border: 1px solid var(--cat-carousel-border);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 8px 24px -16px rgba(15, 23, 42, 0.12);
  overflow: hidden;
}

/* Header bar -------------------------------------------------------------- */
.cat-carousel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 22px;
  background: var(--cat-carousel-head-bg);
  color: var(--cat-carousel-head-text);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}
.cat-carousel__title-wrap {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.cat-carousel__icon {
  font-size: 1.25rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
}
.cat-carousel__title {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0;
  color: inherit !important;
  letter-spacing: 0.01em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cat-carousel__count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 70px;
  padding: 4px 14px;
  border-radius: 999px;
  background: var(--cat-carousel-badge-bg);
  color: var(--cat-carousel-badge-text);
  font-weight: 700;
  font-size: 0.85rem;
  white-space: nowrap;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

/* Body / carousel track --------------------------------------------------- */
.cat-carousel__body {
  position: relative;
  padding: 18px 18px 22px;
  background: var(--cat-carousel-body-bg);
}
.cat-carousel__empty {
  margin: 0;
  padding: 24px 8px;
  text-align: center;
  color: #6b7280;
  font-size: 0.95rem;
}

/* Each slide gets its own padding-inline so slick can use width:100% on the
   inner wrapper while still leaving a gap between cards. The card itself
   stays full-height inside the slide. */
.product-carousel {
  margin: 0;
}
.product-carousel .slick-list {
  margin: 0 -8px;
}
.product-carousel .slick-track {
  display: flex;
  align-items: stretch;
}
.product-carousel .slick-slide {
  height: auto;            /* fill height so cards line up */
  float: none;             /* override slick default float */
  min-height: 1px;
}
.product-carousel .slick-slide > div {
  height: 100%;
}
.product-carousel__slide {
  padding: 0 8px;
  height: 100%;
  display: flex;
}
.product-carousel__slide > .product-card,
.product-carousel__slide > article.product-card {
  width: 100%;
  height: 100%;
}

/* When slick has NOT been initialized (either because JS is still loading,
   or — more commonly — because the section has few enough products to fit
   one row), render the slides as a fixed 4-column grid. Grid auto-flow
   follows the document writing direction, so in RTL the first item lands
   in the rightmost column and additional items fill leftwards — which is
   exactly the layout the storefront expects (start = right). */
.product-carousel:not(.slick-initialized) {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}
.product-carousel:not(.slick-initialized) .product-carousel__slide {
  padding: 0;
  display: flex;
}
.product-carousel:not(.slick-initialized) .product-carousel__slide > .product-card,
.product-carousel:not(.slick-initialized) .product-carousel__slide > article.product-card {
  width: 100%;
}
@media (max-width: 1024px) {
  .product-carousel:not(.slick-initialized) {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (max-width: 768px) {
  .product-carousel:not(.slick-initialized) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 520px) {
  .product-carousel:not(.slick-initialized) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
}

/* Arrows ------------------------------------------------------------------ */
.product-carousel .product-carousel__arrow,
.product-carousel .slick-prev,
.product-carousel .slick-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 4;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  background: var(--cat-carousel-arrow-bg);
  color: var(--cat-carousel-arrow-text);
  border: 1px solid var(--cat-carousel-border);
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.12);
  font-size: 22px;
  font-weight: 600;
  line-height: 1;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.product-carousel .product-carousel__arrow:hover,
.product-carousel .slick-prev:hover,
.product-carousel .slick-next:hover {
  background: var(--cat-carousel-arrow-hover-bg);
  color: #fff;
  transform: translateY(-50%) scale(1.05);
}
.product-carousel .slick-prev:before,
.product-carousel .slick-next:before {
  content: none;     /* hide slick's default unicode arrows */
}
.product-carousel .slick-prev {
  inset-inline-start: -18px;
}
.product-carousel .slick-next {
  inset-inline-end: -18px;
}
/* RTL flip: in RTL Slick swaps prev/next semantically, but the chevron
   glyphs we render are direction-agnostic ‹›, so nothing extra needed. */

/* Disabled arrow (non-infinite carousels at the edge). */
.product-carousel .slick-prev.slick-disabled,
.product-carousel .slick-next.slick-disabled {
  opacity: 0.45;
  cursor: default;
  transform: translateY(-50%);
}

/* Footer "view all" link -------------------------------------------------- */
.cat-carousel__view-all {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 22px;
  background: var(--cat-carousel-link-bg);
  color: var(--cat-carousel-link-text);
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  border-top: 1px solid var(--cat-carousel-border);
  transition: background 0.15s ease, color 0.15s ease;
}
.cat-carousel__view-all:hover,
.cat-carousel__view-all:focus-visible {
  background: var(--cat-carousel-link-hover-bg);
  color: #ffffff;
  outline: none;
}
.cat-carousel__view-all-arrow {
  font-size: 1.1rem;
  line-height: 1;
}
.cat-carousel__view-all-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.cat-carousel__view-all-sep {
  opacity: 0.6;
}

/* Responsive head bar tweaks --------------------------------------------- */
@media (max-width: 640px) {
  .cat-carousel__head {
    padding: 12px 14px;
  }
  .cat-carousel__title {
    font-size: 0.95rem;
  }
  .cat-carousel__count {
    min-width: 0;
    padding: 3px 10px;
    font-size: 0.8rem;
  }
  .cat-carousel__body {
    padding: 14px 14px 18px;
  }
  .cat-carousel__view-all {
    padding: 10px 14px;
    font-size: 0.9rem;
  }
}

/* ==========================================================================
 *  Professional Footer
 * ========================================================================== */
.site-footer-pro {
  margin-top: 64px;
  padding: 0 0 28px;
  background:
    radial-gradient(circle at top right, color-mix(in srgb, var(--primary, #d97706) 10%, transparent), transparent 34%),
    linear-gradient(180deg, color-mix(in srgb, var(--footer-bg, #ffffff) 96%, #f8fafc), var(--footer-bg, #ffffff));
  color: var(--footer-fg, #4b5563);
  border-top: 1px solid rgba(15, 23, 42, 0.06);
}
.site-footer-pro__inner {
  width: min(1180px, calc(100% - 32px));
  margin-inline: auto;
}
.site-footer-pro__trust {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  transform: translateY(-50%);
  margin-bottom: -18px;
}
.site-footer-pro__trust-item {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 72px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(15, 23, 42, 0.07);
  border-radius: 18px;
  box-shadow: 0 18px 34px -24px rgba(15, 23, 42, 0.34);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.site-footer-pro__trust-icon {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  border-radius: 14px;
  background: color-mix(in srgb, var(--primary, #d97706) 12%, #ffffff);
  color: var(--primary, #d97706);
  font-size: 1.25rem;
}
.site-footer-pro__trust-item strong,
.site-footer-pro__trust-item small {
  display: block;
  min-width: 0;
}
.site-footer-pro__trust-item strong {
  color: #111827;
  font-size: 0.9rem;
  font-weight: 950;
  line-height: 1.25;
}
.site-footer-pro__trust-item small {
  margin-top: 2px;
  color: #6b7280;
  font-size: 0.76rem;
  font-weight: 800;
  line-height: 1.35;
}
.site-footer-pro__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(220px, 0.85fr) minmax(260px, 0.9fr);
  gap: 18px;
  padding-block: 26px 22px;
}
.site-footer-pro__brand-card,
.site-footer-pro__card {
  position: relative;
  overflow: hidden;
  padding: 22px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(15, 23, 42, 0.07);
  border-radius: 24px;
  box-shadow: 0 20px 40px -32px rgba(15, 23, 42, 0.28);
}
.site-footer-pro__brand-card::after,
.site-footer-pro__card::after {
  content: "";
  position: absolute;
  inset-block-start: -70px;
  inset-inline-end: -70px;
  width: 150px;
  height: 150px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--primary, #d97706) 10%, transparent);
  pointer-events: none;
}
.site-footer-pro__brand-head {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}
.site-footer-pro__logo {
  width: 64px;
  height: 64px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  overflow: hidden;
  border-radius: 18px;
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 14px 24px -18px rgba(15, 23, 42, 0.45);
}
.site-footer-pro__logo-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.site-footer-pro__store-name,
.site-footer-pro__title {
  margin: 0;
  color: #111827;
  font-size: 1.05rem;
  font-weight: 950;
  line-height: 1.25;
}
.site-footer-pro__eyebrow {
  margin: 4px 0 0;
  color: var(--primary, #d97706);
  font-size: 0.8rem;
  font-weight: 900;
}
.site-footer-pro__card-icon {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
  border-radius: 14px;
  background: color-mix(in srgb, var(--primary, #d97706) 12%, #ffffff);
  color: var(--primary, #d97706);
  font-weight: 950;
  font-size: 1.15rem;
}
.site-footer-pro__content {
  position: relative;
  z-index: 1;
  color: color-mix(in srgb, var(--footer-fg, #4b5563) 92%, #111827);
  font-size: 0.92rem;
  font-weight: 800;
  line-height: 1.8;
}
.site-footer-pro__content p {
  margin: 0;
}
.site-footer-pro__content a {
  color: inherit;
  text-decoration: none;
  transition: color 0.16s ease, transform 0.16s ease;
}
.site-footer-pro__content a:hover,
.site-footer-pro__content a:focus-visible {
  color: var(--primary, #d97706);
  outline: none;
}
.site-footer-pro__links ul {
  display: grid;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.site-footer-pro__links li a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.site-footer-pro__links li a::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--primary, #d97706);
  opacity: 0.7;
}
.site-footer-pro__quick-actions {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}
.site-footer-pro__quick-actions a,
.site-footer-pro__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 38px;
  padding: 9px 14px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--primary, #d97706) 10%, #ffffff);
  color: var(--primary-dark, var(--primary, #d97706));
  font-size: 0.84rem;
  font-weight: 950;
  text-decoration: none;
  transition: transform 0.16s ease, background 0.16s ease, color 0.16s ease;
}
.site-footer-pro__quick-actions a:hover,
.site-footer-pro__quick-actions a:focus-visible,
.site-footer-pro__cta:hover,
.site-footer-pro__cta:focus-visible {
  transform: translateY(-1px);
  background: var(--primary, #d97706);
  color: #ffffff;
  outline: none;
}
.site-footer-pro__socials {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}
.site-footer-pro__social {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  color: #ffffff;
  text-decoration: none;
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}
.site-footer-pro__social:hover,
.site-footer-pro__social:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 12px 22px -14px rgba(15, 23, 42, 0.55);
  outline: none;
}
.site-footer-pro__social svg,
.site-footer-pro__cta svg {
  width: 20px;
  height: 20px;
}
.site-footer-pro__social--whatsapp,
.site-footer-pro__cta {
  background: #25d366;
  color: #ffffff;
}
.site-footer-pro__social--facebook {
  background: #1877f2;
}
.site-footer-pro__social--instagram {
  background: radial-gradient(circle at 30% 110%, #fdf497 0 16%, #fd5949 45%, #d6249f 67%, #285aeb 100%);
}
.site-footer-pro__cta {
  position: relative;
  z-index: 1;
  width: 100%;
  margin-top: 16px;
  border-radius: 14px;
}
.site-footer-pro__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding-top: 18px;
  border-top: 1px solid rgba(15, 23, 42, 0.08);
}
.site-footer-pro__copyright {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  color: color-mix(in srgb, var(--footer-fg, #4b5563) 88%, #111827);
  font-size: 0.86rem;
  font-weight: 900;
}
.site-footer-pro__copyright strong {
  color: #111827;
}
.site-footer-pro__menu ul {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.84rem;
  font-weight: 900;
}
.site-footer-pro__menu a {
  color: inherit;
  text-decoration: none;
}
.site-footer-pro__menu a:hover,
.site-footer-pro__menu a:focus-visible {
  color: var(--primary, #d97706);
  outline: none;
}

@media (max-width: 900px) {
  .site-footer-pro {
    margin-top: 48px;
    padding-bottom: calc(28px + env(safe-area-inset-bottom));
  }
  .site-footer-pro__trust {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    transform: translateY(-26px);
    margin-bottom: -4px;
  }
  .site-footer-pro__grid {
    grid-template-columns: 1fr;
    padding-block-start: 12px;
  }
  .site-footer-pro__bottom {
    align-items: flex-start;
    flex-direction: column;
  }
  .site-footer-pro__menu ul {
    justify-content: flex-start;
  }
}

@media (max-width: 520px) {
  .site-footer-pro__inner {
    width: min(100% - 22px, 1180px);
  }
  .site-footer-pro__trust {
    grid-template-columns: 1fr;
  }
  .site-footer-pro__trust-item {
    min-height: 62px;
  }
  .site-footer-pro__brand-card,
  .site-footer-pro__card {
    padding: 18px;
    border-radius: 20px;
  }
  .site-footer-pro__brand-head {
    align-items: flex-start;
  }
}

/* ==========================================================================
 * Share FAB
 *
 * Floating share button anchored to the bottom-end corner of every public
 * storefront page (rendered by ar_shop's wp_footer hook). Tapping it opens
 * either the OS-native share sheet (mobile) or a small popover with copy-
 * link + social channels (desktop).
 *
 * Button color follows --primary so it matches the brand exactly.
 * ========================================================================== */
.share-fab {
  position: fixed;
  inset-block-end: clamp(16px, 2vw, 24px);
  inset-inline-end: clamp(16px, 2vw, 24px);
  z-index: 2147483646;       /* under cart modal (which uses 2147483647) */
  pointer-events: none;       /* let popover/button each handle their own */
}
.share-fab__btn,
.share-fab__popover {
  pointer-events: auto;
}
.share-fab__btn {
  width: 52px;
  height: 52px;
  border-radius: 999px;
  border: 0;
  background: var(--primary, #5b3a29);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.18), 0 2px 6px rgba(15, 23, 42, 0.12);
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}
.share-fab__btn:hover,
.share-fab__btn:focus-visible {
  background: var(--primary-hover, var(--primary, #5b3a29));
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.22), 0 4px 8px rgba(15, 23, 42, 0.14);
  outline: none;
}
.share-fab__btn:active {
  transform: translateY(0);
}
.share-fab__icon {
  display: block;
  width: 22px;
  height: 22px;
}
.share-fab.is-open .share-fab__btn {
  background: var(--primary-hover, var(--primary, #5b3a29));
}

/* Popover ----------------------------------------------------------------- */
.share-fab__popover {
  position: absolute;
  inset-block-end: calc(100% + 12px);
  inset-inline-end: 0;
  width: min(320px, calc(100vw - 32px));
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 24px 48px rgba(15, 23, 42, 0.18), 0 4px 12px rgba(15, 23, 42, 0.08);
  border: 1px solid rgba(15, 23, 42, 0.06);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  animation: shareFabFadeIn 0.16s ease-out;
}
@keyframes shareFabFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.share-fab__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.share-fab__title {
  font-size: 1rem;
  font-weight: 700;
  color: #1f2937;
}
.share-fab__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  border: 0;
  background: #f3f4f6;
  color: #4b5563;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.share-fab__close:hover {
  background: #e5e7eb;
  color: #111827;
}

/* URL + copy row */
.share-fab__url {
  display: flex;
  align-items: stretch;
  gap: 6px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 4px;
}
.share-fab__url input {
  flex: 1 1 auto;
  min-width: 0;
  border: 0;
  background: transparent;
  padding: 8px 10px;
  font-size: 0.85rem;
  color: #4b5563;
  font-family: inherit;
  direction: ltr;
  text-align: start;
}
.share-fab__url input:focus { outline: none; }
.share-fab__copy {
  flex: 0 0 auto;
  border: 0;
  border-radius: 8px;
  padding: 8px 12px;
  background: var(--primary, #5b3a29);
  color: #ffffff;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  transition: background 0.15s ease;
  white-space: nowrap;
}
.share-fab__copy:hover {
  background: var(--primary-hover, var(--primary, #5b3a29));
}
.share-fab__copy.is-copied {
  background: #16a34a;
}

/* Channel grid */
.share-fab__grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}
.share-fab__channel {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 10px 4px;
  border-radius: 10px;
  background: #f9fafb;
  color: #4b5563;
  text-decoration: none;
  font-size: 0.7rem;
  font-weight: 700;
  transition: transform 0.15s ease, background 0.15s ease, color 0.15s ease;
  text-align: center;
}
.share-fab__channel svg { display: block; }
.share-fab__channel:hover {
  transform: translateY(-2px);
  color: #ffffff;
}
.share-fab__channel--whatsapp:hover { background: #25D366; }
.share-fab__channel--facebook:hover { background: #1877F2; }
.share-fab__channel--x:hover        { background: #000000; }
.share-fab__channel--telegram:hover { background: #229ED9; }
.share-fab__channel--email:hover    { background: var(--primary, #5b3a29); }

/* Responsive tweaks */
@media (max-width: 480px) {
  .share-fab__btn { width: 48px; height: 48px; }
  .share-fab__icon { width: 20px; height: 20px; }
}

/* Print: hide. */
@media print {
  .share-fab { display: none !important; }
}

/* ==========================================================================
 *  Category sidebar — branded pill list with home + contact entries
 *
 *  Used on the homepage (left/RTL-right column). Each item is a `.cat-pill`
 *  with three slots (icon | label | chevron) laid out via CSS grid so they
 *  stay aligned regardless of label length. Active state is solid primary
 *  color; idle state is white with primary outline + text. Promo banner +
 *  contact pill live in the same column and inherit the brand color from
 *  --primary so the whole sidebar re-skins when the admin picks a new
 *  brand color.
 * ========================================================================== */

.cat-sidebar {
  position: sticky;
  top: 96px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px;
  background: #ffffff;
  border-radius: 16px;
  border: 1px solid rgba(15, 23, 42, 0.06);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 12px 24px -16px rgba(15, 23, 42, 0.12);
}

/* ----- Pill button ---------------------------------------------------- */
.cat-pill {
  display: grid;
  grid-template-columns: 34px 1fr 16px;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: #ffffff;
  border: 1.5px solid color-mix(in srgb, var(--primary, #d97706) 18%, #e5e7eb);
  color: var(--primary-dark, var(--primary, #d97706));
  text-decoration: none;
  font-weight: 800;
  font-size: 0.9rem;
  line-height: 1.3;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease, transform 0.15s ease, box-shadow 0.18s ease;
}
.cat-pill:hover,
.cat-pill:focus-visible {
  background: var(--primary, #d97706);
  color: #ffffff;
  border-color: var(--primary, #d97706);
  transform: translateY(-1px);
  box-shadow: 0 8px 16px -10px color-mix(in srgb, var(--primary, #d97706) 80%, transparent);
  outline: none;
}
.cat-pill.is-active {
  background: var(--primary, #d97706);
  color: #ffffff;
  border-color: var(--primary, #d97706);
  box-shadow: 0 6px 14px -10px color-mix(in srgb, var(--primary, #d97706) 80%, transparent);
}

.cat-pill__icon {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: color-mix(in srgb, var(--primary, #d97706) 12%, #ffffff);
  color: var(--primary, #d97706);
  font-size: 1.05rem;
  flex-shrink: 0;
  transition: background 0.18s ease, color 0.18s ease;
}
.cat-pill__icon svg {
  width: 18px;
  height: 18px;
  display: block;
}
.cat-pill:hover .cat-pill__icon,
.cat-pill:focus-visible .cat-pill__icon,
.cat-pill.is-active .cat-pill__icon {
  background: rgba(255, 255, 255, 0.22);
  color: #ffffff;
}

.cat-pill__label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cat-pill__chevron {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  opacity: 0.55;
  transition: opacity 0.18s ease, transform 0.18s ease;
  flex-shrink: 0;
}
/* In RTL the chevron should point toward the reading-end side, so flip
   the SVG horizontally. */
[dir="rtl"] .cat-pill__chevron svg {
  transform: scaleX(-1);
}
.cat-pill:hover .cat-pill__chevron,
.cat-pill:focus-visible .cat-pill__chevron,
.cat-pill.is-active .cat-pill__chevron {
  opacity: 1;
  transform: translateX(-2px);
}
[dir="rtl"] .cat-pill:hover .cat-pill__chevron,
[dir="rtl"] .cat-pill:focus-visible .cat-pill__chevron,
[dir="rtl"] .cat-pill.is-active .cat-pill__chevron {
  transform: translateX(2px);
}

/* Variants ------------------------------------------------------------- */
.cat-pill--home {
  grid-template-columns: 34px 1fr;     /* no chevron */
}
.cat-pill--home .cat-pill__icon {
  background: var(--primary, #d97706);
  color: #ffffff;
}
.cat-pill--home:hover .cat-pill__icon,
.cat-pill--home:focus-visible .cat-pill__icon,
.cat-pill--home.is-active .cat-pill__icon {
  background: rgba(255, 255, 255, 0.22);
}

.cat-pill--contact {
  margin-top: 4px;
  border-color: color-mix(in srgb, var(--primary, #d97706) 26%, #e5e7eb);
}

.cat-social-card {
  display: grid;
  gap: 6px;
  margin-top: 4px;
}
.cat-social-card__title {
  margin: 0;
  padding: 8px 12px 4px;
  color: var(--primary-dark, var(--primary, #d97706));
  font-size: 0.92rem;
  font-weight: 900;
  line-height: 1.2;
  text-align: center;
}
.cat-social-link {
  display: grid;
  grid-template-columns: 1fr 40px;
  align-items: center;
  gap: 10px;
  min-height: 54px;
  padding: 6px 4px 6px 14px;
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 8px;
  color: #c76461;
  font-size: 0.88rem;
  font-weight: 900;
  line-height: 1.25;
  text-align: center;
  text-decoration: none;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  transition: transform 0.15s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
[dir="ltr"] .cat-social-link {
  grid-template-columns: 40px 1fr;
  padding: 6px 14px 6px 4px;
}
.cat-social-link:hover,
.cat-social-link:focus-visible {
  border-color: color-mix(in srgb, currentColor 30%, #e5e7eb);
  box-shadow: 0 10px 18px -14px currentColor;
  transform: translateY(-1px);
  outline: none;
}
.cat-social-link__label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cat-social-link__icon {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #ffffff;
  justify-self: end;
}
[dir="ltr"] .cat-social-link__icon {
  justify-self: start;
  order: -1;
}
.cat-social-link__icon svg {
  width: 24px;
  height: 24px;
  display: block;
}
.cat-social-link--whatsapp .cat-social-link__icon {
  background: #25d366;
}
.cat-social-link--facebook .cat-social-link__icon {
  background: #1877f2;
}
.cat-social-link--instagram .cat-social-link__icon {
  background: radial-gradient(circle at 30% 110%, #fdf497 0 16%, #fd5949 45%, #d6249f 67%, #285aeb 100%);
}

/* ----- Promo card ----------------------------------------------------- */
.cat-promo {
  margin: 6px 0 4px;
  padding: 14px;
  border-radius: 14px;
  background: linear-gradient(135deg,
    color-mix(in srgb, var(--primary, #d97706) 90%, #000) 0%,
    color-mix(in srgb, var(--primary, #d97706) 70%, #fff) 100%);
  color: #ffffff;
  display: grid;
  gap: 6px;
  text-align: start;
  position: relative;
  overflow: hidden;
}
.cat-promo::after {
  content: "";
  position: absolute;
  inset-block-start: -28px;
  inset-inline-end: -28px;
  width: 110px;
  height: 110px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.2), transparent 70%);
  pointer-events: none;
}
.cat-promo__icon {
  font-size: 1.4rem;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
  margin-bottom: 2px;
}
.cat-promo__title {
  font-weight: 900;
  font-size: 0.95rem;
}
.cat-promo__desc {
  font-size: 0.78rem;
  font-weight: 600;
  opacity: 0.95;
  line-height: 1.5;
}
.cat-promo__cta {
  margin-top: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  border-radius: 999px;
  background: #ffffff;
  color: var(--primary-dark, var(--primary, #d97706));
  font-weight: 800;
  font-size: 0.82rem;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  align-self: start;
}
.cat-promo__cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 14px -8px rgba(0, 0, 0, 0.3);
}

/* ===================== Custom animated CSS-based Bar Chart ===================== */
.sales-chart-container {
  width: 100%;
  padding: 10px 0;
  display: flex;
  flex-direction: column;
}
.sales-chart-bars {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  height: 220px;
  border-bottom: 2px solid #e5e7eb;
  padding-bottom: 10px;
  gap: 12px;
}
.chart-bar-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}
.bar-wrapper {
  width: 100%;
  max-width: 32px;
  height: 100%;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  position: relative;
}
.bar-fill {
  width: 100%;
  background: linear-gradient(180deg, var(--primary, #d97706) 0%, var(--primary-hover, #b45309) 100%);
  border-radius: 6px 6px 0 0;
  height: 0;
  transition: height 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 10px -4px rgba(217, 119, 6, 0.4);
}
.chart-bar-col:hover .bar-fill {
  background: var(--primary-hover, #b45309);
  box-shadow: 0 4px 14px -2px rgba(217, 119, 6, 0.6);
}
.bar-value-tooltip {
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translate(-50%, -8px);
  background: #111827;
  color: #fff;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: all 0.2s ease;
  box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1);
  z-index: 10;
}
.bar-value-tooltip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border-width: 5px;
  border-style: solid;
  border-color: #111827 transparent transparent transparent;
}
.chart-bar-col:hover .bar-value-tooltip {
  opacity: 1;
  transform: translate(-50%, -4px);
}
.bar-label {
  margin-top: 8px;
  font-size: 11px;
  font-weight: 800;
  color: #6b7280;
  text-align: center;
}

@keyframes bar-grow {
  from { height: 0; }
}
.animate-bar .bar-fill {
  animation: bar-grow 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* ===================== Analytics Categories Share & Progress ===================== */
.analytics-cats-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.cat-share-item {
  display: flex;
  flex-direction: column;
}
.progress-bg {
  width: 100%;
  height: 8px;
  background: #f3f4f6;
  border-radius: 9999px;
  overflow: hidden;
}
.progress-bar {
  height: 100%;
  background: var(--primary, #d97706);
  border-radius: 9999px;
  width: 0;
  transition: width 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ===================== Analytics Summary Grid ===================== */
.analytics-metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}
.analytics-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  transition: transform 0.2s, box-shadow 0.2s;
  text-align: start;
}
.analytics-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 15px -3px rgba(0,0,0,0.05);
}
.analytics-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.analytics-card__head .lbl {
  font-size: 13px;
  font-weight: 800;
  color: #4b5563;
}
.analytics-card__head .icon {
  font-size: 18px;
}
.analytics-card__val {
  font-size: 26px;
  font-weight: 900;
  color: #111827;
  line-height: 1.2;
}
.analytics-card__desc {
  margin-top: 6px;
  font-size: 11px;
  font-weight: 600;
  color: #9ca3af;
}

/* ===================== Settings Subtabs & Forms =====================
 *
 *   ┌──────────────────────────────────────────────────────────────┐
 *   │  [الموقع والهوية●] [ألوان الهوية] [خيارات العرض] [الفوتر] … │
 *   └──────────────────────────────────────────────────────────────┘
 *
 *  The active pill uses the admin-controlled brand color (--primary)
 *  with a soft drop-shadow + 1px lift, matching the storefront's
 *  cat-pill / shop-filter / order-pagination active states for visual
 *  consistency. ALL hex values are wrapped in `var(--primary, …)` so
 *  the dashboard inherits the brand color exactly like the rest of the
 *  site — no more amber-200 odd-one-out island.
 *
 *  Font family inherits from the theme's `--font-family` token so
 *  Cairo (Arabic) / Inter (English) / Heebo (Hebrew) all switch
 *  together with the storefront language toggle.
 * ----------------------------------------------------------------- */
.settings-subtabs {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid #e5e7eb;
  padding-bottom: 12px;
  margin-bottom: 20px;
  overflow-x: auto;
  scrollbar-width: none;
  font-family: var(--font-family, 'Cairo'), system-ui, -apple-system, 'Segoe UI', sans-serif;
}
.settings-subtabs::-webkit-scrollbar {
  display: none;
}
.settings-subtabs .subtab {
  background: #f9fafb;
  border: 1px solid transparent;
  color: #4b5563;
  padding: 10px 18px;
  border-radius: 999px;            /* full pill — matches storefront UI */
  font-family: inherit;
  font-weight: 800;
  font-size: 13.5px;
  line-height: 1;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.settings-subtabs .subtab:hover,
.settings-subtabs .subtab:focus-visible {
  background: color-mix(in srgb, var(--primary, #d97706) 8%, #f3f4f6);
  border-color: color-mix(in srgb, var(--primary, #d97706) 18%, transparent);
  color: var(--primary, #d97706);
  outline: none;
}
.settings-subtabs .subtab.is-active {
  background: var(--primary, #d97706);
  border-color: var(--primary, #d97706);
  color: #ffffff;
  box-shadow: 0 6px 16px -8px color-mix(in srgb, var(--primary, #d97706) 55%, transparent);
  transform: translateY(-1px);
}
.settings-subtabs .subtab.is-active:hover {
  /* Don't bounce on hover when already active — feels glitchy. */
  background: var(--primary-hover, color-mix(in srgb, var(--primary, #d97706) 88%, #000));
  border-color: var(--primary-hover, color-mix(in srgb, var(--primary, #d97706) 88%, #000));
  color: #ffffff;
}

.settings-subpanel {
  display: none;
  animation: fadeIn 0.22s cubic-bezier(0.22, 1, 0.36, 1);
}
.settings-subpanel.is-active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
 *  Mobile bottom navigation + categories bottom-sheet
 *
 *  Entire layer is hidden on desktop (≥1024px). On mobile:
 *    • .m-bottom-nav sits fixed at the viewport bottom with 5 thumb-friendly
 *      buttons (≥56px height, well above the 44pt / 48dp touch-target floor).
 *    • body gets padding-bottom so page content + footer scroll above the nav.
 *    • .share-fab is lifted above the nav so it never gets covered.
 *    • Cart / wishlist badges reuse the existing data-cart-count /
 *      data-wishlist-count selectors → no extra JS plumbing needed.
 * ========================================================================== */

/* Hide on desktop completely (we keep the desktop header untouched). */
.m-bottom-nav,
.m-cat-sheet { display: none; }

@media (max-width: 1023px) {
  /* Hide desktop header inner actions bar and desktop navigation strip on mobile to avoid overflow and preserve mobile viewport layout */
  .header__main-inner,
  .header__nav {
    display: none !important;
  }

  /* Body bottom padding so the fixed nav doesn't cover content / footer.
     Uses safe-area inset for notched phones; 72px is the nav height + a
     small breathing buffer for the focus ring. */
  body {
    padding-block-end: calc(72px + env(safe-area-inset-bottom));
  }

  /* Lift the share FAB above the mobile nav and WhatsApp/social bubble. */
  .share-fab {
    inset-block-end: calc(160px + env(safe-area-inset-bottom));
  }
  body.has-quick-cart .share-fab {
    inset-block-end: calc(224px + env(safe-area-inset-bottom));
  }

  /* ============================  Bottom nav  ============================ */

  .m-bottom-nav {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
    position: fixed;
    inset-inline: 0;
    inset-block-end: 0;
    z-index: 2147483640;            /* under modals (2147483647) + share FAB */
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: saturate(180%) blur(14px);
    -webkit-backdrop-filter: saturate(180%) blur(14px);
    border-block-start: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow: 0 -10px 24px -16px rgba(15, 23, 42, 0.18);
    padding-block: 6px;
    padding-block-end: calc(6px + env(safe-area-inset-bottom));
    padding-inline: 4px;
  }

  .m-nav-btn {
    appearance: none;
    background: transparent;
    border: 0;
    color: #6b7280;
    font: inherit;
    text-decoration: none;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    min-height: 56px;               /* thumb-friendly floor */
    padding: 6px 4px;
    border-radius: 12px;
    transition: color 0.16s ease, background 0.16s ease, transform 0.12s ease;
    position: relative;
    -webkit-tap-highlight-color: transparent;
  }
  .m-nav-btn:hover,
  .m-nav-btn:focus-visible {
    color: var(--primary, #d97706);
    background: color-mix(in srgb, var(--primary, #d97706) 8%, transparent);
    outline: none;
  }
  .m-nav-btn:active {
    transform: scale(0.96);
  }
  .m-nav-btn.is-active {
    color: var(--primary, #d97706);
  }
  /* Subtle "current-page" dot under the active item — modern app pattern. */
  .m-nav-btn.is-active::after {
    content: "";
    position: absolute;
    inset-block-start: 2px;
    inset-inline-start: 50%;
    transform: translateX(-50%);
    width: 18px;
    height: 3px;
    border-radius: 3px;
    background: var(--primary, #d97706);
  }
  [dir="rtl"] .m-nav-btn.is-active::after {
    transform: translateX(50%);
  }

  .m-nav-btn__icon {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
  }
  .m-nav-btn__icon svg {
    width: 24px;
    height: 24px;
    display: block;
  }
  .m-nav-btn__label {
    font-size: 10.5px;
    line-height: 1;
    font-weight: 700;
    white-space: nowrap;
    letter-spacing: 0.01em;
  }

  /* Cart + wishlist badge ride on top of the icon. */
  .m-nav-btn__badge {
    position: absolute;
    inset-block-start: -4px;
    inset-inline-end: -8px;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    border-radius: 999px;
    background: var(--primary, #d97706);
    color: #ffffff;
    font-size: 10px;
    font-weight: 800;
    line-height: 18px;
    text-align: center;
    box-shadow: 0 0 0 2px #ffffff;
  }
  .m-nav-btn__badge[hidden],
  .m-nav-btn__badge.hidden { display: none; }

  /* ============================  Cat sheet  ============================ */

  .m-cat-sheet {
    display: block;                 /* override the desktop "display:none" */
    position: fixed;
    inset: 0;
    z-index: 2147483647;            /* above share/WhatsApp floating widgets */
    pointer-events: none;
    visibility: hidden;
    transition: visibility 0s linear 0.28s;
  }
  .m-cat-sheet.is-open {
    pointer-events: auto;
    visibility: visible;
    transition: visibility 0s linear 0s;
  }

  .m-cat-sheet__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.42);
    opacity: 0;
    transition: opacity 0.24s ease;
  }
  .m-cat-sheet.is-open .m-cat-sheet__backdrop {
    opacity: 1;
  }

  .m-cat-sheet__panel {
    position: absolute;
    inset-inline: 0;
    inset-block-end: 0;
    max-height: 86vh;
    background: #ffffff;
    border-start-start-radius: 22px;
    border-start-end-radius: 22px;
    box-shadow: 0 -24px 48px -16px rgba(15, 23, 42, 0.32);
    display: flex;
    flex-direction: column;
    transform: translateY(100%);
    transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1);
    will-change: transform;
    padding-block-end: env(safe-area-inset-bottom);
  }
  .m-cat-sheet.is-open .m-cat-sheet__panel {
    transform: translateY(0);
  }

  .m-cat-sheet__handle {
    width: 44px;
    height: 4px;
    background: rgba(15, 23, 42, 0.18);
    border-radius: 999px;
    margin: 8px auto 4px;
    flex-shrink: 0;
  }

  .m-cat-sheet__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 16px 12px;
    border-block-end: 1px solid rgba(15, 23, 42, 0.06);
    flex-shrink: 0;
  }
  .m-cat-sheet__title {
    font-size: 1.05rem;
    font-weight: 900;
    color: #0f172a;
    margin: 0;
  }
  .m-cat-sheet__close {
    appearance: none;
    background: rgba(15, 23, 42, 0.05);
    border: 0;
    width: 36px;
    height: 36px;
    border-radius: 999px;
    color: #0f172a;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.16s ease, transform 0.12s ease;
  }
  .m-cat-sheet__close:hover,
  .m-cat-sheet__close:focus-visible {
    background: rgba(15, 23, 42, 0.1);
    outline: none;
  }
  .m-cat-sheet__close:active { transform: scale(0.94); }
  .m-cat-sheet__close svg { width: 18px; height: 18px; }

  .m-cat-sheet__body {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 12px 14px 18px;
    flex: 1 1 auto;
    overscroll-behavior: contain;     /* prevent body scroll bleed-through */
  }

  /* Reuse the .cat-pill design system from the desktop sidebar — it already
     handles RTL chevrons, active states, and the brand-color theme. */
  .m-cat-sheet__list {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }

  /* ----- Lifecycle state visibility (driven by data-state on sheet root) -- */
  .m-cat-sheet__skel,
  .m-cat-sheet__state { display: none; }

  .m-cat-sheet[data-state="ready"]   .m-cat-sheet__list  { display: flex; }
  .m-cat-sheet[data-state="loading"] .m-cat-sheet__skel  { display: flex; flex-direction: column; gap: 8px; }
  .m-cat-sheet[data-state="empty"]   [data-mcat-empty]   { display: flex; }
  .m-cat-sheet[data-state="error"]   [data-mcat-error]   { display: flex; }

  /* When NOT in ready state, hide the list. */
  .m-cat-sheet:not([data-state="ready"]) .m-cat-sheet__list { display: none; }

  /* ----- Loading skeleton ------------------------------------------------ */
  .m-cat-sheet__skel-pill {
    height: 52px;
    border-radius: 12px;
    background: linear-gradient(90deg, #f3f4f6 0%, #e5e7eb 50%, #f3f4f6 100%);
    background-size: 200% 100%;
    animation: m-skel-shimmer 1.4s ease-in-out infinite;
  }
  @keyframes m-skel-shimmer {
    0%   { background-position: -200% 0; }
    100% { background-position: 200% 0; }
  }

  /* ----- Empty / Error states (shared layout) --------------------------- */
  .m-cat-sheet__state {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 36px 20px 24px;
    gap: 6px;
  }
  .m-cat-sheet__state-icon {
    width: 64px;
    height: 64px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--primary, #d97706) 12%, #f9fafb);
    color: var(--primary, #d97706);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    margin-bottom: 4px;
  }
  .m-cat-sheet__state--error .m-cat-sheet__state-icon {
    background: #fef2f2;
    color: #b91c1c;
  }
  .m-cat-sheet__state-title {
    font-size: 1rem;
    font-weight: 800;
    color: #0f172a;
    margin: 0;
  }
  .m-cat-sheet__state-text {
    font-size: 0.85rem;
    color: #6b7280;
    line-height: 1.55;
    margin: 0 0 8px;
    max-width: 30ch;
  }
  .m-cat-sheet__state-cta {
    appearance: none;
    border: 0;
    cursor: pointer;
    background: var(--primary, #d97706);
    color: #ffffff;
    padding: 10px 18px;
    border-radius: 999px;
    font-weight: 800;
    font-size: 0.88rem;
    text-decoration: none;
    transition: transform 0.14s ease, box-shadow 0.16s ease, background 0.16s ease;
    margin-top: 4px;
  }
  .m-cat-sheet__state-cta:hover,
  .m-cat-sheet__state-cta:focus-visible {
    background: var(--primary-hover, var(--primary, #d97706));
    transform: translateY(-1px);
    box-shadow: 0 10px 20px -10px color-mix(in srgb, var(--primary, #d97706) 70%, transparent);
    outline: none;
  }

  /* ----- Body scroll lock while sheet is open --------------------------- */
  body.m-noscroll {
    overflow: hidden;
    touch-action: none;
  }

  /* Reduced motion: skip the slide animation but keep the sheet usable. */
  @media (prefers-reduced-motion: reduce) {
    .m-cat-sheet,
    .m-cat-sheet__panel,
    .m-cat-sheet__backdrop,
    .m-nav-btn,
    .m-cat-sheet__skel-pill { transition: none !important; animation: none !important; }
    .m-cat-sheet__panel { transform: translateY(0); }
    .m-cat-sheet:not(.is-open) .m-cat-sheet__panel { transform: translateY(100%); }
  }

  /* Very small phones (≤340px) — tighten labels so 5 buttons still fit. */
  @media (max-width: 340px) {
    .m-nav-btn__label { font-size: 10px; }
    .m-nav-btn__icon svg { width: 22px; height: 22px; }
  }
}

/* Print: never show the mobile nav even if @media print zooms below 1024px. */
@media print {
  .m-bottom-nav,
  .m-cat-sheet { display: none !important; }
}

/* ==========================================================================
 *  WooCommerce notice → modern toast-style alert
 *
 *  Woo renders status messages as `.woocommerce-message` (success),
 *  `.woocommerce-info` (info), and `.woocommerce-error` (error). The
 *  defaults are a thin gray pill with a colored underline — visually weak
 *  and inconsistent with the rest of the storefront's design system.
 *
 *  We give them a unified "modern alert" treatment:
 *    ┌─────────────────────────────────────────────────────┐
 *    │ ✓ │  تم تحديث تفاصيل الحساب بنجاح              ✕ │
 *    │   │  ▓▓▓▓▓▓▓░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ │ ← 4s timer
 *    └─────────────────────────────────────────────────────┘
 *
 *  Success notices auto-dismiss after 4s (see theme.js). Info / error
 *  notices stay until the user acknowledges them — too important to
 *  yank away while they're reading.
 * ========================================================================== */

.woocommerce-notices-wrapper {
  display: block;
  margin: 0 0 20px;
}
.woocommerce-notices-wrapper:empty { margin: 0; }

.woocommerce-message,
.woocommerce-info,
.woocommerce-error {
  /* Reset Woo's default chrome (underlines, list bullets, gray bg). */
  list-style: none !important;
  margin: 0 0 12px !important;
  padding: 14px 16px 14px 18px !important;
  border: 1px solid transparent !important;
  border-radius: 14px !important;
  background: #ffffff !important;
  background-image: none !important;
  box-shadow: 0 6px 20px -10px rgba(15, 23, 42, 0.18) !important;
  color: #111827 !important;
  font-weight: 700;
  font-size: 14.5px;
  line-height: 1.5;
  display: flex;
  align-items: center;
  gap: 12px;
  position: relative;
  overflow: hidden;
  animation: ar-alert-in 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Kill Woo's inline ::before checkmark — we render our own as a real
   icon chip with proper sizing. */
.woocommerce-message::before,
.woocommerce-info::before,
.woocommerce-error::before {
  content: "" !important;
  flex-shrink: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 36px !important;
  height: 36px !important;
  margin: 0 !important;
  padding: 0 !important;
  border-radius: 999px !important;
  background-color: currentColor;
  background-repeat: no-repeat !important;
  background-position: center !important;
  background-size: 20px 20px !important;
  color: inherit;
  font: inherit !important;
  line-height: 1 !important;
  text-indent: 0 !important;
  position: static !important;
  top: auto !important;
  left: auto !important;
  right: auto !important;
}

/* The actual list-item text (Woo wraps the message in <li>). */
.woocommerce-message > li,
.woocommerce-info > li,
.woocommerce-error > li {
  margin: 0;
  padding: 0;
  list-style: none;
  flex: 1 1 auto;
  min-width: 0;
}

/* Optional "view cart" / action link Woo sometimes appends. */
.woocommerce-message .button,
.woocommerce-info .button {
  margin-inline-start: 12px;
  font-size: 12.5px !important;
  padding: 6px 12px !important;
  border-radius: 8px !important;
}

/* ===== Success (green) ===== */
.woocommerce-message {
  background: linear-gradient(to var(--ar-alert-end, right), color-mix(in srgb, #10b981 8%, #ffffff) 0%, #ffffff 60%) !important;
  border-color: color-mix(in srgb, #10b981 30%, #ffffff) !important;
  color: #065f46 !important;
}
[dir="rtl"] .woocommerce-message { --ar-alert-end: left; }
.woocommerce-message::before {
  background-color: #10b981 !important;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='20 6 9 17 4 12'/%3e%3c/svg%3e") !important;
}

/* ===== Info (blue) ===== */
.woocommerce-info {
  background: linear-gradient(to var(--ar-alert-end, right), color-mix(in srgb, #3b82f6 8%, #ffffff) 0%, #ffffff 60%) !important;
  border-color: color-mix(in srgb, #3b82f6 30%, #ffffff) !important;
  color: #1e3a8a !important;
}
[dir="rtl"] .woocommerce-info { --ar-alert-end: left; }
.woocommerce-info::before {
  background-color: #3b82f6 !important;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3e%3ccircle cx='12' cy='12' r='10'/%3e%3cline x1='12' y1='8' x2='12' y2='12'/%3e%3cline x1='12' y1='16' x2='12.01' y2='16'/%3e%3c/svg%3e") !important;
}

/* ===== Error (red) ===== */
.woocommerce-error {
  background: linear-gradient(to var(--ar-alert-end, right), color-mix(in srgb, #ef4444 8%, #ffffff) 0%, #ffffff 60%) !important;
  border-color: color-mix(in srgb, #ef4444 30%, #ffffff) !important;
  color: #991b1b !important;
}
[dir="rtl"] .woocommerce-error { --ar-alert-end: left; }
.woocommerce-error::before {
  background-color: #ef4444 !important;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3e%3ccircle cx='12' cy='12' r='10'/%3e%3cline x1='12' y1='8' x2='12' y2='12'/%3e%3cline x1='12' y1='16' x2='12.01' y2='16'/%3e%3c/svg%3e") !important;
}

/* ===== Dismiss button (injected by JS into success notices) ===== */
.ar-alert__close {
  appearance: none;
  border: 0;
  background: transparent;
  color: currentColor;
  opacity: 0.55;
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  padding: 0;
  border-radius: 999px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.16s ease, background 0.16s ease;
}
.ar-alert__close:hover,
.ar-alert__close:focus-visible {
  opacity: 1;
  background: rgba(15, 23, 42, 0.08);
  outline: none;
}
.ar-alert__close svg { width: 14px; height: 14px; }

/* ===== Auto-dismiss progress bar (success only) =====
   When JS marks the notice with [data-ar-dismiss], a thin sliver at the
   bottom shrinks from 100%→0 width over the configured duration. Gives
   the user a "you have N seconds" cue instead of an abrupt disappearance. */
[data-ar-dismiss]::after {
  content: "";
  position: absolute;
  inset-block-end: 0;
  inset-inline-start: 0;
  height: 3px;
  width: 100%;
  background: currentColor;
  opacity: 0.4;
  transform-origin: inline-start;
  animation: ar-alert-progress var(--ar-alert-duration, 4000ms) linear forwards;
}

/* ===== Animations ===== */
@keyframes ar-alert-in {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes ar-alert-out {
  to {
    opacity: 0;
    transform: translateY(-10px);
    max-height: 0;
    margin-block: 0 !important;
    padding-block: 0 !important;
    border-width: 0 !important;
  }
}
@keyframes ar-alert-progress {
  to { transform: scaleX(0); }
}
.ar-alert-leaving {
  animation: ar-alert-out 0.28s ease-in forwards !important;
  overflow: hidden;
}

/* Reduced motion: skip animations + skip the timer bar (let JS still
   auto-dismiss, but without the visual countdown). */
@media (prefers-reduced-motion: reduce) {
  .woocommerce-message,
  .woocommerce-info,
  .woocommerce-error,
  [data-ar-dismiss]::after,
  .ar-alert-leaving {
    animation: none !important;
  }
}
