/* RS brand - Stage D demo (New Era layout patterns, original branding) */

:root {
  --rs-brown: #924628;
  --rs-red: #E31B23;
  --rs-black: #000000;
  --rs-white: #ffffff;
  --gray-50: #fafafa;
  --gray-100: #f5f5f5;
  --gray-200: #e5e5e5;
  --gray-400: #a3a3a3;
  --gray-600: #525252;
  --gray-800: #262626;
  --font: "Helvetica Neue", Helvetica, Arial, system-ui, sans-serif;
  --touch: 44px;
}

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--rs-black);
  background: var(--rs-white);
  line-height: 1.45;
  font-size: 14px;
}

a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; display: block; }

/* Promo bar - New Era pattern */
.promo-bar {
  background: var(--rs-black);
  color: var(--rs-white);
  text-align: center;
  padding: 0.55rem 1rem;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.demo-banner {
  background: var(--rs-brown);
  color: var(--rs-white);
  text-align: center;
  padding: 0.4rem 1rem;
  font-size: 11px;
}

/* Header */
.site-header {
  background: var(--rs-white);
  border-bottom: 1px solid var(--gray-200);
  position: sticky;
  top: 0;
  z-index: 200;
}

.header-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0.75rem 1.25rem;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1rem;
}

.header-left { display: flex; align-items: center; gap: 0.75rem; }

.menu-toggle {
  background: none;
  border: none;
  padding: 0.35rem;
  cursor: pointer;
  min-width: var(--touch);
  min-height: var(--touch);
}

.logo img {
  height: 40px;
  width: auto;
}

.header-nav {
  display: none;
  justify-content: center;
  gap: 1.75rem;
}

.header-nav a {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.header-nav a:hover { color: var(--rs-red); text-decoration: none; }

.header-icons {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 0.25rem;
}

.lang-switcher {
  display: flex;
  border: 1px solid var(--gray-200);
  border-radius: 4px;
  overflow: hidden;
  margin-right: 0.25rem;
}

.lang-btn {
  background: var(--rs-white);
  border: none;
  padding: 0.35rem 0.55rem;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  color: var(--gray-600);
}

.lang-btn.active {
  background: var(--rs-red);
  color: var(--rs-white);
}

.admin-sidebar .lang-btn {
  background: transparent;
  color: rgba(255,255,255,0.8);
}

.admin-sidebar .lang-btn.active {
  background: var(--rs-red);
  color: var(--rs-white);
}

.icon-btn {
  background: none;
  border: none;
  padding: 0.5rem;
  cursor: pointer;
  min-width: var(--touch);
  min-height: var(--touch);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.icon-btn svg { width: 22px; height: 22px; }

.icon-btn .badge {
  position: absolute;
  top: 4px;
  right: 4px;
  background: var(--rs-red);
  color: var(--rs-white);
  font-size: 10px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-mobile {
  display: none;
  flex-direction: column;
  padding: 0 1.25rem 1rem;
  border-top: 1px solid var(--gray-200);
}

.nav-mobile.open { display: flex; }

.nav-mobile a {
  padding: 0.75rem 0;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 13px;
  border-bottom: 1px solid var(--gray-100);
}

@media (min-width: 900px) {
  .menu-toggle { display: none; }
  .header-nav { display: flex; }
  .nav-mobile { display: none !important; }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.5rem;
  font-weight: 700;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border: none;
  cursor: pointer;
  text-decoration: none;
}

.btn:hover { text-decoration: none; opacity: 0.92; }

.btn-primary {
  background: var(--rs-red);
  color: var(--rs-white);
}

.btn-secondary {
  background: var(--rs-black);
  color: var(--rs-white);
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--rs-black);
  color: var(--rs-black);
}

/* Layout */
.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

main { min-height: 50vh; }

/* Hero home */
.hero-rs {
  background: var(--rs-brown);
  color: var(--rs-white);
  padding: 3rem 1.25rem;
  text-align: center;
}

.hero-rs h1 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.5rem, 4vw, 2.25rem);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.hero-rs p {
  margin: 0 auto 1.5rem;
  max-width: 480px;
  opacity: 0.95;
}

/* Collection layout - New Era style */
.collection-header {
  padding: 2rem 0 1rem;
  border-bottom: 1px solid var(--gray-200);
  margin-bottom: 1.5rem;
}

.collection-header h1 {
  margin: 0 0 0.35rem;
  font-size: 1.75rem;
  font-weight: 700;
  text-transform: uppercase;
}

.collection-meta {
  color: var(--gray-600);
  font-size: 13px;
}

.collection-layout {
  display: grid;
  gap: 2rem;
  padding-bottom: 3rem;
}

@media (min-width: 900px) {
  .collection-layout {
    grid-template-columns: 240px 1fr;
    align-items: start;
  }
}

/* Filters sidebar */
.filters-sidebar {
  border: 1px solid var(--gray-200);
  padding: 1rem;
}

.filters-sidebar h3 {
  margin: 0 0 0.75rem;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.filter-group { margin-bottom: 1.25rem; }

.filter-group-title {
  font-weight: 700;
  font-size: 12px;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
  display: flex;
  justify-content: space-between;
  cursor: pointer;
}

.filter-options label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0;
  font-size: 13px;
  cursor: pointer;
}

.filter-options input { accent-color: var(--rs-red); }

.filters-mobile-bar {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

@media (min-width: 900px) {
  .filters-mobile-bar { display: none; }
  .filters-sidebar { display: block; }
}

@media (max-width: 899px) {
  .filters-sidebar {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 300;
    background: var(--rs-white);
    overflow-y: auto;
    padding: 1.5rem;
  }
  .filters-sidebar.open { display: block; }
  .filter-close {
    float: right;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
  }
}

.collection-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.sort-select {
  padding: 0.5rem 2rem 0.5rem 0.75rem;
  border: 1px solid var(--gray-200);
  font: inherit;
  background: var(--rs-white);
}

/* Product grid */
.product-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem 0.75rem;
}

@media (min-width: 640px) {
  .product-grid { grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
}

@media (min-width: 1100px) {
  .product-grid { grid-template-columns: repeat(4, 1fr); }
}

.product-card { position: relative; }

.product-card a:hover { text-decoration: none; }

.product-image {
  aspect-ratio: 1;
  background: var(--gray-100);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  margin-bottom: 0.65rem;
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-image .placeholder-jersey {
  width: 70%;
  height: 80%;
  background: linear-gradient(180deg, var(--gray-200) 0%, var(--gray-100) 100%);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: var(--gray-600);
  text-transform: uppercase;
}

.product-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background: var(--rs-black);
  color: var(--rs-white);
  font-size: 10px;
  font-weight: 700;
  padding: 0.25rem 0.5rem;
  text-transform: uppercase;
  z-index: 1;
}

.product-info h3 {
  margin: 0 0 0.35rem;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.35;
}

.product-price {
  margin: 0;
  font-weight: 600;
  font-size: 14px;
}

.product-card.hidden { display: none; }

/* Breadcrumb */
.breadcrumb {
  font-size: 12px;
  color: var(--gray-600);
  padding: 1rem 0 0;
}

.breadcrumb a { color: var(--gray-600); }

/* PDP */
.pdp-layout {
  display: grid;
  gap: 2rem;
  padding: 1rem 0 5rem;
}

@media (min-width: 900px) {
  .pdp-layout { grid-template-columns: 1fr 1fr; padding-bottom: 3rem; }
}

.pdp-gallery-main {
  aspect-ratio: 1;
  background: var(--gray-100);
  display: flex;
  align-items: center;
  justify-content: center;
}

.pdp-thumbs {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.pdp-thumb {
  width: 72px;
  height: 72px;
  border: 2px solid transparent;
  background: var(--gray-100);
  cursor: pointer;
  padding: 0;
}

.pdp-thumb.active { border-color: var(--rs-black); }

.pdp-details h1 {
  margin: 0 0 0.5rem;
  font-size: 1.5rem;
  font-weight: 700;
}

.pdp-price { font-size: 1.25rem; font-weight: 700; margin-bottom: 1rem; }

.pdp-sku { font-size: 12px; color: var(--gray-600); margin-bottom: 1rem; }

.size-label {
  font-weight: 700;
  font-size: 12px;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
  display: block;
}

.size-options {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.size-btn {
  min-width: var(--touch);
  min-height: var(--touch);
  padding: 0 0.75rem;
  border: 1px solid var(--gray-200);
  background: var(--rs-white);
  cursor: pointer;
  font-weight: 600;
  font-size: 13px;
}

.size-btn.selected {
  border-color: var(--rs-black);
  background: var(--rs-black);
  color: var(--rs-white);
}

.size-btn:disabled {
  opacity: 0.35;
  text-decoration: line-through;
  cursor: not-allowed;
}

.size-guide {
  font-size: 12px;
  text-decoration: underline;
  margin-bottom: 1.25rem;
  display: inline-block;
}

.pdp-actions { display: flex; flex-direction: column; gap: 0.65rem; }

.pdp-actions .btn { width: 100%; }

.pdp-section {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--gray-200);
}

.pdp-section h2 {
  font-size: 13px;
  text-transform: uppercase;
  margin: 0 0 0.75rem;
}

/* Sticky mobile CTA - New Era pattern */
.pdp-sticky-bar {
  display: flex;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 0.75rem 1rem;
  background: var(--rs-white);
  border-top: 1px solid var(--gray-200);
  z-index: 150;
  gap: 0.75rem;
  align-items: center;
}

.pdp-sticky-bar .pdp-price { margin: 0; font-size: 1rem; flex: 1; }

@media (min-width: 900px) {
  .pdp-sticky-bar { display: none; }
}

/* Forms */
.page-intro { padding: 2rem 0 1rem; max-width: 640px; }

.page-intro h1 {
  margin: 0 0 0.5rem;
  font-size: 1.75rem;
  text-transform: uppercase;
}

.form-card {
  background: var(--rs-white);
  border: 1px solid var(--gray-200);
  padding: 1.5rem;
  max-width: 560px;
  margin-bottom: 3rem;
}

.form-card-wide { max-width: 720px; }

.form-section {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--gray-200);
}

.form-section:last-of-type { border-bottom: none; margin-bottom: 0; }

.form-section h2 {
  margin: 0 0 1rem;
  font-size: 1rem;
  text-transform: uppercase;
  color: var(--rs-brown);
}

.form-hint {
  font-size: 12px;
  color: var(--gray-600, #666);
  margin: 0 0 0.75rem;
}

.market-hint {
  background: #fff8e6;
  border-left: 4px solid var(--rs-brown);
  padding: 0.75rem 1rem;
  font-size: 12px;
  margin-bottom: 1rem;
}

.market-hint p { margin: 0 0 0.35rem; }
.market-hint p:last-child { margin-bottom: 0; }

.size-grid-wrap { overflow-x: auto; margin-bottom: 0.5rem; }

.size-grid {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.size-grid th,
.size-grid td {
  border: 1px solid var(--gray-200);
  padding: 0.35rem;
  text-align: center;
}

.size-grid th {
  background: var(--gray-100);
  font-size: 11px;
  text-transform: uppercase;
}

.size-grid input {
  width: 3rem;
  padding: 0.4rem;
  border: 1px solid var(--gray-200);
  text-align: center;
  font: inherit;
}

.deco-fieldset { border: none; margin: 0; padding: 0; }

.deco-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.75rem;
}

.deco-option { position: relative; }

.deco-option input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.deco-option label {
  display: block;
  border: 2px solid var(--gray-200);
  padding: 1rem 0.75rem;
  cursor: pointer;
  text-align: center;
  height: 100%;
  transition: border-color 0.15s, background 0.15s;
}

.deco-option input:focus-visible + label {
  outline: 2px solid var(--rs-red);
  outline-offset: 2px;
}

.deco-option input:checked + label {
  border-color: var(--rs-red);
  background: #fff5f5;
}

.deco-name {
  display: block;
  font-weight: 800;
  font-size: 14px;
  text-transform: uppercase;
}

.deco-sub {
  display: block;
  font-size: 11px;
  color: var(--gray-600, #666);
  margin-top: 0.2rem;
}

.deco-badge {
  display: block;
  font-size: 10px;
  font-weight: 700;
  color: var(--rs-brown);
  margin-top: 0.5rem;
  text-transform: uppercase;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.custom-cta-band {
  background: linear-gradient(135deg, var(--rs-brown) 0%, #6b3419 100%);
  color: var(--rs-white);
  padding: 2rem 1.25rem;
  margin: 0 0 2.5rem;
  text-align: center;
}

.custom-cta-band h2 {
  margin: 0 0 0.5rem;
  font-size: 1.35rem;
  text-transform: uppercase;
}

.custom-cta-band p {
  margin: 0 0 1rem;
  font-size: 14px;
  opacity: 0.95;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
}

.custom-cta-band .btn-outline {
  border-color: var(--rs-white);
  color: var(--rs-white);
}

.form-group { margin-bottom: 1rem; }

.form-group label {
  display: block;
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  margin-bottom: 0.35rem;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--gray-200);
  font: inherit;
}

.checkbox-group {
  display: flex;
  gap: 0.5rem;
  font-size: 12px;
  align-items: flex-start;
}

.checkbox-group input { width: auto; margin-top: 0.2rem; }

.form-success {
  display: none;
  background: #ecfdf5;
  border: 1px solid #10b981;
  padding: 1rem;
  margin-top: 1rem;
  font-size: 13px;
}

.form-success.visible { display: block; }

/* Admin */
.admin-layout {
  display: grid;
  min-height: calc(100vh - 100px);
}

@media (min-width: 768px) {
  .admin-layout { grid-template-columns: 220px 1fr; }
}

.admin-sidebar {
  background: var(--rs-black);
  color: var(--rs-white);
  padding: 1.25rem;
}

.admin-sidebar .logo img { height: 32px; }

.admin-nav { list-style: none; margin: 1.5rem 0 0; padding: 0; }

.admin-nav a {
  display: block;
  padding: 0.6rem 0.75rem;
  color: var(--rs-white);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  border-radius: 4px;
}

.admin-nav a:hover,
.admin-nav a.active { background: var(--rs-red); text-decoration: none; }

.admin-main {
  padding: 1.5rem;
  background: var(--gray-50);
}

.admin-note {
  background: #fff8e6;
  border-left: 4px solid var(--rs-brown);
  padding: 0.75rem 1rem;
  font-size: 13px;
  margin-bottom: 1.5rem;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.kpi-card {
  background: var(--rs-white);
  border: 1px solid var(--gray-200);
  padding: 1.25rem;
}

.kpi-card .value {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--rs-red);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--rs-white);
  border: 1px solid var(--gray-200);
  font-size: 13px;
}

.data-table th,
.data-table td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--gray-200);
}

.data-table th {
  background: var(--gray-100);
  font-size: 11px;
  text-transform: uppercase;
}

.status {
  display: inline-block;
  padding: 0.2rem 0.5rem;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.status-draft { background: var(--gray-200); }
.status-sent { background: #dbeafe; }
.status-accepted { background: #d1fae5; }

/* Footer - New Era pattern */
.site-footer {
  background: var(--rs-black);
  color: var(--rs-white);
  padding: 2.5rem 1.25rem 1.5rem;
  margin-top: 3rem;
}

.footer-grid {
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  gap: 2rem;
}

@media (min-width: 768px) {
  .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; }
}

.site-footer h4 {
  margin: 0 0 1rem;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.site-footer ul { list-style: none; margin: 0; padding: 0; }

.site-footer li { margin-bottom: 0.4rem; }

.site-footer a {
  color: rgba(255,255,255,0.8);
  font-size: 13px;
}

.newsletter-box input {
  width: 100%;
  padding: 0.75rem;
  border: none;
  margin-bottom: 0.5rem;
}

.footer-copy {
  text-align: center;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255,255,255,0.15);
  font-size: 11px;
  opacity: 0.7;
  max-width: 1400px;
  margin-left: auto;
  margin-right: auto;
}

/* Toast */
.toast {
  position: fixed;
  bottom: 5rem;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  background: var(--rs-black);
  color: var(--rs-white);
  padding: 0.85rem 1.25rem;
  font-size: 13px;
  z-index: 400;
  opacity: 0;
  transition: opacity 0.2s, transform 0.2s;
  max-width: 90%;
  text-align: center;
}

.toast.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.hidden { display: none !important; }

.section-title {
  margin: 0 0 1.25rem;
  font-size: 1.25rem;
  text-transform: uppercase;
}
