/* ==========================================================================
   Premium Arabic/English theme for YouCan — design system
   1rem = 10px (inherited from the base stylesheet).
   Everything is driven by the --px-* tokens below. Five palettes are built in;
   pick one in Theme settings > Colours, or choose "Custom" to use your own.
   Layout uses logical properties only, so RTL (Arabic) and LTR (English)
   share the same rules.
   ========================================================================== */

/* ------------------------------------------------------------ 1. Palettes */
:root,
html[data-palette='blue'] {
  --px-primary: #0b3d91;
  --px-primary-rgb: 11, 61, 145;
  --px-on-primary: #ffffff;
  --px-on-primary-rgb: 255, 255, 255;
  --px-accent: #2f7bf6;
  --px-accent-rgb: 47, 123, 246;
  --px-accent-soft: #e6f0ff;
  --px-bg: #ffffff;
  --px-bg-rgb: 255, 255, 255;
  --px-surface: #f3f7fe;
  --px-card: #ffffff;
  --px-text: #0d1b2e;
  --px-text-rgb: 13, 27, 46;
  --px-muted: #56657c;
  --px-border: #dce6f4;
  --px-sale: #1463ff;
  --px-on-sale: #ffffff;
  --px-announce-bg: #0b3d91;
  --px-announce-fg: #ffffff;
  --px-footer-bg: #071f4d;
  --px-footer-fg: #e8effb;
  --px-footer-fg-rgb: 232, 239, 251;

  --px-radius-card: 16px;
  --px-radius-btn: 12px;
  --px-radius-input: 12px;
  --px-radius-badge: 999px;
  --px-heading-weight: 700;
  --px-heading-tracking: -0.02em;
  --px-btn-transform: none;
  --px-btn-tracking: 0;
  --px-shadow-card: 0 1px 2px rgba(var(--px-primary-rgb), 0.06), 0 12px 28px -14px rgba(var(--px-primary-rgb), 0.22);
  --px-shadow-pop: 0 24px 48px -20px rgba(var(--px-primary-rgb), 0.35);
  --px-card-border: 1px solid var(--px-border);
  --px-title-rule: none;
}

html[data-palette='black'] {
  --px-primary: #111111;
  --px-primary-rgb: 17, 17, 17;
  --px-on-primary: #ffffff;
  --px-on-primary-rgb: 255, 255, 255;
  --px-accent: #8a8f98;
  --px-accent-rgb: 138, 143, 152;
  --px-accent-soft: #f1f2f4;
  --px-bg: #ffffff;
  --px-bg-rgb: 255, 255, 255;
  --px-surface: #f6f6f7;
  --px-card: #ffffff;
  --px-text: #111111;
  --px-text-rgb: 17, 17, 17;
  --px-muted: #62666d;
  --px-border: #e4e5e8;
  --px-sale: #111111;
  --px-on-sale: #ffffff;
  --px-announce-bg: #111111;
  --px-announce-fg: #ffffff;
  --px-footer-bg: #111111;
  --px-footer-fg: #f2f2f2;
  --px-footer-fg-rgb: 242, 242, 242;

  --px-radius-card: 0px;
  --px-radius-btn: 0px;
  --px-radius-input: 0px;
  --px-radius-badge: 0px;
  --px-heading-weight: 600;
  --px-heading-tracking: 0.01em;
  --px-btn-transform: uppercase;
  --px-btn-tracking: 0.12em;
  --px-shadow-card: none;
  --px-shadow-pop: 0 24px 48px -24px rgba(0, 0, 0, 0.35);
  --px-card-border: 1px solid var(--px-border);
  --px-title-rule: none;
}

html[data-palette='navy_gold'] {
  --px-primary: #0f1e3d;
  --px-primary-rgb: 15, 30, 61;
  --px-on-primary: #ffffff;
  --px-on-primary-rgb: 255, 255, 255;
  --px-accent: #c5a04a;
  --px-accent-rgb: 197, 160, 74;
  --px-accent-soft: #f4ecd8;
  --px-bg: #fbf8f2;
  --px-bg-rgb: 251, 248, 242;
  --px-surface: #f4eee2;
  --px-card: #ffffff;
  --px-text: #14203a;
  --px-text-rgb: 20, 32, 58;
  --px-muted: #636977;
  --px-border: #e6decd;
  --px-sale: #c5a04a;
  --px-on-sale: #0f1e3d;
  --px-announce-bg: #0f1e3d;
  --px-announce-fg: #ecdcb0;
  --px-footer-bg: #0b1630;
  --px-footer-fg: #efe7d3;
  --px-footer-fg-rgb: 239, 231, 211;

  --px-radius-card: 6px;
  --px-radius-btn: 4px;
  --px-radius-input: 4px;
  --px-radius-badge: 2px;
  --px-heading-weight: 600;
  --px-heading-tracking: 0;
  --px-btn-transform: none;
  --px-btn-tracking: 0.03em;
  --px-shadow-card: 0 14px 32px -18px rgba(var(--px-primary-rgb), 0.3);
  --px-shadow-pop: 0 28px 56px -24px rgba(var(--px-primary-rgb), 0.45);
  --px-card-border: 1px solid var(--px-border);
  --px-title-rule: block;
}

html[data-palette='emerald'] {
  --px-primary: #0a5c44;
  --px-primary-rgb: 10, 92, 68;
  --px-on-primary: #ffffff;
  --px-on-primary-rgb: 255, 255, 255;
  --px-accent: #c9a85c;
  --px-accent-rgb: 201, 168, 92;
  --px-accent-soft: #e4f2ec;
  --px-bg: #ffffff;
  --px-bg-rgb: 255, 255, 255;
  --px-surface: #f1f7f4;
  --px-card: #ffffff;
  --px-text: #0e2a21;
  --px-text-rgb: 14, 42, 33;
  --px-muted: #516a61;
  --px-border: #d8e7e0;
  --px-sale: #c9a85c;
  --px-on-sale: #0e2a21;
  --px-announce-bg: #0a5c44;
  --px-announce-fg: #ffffff;
  --px-footer-bg: #073f2f;
  --px-footer-fg: #e3f1eb;
  --px-footer-fg-rgb: 227, 241, 235;

  --px-radius-card: 22px;
  --px-radius-btn: 999px;
  --px-radius-input: 14px;
  --px-radius-badge: 999px;
  --px-heading-weight: 700;
  --px-heading-tracking: -0.01em;
  --px-btn-transform: none;
  --px-btn-tracking: 0;
  --px-shadow-card: 0 14px 34px -18px rgba(var(--px-primary-rgb), 0.28);
  --px-shadow-pop: 0 28px 56px -24px rgba(var(--px-primary-rgb), 0.4);
  --px-card-border: 1px solid transparent;
  --px-title-rule: none;
}

html[data-palette='charcoal'] {
  --px-primary: #2a2a2d;
  --px-primary-rgb: 42, 42, 45;
  --px-on-primary: #f6f0e6;
  --px-on-primary-rgb: 246, 240, 230;
  --px-accent: #b99a63;
  --px-accent-rgb: 185, 154, 99;
  --px-accent-soft: #ede3d1;
  --px-bg: #f6f0e6;
  --px-bg-rgb: 246, 240, 230;
  --px-surface: #efe7d9;
  --px-card: #fbf7f0;
  --px-text: #262628;
  --px-text-rgb: 38, 38, 40;
  --px-muted: #68635b;
  --px-border: #e0d5c2;
  --px-sale: #2a2a2d;
  --px-on-sale: #ebd9b4;
  --px-announce-bg: #2a2a2d;
  --px-announce-fg: #ebd9b4;
  --px-footer-bg: #232325;
  --px-footer-fg: #efe6d6;
  --px-footer-fg-rgb: 239, 230, 214;

  --px-radius-card: 10px;
  --px-radius-btn: 8px;
  --px-radius-input: 8px;
  --px-radius-badge: 4px;
  --px-heading-weight: 500;
  --px-heading-tracking: 0.005em;
  --px-btn-transform: none;
  --px-btn-tracking: 0.02em;
  --px-shadow-card: 0 12px 28px -18px rgba(var(--px-primary-rgb), 0.3);
  --px-shadow-pop: 0 28px 56px -24px rgba(var(--px-primary-rgb), 0.4);
  --px-card-border: 1px solid var(--px-border);
  --px-title-rule: none;
}

html[data-palette='custom'] {
  --px-footer-fg-rgb: var(--px-on-primary-rgb);
}

/* Shape override (Theme settings > Colours > Shape) */
html[data-shape='sharp'] {
  --px-radius-card: 0px;
  --px-radius-btn: 0px;
  --px-radius-input: 0px;
  --px-radius-badge: 0px;
}
html[data-shape='soft'] {
  --px-radius-card: 12px;
  --px-radius-btn: 10px;
  --px-radius-input: 10px;
  --px-radius-badge: 6px;
}
html[data-shape='round'] {
  --px-radius-card: 24px;
  --px-radius-btn: 999px;
  --px-radius-input: 16px;
  --px-radius-badge: 999px;
}

/* ---------------------------------------- 2. Bridge to the base variables */
:root {
  --px-max: 1280px;
  --px-gutter: clamp(16px, 4vw, 40px);
  --px-header-h: 64px;
  --px-ease: cubic-bezier(0.2, 0.7, 0.2, 1);

  --color-primary: var(--px-text-rgb);
  --color-secondary: var(--px-bg);
  --color-base-white: #fff;
  --color-base-black: #121212;
  --color-gray-50: #f3f3f3;
  --color-gray-300: #dcdcdc;
  --color-gray-500: #535151;
  --color-yellow-50: #fff5dc;
  --color-yellow-500: #faab00;
  --color-info-50: #ddeefd;
  --color-info-500: #335cff;
  --color-error-50: #ffe0e0;
  --color-error-500: #d92d20;
  --color-warning-50: #ffaa00;
  --color-warning-500: #ff9147;
  --color-success-50: #d0f0e1;
  --color-success-500: #178c4e;

  --color-button: var(--px-primary-rgb);
  --color-button-text: var(--px-on-primary-rgb);
  --color-secondary-button: var(--px-primary-rgb);

  --text-xs: 1.2rem;
  --text-sm: 1.3rem;
  --text-md: 1.4rem;
  --text-lg: 1.6rem;
  --text-xl: 1.8rem;
  --text-2xl: 2.4rem;
  --text-3xl: 3rem;

  --gap-2xs: 2px;
  --gap-xs: 3px;
  --gap-sm: 5px;
  --gap-md: 8px;
  --gap-lg: 16px;
  --gap-xl: 25px;
  --gap-2xl: 32px;
  --gap-3xl: 48px;

  --radius-sm: 0.5em;
  --radius-md: 0.7em;
  --radius-lg: 1em;
  --radius-xl: 1.5em;
  --radius-2xl: 2em;
  --radius-circle: 50%;

  --media-blur: blur(1px);
  --media-background: #0000001a;
  --overlay-blur: blur(2px);
  --overlay-background: rgba(0, 0, 0, 0.35);
  --shadow-dark-sm: rgba(0, 0, 0, 0.03) 0 3px 14px 0, rgba(0, 0, 0, 0.1) 0 0 0 1px;
  --shadow-dark-focus-sm: rgba(0, 0, 0, 0.03) 0 3px 14px 0, var(--color-gray-500) 0 0 0 1px;
  --transition-duration-fast: 0.1s;
  --transition-duration-normal: 0.3s;
  --transition-duration-slow: 0.4s;

  --button-border-radius: var(--px-radius-btn);
  --input-border-radius: var(--px-radius-input);
  --modal-border-radius: var(--px-radius-card);
  --drawer-border-radius: var(--px-radius-card);
  --toast-border-radius: var(--px-radius-input);
  --product-card-border-radius: var(--px-radius-card);
  --collection-card-border-radius: var(--px-radius-card);
  --column-card-border-radius: var(--px-radius-card);
  --review-card-border-radius: var(--px-radius-card);
  --badge-text-color: var(--px-on-sale);
  --badge-bg-color: var(--px-sale);
}

/* ----------------------------------------------------------------- 3. Base */
html { overflow-x: clip; }
.px-body {
  background-color: var(--px-bg);
  color: var(--px-text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
.px-body ::selection {
  background: var(--px-primary);
  color: var(--px-on-primary);
}
.px-body #youcan-section--announcement-bar { order: 1; }
.px-body #youcan-section--header { order: 2; }
.px-body #youcan-section--header:has([data-sticky]) {
  position: sticky;
  inset-block-start: 0;
  z-index: 40;
}
.px-body h1, .px-body h2, .px-body h3, .px-body h4,
.px-body .h1, .px-body .h2, .px-body .h3, .px-body .h4 {
  font-weight: var(--px-heading-weight);
  letter-spacing: var(--px-heading-tracking);
  line-height: 1.2;
  text-wrap: balance;
}
html[lang='ar'] .px-body h1, html[lang='ar'] .px-body h2, html[lang='ar'] .px-body h3,
html[lang='ar'] .px-body .h1, html[lang='ar'] .px-body .h2, html[lang='ar'] .px-body .h3 {
  letter-spacing: 0;
  line-height: 1.4;
}
html[lang='ar'] .px-body { --px-btn-tracking: 0; }

.px-container {
  width: 100%;
  max-width: calc(var(--px-max) + 2 * var(--px-gutter));
  margin-inline: auto;
  padding-inline: var(--px-gutter);
}
.px-icon { flex: none; display: block; }
[dir='rtl'] .px-icon--dir { transform: scaleX(-1); }
.px-visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* Focus: one visible ring everywhere */
.px-body a:focus-visible, .px-body button:focus-visible, .px-body summary:focus-visible,
.px-body input:focus-visible, .px-body textarea:focus-visible, .px-body select:focus-visible {
  outline: 2px solid var(--px-accent);
  outline-offset: 2px;
}

/* Section colour schemes — shared by this theme's sections and the base sections */
.px-section,
.px-body yc-section {
  --px-s-bg: var(--px-bg);
  --px-s-fg: var(--px-text);
  --px-s-fg-rgb: var(--px-text-rgb);
  --px-s-muted: var(--px-muted);
  --px-s-border: var(--px-border);
  --px-s-card: var(--px-card);
  --px-s-btn-bg: var(--px-primary);
  --px-s-btn-fg: var(--px-on-primary);
}
.px-section[data-scheme='surface'], .px-body yc-section[data-scheme='surface'] { --px-s-bg: var(--px-surface); }
.px-section[data-scheme='accent'], .px-body yc-section[data-scheme='accent'] { --px-s-bg: var(--px-accent-soft); }
.px-section[data-scheme='primary'], .px-body yc-section[data-scheme='primary'] {
  --px-s-bg: var(--px-primary);
  --px-s-fg: var(--px-on-primary);
  --px-s-fg-rgb: var(--px-on-primary-rgb);
  --px-s-muted: color-mix(in srgb, var(--px-on-primary) 78%, var(--px-primary));
  --px-s-border: color-mix(in srgb, var(--px-on-primary) 22%, var(--px-primary));
  --px-s-card: color-mix(in srgb, var(--px-on-primary) 9%, var(--px-primary));
  --px-s-btn-bg: var(--px-on-primary);
  --px-s-btn-fg: var(--px-primary);
}
.px-body yc-section {
  --section-bg-color: var(--px-s-bg);
  --section-text-color: var(--px-s-fg-rgb);
  padding-inline: max(var(--px-gutter), calc((100% - var(--px-max)) / 2));
}
.px-section {
  background-color: var(--px-s-bg);
  color: var(--px-s-fg);
  padding-block: var(--px-space-top, 60px) var(--px-space-bottom, 60px);
}
@media (max-width: 768px) {
  .px-section {
    padding-block: calc(var(--px-space-top, 60px) * 0.7) calc(var(--px-space-bottom, 60px) * 0.7);
  }
}
.px-section a, .px-header a, .px-footer a, .px-announce a { font-size: inherit; color: inherit; }
.px-section p, .px-section li { font-size: 1.6rem; }

/* Buttons */
.px-btn,
.px-body button.px-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 12px 26px;
  border-radius: var(--px-radius-btn);
  border: 1.5px solid transparent;
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: var(--px-btn-tracking);
  text-transform: var(--px-btn-transform);
  text-align: center;
  cursor: pointer;
  transition: transform 0.25s var(--px-ease), box-shadow 0.25s var(--px-ease), background-color 0.2s, color 0.2s, border-color 0.2s;
}
.px-section .px-btn--primary, .px-btn--primary {
  background: var(--px-s-btn-bg, var(--px-primary));
  color: var(--px-s-btn-fg, var(--px-on-primary));
  border-color: var(--px-s-btn-bg, var(--px-primary));
}
.px-btn--primary:hover {
  transform: translateY(-1px);
  box-shadow: var(--px-shadow-pop);
}
.px-section .px-btn--ghost, .px-btn--ghost {
  background: transparent;
  color: var(--px-s-fg, var(--px-text));
  border-color: color-mix(in srgb, var(--px-s-fg, var(--px-text)) 35%, transparent);
}
.px-btn--ghost:hover { border-color: var(--px-s-fg, var(--px-text)); }
.px-btn--block { width: 100%; }
.px-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  border-block-end: 1.5px solid currentColor;
  padding-block-end: 2px;
}
.px-link .px-icon { transition: transform 0.25s var(--px-ease); }
.px-link:hover .px-icon { transform: translateX(4px); }
[dir='rtl'] .px-link:hover .px-icon { transform: scaleX(-1) translateX(4px); }

.px-iconbtn,
.px-body button.px-iconbtn {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: var(--px-radius-btn);
  background: transparent;
  color: inherit;
  cursor: pointer;
}
.px-iconbtn:hover { background: color-mix(in srgb, currentColor 8%, transparent); }

/* Base buttons re-skinned with the palette */
.px-body button.primary,
.px-body .yc-btn.primary {
  min-height: 48px;
  font-weight: 600;
  font-size: 1.5rem;
  letter-spacing: var(--px-btn-tracking);
  text-transform: var(--px-btn-transform);
  background-color: var(--px-primary);
  color: var(--px-on-primary);
  border: 1.5px solid var(--px-primary);
}
.px-body button.primary:hover:not(:disabled),
.px-body .yc-btn.primary:hover:not(:disabled) {
  opacity: 1;
  box-shadow: var(--px-shadow-pop);
}
.px-body button.secondary,
.px-body .yc-btn.secondary {
  min-height: 44px;
  font-weight: 600;
  letter-spacing: var(--px-btn-tracking);
  text-transform: var(--px-btn-transform);
  color: var(--px-primary);
  background: transparent;
  border: 1.5px solid color-mix(in srgb, var(--px-primary) 30%, transparent);
}
.px-body button.secondary:hover:not(:disabled),
.px-body .yc-btn.secondary:hover:not(:disabled) {
  color: var(--px-on-primary);
  background: var(--px-primary);
  border-color: var(--px-primary);
}
.px-body yc-section[data-scheme='primary'] button.primary,
.px-body yc-section[data-scheme='primary'] .yc-btn.primary {
  background: var(--px-on-primary);
  color: var(--px-primary);
  border-color: var(--px-on-primary);
}
.px-body yc-section[data-scheme='primary'] button.secondary,
.px-body yc-section[data-scheme='primary'] .yc-btn.secondary {
  color: var(--px-on-primary);
  border-color: color-mix(in srgb, var(--px-on-primary) 45%, transparent);
}

/* Inputs */
.px-body select,
.px-body textarea,
.px-body input:not([type='checkbox']):not([type='radio']):not([type='file']):not([type='search']):not([type='range']) {
  border-radius: var(--px-radius-input);
  border: 1px solid var(--px-s-border, var(--px-border));
  background-color: var(--px-s-card, var(--px-card));
}

/* Editor-only note */
.px-hint {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  margin-block: 16px;
  padding: 14px 18px;
  border: 1.5px dashed color-mix(in srgb, var(--px-s-fg, var(--px-text)) 35%, transparent);
  border-radius: 10px;
  font-size: 1.4rem;
  color: var(--px-s-fg, var(--px-text));
}

/* -------------------------------------------------------- 4. Announcement */
.px-announce {
  background: var(--px-announce-bg);
  color: var(--px-announce-fg);
  font-size: 1.3rem;
  font-weight: 500;
  letter-spacing: 0.02em;
}
.px-announce__inner {
  display: grid;
  min-height: 38px;
  align-items: center;
  text-align: center;
}
.px-announce__item {
  grid-area: 1 / 1;
  padding-block: 8px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s, visibility 0.5s;
}
.px-announce__item.is-active { opacity: 1; visibility: visible; }
.px-announce a { text-decoration: underline; text-underline-offset: 3px; }

/* ----------------------------------------------------------------- 5. Header */
.px-header {
  position: relative;
  isolation: isolate;
  border-block-end: 1px solid var(--px-border);
  color: var(--px-text);
}
/* The frosted background lives on a pseudo-element: a backdrop-filter on the header itself
   would trap the fixed-position menu and cart drawers inside the header box. */
.px-header::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: color-mix(in srgb, var(--px-bg) 92%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  backdrop-filter: saturate(1.4) blur(14px);
}
.px-header__main {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px 28px;
  min-height: var(--px-header-h);
  padding-block: 8px;
}
.px-header__burger { display: none; }
.px-logo {
  display: inline-flex;
  align-items: center;
  font-size: 2.2rem !important;
  font-weight: var(--px-heading-weight);
  letter-spacing: var(--px-heading-tracking);
  color: var(--px-primary) !important;
  line-height: 1;
}
.px-logo img {
  width: var(--px-logo-width, 120px);
  height: auto;
  max-height: 48px;
  object-fit: contain;
}
.px-search {
  display: flex;
  align-items: center;
  width: 100%;
  max-width: 520px;
  justify-self: center;
  border: 1px solid var(--px-border);
  border-radius: var(--px-radius-btn);
  background: var(--px-surface);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.px-search:focus-within {
  border-color: var(--px-primary);
  box-shadow: 0 0 0 3px rgba(var(--px-primary-rgb), 0.12);
}
.px-body .px-search input[type='search'] {
  flex: 1;
  min-width: 0;
  height: 44px;
  padding-inline: 16px 4px;
  border: 0;
  background: transparent;
  color: var(--px-text);
  font-size: 1.5rem;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}
.px-search input::placeholder { color: var(--px-muted); }
.px-body .px-search button {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  background: transparent;
  color: var(--px-primary);
}
.px-header__actions {
  display: flex;
  align-items: center;
  gap: 4px;
  justify-self: end;
}
/* cart button + cart drawer (base components) */
.px-header {
  --header-bg-color: var(--px-bg);
  --header-text-color: var(--px-text-rgb);
}
.px-body .px-header yc-drawer#cart .cart-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 8px 10px;
  border: 0;
  border-radius: var(--px-radius-btn);
  background: transparent;
  color: var(--px-text);
}
.px-body .px-header yc-drawer#cart .cart-btn:hover { background: color-mix(in srgb, currentColor 8%, transparent); }
.px-header yc-drawer#cart .cart-btn svg { width: 22px; height: 22px; }
.px-header yc-drawer#cart .cart-btn .total-items {
  position: absolute;
  inset-block-start: 2px;
  inset-inline-start: 22px;
  min-width: 18px;
  height: 18px;
  padding-inline: 5px;
  border-radius: 999px;
  background: var(--px-primary);
  color: var(--px-on-primary);
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
}
.px-header yc-drawer#cart .cart-btn .total-items[hidden] { display: none; }
.px-header yc-drawer#cart .cart-btn .total-amount {
  font-size: 1.4rem;
  font-weight: 600;
  white-space: nowrap;
}
.px-body .cart-drawer { background: var(--px-bg); color: var(--px-text); }

/* Language selector */
.px-lang--toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 8px 12px;
  border-radius: var(--px-radius-btn);
  font-size: 1.4rem !important;
  font-weight: 600;
  white-space: nowrap;
}
.px-lang--toggle:hover { background: color-mix(in srgb, currentColor 8%, transparent); }
.px-lang--menu { position: relative; }
.px-lang--menu summary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 8px 12px;
  border-radius: var(--px-radius-btn);
  font-size: 1.4rem;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}
.px-lang--menu summary::-webkit-details-marker { display: none; }
.px-lang--menu ul {
  position: absolute;
  inset-block-start: calc(100% + 6px);
  inset-inline-end: 0;
  z-index: 5;
  min-width: 160px;
  padding: 6px;
  background: var(--px-card);
  border: 1px solid var(--px-border);
  border-radius: var(--px-radius-input);
  box-shadow: var(--px-shadow-pop);
}
.px-lang--menu ul a {
  display: block;
  padding: 10px 12px;
  border-radius: calc(var(--px-radius-input) * 0.6);
  font-size: 1.4rem;
}
.px-lang--menu ul a:hover, .px-lang--menu ul a[aria-current] { background: var(--px-surface); }
.px-lang--list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.px-lang__pill {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 6px 16px;
  border: 1px solid color-mix(in srgb, currentColor 30%, transparent);
  border-radius: var(--px-radius-badge);
  font-size: 1.4rem !important;
  font-weight: 500;
}
.px-lang--list { --px-pill-on-bg: var(--px-text); --px-pill-on-fg: var(--px-bg); }
.px-footer .px-lang--list { --px-pill-on-bg: var(--px-footer-fg); --px-pill-on-fg: var(--px-footer-bg); }
.px-lang__pill[aria-current] {
  background: var(--px-pill-on-bg);
  border-color: var(--px-pill-on-bg);
  color: var(--px-pill-on-fg) !important;
}

/* Desktop navigation */
.px-nav { border-block-start: 1px solid var(--px-border); }
.px-nav__list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0 6px;
}
.px-nav__item { position: relative; }
.px-nav__item > a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 13px 14px;
  font-size: 1.45rem !important;
  font-weight: 500;
  color: var(--px-text) !important;
  position: relative;
}
.px-nav__item > a::after {
  content: '';
  position: absolute;
  inset-inline: 14px;
  inset-block-end: 6px;
  height: 2px;
  background: var(--px-accent);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.3s var(--px-ease);
}
.px-nav__item > a:hover::after, .px-nav__item > a[aria-current]::after { transform: scaleX(1); }
.px-nav__sub {
  position: absolute;
  inset-block-start: 100%;
  inset-inline-start: 0;
  z-index: 5;
  min-width: 220px;
  padding: 8px;
  background: var(--px-card);
  border: 1px solid var(--px-border);
  border-radius: var(--px-radius-input);
  box-shadow: var(--px-shadow-pop);
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: opacity 0.2s, transform 0.2s, visibility 0.2s;
}
.px-nav__item:hover .px-nav__sub, .px-nav__item:focus-within .px-nav__sub {
  opacity: 1;
  visibility: visible;
  transform: none;
}
.px-nav__sub a {
  display: block;
  padding: 10px 12px;
  border-radius: calc(var(--px-radius-input) * 0.6);
  font-size: 1.4rem !important;
}
.px-nav__sub a:hover { background: var(--px-surface); }

/* Drawers (menu + cart): keep the off-screen panel from widening the page, in RTL and LTR */
.px-body yc-drawer .drawer-container {
  position: fixed;
  inset: 0;
  z-index: 100;
  overflow: hidden;
  contain: paint;
  pointer-events: none;
}
.px-body yc-drawer[data-hidden='false'] .drawer-container { pointer-events: auto; }
.px-body yc-drawer#menu { --drawer-width: min(88vw, 380px); }
.px-body yc-drawer .drawer-box { background: var(--px-bg); color: var(--px-text); }
.px-drawer {
  display: flex;
  flex-direction: column;
  gap: 18px;
  width: 100%;
  height: 100%;
  padding: 18px;
  background: var(--px-bg);
  color: var(--px-text);
  overflow-y: auto;
}
.px-drawer__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.px-search--drawer { max-width: none; }
.px-drawer__nav > li { border-block-end: 1px solid var(--px-border); }
.px-drawer__nav a, .px-drawer__nav summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 52px;
  font-size: 1.6rem !important;
  font-weight: 500;
  color: var(--px-text) !important;
  cursor: pointer;
  list-style: none;
}
.px-drawer__nav summary::-webkit-details-marker { display: none; }
.px-drawer__nav details[open] summary .px-icon { transform: rotate(180deg); }
.px-drawer__nav details ul { padding-inline-start: 14px; padding-block-end: 8px; }
.px-drawer__nav details ul a { min-height: 42px; font-size: 1.5rem !important; font-weight: 400; color: var(--px-muted) !important; }
.px-drawer__foot {
  margin-block-start: auto;
  display: grid;
  gap: 14px;
  padding-block-start: 14px;
}
.px-drawer__account {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  font-size: 1.5rem !important;
  font-weight: 500;
}

@media (max-width: 960px) {
  .px-header__burger { display: block; }
  .px-nav, .px-header__search, .px-header__account { display: none; }
  .px-header__main {
    grid-template-columns: 1fr auto 1fr;
    gap: 8px;
    padding-inline: 8px;
  }
  .px-header__burger { justify-self: start; }
  .px-header__logo { justify-self: center; }
  .px-header[data-logo-position='start'] .px-header__main { grid-template-columns: auto 1fr auto; }
  .px-header[data-logo-position='start'] .px-header__logo { justify-self: start; }
  .px-logo { font-size: 1.9rem !important; }
  .px-logo img { max-height: 38px; max-width: 34vw; }
  .px-header yc-drawer#cart .cart-btn .total-amount { display: none; }
  .px-lang--toggle { padding-inline: 8px; }
  .px-lang--toggle .px-icon { display: none; }
}

/* App-style bottom bar (phones) */
.px-tabbar { display: none; }
@media (max-width: 768px) {
  .px-tabbar {
    position: fixed;
    inset-inline: 0;
    inset-block-end: 0;
    z-index: 30;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    padding-block-end: env(safe-area-inset-bottom);
    background: color-mix(in srgb, var(--px-bg) 94%, transparent);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    border-block-start: 1px solid var(--px-border);
  }
  .px-tabbar a, .px-body .px-tabbar button {
    display: grid;
    justify-items: center;
    gap: 2px;
    padding: 8px 4px 6px;
    border: 0;
    border-radius: 0;
    background: transparent;
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--px-muted);
  }
  .px-tabbar a[aria-current] { color: var(--px-primary); }
  .px-body:has(.px-tabbar) { padding-block-end: calc(58px + env(safe-area-inset-bottom)); }
}

/* ----------------------------------------------------------------- 6. Footer */
.px-footer {
  background: var(--px-footer-bg);
  color: var(--px-footer-fg);
  padding-block-start: clamp(40px, 6vw, 72px);
}
.px-footer__grid {
  display: grid;
  grid-template-columns: minmax(240px, 1.4fr) repeat(auto-fit, minmax(150px, 1fr));
  gap: 36px 48px;
  padding-block-end: clamp(32px, 5vw, 56px);
}
.px-footer .px-logo { color: var(--px-footer-fg) !important; }
.px-footer__about {
  margin-block-start: 14px;
  max-width: 38ch;
  font-size: 1.45rem;
  color: rgba(var(--px-footer-fg-rgb), 0.75);
}
.px-footer__title {
  margin-block-end: 14px;
  font-size: 1.3rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--px-accent);
}
html[lang='ar'] .px-footer__title { letter-spacing: 0; font-size: 1.5rem; }
html[data-palette='blue'] .px-footer__title { color: #9cc3ff; }
html[data-palette='black'] .px-footer__title { color: #b9bdc4; }
.px-footer__col ul { display: grid; gap: 10px; }
.px-footer__col li { font-size: 1.45rem; }
.px-footer__col a { color: rgba(var(--px-footer-fg-rgb), 0.82) !important; }
.px-footer__col a:hover { color: var(--px-footer-fg) !important; text-decoration: underline; text-underline-offset: 3px; }
.px-footer__contact li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: rgba(var(--px-footer-fg-rgb), 0.82);
}
.px-footer__contact .px-icon { margin-block-start: 4px; }
.px-social { display: flex; flex-wrap: wrap; gap: 8px; margin-block-start: 18px; }
.px-social a {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: var(--px-radius-btn);
  border: 1px solid color-mix(in srgb, currentColor 25%, transparent);
  transition: background-color 0.2s, color 0.2s;
}
.px-social a svg { width: 18px; height: 18px; }
.px-footer .px-social a:hover { background: var(--px-footer-fg); color: var(--px-footer-bg) !important; }
.px-footer__bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px 24px;
  padding-block: 20px;
  border-block-start: 1px solid rgba(var(--px-footer-fg-rgb), 0.16);
}
.px-footer__copy { font-size: 1.3rem; color: rgba(var(--px-footer-fg-rgb), 0.7); }
.px-footer__cod {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 1.3rem;
  font-weight: 500;
}
@media (max-width: 640px) {
  .px-footer__grid { grid-template-columns: 1fr 1fr; gap: 32px 20px; }
  .px-footer__brand { grid-column: 1 / -1; }
  .px-footer__bottom { flex-direction: column; align-items: flex-start; }
}

/* -------------------------------------------------- 7. Cards (base components) */
.px-body .product-card {
  --product-card-background: var(--px-s-card, var(--px-card));
  --product-card-border-color: var(--px-s-border, var(--px-border));
  --product-card-border: var(--px-card-border);
  background: var(--product-card-background);
  border: var(--px-card-border);
  border-radius: var(--px-radius-card);
  overflow: hidden;
  height: 100%;
  display: flex;
  flex-direction: column;
  transition: transform 0.35s var(--px-ease), box-shadow 0.35s var(--px-ease);
}
html[data-palette='emerald'] .px-body .product-card { box-shadow: var(--px-shadow-card); }
.px-body .product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--px-shadow-card);
}
.px-body .product-card[data-style$='standard'] { border: var(--px-card-border); }
.px-body .product-card .img-link {
  display: block;
  border: 0 !important;
  background: var(--px-surface);
}
.px-body .product-card .img-link img {
  border-radius: 0;
  transition: transform 0.6s var(--px-ease);
}
.px-body .product-card:hover .img-link img { transform: scale(1.04); }
.px-body .product-card .info {
  flex: 1;
  padding: 14px 16px 16px;
  gap: 6px;
  align-content: start;
  border-radius: 0;
  color: var(--px-s-fg, var(--px-text));
}
.px-body .product-card .info .title {
  font-size: 1.5rem;
  font-weight: 500;
  white-space: normal;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  line-height: 1.4;
}
.px-body .product-card .info .price { flex-wrap: wrap; gap: 4px 10px; }
.px-body .product-card .info .price .current {
  font-size: 1.7rem;
  font-weight: 700;
  color: var(--px-s-fg, var(--px-primary));
}
html:not([data-palette='black']):not([data-palette='charcoal']) .px-body .px-section:not([data-scheme='primary']) .product-card .info .price .current,
html:not([data-palette='black']):not([data-palette='charcoal']) .px-body yc-section:not([data-scheme='primary']) .product-card .info .price .current { color: var(--px-primary); }
.px-body .product-card .info .price .compare-at {
  font-size: 1.35rem;
  color: var(--px-s-muted, var(--px-muted));
}
.px-body .product-card .info > yc-product-form,
.px-body .product-card .info > yc-quick-view,
.px-body .product-card .info > a.yc-btn { margin-block-start: auto; }
.px-body .product-card .info button.secondary,
.px-body .product-card .info .yc-btn.secondary { margin-block-start: 10px; }
.px-body .product-card .badge,
.px-badge {
  background: var(--px-sale);
  color: var(--px-on-sale);
  border-radius: var(--px-radius-badge);
  padding: 4px 10px;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.3;
}
.px-body .product-card .badge { z-index: 1; inset-block-start: 12px; }
.px-body .product-card .badge[data-position$='left'] { inset-inline-start: 12px; }
.px-body .product-card .badge[data-position$='right'] { inset-inline-end: 12px; }
.px-body .product-card .px-badge--custom {
  background: var(--px-primary);
  color: var(--px-on-primary);
}

.px-body .collection-card {
  border: var(--px-card-border);
  border-radius: var(--px-radius-card);
  overflow: hidden;
  background: var(--px-s-card, var(--px-card));
  transition: transform 0.35s var(--px-ease), box-shadow 0.35s var(--px-ease);
}
.px-body .collection-card:hover { transform: translateY(-4px); box-shadow: var(--px-shadow-card); }
.px-body .collection-card .info .name { font-weight: 600; font-size: 1.5rem; }

.px-body .items-grid {
  gap: clamp(12px, 2vw, 24px);
  grid-template-columns: repeat(var(--items-columns, 4), minmax(0, 1fr)) !important;
}
@media (max-width: 1024px) {
  .px-body .items-grid { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
}
@media (max-width: 768px) {
  .px-body .items-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  .px-body yc-testimonials .items-grid,
  .px-body yc-reviews .items-grid { grid-template-columns: 1fr !important; }
  .px-body .product-card .info { padding: 10px 12px 12px; }
  .px-body .product-card .info .title { font-size: 1.35rem; }
  .px-body .product-card .info .price .current { font-size: 1.5rem; }
  .px-body .product-card .info button.secondary,
  .px-body .product-card .info .yc-btn.secondary { padding: 8px 10px; min-height: 40px; font-size: 1.25rem; letter-spacing: 0; }
}
/* Native reviews on the homepage: hide the whole section while the product has no review yet */
.px-body yc-section:has(yc-testimonials [data-empty]:not([hidden])) { display: none; }

/* ---------------------------------------------------------- 8. Product page */
.px-body .single-product, .px-body .featured-product { gap: clamp(24px, 4vw, 64px); }
.px-body yc-product-media .main-image {
  border-radius: var(--px-radius-card);
  background: var(--px-surface);
  overflow: hidden;
}
.px-body yc-product-info { gap: 16px; }
.px-body yc-product-info > .h2 {
  font-size: clamp(2.4rem, 3vw, 3.4rem);
  font-weight: var(--px-heading-weight);
  line-height: 1.25;
}
.px-body yc-product-info .price { align-items: baseline; flex-wrap: wrap; gap: 6px 14px; }
.px-body yc-product-info .price .current {
  font-size: clamp(2.6rem, 3.2vw, 3.4rem);
  font-weight: 700;
  color: var(--px-primary);
}
html[data-palette='black'] .px-body yc-product-info .price .current,
html[data-palette='charcoal'] .px-body yc-product-info .price .current { color: var(--px-text); }
.px-body yc-product-info .price .compare-at {
  font-size: 1.8rem;
  color: var(--px-muted);
  text-decoration: line-through;
}
.px-body yc-product-info .description { color: var(--px-text); font-size: 1.55rem; line-height: 1.8; }
.px-body yc-product-info .accordion {
  border: 1px solid var(--px-border);
  border-radius: var(--px-radius-input);
  background: var(--px-card);
}

.px-save {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.px-save[hidden] { display: none; }
.px-save__amount { font-size: 1.4rem; font-weight: 600; color: var(--px-muted); }

.px-pd-headline {
  font-size: clamp(1.5rem, 1.6vw, 1.8rem);
  font-weight: 600;
  color: var(--px-primary);
}
html[data-palette='navy_gold'] .px-pd-headline, html[data-palette='emerald'] .px-pd-headline { color: color-mix(in srgb, var(--px-accent) 70%, var(--px-text)); }
.px-pd-badge { align-self: flex-start; justify-self: start; display: inline-block; }
.px-pd-benefits { display: grid; gap: 10px; }
.px-pd-benefits li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 1.55rem;
  line-height: 1.6;
}
.px-pd-benefits .px-icon {
  margin-block-start: 3px;
  padding: 3px;
  border-radius: 50%;
  background: var(--px-accent-soft);
  color: var(--px-primary);
}
.px-pd-trust {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
}
.px-pd-trust li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--px-border);
  border-radius: var(--px-radius-input);
  background: var(--px-surface);
  font-size: 1.35rem;
  font-weight: 500;
  line-height: 1.35;
}
.px-pd-trust .px-icon { color: var(--px-primary); }
.px-pd-cod {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--px-radius-input);
  background: var(--px-accent-soft);
  color: var(--px-text);
}
.px-pd-cod strong { display: block; font-size: 1.5rem; }
.px-pd-cod span { font-size: 1.35rem; color: var(--px-muted); }
.px-pd-cod .px-icon { color: var(--px-primary); }
.px-pd-info { display: grid; gap: 8px; }
.px-pd-info details {
  border: 1px solid var(--px-border);
  border-radius: var(--px-radius-input);
  background: var(--px-card);
}
.px-pd-info summary {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  font-size: 1.5rem;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}
.px-pd-info summary::-webkit-details-marker { display: none; }
.px-pd-info summary .px-icon:last-child { margin-inline-start: auto; transition: transform 0.25s; }
.px-pd-info details[open] summary .px-icon:last-child { transform: rotate(180deg); }
.px-pd-info .px-pd-info__body {
  padding: 0 16px 16px;
  font-size: 1.45rem;
  line-height: 1.75;
  color: var(--px-muted);
  white-space: pre-line;
}

/* Winning-product mode: louder buy box */
.px-body [data-px-mode='winning'] yc-product-info .buy-button {
  padding: 16px;
  border: 1.5px solid var(--px-primary);
  border-radius: var(--px-radius-card);
  background: var(--px-card);
  box-shadow: var(--px-shadow-card);
}
.px-body [data-px-mode='winning'] yc-product-info > .h2 { font-size: clamp(2.6rem, 3.4vw, 4rem); }
.px-body [data-px-mode='winning'] yc-product-info button.primary { min-height: 56px; font-size: 1.7rem; }

/* Buy button pinned to the bottom on phones (behaviour comes from the base product styles) */
@media (max-width: 768px) {
  .px-body [data-px-mode='winning']:not([data-prevent-sticky]) yc-product-info .buy-button {
    padding: 0;
    border: 0;
    background: none;
    box-shadow: none;
  }
  .px-body .single-product:not([data-prevent-sticky]) yc-product-info .buy-button .actions[data-sticky],
  .px-body .single-product:not([data-prevent-sticky]) yc-product-info .buy-button > yc-product-form {
    z-index: 35;
    margin: 0;
    width: 100%;
    padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
    border: 0;
    border-block-start: 1px solid var(--px-border);
    border-radius: 0;
    background: var(--px-bg);
    box-shadow: 0 -12px 28px -18px rgba(0, 0, 0, 0.35);
  }
  .px-template-product.px-body { padding-block-end: 96px; }
}

/* ------------------------------------------------ 9. Cart, pages, misc polish */
.px-body .cart .summary, .px-body yc-summary-box .box {
  border-radius: var(--px-radius-card);
}
.px-body .cart .summary { background: var(--px-surface); border: 1px solid var(--px-border); padding: 20px; }
.px-cart-notes { display: grid; gap: 10px; margin-block-start: 16px; }
.px-cart-notes li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.4rem;
  color: var(--px-muted);
}
.px-cart-notes .px-icon { color: var(--px-primary); }

.px-body .page {
  font-size: 1.6rem;
  line-height: 1.85;
  color: var(--px-text);
}
.px-body .page[data-page-width='reading-mode'] { max-width: 76ch; margin-inline: auto; }
.px-body .page h2, .px-body .page h3 { margin-block: 1.6em 0.5em; }
.px-body .page p, .px-body .page ul, .px-body .page ol { margin-block-end: 1em; }
.px-body .page ul { list-style: disc; padding-inline-start: 1.4em; }
.px-body .page ol { list-style: decimal; padding-inline-start: 1.4em; }
.px-body .page a { color: var(--px-primary); text-decoration: underline; text-underline-offset: 3px; font-size: inherit; }
.px-body .page table { width: 100%; border-collapse: collapse; }
.px-body .page td, .px-body .page th { padding: 10px 12px; border: 1px solid var(--px-border); text-align: start; }

.px-body yc-countdown-timer {
  --timer-background: var(--px-primary);
  --timer-foreground: var(--px-on-primary-rgb);
  border-radius: var(--px-radius-input);
}
.px-body .thank-you-cod {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  border-radius: var(--px-radius-input);
  background: var(--px-accent-soft);
  font-size: 1.5rem;
}

@media (prefers-reduced-motion: reduce) {
  .px-body *, .px-body *::before, .px-body *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
