/* River Plate Wingshooting theme — ports the design language of the
   reference Next.js storefront (reference/ims-stores) onto Bootstrap 5. */

:root {
  --rpw-background: #f5f0e8;
  --rpw-foreground: #1a1a1a;
  --rpw-card: #fbf7f1;
  --rpw-muted: #6d655a;
  --rpw-border: rgba(60, 74, 62, 0.16);
  --rpw-primary: #8b1a1a;
  --rpw-primary-dark: #701414;
  --rpw-secondary: #2b7a78;
  --rpw-accent: #d4682b;
  --rpw-olive: #3c4a3e;
  --rpw-khaki: #c4a76c;
  --rpw-copper: #a46b44;
}

body {
  background:
    radial-gradient(circle at top, rgba(139, 26, 26, 0.12), transparent 30%),
    linear-gradient(180deg, rgba(196, 167, 108, 0.12), transparent 20%),
    var(--rpw-background);
  color: var(--rpw-foreground);
}

/* Bootstrap component recolors.
   NOTE: the legacy theme (style.min.css, loaded before this file) hard-codes a
   blue palette (#36A2EB) with literal declarations and !important active-state
   rules, so Bootstrap 5 CSS-variable overrides alone never win. These rules use
   literal declarations with matching/greater specificity to take the cascade. */
.btn-primary {
  --bs-btn-bg: var(--rpw-primary);
  --bs-btn-border-color: var(--rpw-primary);
  --bs-btn-hover-bg: var(--rpw-primary-dark);
  --bs-btn-hover-border-color: var(--rpw-primary-dark);
  --bs-btn-active-bg: var(--rpw-primary-dark);
  --bs-btn-active-border-color: var(--rpw-primary-dark);
}
.btn-primary,
.btn-primary:disabled,
.btn-primary.disabled {
  color: #fff;
  background-color: var(--rpw-primary) !important;
  border-color: var(--rpw-primary) !important;
}
.btn-primary:hover,
.btn-primary:focus,
.btn-primary.focus,
.btn-primary:not(:disabled):not(.disabled):active,
.btn-primary:not(:disabled):not(.disabled).active,
.show > .btn-primary.dropdown-toggle {
  color: #fff;
  background-color: var(--rpw-primary-dark) !important;
  border-color: var(--rpw-primary-dark) !important;
}
.btn-primary:focus,
.btn-primary.focus,
.btn-primary:not(:disabled):not(.disabled):active:focus,
.btn-primary:not(:disabled):not(.disabled).active:focus {
  box-shadow: 0 0 0 0.125rem rgba(139, 26, 26, 0.35) !important;
}
.btn-outline-primary,
.btn-outline-primary:disabled,
.btn-outline-primary.disabled {
  color: var(--rpw-primary) !important;
  border-color: var(--rpw-primary) !important;
  background-color: transparent;
}
.btn-outline-primary:hover,
.btn-outline-primary:not(:disabled):not(.disabled):active,
.btn-outline-primary:not(:disabled):not(.disabled).active,
.show > .btn-outline-primary.dropdown-toggle {
  color: #fff !important;
  background-color: var(--rpw-primary) !important;
  border-color: var(--rpw-primary) !important;
}
.btn-outline-primary:focus,
.btn-outline-primary.focus,
.btn-outline-primary:not(:disabled):not(.disabled):active:focus,
.btn-outline-primary:not(:disabled):not(.disabled).active:focus {
  box-shadow: 0 0 0 0.125rem rgba(139, 26, 26, 0.25) !important;
}
.btn-success {
  --bs-btn-bg: var(--rpw-secondary);
  --bs-btn-border-color: var(--rpw-secondary);
  --bs-btn-hover-bg: #226360;
  --bs-btn-hover-border-color: #226360;
}
.btn-success,
.btn-success:disabled,
.btn-success.disabled {
  color: #fff;
  background-color: var(--rpw-secondary) !important;
  border-color: var(--rpw-secondary) !important;
}
.btn-success:hover,
.btn-success:focus,
.btn-success.focus,
.btn-success:not(:disabled):not(.disabled):active,
.btn-success:not(:disabled):not(.disabled).active {
  color: #fff;
  background-color: #226360 !important;
  border-color: #226360 !important;
}
.btn-outline-success,
.btn-outline-success:disabled,
.btn-outline-success.disabled {
  color: var(--rpw-secondary) !important;
  border-color: var(--rpw-secondary) !important;
  background-color: transparent;
}
.btn-outline-success:hover,
.btn-outline-success:not(:disabled):not(.disabled):active,
.btn-outline-success:not(:disabled):not(.disabled).active {
  color: #fff !important;
  background-color: var(--rpw-secondary) !important;
  border-color: var(--rpw-secondary) !important;
}

/* Links: legacy theme paints anchors #36A2EB blue; use the deep red brand
   color instead. Class-based components (nav-link, btn, etc.) keep their own
   higher-specificity colors. */
a { color: var(--rpw-primary); }
a:hover { color: var(--rpw-primary-dark); }

/* Form focus: replace the legacy blue focus ring with a muted brand ring. */
.form-control:focus,
.form-select:focus {
  border-color: rgba(139, 26, 26, 0.4);
  box-shadow: 0 0 0 0.125rem rgba(139, 26, 26, 0.15);
}
.text-primary { color: var(--rpw-primary) !important; }
.badge.bg-primary { background-color: var(--rpw-olive) !important; }
.badge.bg-secondary { background-color: var(--rpw-khaki) !important; color: var(--rpw-foreground) !important; }

/* Header — copper bar matching riverplatewingshooting.com */
header.rpw-header {
  background: var(--rpw-copper);
  margin-bottom: 0 !important;
}
header.rpw-header h2,
header.rpw-header .nav-link { color: #fff; }
header.rpw-header .nav-link:hover { color: rgba(255, 255, 255, 0.85); }
header.rpw-header .header-logo-img { background: transparent; }

/* Lodge cards (from reference .wood-card / .texture) */
.wood-card {
  background: linear-gradient(180deg, rgba(255,255,255,0.78), rgba(255,255,255,0.92));
  border: 1px solid var(--rpw-border);
  box-shadow: 0 16px 40px rgba(35, 28, 20, 0.08);
  border-radius: 0.75rem;
}
.texture { position: relative; }
.texture::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,0.03), rgba(255,255,255,0.03)),
    repeating-linear-gradient(135deg, transparent 0, transparent 16px, rgba(60,74,62,0.025) 16px, rgba(60,74,62,0.025) 17px);
  border-radius: inherit;
}

/* Hero */
.rpw-hero {
  position: relative;
  border-radius: 0.75rem;
  overflow: hidden;
  min-height: 320px;
}
.rpw-hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.rpw-hero-overlay {
  position: relative;
  z-index: 1;
  background: linear-gradient(180deg, rgba(20, 16, 12, 0.25), rgba(20, 16, 12, 0.72));
  color: #fff;
  padding: 4rem 2rem 2.5rem;
  min-height: 320px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}
.rpw-hero-eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.8rem;
  color: var(--rpw-khaki);
  margin-bottom: 0.5rem;
}
.rpw-hero-overlay h1 {
  font-weight: 700;
  max-width: 34rem;
}
.rpw-hero-sub { color: rgba(255, 255, 255, 0.85); max-width: 40rem; }

/* Catalog */
.rpw-page-title { color: var(--rpw-olive); font-weight: 700; }
.category-nav { background: transparent !important; border-bottom-color: var(--rpw-border) !important; box-shadow: none !important; }
.category-nav .nav-link { color: var(--rpw-olive); border: 1px solid var(--rpw-border); margin-right: 0.5rem; background: rgba(255,255,255,0.6); }
.category-nav .nav-link:hover { background-color: rgba(139, 26, 26, 0.08); }
.category-nav .nav-link.active { background-color: var(--rpw-olive) !important; color: #fff; border-color: var(--rpw-olive); }
.category-header { border-bottom-color: var(--rpw-khaki) !important; }
.category-header h4 { color: var(--rpw-olive); }
.category-header .back-to-top:hover { color: var(--rpw-primary); }

.product-card { border: 1px solid var(--rpw-border); }
.product-card:hover { box-shadow: 0 16px 40px rgba(35, 28, 20, 0.14); }
.product-card .price, .rpw-price { color: var(--rpw-primary); font-weight: 700; }
.product-card .swiper-container { background-color: var(--rpw-card); border-bottom: 1px solid var(--rpw-border); }
.rpw-card-eyebrow {
  color: var(--rpw-secondary);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.7rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

/* Footer */
.footer { background: transparent; color: var(--rpw-muted); border-top: 1px solid var(--rpw-border); padding-top: 1.5rem; }

/* Auth pages */
.rpw-auth-card { max-width: 420px; margin: 3rem auto; }
