/* ============================================================
   REJO CSS Framework — полная замена Tilda CSS
   ============================================================ */

/* --- CSS Custom Properties --- */
:root {
  /* Colors */
  --color-black: #000;
  --color-white: #fff;
  --color-bg: #fff;
  --color-text: #000;
  --color-text-secondary: #666;
  --color-text-muted: #999;
  --color-border: #e0e0e0;
  --color-border-light: #eee;
  --color-bg-light: #f8f8f8;
  --color-bg-hover: #f5f5f5;
  --color-accent: #000;
  --color-gold: #c5a55a;
  --color-red: #e53935;
  --color-pink: #F4DDE3;
  --color-green: #2e7d32;
  --color-error: #e53935;
  --color-success: #2e7d32;
  --color-overlay: rgba(0, 0, 0, 0.5);

  /* Typography */
  --font-primary: 'EuclidFlex', Arial, Helvetica, sans-serif;
  --font-size-xxs: 11px;
  --font-size-xs: 12px;
  --font-size-sm: 13px;
  --font-size-base: 14px;
  --font-size-md: 16px;
  --font-size-lg: 18px;
  --font-size-xl: 22px;
  --font-size-xxl: 28px;
  --font-size-hero: 36px;
  --line-height: 1.5;
  --line-height-tight: 1.2;

  /* Spacing */
  --gap-xs: 4px;
  --gap-sm: 8px;
  --gap-md: 12px;
  --gap-base: 16px;
  --gap-lg: 20px;
  --gap-xl: 28px;
  --gap-xxl: 40px;
  --gap-section: 60px;

  /* Layout */
  --container-max: 1200px;
  --container-narrow: 960px;
  --container-text: 680px;
  --container-padding: 20px;
  --header-height: 90px;

  /* Effects */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 14px;
  --radius-full: 50%;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.12);
  --transition: 0.2s ease;
  --transition-slow: 0.35s ease;

  /* Z-index */
  --z-base: 1;
  --z-sticky: 100;
  --z-dropdown: 200;
  --z-drawer: 500;
  --z-modal: 1000;
  --z-toast: 2000;
}

/* --- Reset --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: var(--font-primary);
  font-size: var(--font-size-base);
  line-height: var(--line-height);
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
}
img, video, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea {
  font: inherit;
  color: inherit;
  border: none;
  background: none;
  outline: none;
}
button { cursor: pointer; }
ul, ol { list-style: none; }
h1, h2, h3, h4, h5, h6 { font-weight: 500; line-height: var(--line-height-tight); }
::placeholder { color: var(--color-text-muted); }
:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }

/* Prevent scroll when modal/drawer is open */
body.rejo-no-scroll { overflow: hidden; }

/* --- Container --- */
.r-container { max-width: var(--container-max); margin: 0 auto; padding: 0 var(--container-padding); }
.r-container--narrow { max-width: var(--container-narrow); }
.r-container--text { max-width: var(--container-text); }
.r-container--full { max-width: none; }

/* --- Grid (CSS Grid) --- */
.r-grid { display: grid; gap: var(--gap-lg); }
.r-grid--2 { grid-template-columns: repeat(2, 1fr); }
.r-grid--3 { grid-template-columns: repeat(3, 1fr); }
.r-grid--4 { grid-template-columns: repeat(4, 1fr); }
.r-grid--5 { grid-template-columns: repeat(5, 1fr); }
.r-grid--6 { grid-template-columns: repeat(6, 1fr); }

/* Flexible product grid */
.r-product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--gap-lg);
}

@media (max-width: 1200px) {
  .r-product-grid { grid-template-columns: repeat(3, 1fr); }
  .r-grid--4 { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 960px) {
  .r-product-grid { grid-template-columns: repeat(3, 1fr); }
  .r-grid--3, .r-grid--4, .r-grid--5, .r-grid--6 { grid-template-columns: repeat(2, 1fr); }
  :root { --header-height: 56px; --container-padding: 14px; }
}
@media (max-width: 640px) {
  .r-product-grid { grid-template-columns: repeat(2, 1fr); gap: var(--gap-md); }
  .r-grid--2, .r-grid--3, .r-grid--4 { grid-template-columns: 1fr; }
}

/* --- Flex utilities --- */
.r-flex { display: flex; }
.r-flex--center { align-items: center; justify-content: center; }
.r-flex--between { align-items: center; justify-content: space-between; }
.r-flex--col { flex-direction: column; }
.r-flex--wrap { flex-wrap: wrap; }
.r-flex--gap-sm { gap: var(--gap-sm); }
.r-flex--gap { gap: var(--gap-base); }
.r-flex--gap-lg { gap: var(--gap-lg); }
.r-flex-1 { flex: 1; }

/* --- Typography --- */
.r-h1 { font-size: var(--font-size-hero); font-weight: 500; line-height: var(--line-height-tight); }
.r-h2 { font-size: var(--font-size-xxl); font-weight: 500; line-height: var(--line-height-tight); }
.r-h3 { font-size: var(--font-size-xl); font-weight: 500; }
.r-h4 { font-size: var(--font-size-lg); font-weight: 500; }
.r-h5 { font-size: var(--font-size-md); font-weight: 500; }
.r-text { font-size: var(--font-size-base); }
.r-text--sm { font-size: var(--font-size-sm); }
.r-text--xs { font-size: var(--font-size-xs); }
.r-text--lg { font-size: var(--font-size-md); }
.r-text--muted { color: var(--color-text-secondary); }
.r-text--upper { text-transform: uppercase; letter-spacing: 0.05em; }
.r-text--center { text-align: center; }
.r-text--right { text-align: right; }

@media (max-width: 960px) {
  .r-h1 { font-size: var(--font-size-xxl); }
  .r-h2 { font-size: var(--font-size-xl); }
  .r-h3 { font-size: var(--font-size-lg); }
}

/* --- Buttons --- */
.r-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--gap-sm);
  padding: 0 32px;
  height: 52px;
  font-size: var(--font-size-base);
  font-weight: 500;
  letter-spacing: 0.02em;
  border-radius: 0;
  transition: var(--transition);
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
}
.r-btn--primary {
  background: var(--color-black);
  color: var(--color-white);
  border-color: var(--color-black);
}
.r-btn--primary:hover { background: #222; }
.r-btn--secondary {
  background: transparent;
  color: var(--color-black);
  border-color: var(--color-black);
}
.r-btn--secondary:hover { background: var(--color-black); color: var(--color-white); }
.r-btn--ghost {
  background: transparent;
  color: var(--color-black);
  border-color: transparent;
  padding: 0 16px;
}
.r-btn--ghost:hover { background: var(--color-bg-light); }
.r-btn--sm { height: 40px; padding: 0 20px; font-size: var(--font-size-sm); }
.r-btn--lg { height: 60px; padding: 0 40px; font-size: var(--font-size-md); }
.r-btn--full { width: 100%; }
.r-btn--icon { width: 44px; height: 44px; padding: 0; }
.r-btn:disabled { opacity: 0.4; pointer-events: none; }

@media (max-width: 640px) {
  .r-btn { height: 48px; padding: 0 24px; }
  .r-btn--lg { height: 52px; padding: 0 28px; }
}

/* --- Forms --- */
.r-form { display: flex; flex-direction: column; gap: var(--gap-base); }
.r-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap-base); }
@media (max-width: 640px) { .r-form-row { grid-template-columns: 1fr; } }

.r-field { position: relative; }
.r-field__label {
  display: block;
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
  margin-bottom: var(--gap-xs);
}
.r-field__input {
  width: 100%;
  height: 52px;
  padding: 0 16px;
  font-size: var(--font-size-base);
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  transition: var(--transition);
}
.r-field__input:focus { border-color: var(--color-black); }
.r-field__input--textarea { height: auto; min-height: 100px; padding: 12px 16px; resize: vertical; }
.r-field__error {
  font-size: var(--font-size-xs);
  color: var(--color-error);
  margin-top: var(--gap-xs);
  display: none;
}
.r-field--error .r-field__input { border-color: var(--color-error); }
.r-field--error .r-field__error { display: block; }

/* Floating label variant */
.r-field--float .r-field__input { padding-top: 20px; padding-bottom: 4px; }
.r-field--float .r-field__label {
  position: absolute;
  top: 50%;
  left: 16px;
  transform: translateY(-50%);
  transition: var(--transition);
  pointer-events: none;
  margin-bottom: 0;
}
.r-field--float .r-field__input:focus ~ .r-field__label,
.r-field--float .r-field__input:not(:placeholder-shown) ~ .r-field__label {
  top: 8px;
  transform: none;
  font-size: var(--font-size-xxs);
}

/* Select */
.r-select {
  appearance: none;
  width: 100%;
  height: 52px;
  padding: 0 40px 0 16px;
  font-size: var(--font-size-base);
  background: var(--color-bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23333'/%3E%3C/svg%3E") right 16px center no-repeat;
  border: 1px solid var(--color-border);
  transition: var(--transition);
}
.r-select:focus { border-color: var(--color-black); }

/* Radio / Checkbox */
.r-radio, .r-checkbox { display: flex; align-items: flex-start; gap: var(--gap-sm); cursor: pointer; }
.r-radio__input, .r-checkbox__input { position: absolute; opacity: 0; width: 0; height: 0; }

.r-radio__mark {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  border: 2px solid var(--color-border);
  border-radius: var(--radius-full);
  transition: var(--transition);
  position: relative;
}
.r-radio__input:checked + .r-radio__mark { border-color: var(--color-black); }
.r-radio__input:checked + .r-radio__mark::after {
  content: '';
  position: absolute;
  top: 3px; left: 3px;
  width: 10px; height: 10px;
  border-radius: var(--radius-full);
  background: var(--color-black);
}

.r-checkbox__mark {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  border: 2px solid var(--color-border);
  transition: var(--transition);
  position: relative;
}
.r-checkbox__input:checked + .r-checkbox__mark {
  background: var(--color-black);
  border-color: var(--color-black);
}
.r-checkbox__input:checked + .r-checkbox__mark::after {
  content: '';
  position: absolute;
  top: 2px; left: 6px;
  width: 5px; height: 10px;
  border: 2px solid var(--color-white);
  border-top: 0; border-left: 0;
  transform: rotate(45deg);
}

.r-radio__text, .r-checkbox__text { font-size: var(--font-size-base); padding-top: 1px; }

/* --- Sections --- */
.r-section { padding: var(--gap-section) 0; }
.r-section--sm { padding: var(--gap-xl) 0; }
.r-section--dark { background: var(--color-black); color: var(--color-white); }
.r-section__title {
  font-size: var(--font-size-xxl);
  font-weight: 500;
  margin-bottom: var(--gap-xl);
}
@media (max-width: 960px) {
  .r-section { padding: var(--gap-xxl) 0; }
  .r-section__title { font-size: var(--font-size-xl); margin-bottom: var(--gap-lg); }
}

/* --- Header --- */
.r-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: var(--z-sticky);
  background: var(--color-white);
  border-bottom: 1px solid var(--color-border-light);
}
.r-header__bar {
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-padding);
}
.r-header__logo img { height: 40px; width: auto; }
.r-header__nav { display: flex; align-items: center; gap: var(--gap-xl); }
.r-header__nav a {
  font-size: var(--font-size-base);
  transition: var(--transition);
  position: relative;
}
.r-header__nav a:hover { opacity: 0.6; }
.r-header__nav a.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--color-black);
}
.r-header__actions { display: flex; align-items: center; gap: var(--gap-base); }
.r-header__icon {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
}
.r-header__icon svg { width: 22px; height: 22px; }
.r-header__badge {
  position: absolute;
  top: 2px;
  right: 2px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  background: var(--color-black);
  color: var(--color-white);
  font-size: 10px;
  font-weight: 600;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.r-header__badge:empty { display: none; }
.r-header-spacer { height: var(--header-height); }

@media (max-width: 960px) {
  .r-header__nav { display: none; }
  .r-header__logo img { height: 30px; }
}

/* Mobile hamburger */
.r-burger {
  display: none;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}
.r-burger span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--color-black);
  transition: var(--transition);
}
.r-burger.active span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.r-burger.active span:nth-child(2) { opacity: 0; }
.r-burger.active span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

@media (max-width: 960px) {
  .r-burger { display: flex; }
}

/* --- Mobile Menu Drawer --- */
.r-mobile-menu {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: var(--z-drawer);
  pointer-events: none;
  opacity: 0;
  transition: opacity var(--transition-slow);
}
.r-mobile-menu.open { pointer-events: auto; opacity: 1; }
.r-mobile-menu__overlay {
  position: absolute;
  inset: 0;
  background: var(--color-overlay);
}
.r-mobile-menu__panel {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 300px;
  max-width: 85vw;
  background: var(--color-white);
  transform: translateX(-100%);
  transition: transform var(--transition-slow);
  overflow-y: auto;
  padding: var(--gap-xxl) var(--gap-lg);
}
.r-mobile-menu.open .r-mobile-menu__panel { transform: translateX(0); }
.r-mobile-menu__close {
  position: absolute;
  top: var(--gap-base);
  right: var(--gap-base);
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.r-mobile-menu__link {
  display: block;
  padding: var(--gap-md) 0;
  font-size: var(--font-size-md);
  border-bottom: 1px solid var(--color-border-light);
}

/* --- Drawer (Cart, Account, etc.) --- */
.r-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: var(--z-drawer);
  pointer-events: none;
}
.r-drawer.open { pointer-events: auto; }
.r-drawer__overlay {
  position: fixed;
  inset: 0;
  background: var(--color-overlay);
  opacity: 0;
  transition: opacity var(--transition-slow);
}
.r-drawer.open .r-drawer__overlay { opacity: 1; }
.r-drawer__panel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 460px;
  max-width: 100vw;
  background: var(--color-white);
  transform: translateX(100%);
  transition: transform var(--transition-slow);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.r-drawer.open .r-drawer__panel { transform: translateX(0); }
.r-drawer__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--gap-lg);
  border-bottom: 1px solid var(--color-border-light);
  flex-shrink: 0;
}
.r-drawer__title { font-size: var(--font-size-lg); font-weight: 500; }
.r-drawer__close { width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; }
.r-drawer__body { flex: 1; overflow-y: auto; padding: var(--gap-lg); }
.r-drawer__footer {
  padding: var(--gap-lg);
  border-top: 1px solid var(--color-border-light);
  flex-shrink: 0;
}

@media (max-width: 640px) {
  .r-drawer__panel { width: 100vw; }
}

/* --- Modal --- */
.r-modal {
  position: fixed;
  inset: 0;
  z-index: var(--z-modal);
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  opacity: 0;
  transition: opacity var(--transition);
}
.r-modal.open { pointer-events: auto; opacity: 1; }
.r-modal__overlay {
  position: absolute;
  inset: 0;
  background: var(--color-overlay);
}
.r-modal__content {
  position: relative;
  background: var(--color-white);
  width: 90%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  padding: var(--gap-xl);
  transform: translateY(20px);
  transition: transform var(--transition);
}
.r-modal.open .r-modal__content { transform: translateY(0); }
.r-modal__close {
  position: absolute;
  top: var(--gap-base);
  right: var(--gap-base);
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.r-modal__title { font-size: var(--font-size-xl); font-weight: 500; margin-bottom: var(--gap-lg); }

/* --- Hero / Cover --- */
.r-hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.r-hero__bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
}
.r-hero__bg img { width: 100%; height: 100%; object-fit: cover; }
.r-hero__content {
  position: relative;
  z-index: 2;
  text-align: center;
  color: var(--color-white);
  padding: var(--gap-xxl);
}
.r-hero__title { font-size: 48px; font-weight: 500; margin-bottom: var(--gap-lg); }
.r-hero__subtitle { font-size: var(--font-size-lg); margin-bottom: var(--gap-xl); opacity: 0.9; }

@media (max-width: 960px) {
  .r-hero { min-height: 80vh; }
  .r-hero__title { font-size: 32px; }
}

/* --- Slider / Carousel --- */
.r-slider { position: relative; overflow: hidden; }
.r-slider__track { display: flex; transition: transform 0.5s ease; }
.r-slider__slide { flex: 0 0 100%; min-width: 0; }
.r-slider__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(4px);
  transition: var(--transition);
}
.r-slider__arrow:hover { background: var(--color-white); }
.r-slider__arrow--prev { left: 16px; }
.r-slider__arrow--next { right: 16px; }
.r-slider__dots {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
}
.r-slider__dot {
  width: 8px;
  height: 8px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.5);
  transition: var(--transition);
}
.r-slider__dot.active { background: var(--color-white); width: 24px; }

@media (max-width: 640px) {
  .r-slider__arrow { display: none; }
}

/* --- Product Card --- */
.r-product-card { position: relative; display: flex; flex-direction: column; }
.r-product-card__img-wrap {
  position: relative;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  background: #fff;
}
.r-product-card__img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center center;
  transition: transform 0.4s ease;
}
.r-product-card:hover .r-product-card__img { transform: scale(1.03); }
.r-product-card__img--hover {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.r-product-card:hover .r-product-card__img--hover { opacity: 1; }

.r-product-card__body { padding: var(--gap-md) 0; }
.r-product-card__title {
  font-size: var(--font-size-sm);
  font-weight: 400;
  margin-bottom: var(--gap-xs);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.r-product-card__price { font-size: var(--font-size-base); font-weight: 500; }
.r-product-card__price-old {
  text-decoration: line-through;
  color: var(--color-text-muted);
  font-weight: 400;
  margin-left: var(--gap-sm);
}

/* --- Cart Item --- */
.r-cart-item {
  display: flex;
  gap: var(--gap-base);
  padding: var(--gap-base) 0;
  border-bottom: 1px solid var(--color-border-light);
}
.r-cart-item__img {
  width: 80px;
  height: 106px;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--color-bg-light);
}
.r-cart-item__info { flex: 1; min-width: 0; }
.r-cart-item__title { font-size: var(--font-size-sm); margin-bottom: var(--gap-xs); }
.r-cart-item__meta { font-size: var(--font-size-xs); color: var(--color-text-secondary); margin-bottom: var(--gap-sm); }
.r-cart-item__bottom { display: flex; align-items: center; justify-content: space-between; }
.r-cart-item__price { font-weight: 500; }
.r-cart-item__qty {
  display: flex;
  align-items: center;
  gap: var(--gap-sm);
  border: 1px solid var(--color-border);
}
.r-cart-item__qty button {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}
.r-cart-item__qty span { min-width: 20px; text-align: center; font-size: var(--font-size-sm); }
.r-cart-item__remove {
  color: var(--color-text-muted);
  font-size: var(--font-size-xs);
  text-decoration: underline;
  margin-top: var(--gap-xs);
}

/* --- Search Overlay --- */
.r-search {
  position: fixed;
  inset: 0;
  z-index: var(--z-modal);
  background: var(--color-white);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition);
}
.r-search.open { opacity: 1; pointer-events: auto; }
.r-search__inner {
  max-width: var(--container-narrow);
  margin: 0 auto;
  padding: var(--gap-xxl) var(--container-padding);
}
.r-search__input {
  width: 100%;
  height: 60px;
  font-size: var(--font-size-xl);
  border-bottom: 2px solid var(--color-black);
  padding: 0;
}
.r-search__close {
  position: absolute;
  top: var(--gap-lg);
  right: var(--gap-lg);
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.r-search__results { margin-top: var(--gap-xl); }
.r-search__hint {
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
  margin-top: var(--gap-base);
}

/* --- Toast / Notifications --- */
.r-toast {
  position: fixed;
  bottom: var(--gap-lg);
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  z-index: var(--z-toast);
  background: var(--color-black);
  color: var(--color-white);
  padding: var(--gap-md) var(--gap-lg);
  font-size: var(--font-size-sm);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  transition: transform var(--transition-slow);
  pointer-events: none;
}
.r-toast.show { transform: translateX(-50%) translateY(0); pointer-events: auto; }

/* --- Footer --- */
.r-footer {
  background: var(--color-black);
  color: var(--color-white);
  padding: var(--gap-section) 0 var(--gap-xl);
}
.r-footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--gap-xxl);
  margin-bottom: var(--gap-xxl);
}
.r-footer__heading {
  font-size: var(--font-size-sm);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--gap-base);
  opacity: 0.6;
}
.r-footer__link {
  display: block;
  padding: var(--gap-xs) 0;
  font-size: var(--font-size-base);
  opacity: 0.8;
  transition: var(--transition);
}
.r-footer__link:hover { opacity: 1; }
.r-footer__bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  padding-top: var(--gap-lg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: var(--font-size-xs);
  opacity: 0.5;
}
.r-footer__social { display: flex; gap: var(--gap-base); }
.r-footer__social a { opacity: 0.6; transition: var(--transition); }
.r-footer__social a:hover { opacity: 1; }

@media (max-width: 960px) {
  .r-footer__grid { grid-template-columns: 1fr 1fr; gap: var(--gap-xl); }
}
@media (max-width: 640px) {
  .r-footer__grid { grid-template-columns: 1fr; }
  .r-footer__bottom { flex-direction: column; gap: var(--gap-md); }
}

/* --- Divider --- */
.r-divider { border: none; border-top: 1px solid var(--color-border-light); margin: var(--gap-xl) 0; }

/* --- Spacing utilities --- */
.r-mt-sm { margin-top: var(--gap-sm); }
.r-mt { margin-top: var(--gap-base); }
.r-mt-lg { margin-top: var(--gap-lg); }
.r-mt-xl { margin-top: var(--gap-xl); }
.r-mb-sm { margin-bottom: var(--gap-sm); }
.r-mb { margin-bottom: var(--gap-base); }
.r-mb-lg { margin-bottom: var(--gap-lg); }
.r-mb-xl { margin-bottom: var(--gap-xl); }
.r-py { padding-top: var(--gap-base); padding-bottom: var(--gap-base); }
.r-py-lg { padding-top: var(--gap-lg); padding-bottom: var(--gap-lg); }

/* --- Responsive visibility --- */
.r-hide-mobile { display: block; }
.r-hide-desktop { display: none; }
.r-show-mobile { display: none; }
@media (max-width: 960px) {
  .r-hide-mobile { display: none !important; }
  .r-hide-desktop { display: block; }
  .r-show-mobile { display: block !important; }
}

/* --- Loading / Skeleton --- */
.r-skeleton {
  background: linear-gradient(90deg, var(--color-bg-light) 25%, #ececec 50%, var(--color-bg-light) 75%);
  background-size: 200% 100%;
  animation: r-skeleton-pulse 1.5s ease infinite;
}
@keyframes r-skeleton-pulse { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

.r-spinner {
  width: 24px;
  height: 24px;
  border: 2px solid var(--color-border);
  border-top-color: var(--color-black);
  border-radius: var(--radius-full);
  animation: r-spin 0.6s linear infinite;
}
@keyframes r-spin { to { transform: rotate(360deg); } }

/* --- Tabs --- */
.r-tabs { display: flex; gap: 0; border-bottom: 1px solid var(--color-border); }
.r-tabs__tab {
  padding: var(--gap-md) var(--gap-lg);
  font-size: var(--font-size-base);
  color: var(--color-text-secondary);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: var(--transition);
}
.r-tabs__tab:hover { color: var(--color-text); }
.r-tabs__tab.active { color: var(--color-text); border-bottom-color: var(--color-black); }

/* --- Breadcrumbs --- */
.r-breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: var(--gap-sm);
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
  padding: var(--gap-base) 0;
}
.r-breadcrumbs a:hover { color: var(--color-text); }
.r-breadcrumbs__sep { margin: 0 var(--gap-xs); }

/* --- Lazy Image --- */
.r-img-lazy {
  opacity: 0;
  transition: opacity 0.3s ease;
}
.r-img-lazy.loaded { opacity: 1; }

/* --- Skip link (accessibility) --- */
.r-skip-link {
  position: absolute;
  top: -100px;
  left: 0;
  padding: 8px 16px;
  background: var(--color-black);
  color: var(--color-white);
  z-index: 10000;
}
.r-skip-link:focus { top: 0; }

/* --- Announcement bar --- */
.r-announce {
  background: var(--color-black);
  color: var(--color-white);
  text-align: center;
  padding: var(--gap-sm) var(--container-padding);
  font-size: var(--font-size-xs);
  letter-spacing: 0.05em;
}

/* --- Category pills (horizontal scroll) --- */
.r-pills {
  display: flex;
  gap: var(--gap-sm);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: var(--gap-sm) 0;
}
.r-pills::-webkit-scrollbar { display: none; }
.r-pill {
  flex-shrink: 0;
  padding: var(--gap-sm) var(--gap-base);
  font-size: var(--font-size-sm);
  border: 1px solid var(--color-border);
  border-radius: 100px;
  transition: var(--transition);
  white-space: nowrap;
}
.r-pill:hover, .r-pill.active {
  background: var(--color-black);
  color: var(--color-white);
  border-color: var(--color-black);
}

/* --- Accordion --- */
.r-accordion {}
.r-accordion__item { border-bottom: 1px solid var(--color-border-light); }
.r-accordion__trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--gap-base) 0;
  font-size: var(--font-size-base);
  text-align: left;
}
.r-accordion__icon {
  width: 20px;
  height: 20px;
  transition: transform var(--transition);
}
.r-accordion__item.open .r-accordion__icon { transform: rotate(180deg); }
.r-accordion__body {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--transition-slow);
}
.r-accordion__item.open .r-accordion__body { max-height: 1000px; }
.r-accordion__content { padding-bottom: var(--gap-base); font-size: var(--font-size-sm); color: var(--color-text-secondary); }

/* --- Image gallery (PDP) --- */
.r-gallery { display: grid; grid-template-columns: 80px 1fr; gap: var(--gap-md); }
.r-gallery__thumbs { display: flex; flex-direction: column; gap: var(--gap-sm); overflow-y: auto; max-height: 600px; }
.r-gallery__thumb {
  width: 80px;
  height: 100px;
  object-fit: cover;
  opacity: 0.5;
  transition: var(--transition);
  cursor: pointer;
}
.r-gallery__thumb.active { opacity: 1; }
.r-gallery__main { aspect-ratio: 3 / 4; overflow: hidden; }
.r-gallery__main img { width: 100%; height: 100%; object-fit: contain; object-position: center center; cursor: zoom-in; }

@media (max-width: 960px) {
  .r-gallery { grid-template-columns: 1fr; }
  .r-gallery__thumbs { flex-direction: row; overflow-x: auto; max-height: none; }
  .r-gallery__thumb { width: 60px; height: 75px; }
}

/* --- Empty state --- */
.r-empty {
  text-align: center;
  padding: var(--gap-section) var(--gap-lg);
  color: var(--color-text-secondary);
}
.r-empty__icon { margin-bottom: var(--gap-lg); opacity: 0.3; }
.r-empty__title { font-size: var(--font-size-lg); margin-bottom: var(--gap-sm); color: var(--color-text); }
.r-empty__text { font-size: var(--font-size-base); margin-bottom: var(--gap-xl); }

/* --- Price display --- */
.r-price { font-weight: 500; }
.r-price--lg { font-size: var(--font-size-xl); }
.r-price__old { text-decoration: line-through; color: var(--color-text-muted); font-weight: 400; }
.r-price__discount { color: var(--color-red); }

/* --- Tag / Badge --- */
.r-tag {
  display: inline-block;
  padding: var(--gap-xs) var(--gap-sm);
  font-size: var(--font-size-xxs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-radius: 3px;
}
.r-tag--black { background: var(--color-black); color: var(--color-white); }
.r-tag--gold { background: var(--color-gold); color: var(--color-white); }
.r-tag--red { background: var(--color-red); color: var(--color-white); }
.r-tag--pink { background: var(--color-pink); color: #1f2433; }
.r-tag--outline { border: 1px solid var(--color-border); }

/* --- Rich text (for CMS content) --- */
.r-content { line-height: 1.7; }
.r-content p { margin-bottom: 1em; }
.r-content h2, .r-content h3 { margin-top: 1.5em; margin-bottom: 0.5em; }
.r-content a { text-decoration: underline; }
.r-content ul, .r-content ol { padding-left: 1.5em; margin-bottom: 1em; }
.r-content li { margin-bottom: 0.5em; }
.r-content img { margin: 1.5em 0; }
.r-content table { width: 100%; border-collapse: collapse; margin-bottom: 1em; }
.r-content th, .r-content td { padding: 8px 12px; border: 1px solid var(--color-border); text-align: left; }
.r-content th { font-weight: 500; background: var(--color-bg-light); }

/* --- Size chart table --- */
.r-size-table { width: 100%; border-collapse: collapse; font-size: var(--font-size-sm); }
.r-size-table th, .r-size-table td { padding: 10px 14px; border-bottom: 1px solid var(--color-border-light); text-align: center; }
.r-size-table th { font-weight: 500; background: var(--color-bg-light); }
.r-size-table tr:hover { background: var(--color-bg-hover); }

/* --- Newsletter section --- */
.r-newsletter {
  text-align: center;
  padding: var(--gap-section) 0;
  background: var(--color-bg-light);
}
.r-newsletter__form {
  display: flex;
  max-width: 440px;
  margin: var(--gap-lg) auto 0;
  gap: 0;
}
.r-newsletter__input {
  flex: 1;
  height: 52px;
  padding: 0 16px;
  border: 1px solid var(--color-border);
  border-right: none;
}
.r-newsletter__btn {
  height: 52px;
  padding: 0 24px;
  background: var(--color-black);
  color: var(--color-white);
  font-weight: 500;
  white-space: nowrap;
}
@media (max-width: 640px) {
  .r-newsletter__form { flex-direction: column; gap: var(--gap-sm); }
  .r-newsletter__input { border-right: 1px solid var(--color-border); }
  .r-newsletter__btn { width: 100%; }
}
