/* ================================================================
 * Raj Collection Sequel — Components
 * Buttons, cards, badges, inputs, toasts, loading states
 * ================================================================ */

/* ---------- BUTTONS ---------- */
.rcs-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--rcs-space-2);
  min-height: 48px;
  padding: 0 22px;
  font-family: var(--rcs-font-ui);
  font-size: var(--rcs-size-sm);
  font-weight: var(--rcs-fw-semi);
  letter-spacing: var(--rcs-track-ui);
  text-transform: uppercase;
  text-decoration: none;
  border: 0;
  border-radius: var(--rcs-r-4);
  background: var(--rcs-primary);
  color: var(--rcs-text-inverse);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
  transition: transform var(--rcs-dur-2) var(--rcs-ease-out),
              box-shadow var(--rcs-dur-2) var(--rcs-ease-out),
              background var(--rcs-dur-2) var(--rcs-ease-out);
  box-shadow: var(--rcs-shadow-cta);
}
.rcs-btn:hover { background: var(--rcs-primary-soft); }
.rcs-btn:active {
  transform: scale(0.97);
  box-shadow: var(--rcs-shadow-press);
  background: var(--rcs-primary-deep);
}

/* Ripple effect */
.rcs-btn::after {
  content: "";
  position: absolute;
  top: 50%; left: 50%;
  width: 0; height: 0;
  background: rgba(255, 255, 255, 0.32);
  border-radius: var(--rcs-r-pill);
  transform: translate(-50%, -50%);
  pointer-events: none;
  transition: width var(--rcs-dur-5) var(--rcs-ease-out),
              height var(--rcs-dur-5) var(--rcs-ease-out),
              opacity var(--rcs-dur-5) var(--rcs-ease-out);
  opacity: 0;
}
.rcs-btn.is-pressed::after {
  width: 360px; height: 360px;
  opacity: 1;
}

/* Variants */
.rcs-btn--ghost {
  background: transparent;
  color: var(--rcs-primary);
  border: 1.5px solid var(--rcs-primary);
  box-shadow: none;
}
.rcs-btn--ghost:hover, .rcs-btn--ghost:active {
  background: rgba(107, 26, 46, 0.06);
}

.rcs-btn--text {
  background: transparent;
  color: var(--rcs-primary);
  box-shadow: none;
  padding: 0;
  min-height: auto;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.rcs-btn--success {
  background: var(--rcs-success);
  box-shadow: 0 4px 14px -4px rgba(46, 125, 50, 0.45);
}

.rcs-btn--block { width: 100%; }
.rcs-btn--lg { min-height: 54px; font-size: var(--rcs-size-base); padding: 0 28px; border-radius: var(--rcs-r-5); }
.rcs-btn--sm { min-height: 36px; font-size: var(--rcs-size-xs); padding: 0 16px; }
.rcs-btn--pill { border-radius: var(--rcs-r-pill); }

.rcs-btn:disabled, .rcs-btn[aria-disabled="true"] {
  opacity: 0.55;
  cursor: not-allowed;
  pointer-events: none;
}

/* ---------- CARDS ---------- */
.rcs-card {
  background: var(--rcs-surface);
  border: 1px solid var(--rcs-outline);
  border-radius: var(--rcs-r-5);
  padding: var(--rcs-space-5);
  box-shadow: var(--rcs-shadow-sm);
}
.rcs-card--floating {
  background: var(--rcs-surface-2);
  border-radius: var(--rcs-r-6);
  box-shadow: var(--rcs-shadow-md);
}
.rcs-card--brand {
  background: linear-gradient(135deg, var(--rcs-primary) 0%, var(--rcs-primary-deep) 100%);
  color: var(--rcs-text-inverse);
  border: 0;
  box-shadow: var(--rcs-shadow-xl);
  position: relative;
  overflow: hidden;
}
.rcs-card--brand::before {
  content: "";
  position: absolute;
  top: -50%; right: -30%;
  width: 60%; height: 200%;
  background: radial-gradient(circle, rgba(201, 169, 97, 0.18) 0%, transparent 60%);
  pointer-events: none;
}

/* ---------- BADGES / CHIPS ---------- */
.rcs-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  font-size: 10px;
  font-weight: var(--rcs-fw-bold);
  letter-spacing: var(--rcs-track-wide);
  text-transform: uppercase;
  border-radius: var(--rcs-r-pill);
  background: var(--rcs-primary);
  color: var(--rcs-text-inverse);
}
.rcs-badge--accent { background: var(--rcs-accent); color: var(--rcs-text); }
.rcs-badge--success { background: var(--rcs-success-soft); color: var(--rcs-success); }
.rcs-badge--warning { background: var(--rcs-warning-soft); color: var(--rcs-warning); }
.rcs-badge--soft { background: var(--rcs-outline); color: var(--rcs-text); }

.rcs-chip {
  display: inline-flex;
  align-items: center;
  gap: var(--rcs-space-2);
  height: 36px;
  padding: 0 16px;
  border-radius: var(--rcs-r-pill);
  border: 1.5px solid var(--rcs-outline-strong);
  background: var(--rcs-field);
  font-size: var(--rcs-size-sm);
  font-weight: var(--rcs-fw-semi);
  color: var(--rcs-text);
  white-space: nowrap;
  transition: all var(--rcs-dur-2) var(--rcs-ease-out);
}
.rcs-chip:active { transform: scale(0.97); }
.rcs-chip.is-active {
  background: var(--rcs-primary);
  color: var(--rcs-text-inverse);
  border-color: var(--rcs-primary);
  box-shadow: 0 4px 14px -6px rgba(107, 26, 46, 0.45);
}

/* ---------- INPUTS / FIELD GROUPS ---------- */
.rcs-field { position: relative; margin-bottom: var(--rcs-space-4); }
.rcs-field label {
  display: block;
  font-size: var(--rcs-size-xs);
  letter-spacing: var(--rcs-track-ui);
  text-transform: uppercase;
  color: var(--rcs-text-muted);
  font-weight: var(--rcs-fw-semi);
  margin-bottom: var(--rcs-space-1);
}
.rcs-field--floating { position: relative; }
.rcs-field--floating input {
  height: 56px;
  padding: 22px 14px 8px;
}
.rcs-field--floating label {
  position: absolute;
  top: 50%; left: 14px;
  transform: translateY(-50%);
  margin: 0;
  font-size: var(--rcs-size-md);
  letter-spacing: 0;
  text-transform: none;
  color: var(--rcs-text-subtle);
  pointer-events: none;
  background: transparent;
  font-weight: var(--rcs-fw-regular);
  transition: all var(--rcs-dur-2) var(--rcs-ease-out);
}
.rcs-field--floating input:focus + label,
.rcs-field--floating input:not(:placeholder-shown) + label {
  top: 14px;
  font-size: var(--rcs-size-xs);
  font-weight: var(--rcs-fw-semi);
  letter-spacing: var(--rcs-track-ui);
  text-transform: uppercase;
  color: var(--rcs-primary);
}

/* Quantity stepper */
.rcs-qty {
  display: inline-flex;
  align-items: center;
  height: 44px;
  border: 1.5px solid var(--rcs-outline-strong);
  border-radius: var(--rcs-r-pill);
  overflow: hidden;
  background: var(--rcs-field);
}
.rcs-qty button {
  width: 40px;
  height: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--rcs-text);
  font-size: 18px;
  transition: background var(--rcs-dur-2) var(--rcs-ease-out);
}
.rcs-qty button:active { background: rgba(28, 26, 25, 0.06); }
.rcs-qty input {
  width: 40px;
  height: 100%;
  border: 0;
  background: transparent;
  text-align: center;
  font-size: var(--rcs-size-md);
  font-weight: var(--rcs-fw-semi);
  padding: 0;
  min-height: auto;
}
.rcs-qty input::-webkit-outer-spin-button,
.rcs-qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.rcs-qty input { -moz-appearance: textfield; appearance: textfield; }

/* ---------- TOAST ---------- */
.rcs-toast {
  position: fixed;
  top: calc(var(--rcs-space-9) + var(--rcs-safe-top));
  left: var(--rcs-space-4);
  right: var(--rcs-space-4);
  background: var(--rcs-text);
  color: var(--rcs-canvas);
  padding: 14px 18px;
  border-radius: var(--rcs-r-4);
  font-size: var(--rcs-size-base);
  font-weight: var(--rcs-fw-medium);
  box-shadow: var(--rcs-shadow-lg);
  z-index: var(--rcs-z-toast);
  transform: translateY(-120%);
  opacity: 0;
  transition: transform var(--rcs-dur-4) var(--rcs-ease-out),
              opacity var(--rcs-dur-4) var(--rcs-ease-out);
  display: flex;
  align-items: center;
  gap: var(--rcs-space-3);
}
.rcs-toast.is-visible { transform: translateY(0); opacity: 1; }
.rcs-toast--success { background: var(--rcs-success); color: #fff; }
.rcs-toast--error   { background: var(--rcs-error); color: #fff; }
.rcs-toast--info    { background: var(--rcs-info); color: #fff; }

/* ---------- SKELETON LOADERS ---------- */
.rcs-skeleton {
  background: linear-gradient(90deg,
    rgba(28, 26, 25, 0.06) 0%,
    rgba(28, 26, 25, 0.12) 50%,
    rgba(28, 26, 25, 0.06) 100%);
  background-size: 200% 100%;
  animation: rcs-skel 1.4s ease-in-out infinite;
  border-radius: var(--rcs-r-2);
}
@keyframes rcs-skel {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ---------- PRODUCT CARD (reused on home + shop + recs) ---------- */
.rcs-product-card {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  text-decoration: none;
  color: inherit;
}
.rcs-product-card__media {
  position: relative;
  aspect-ratio: 4 / 5;
  border-radius: var(--rcs-r-4);
  overflow: hidden;
  background: var(--rcs-surface);
  transition: transform var(--rcs-dur-5) var(--rcs-ease-out);
}
.rcs-product-card__media img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform var(--rcs-dur-6) var(--rcs-ease-out);
}
.rcs-product-card:active .rcs-product-card__media img { transform: scale(1.04); }

.rcs-product-card__wishlist {
  position: absolute;
  top: 10px; right: 10px;
  width: 36px; height: 36px;
  border-radius: var(--rcs-r-pill);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: inline-flex;
  align-items: center; justify-content: center;
  color: var(--rcs-text);
  box-shadow: var(--rcs-shadow-sm);
  z-index: 2;
  transition: transform var(--rcs-dur-2) var(--rcs-ease-out),
              color var(--rcs-dur-2) var(--rcs-ease-out);
}
.rcs-product-card__wishlist:active { transform: scale(0.85); }
.rcs-product-card__wishlist.is-active { color: var(--rcs-primary); }
.rcs-product-card__wishlist.is-active .rcs-ico::before { content: "\e234"; /* filled heart */ }

.rcs-product-card__discount {
  position: absolute;
  top: 10px; left: 10px;
  z-index: 2;
}

.rcs-product-card__rating {
  position: absolute;
  bottom: 8px; left: 8px;
  padding: 4px 8px;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(8px);
  border-radius: var(--rcs-r-pill);
  font-size: 11px;
  font-weight: var(--rcs-fw-semi);
  color: var(--rcs-text);
  display: inline-flex;
  align-items: center;
  gap: 3px;
}
.rcs-product-card__rating .rcs-ico { color: var(--rcs-accent); font-size: 12px; }

.rcs-product-card__info { padding: var(--rcs-space-2) 2px 0; }
.rcs-product-card__title {
  font-family: var(--rcs-font-display);
  font-size: var(--rcs-size-base);
  font-weight: var(--rcs-fw-medium);
  line-height: 1.25;
  margin: 0 0 4px;
  color: var(--rcs-text);
  letter-spacing: -0.005em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.rcs-product-card__price {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
  font-family: var(--rcs-font-ui);
}
.rcs-product-card__price .price {
  font-size: var(--rcs-size-base);
  font-weight: var(--rcs-fw-bold);
  color: var(--rcs-text);
}
.rcs-product-card__price del {
  font-size: var(--rcs-size-sm);
  color: var(--rcs-text-subtle);
  font-weight: var(--rcs-fw-regular);
}

/* ---------- DIVIDED TABLE (used for specs) ---------- */
.rcs-table-card {
  border: 1px solid var(--rcs-outline);
  border-radius: var(--rcs-r-5);
  overflow: hidden;
  background: var(--rcs-surface-2);
}
.rcs-table-row {
  display: grid;
  grid-template-columns: 120px 1fr;
  align-items: center;
  padding: 14px 18px;
  border-bottom: 1px solid var(--rcs-outline);
  min-height: 48px;
  font-size: var(--rcs-size-base);
}
.rcs-table-row:last-child { border-bottom: 0; }
.rcs-table-row__key {
  font-size: var(--rcs-size-xs);
  letter-spacing: var(--rcs-track-ui);
  text-transform: uppercase;
  color: var(--rcs-text-muted);
  font-weight: var(--rcs-fw-bold);
}
.rcs-table-row__val {
  font-weight: var(--rcs-fw-medium);
  color: var(--rcs-text);
}

/* ---------- ACCORDION ---------- */
.rcs-accordion { border-top: 1px solid var(--rcs-outline); }
.rcs-accordion details { border-bottom: 1px solid var(--rcs-outline); }
.rcs-accordion summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 0;
  font-size: var(--rcs-size-sm);
  font-weight: var(--rcs-fw-bold);
  letter-spacing: var(--rcs-track-display);
  text-transform: uppercase;
  color: var(--rcs-text);
  transition: color var(--rcs-dur-2) var(--rcs-ease-out);
}
.rcs-accordion summary::-webkit-details-marker { display: none; }
.rcs-accordion summary::after {
  content: "";
  width: 10px; height: 10px;
  border-right: 1.5px solid var(--rcs-text-muted);
  border-bottom: 1.5px solid var(--rcs-text-muted);
  transform: rotate(45deg);
  transition: transform var(--rcs-dur-3) var(--rcs-ease-out);
}
.rcs-accordion details[open] summary { color: var(--rcs-primary); }
.rcs-accordion details[open] summary::after {
  transform: rotate(-135deg);
  border-color: var(--rcs-primary);
}
.rcs-accordion details > *:not(summary) {
  padding: 0 0 18px;
  font-size: var(--rcs-size-base);
  line-height: var(--rcs-lh-relaxed);
  color: var(--rcs-text-muted);
}

/* ---------- SCROLL CAROUSEL ---------- */
.rcs-carousel {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 46%;
  gap: var(--rcs-space-3);
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  padding: 0 var(--rcs-gutter) 8px;
  margin: 0 calc(var(--rcs-gutter) * -1);
}
.rcs-carousel::-webkit-scrollbar { display: none; }
.rcs-carousel > * { scroll-snap-align: start; }

/* ---------- STICKY BAR (PDP ATC, cart checkout) ---------- */
.rcs-sticky-bar {
  position: fixed;
  left: 0; right: 0;
  bottom: var(--rcs-bottom-nav-h);
  z-index: var(--rcs-z-sticky-bar);
  background: rgba(250, 246, 240, 0.96);
  backdrop-filter: blur(16px) saturate(1.4);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  border-top: 1px solid var(--rcs-outline);
  box-shadow: 0 -10px 28px -12px rgba(28, 26, 25, 0.18);
  padding: 12px var(--rcs-gutter) calc(12px + var(--rcs-safe-bottom));
  display: flex;
  align-items: center;
  gap: var(--rcs-space-3);
  transform: translateY(110%);
  transition: transform var(--rcs-dur-4) var(--rcs-ease-out);
  will-change: transform;
}
.rcs-sticky-bar.is-visible { transform: translateY(0); }
.rcs-sticky-bar__info { flex: 1; min-width: 0; }
.rcs-sticky-bar__price {
  font-size: var(--rcs-size-xl);
  font-weight: var(--rcs-fw-bold);
  color: var(--rcs-text);
  line-height: 1.1;
}
.rcs-sticky-bar__price del {
  font-size: var(--rcs-size-sm);
  color: var(--rcs-text-subtle);
  font-weight: var(--rcs-fw-regular);
  margin-right: 6px;
}
.rcs-sticky-bar__meta {
  font-size: var(--rcs-size-xs);
  color: var(--rcs-text-muted);
  margin-top: 2px;
}
.rcs-sticky-bar .rcs-btn { flex: 0 0 auto; }
