/*
Theme Name: RaoVat Marketplace
Theme URI: https://raovat.ca
Author: RaoVat
Author URI: https://raovat.ca
Description: Clean modern marketplace theme for raovat.ca — a Vietnamese-Canadian classifieds site built on AWPCP. Photo-first card grid, warm palette, mobile-first.
Version: 0.1.1
Requires at least: 6.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: raovat-marketplace
Tags: classifieds, marketplace, vietnamese, bilingual, responsive
*/

/* ============================================================
   1. DESIGN TOKENS
   ============================================================ */
:root {
  /* Brand palette — warm, modern, references VN flag without being heavy-handed */
  --rv-primary:        #D7263D;  /* coral red — buttons, links, accents */
  --rv-primary-dark:   #A81B2E;  /* hover state */
  --rv-primary-soft:   #FCE9EC;  /* tinted backgrounds */
  --rv-accent:         #F4B400;  /* gold — used very sparingly (badges, stars) */

  /* Neutrals */
  --rv-ink:            #1F2937;  /* primary text */
  --rv-ink-soft:       #4B5563;  /* secondary text */
  --rv-muted:          #9CA3AF;  /* meta/timestamps */
  --rv-line:           #E5E7EB;  /* borders */
  --rv-line-soft:      #F3F4F6;  /* subtle separators */
  --rv-surface:        #FFFFFF;  /* cards */
  --rv-bg:             #FAFAF7;  /* warm off-white page background */

  /* Status */
  --rv-success:        #16A34A;
  --rv-danger:         #DC2626;

  /* Autumn maple — matches the warm leaves in the hero illustration */
  --rv-autumn:         #E76F51;
  --rv-autumn-dark:    #B24B32;

  /* Shape */
  --rv-radius-sm:      6px;
  --rv-radius:         10px;
  --rv-radius-lg:      16px;

  /* Elevation */
  --rv-shadow-sm:      0 1px 2px rgba(17, 24, 39, 0.04), 0 1px 1px rgba(17, 24, 39, 0.03);
  --rv-shadow:         0 4px 12px rgba(17, 24, 39, 0.06), 0 2px 4px rgba(17, 24, 39, 0.04);
  --rv-shadow-lg:      0 12px 32px rgba(17, 24, 39, 0.10);

  /* Spacing scale */
  --rv-space-1: 4px;
  --rv-space-2: 8px;
  --rv-space-3: 12px;
  --rv-space-4: 16px;
  --rv-space-5: 24px;
  --rv-space-6: 32px;
  --rv-space-8: 48px;
  --rv-space-10: 64px;

  /* Layout */
  --rv-content-max: 1200px;
  --rv-content-pad: 20px;

  /* Typography — emoji fonts appended so 🛍️💼🏠🤝 render natively */
  --rv-font-sans: "Be Vietnam Pro", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
  --rv-font-display: "Be Vietnam Pro", "Inter", system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji";
}

/* ============================================================
   2. RESET + BASE
   ============================================================ */
*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--rv-font-sans);
  font-size: 16px;
  line-height: 1.55;
  color: var(--rv-ink);
  background: var(--rv-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* (page-edge vignette removed per design preference) */

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

a {
  color: var(--rv-primary);
  text-decoration: none;
  transition: color .15s ease;
}
a:hover { color: var(--rv-primary-dark); }

h1, h2, h3, h4 {
  font-family: var(--rv-font-display);
  color: var(--rv-ink);
  line-height: 1.25;
  margin: 0 0 var(--rv-space-3);
  font-weight: 700;
  letter-spacing: -0.01em;
}
h1 { font-size: clamp(1.75rem, 3vw + 1rem, 2.5rem); }
h2 { font-size: clamp(1.4rem, 2vw + .8rem, 1.875rem); }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.0625rem; }

p { margin: 0 0 var(--rv-space-4); }

/* ============================================================
   3. LAYOUT
   ============================================================ */
.rv-container {
  width: 100%;
  max-width: var(--rv-content-max);
  margin: 0 auto;
  padding: 0 var(--rv-content-pad);
}

.rv-section { padding: var(--rv-space-8) 0; }
.rv-section--tight { padding: var(--rv-space-6) 0; }

/* ============================================================
   4. HEADER
   ============================================================ */
.rv-header {
  background: var(--rv-surface);
  border-bottom: 1px solid var(--rv-line);
  position: sticky;
  top: 0;
  z-index: 50;
}

.rv-header__inner {
  display: flex;
  align-items: center;
  gap: var(--rv-space-5);
  min-height: 68px;
  padding-top: var(--rv-space-3);
  padding-bottom: var(--rv-space-3);
}

.rv-logo {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  text-decoration: none;
}
.rv-logo__img {
  display: block;
  height: 44px;
  width: auto;
  max-width: 100%;
}
/* Slightly smaller in the sticky header on tight screens; full size in the footer */
.rv-header .rv-logo__img { height: 40px; }
.rv-footer .rv-logo__img { height: 48px; }
@media (max-width: 720px) {
  .rv-header .rv-logo__img { height: 34px; }
}

.rv-header__search {
  flex: 1 1 auto;
  max-width: 460px;
}

/* ----- City selector (Kijiji-style) ----- */
.rv-city-pick {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: var(--rv-space-2);
  padding: 8px 10px 8px 12px;
  border: 1px solid var(--rv-line);
  border-radius: 999px;
  background: var(--rv-surface);
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease;
  flex-shrink: 0;
  max-width: 200px;
}
.rv-city-pick:hover { border-color: var(--rv-primary); background: var(--rv-primary-soft); }
.rv-city-pick__icon {
  width: 16px;
  height: 16px;
  color: var(--rv-primary);
  flex-shrink: 0;
  pointer-events: none;
}
.rv-city-pick__chev {
  width: 14px;
  height: 14px;
  color: var(--rv-muted);
  flex-shrink: 0;
  pointer-events: none;
}
.rv-city-pick select {
  border: none;
  background: transparent;
  font-size: .9rem;
  font-weight: 500;
  color: var(--rv-ink);
  font-family: inherit;
  cursor: pointer;
  padding: 0;
  outline: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  max-width: 140px;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
}

/* ----- Language toggle (VI / EN pill) ----- */
.rv-lang {
  display: inline-flex;
  border: 1px solid var(--rv-line);
  border-radius: 999px;
  overflow: hidden;
  background: var(--rv-surface);
  flex-shrink: 0;
}
.rv-lang__btn {
  appearance: none;
  border: none;
  background: transparent;
  padding: 7px 12px;
  font-size: .8125rem;
  font-weight: 600;
  color: var(--rv-ink-soft);
  cursor: pointer;
  font-family: inherit;
  letter-spacing: .02em;
  transition: background .15s ease, color .15s ease;
}
.rv-lang__btn:hover { color: var(--rv-ink); }
.rv-lang__btn.is-active {
  background: var(--rv-primary);
  color: #fff;
}
.rv-lang__btn + .rv-lang__btn {
  border-left: 1px solid var(--rv-line);
}
.rv-lang__btn.is-active + .rv-lang__btn,
.rv-lang__btn:has(+ .is-active) {
  border-left-color: transparent;
}
.rv-header__actions {
  display: flex;
  align-items: center;
  gap: var(--rv-space-3);
  flex-shrink: 0;
  margin-left: auto;
}

/* ============================================================
   5. SEARCH BAR
   ============================================================ */
.rv-search {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}
.rv-search input[type="text"],
.rv-search input[type="search"] {
  width: 100%;
  height: 44px;
  padding: 0 110px 0 42px;
  border: 1px solid var(--rv-line);
  border-radius: 999px;
  background: var(--rv-bg);
  font-size: .95rem;
  color: var(--rv-ink);
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.rv-search input:focus {
  border-color: var(--rv-primary);
  box-shadow: 0 0 0 3px var(--rv-primary-soft);
  background: var(--rv-surface);
}
.rv-search__icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--rv-muted);
  pointer-events: none;
}
.rv-search button {
  position: absolute;
  right: 4px;
  top: 4px;
  bottom: 4px;
  padding: 0 18px;
  border: none;
  border-radius: 999px;
  background: var(--rv-autumn);
  color: #fff;
  font-weight: 600;
  font-size: .9rem;
  cursor: pointer;
  opacity: 1;
  transition: background .15s ease, opacity .15s ease;
}
.rv-search button:hover,
.rv-search button:focus {
  background: var(--rv-autumn-dark);
  opacity: 0.5;
}

/* Compact header search — icon-only button, doesn't get bloated by bilingual labels */
.rv-search--compact input[type="search"] { padding-right: 52px; }
.rv-search--compact button {
  padding: 0;
  width: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.rv-search--compact button svg { display: block; }

/* ============================================================
   6. BUTTONS
   ============================================================ */
.rv-btn,
.rv-btn:visited {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--rv-space-2);
  padding: 10px 18px;
  border-radius: 999px;
  font-weight: 600;
  font-size: .95rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background .15s ease, color .15s ease, border-color .15s ease, transform .05s ease, opacity .15s ease;
  white-space: nowrap;
  text-decoration: none;
  line-height: 1;
}
.rv-btn:active { transform: translateY(1px); }

/* Primary buttons in maple-leaf orange — 100% opacity by default, 50% on hover */
.rv-btn--primary,
.rv-btn--primary:visited {
  background: var(--rv-autumn);
  color: #fff;
  opacity: 1;
}
.rv-btn--primary:hover,
.rv-btn--primary:focus {
  background: var(--rv-autumn-dark);
  color: #fff;
  opacity: 0.5;
}

.rv-btn--ghost,
.rv-btn--ghost:visited {
  background: transparent;
  color: var(--rv-ink);
  border-color: var(--rv-line);
}
.rv-btn--ghost:hover { background: var(--rv-line-soft); color: var(--rv-ink); }

.rv-btn--lg {
  padding: 14px 28px;
  font-size: 1rem;
}

/* ============================================================
   7. HERO
   ============================================================ */
.rv-hero {
  position: relative;
  /* Layered background, painted bottom→top:
     1. Base: pink-cream gradient (fallback shown if anything is transparent)
     2. Illustration at cover (fills the hero)
     3. Horizontal autumn-orange wash — solid orange at the very edges, fading to
        transparent in the middle. Blends the image's built-in cream margins into
        autumn at the screen edges.
     4. Vertical cream wash — keeps text readable at the top and bottom. */
  background:
    linear-gradient(180deg,
      rgba(252, 233, 236, 0.35) 0%,
      rgba(250, 250, 247, 0.05) 35%,
      rgba(250, 250, 247, 0.05) 60%,
      rgba(252, 233, 236, 0.55) 100%
    ),
    linear-gradient(90deg,
      var(--rv-autumn)             0%,
      rgba(231, 111, 81, 0.85)     4%,
      rgba(231, 111, 81, 0.45)    10%,
      rgba(231, 111, 81, 0.10)    18%,
      rgba(231, 111, 81, 0)       26%,
      rgba(231, 111, 81, 0)       74%,
      rgba(231, 111, 81, 0.10)    82%,
      rgba(231, 111, 81, 0.45)    90%,
      rgba(231, 111, 81, 0.85)    96%,
      var(--rv-autumn)           100%
    ),
    url('/wp-content/themes/raovat-marketplace/assets/background-image.png') center center / cover no-repeat,
    linear-gradient(180deg, var(--rv-primary-soft) 0%, var(--rv-bg) 100%);
  /* Hero shrunk to ~2/3 of previous height */
  min-height: clamp(280px, 37.5vw, 480px);
  /* Text anchors to the TOP of the hero so it sits over the cream sky portion
     of the illustration, unobstructed by the bridge below. */
  padding: var(--rv-space-5) 0 var(--rv-space-6);
  text-align: center;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}
.rv-hero > * { position: relative; z-index: 1; }
.rv-hero .rv-container {
  /* No extra top padding — title sits at the top of the hero, in the cream sky area */
  padding-top: 0;
}
.rv-hero__title {
  font-size: clamp(2rem, 4vw + 1rem, 3rem);
  margin-bottom: var(--rv-space-3);
  text-shadow: 0 1px 0 rgba(250, 250, 247, 0.7), 0 2px 16px rgba(250, 250, 247, 0.6);
}
.rv-hero__subtitle {
  font-size: 1.125rem;
  color: var(--rv-ink-soft);
  margin: 0 auto var(--rv-space-6);
  max-width: 600px;
  text-shadow: 0 1px 0 rgba(250, 250, 247, 0.7);
}
.rv-hero__search {
  max-width: 600px;
  margin: 0 auto;
}

/* On narrow screens, lock the image to the bottom so it doesn't compete with the title.
   Also fade it more aggressively. */
@media (max-width: 720px) {
  .rv-hero::before {
    background-position: center bottom;
    background-size: 140% auto;
    opacity: 0.8;
  }
  .rv-hero::after {
    background: linear-gradient(
      180deg,
      rgba(250, 250, 247, 0.92) 0%,
      rgba(252, 233, 236, 0.60) 100%
    );
  }
}
.rv-hero__search input { height: 56px; font-size: 1rem; }
.rv-hero__search button { font-size: 1rem; padding: 0 24px; }

/* ============================================================
   8. CATEGORY TILES
   ============================================================ */
.rv-categories {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: var(--rv-space-4);
  margin: var(--rv-space-6) 0;
}
@media (max-width: 1100px) { .rv-categories { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 700px)  { .rv-categories { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 460px)  { .rv-categories { grid-template-columns: 1fr; } }

.rv-cat {
  background: var(--rv-surface);
  border: 1px solid var(--rv-line);
  border-radius: var(--rv-radius-lg);
  padding: var(--rv-space-5);
  text-align: left;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
  display: flex;
  flex-direction: column;
  gap: var(--rv-space-2);
  text-decoration: none;
  color: var(--rv-ink);
}
.rv-cat:hover {
  transform: translateY(-2px);
  box-shadow: var(--rv-shadow);
  border-color: var(--rv-primary);
  color: var(--rv-ink);
}
.rv-cat__icon {
  width: 52px;
  height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--rv-primary-soft);
  color: var(--rv-primary);
  border-radius: var(--rv-radius);
  /* Force native emoji rendering — the Be Vietnam Pro chain would otherwise hide glyphs */
  font-family: "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji", sans-serif;
  font-size: 1.75rem;
  line-height: 1;
  margin-bottom: var(--rv-space-2);
}
.rv-cat__title {
  font-weight: 700;
  font-size: 1.0625rem;
  color: var(--rv-ink);
  margin: 0;
}
.rv-cat__desc {
  font-size: .875rem;
  color: var(--rv-muted);
  margin: 0;
}

/* ============================================================
   9. LISTING CARD GRID (overrides AWPCP defaults)
   ============================================================ */
.awpcp-classifieds-listings,
.awpcp-classifieds-grid,
.rv-listings {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: var(--rv-space-4);
  margin: var(--rv-space-5) 0;
  list-style: none;
  padding: 0;
}

.awpcp-classifieds-listings > li,
.awpcp-classifieds-grid > li,
.awpcp-listings-row,
.rv-listing-card {
  background: var(--rv-surface);
  border: 1px solid var(--rv-line);
  border-radius: var(--rv-radius);
  overflow: hidden;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
  display: flex;
  flex-direction: column;
  padding: 0;
  margin: 0;
  list-style: none;
}

.awpcp-classifieds-listings > li:hover,
.awpcp-listings-row:hover,
.rv-listing-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--rv-shadow);
  border-color: var(--rv-primary);
}

/* AWPCP image area */
.awpcp-listing-primary-image,
.awpcp-listing-image,
.rv-listing-card__img {
  aspect-ratio: 4 / 3;
  width: 100%;
  background: var(--rv-line-soft);
  object-fit: cover;
  display: block;
}

.awpcp-listing-title,
.rv-listing-card__title {
  font-size: .95rem;
  font-weight: 600;
  color: var(--rv-ink);
  line-height: 1.35;
  margin: var(--rv-space-3) var(--rv-space-3) var(--rv-space-1);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* AWPCP browse excerpt layout: compact thumbnail column + aligned content column */
.awpcp-listing-excerpt {
  width: 100% !important;
  float: none !important;
  clear: both;
  margin: 0 0 12px !important;
  padding: 0 !important;
  display: grid !important;
  grid-template-columns: 68px 1fr;
  gap: 12px;
  align-items: start;
}
.awpcp-listing-excerpt-thumbnail {
  width: 68px;
  float: none !important;
}
.awpcp-listing-excerpt-thumbnail .awpcp-listing-primary-image-listing-link,
.awpcp-listing-excerpt-thumbnail img.awpcp-listing-primary-image-thumbnail {
  width: 68px !important;
  height: 68px !important;
  display: block;
  object-fit: cover;
  border-radius: 8px;
}
.awpcp-listing-excerpt-inner {
  float: none !important;
  display: block !important;
  width: auto !important;
  min-width: 0;
}

.awpcp-listing-price,
.rv-listing-card__price {
  color: var(--rv-primary);
  font-weight: 700;
  font-size: 1.0625rem;
  margin: 0 var(--rv-space-3) var(--rv-space-1);
}

.awpcp-listing-region,
.awpcp-listing-meta,
.rv-listing-card__meta {
  color: var(--rv-muted);
  font-size: .8125rem;
  margin: 0 var(--rv-space-3) var(--rv-space-3);
  display: flex;
  align-items: center;
  gap: var(--rv-space-1);
}

/* AWPCP listing detail page */
.awpcp-single-ad-content {
  max-width: var(--rv-content-max);
  margin: var(--rv-space-6) auto;
  padding: var(--rv-space-6);
  background: var(--rv-surface);
  border: 1px solid var(--rv-line);
  border-radius: var(--rv-radius-lg);
}

/* Hide AWPCP's redundant in-page chrome on listing detail —
   the classifieds menu and search bar duplicate the header nav. */
.awpcp-classifieds-menu,
.awpcp-classifieds-search-bar { display: none !important; }

/* Listing detail image gallery — promote thumbnails into a responsive grid of
   large tiles. The UL wrapping .awpcp-attachments-list-item has no class of its
   own, so we target it via :has(). Clicking any tile opens the full-size image
   in AWPCP's built-in lightbox (thickbox). */
ul:has(> .awpcp-attachments-list-item) {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)) !important;
  gap: var(--rv-space-3) !important;
  list-style: none !important;
  padding: 0 !important;
  margin: var(--rv-space-4) 0 var(--rv-space-5) !important;
}
.awpcp-attachments-list-item {
  margin: 0 !important;
  padding: 0 !important;
  display: block !important;
  float: none !important;
  width: auto !important;
}
.awpcp-attachments-list-item > a,
.awpcp-attachment-thumbnail-container {
  display: block;
  border-radius: var(--rv-radius);
  overflow: hidden;
  border: 1px solid var(--rv-line);
  background: var(--rv-line-soft);
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.awpcp-attachments-list-item > a:hover,
.awpcp-attachment-thumbnail-container:hover {
  transform: translateY(-2px);
  box-shadow: var(--rv-shadow);
  border-color: var(--rv-autumn);
}
.awpcp-attachments-list-item img,
.awpcp-attachment-thumbnail-container img {
  width: 100% !important;
  height: auto !important;
  aspect-ratio: 1 / 1 !important;
  object-fit: cover !important;
  display: block !important;
  max-width: none !important;
  max-height: none !important;
}

/* Hide AWPCP's standalone "primary image" — the gallery grid below makes it redundant. */
.awpcp-ad-primary-image,
img.awpcp-ad-primary-image,
.awpcp-show-ad-listing-main-image,
.awpcp-listing-primary-image-large { display: none !important; }

/* AWPCP forms (place ad, reply) */
.awpcp-form input[type="text"],
.awpcp-form input[type="email"],
.awpcp-form input[type="tel"],
.awpcp-form input[type="number"],
.awpcp-form input[type="url"],
.awpcp-form select,
.awpcp-form textarea,
form#awpcp-search-form input[type="text"],
form#awpcp-search-form select,
form#awpcp-search-form input[type="number"] {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--rv-line);
  border-radius: var(--rv-radius-sm);
  font-size: .95rem;
  font-family: inherit;
  background: var(--rv-surface);
  color: var(--rv-ink);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.awpcp-form input:focus,
.awpcp-form select:focus,
.awpcp-form textarea:focus,
form#awpcp-search-form input:focus,
form#awpcp-search-form select:focus {
  outline: none;
  border-color: var(--rv-primary);
  box-shadow: 0 0 0 3px var(--rv-primary-soft);
}

/* Make native <select> dropdowns obviously clickable — add a chevron and pointer */
.awpcp-form select,
form#awpcp-search-form select,
.rv-select {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  cursor: pointer;
  padding-right: 40px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236B7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px 16px;
}

/* The Select2 widget AWPCP enhances the category <select> with — style to match the rest */
.select2-container--default .select2-selection--single,
.select2-container--default .select2-selection--multiple {
  height: 42px !important;
  padding: 4px 8px !important;
  border: 1px solid var(--rv-line) !important;
  border-radius: var(--rv-radius-sm) !important;
  background: var(--rv-surface) !important;
  display: flex !important;
  align-items: center !important;
  cursor: pointer;
}
.select2-container--default .select2-selection--single .select2-selection__rendered,
.select2-container--default .select2-selection--multiple .select2-selection__rendered {
  color: var(--rv-ink) !important;
  font-size: .95rem !important;
  line-height: 1.5 !important;
  padding: 0 6px !important;
}
.select2-container--default .select2-selection--single .select2-selection__placeholder,
.select2-container--default .select2-selection--multiple .select2-selection__placeholder {
  color: var(--rv-muted) !important;
}
.select2-container--default .select2-selection--single .select2-selection__arrow {
  height: 40px !important;
  right: 8px !important;
}
/* Multi-select Select2 doesn't have an arrow element — add one via pseudo-element */
.select2-container--default .select2-selection--multiple {
  position: relative;
  padding-right: 36px !important;
}
.select2-container--default .select2-selection--multiple::after {
  content: '';
  position: absolute;
  top: 50%;
  right: 12px;
  width: 14px;
  height: 14px;
  transform: translateY(-50%);
  pointer-events: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236B7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>");
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}
.select2-container--default .select2-selection--multiple .select2-selection__choice {
  background: var(--rv-primary-soft) !important;
  border: 1px solid var(--rv-primary-soft) !important;
  border-radius: 999px !important;
  color: var(--rv-primary-dark) !important;
  padding: 2px 10px 2px 8px !important;
  margin: 2px 4px 2px 0 !important;
  font-size: .85rem !important;
}
.select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
  color: var(--rv-primary-dark) !important;
  margin-right: 4px !important;
}
.select2-container--default.select2-container--focus .select2-selection,
.select2-container--default.select2-container--open .select2-selection {
  border-color: var(--rv-primary) !important;
  box-shadow: 0 0 0 3px var(--rv-primary-soft);
}
.select2-dropdown {
  border-color: var(--rv-line) !important;
  border-radius: var(--rv-radius-sm) !important;
  overflow: hidden;
}
.select2-container--default .select2-results__option--highlighted[aria-selected] {
  background-color: var(--rv-primary) !important;
}

.awpcp-form input[type="submit"],
.awpcp-form button[type="submit"],
.awpcp-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  border-radius: 999px;
  background: var(--rv-autumn);
  color: #fff;
  border: none;
  font-weight: 600;
  font-size: .95rem;
  cursor: pointer;
  opacity: 1;
  transition: background .15s ease, opacity .15s ease;
}
.awpcp-form input[type="submit"]:hover,
.awpcp-form button[type="submit"]:hover,
.awpcp-button:hover,
.awpcp-form input[type="submit"]:focus,
.awpcp-button:focus {
  background: var(--rv-autumn-dark);
  opacity: 0.5;
}

/* ============================================================
   10. FOOTER
   ============================================================ */
.rv-footer {
  background: #fff;
  border-top: 1px solid var(--rv-line);
  padding: var(--rv-space-8) 0 var(--rv-space-5);
  margin-top: var(--rv-space-10);
  color: var(--rv-ink-soft);
  font-size: .9rem;
}
.rv-footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--rv-space-6);
  margin-bottom: var(--rv-space-6);
}
@media (max-width: 800px) { .rv-footer__grid { grid-template-columns: 1fr 1fr; } }
.rv-footer h4 {
  font-size: .8125rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--rv-muted);
  margin-bottom: var(--rv-space-3);
}
.rv-footer ul { list-style: none; padding: 0; margin: 0; }
.rv-footer li { margin-bottom: var(--rv-space-2); }
.rv-footer a { color: var(--rv-ink-soft); }
.rv-footer a:hover { color: var(--rv-primary); }
.rv-footer__bottom {
  border-top: 1px solid var(--rv-line);
  padding-top: var(--rv-space-4);
  font-size: .8125rem;
  color: var(--rv-muted);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--rv-space-3);
}

/* ============================================================
   11. SECONDARY NAV (own row, scrollable on mobile)
   ============================================================ */
.rv-subnav {
  border-top: 1px solid var(--rv-line);
  background: var(--rv-surface);
}
.rv-subnav__list {
  display: flex;
  align-items: center;
  gap: var(--rv-space-1);
  margin: 0;
  padding: 0;
  list-style: none;
  overflow-x: auto;
  scrollbar-width: none;
}
.rv-subnav__list::-webkit-scrollbar { display: none; }
.rv-subnav__list li {
  margin: 0;
  padding: 0;
  flex-shrink: 0;
}
.rv-subnav__list a {
  display: inline-block;
  padding: var(--rv-space-3) var(--rv-space-4);
  color: var(--rv-ink-soft);
  font-weight: 500;
  font-size: .9rem;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  transition: color .15s ease, border-color .15s ease;
}
.rv-subnav__list a:hover,
.rv-subnav__list .current-menu-item > a,
.rv-subnav__list .current_page_item > a {
  color: var(--rv-primary);
  border-bottom-color: var(--rv-primary);
}

@media (max-width: 720px) {
  .rv-header__inner { flex-wrap: wrap; min-height: 0; gap: var(--rv-space-2); padding: var(--rv-space-3) 0; }
  .rv-header__search { order: 3; flex-basis: 100%; max-width: 100%; }
}

/* ============================================================
   12. UTILITIES
   ============================================================ */
.rv-stack-sm > * + * { margin-top: var(--rv-space-3); }
.rv-stack    > * + * { margin-top: var(--rv-space-5); }
.rv-text-muted { color: var(--rv-muted); }
.rv-text-center { text-align: center; }
.rv-flex { display: flex; gap: var(--rv-space-3); align-items: center; }
.rv-mt-6 { margin-top: var(--rv-space-6); }

/* WordPress core alignment helpers (kept for content) */
.alignleft   { float: left;  margin: 0 var(--rv-space-4) var(--rv-space-3) 0; }
.alignright  { float: right; margin: 0 0 var(--rv-space-3) var(--rv-space-4); }
.aligncenter { display: block; margin-left: auto; margin-right: auto; }
.wp-caption  { max-width: 100%; }
.screen-reader-text { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }
