/* ═══════════════════════════════════════════════════════════
   FARM MARKET EVENT THEME
   Rustic, warm, harvest-inspired styling for event pages
   ═══════════════════════════════════════════════════════════ */

/* 1 ─ RUSTIC DISPLAY FONTS */
@import url('https://fonts.googleapis.com/css2?family=Alfa+Slab+One&family=Cabin:wght@400;600;700&display=swap');

/* 2 ─ GLOBAL WARM PAPER BACKGROUND */
html,
body {
  background: linear-gradient(135deg, #F8F5E8 0%, #F2EFE0 100%) !important;
  color: #2A311F;
  font-family: "Cabin", "Helvetica Neue", Arial, sans-serif;
}

/* 3 ─ BARN WOOD TEXTURE OVERLAY (subtle) */
body::before {
  content: "";
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background-image: 
    repeating-linear-gradient(90deg,
      transparent, transparent 2px,
      rgba(139, 90, 43, .02) 2px, rgba(139, 90, 43, .02) 4px);
  pointer-events: none;
  z-index: 1;
}

/* 4 ─ HEADERS WITH HAND-PAINTED SIGN FEEL */
h1,
h2,
h3,
.event-title {
  font-family: "Alfa Slab One", serif;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #7A3B2E;
  text-shadow: 
    2px 2px 0 rgba(212, 175, 55, .3),
    1px 1px 3px rgba(0, 0, 0, .1);
  position: relative;
}

/* 5 ─ CORE COLOUR TOKENS */
:root {
  --st-accent: #2E7D32;        /* farm green */
  --st-accent-2: #D4AF37;      /* straw gold */
  --st-accent-3: #8B5A2B;      /* barn brown */
  --st-border: rgba(139, 90, 43, .15);
  --harvest-orange: #E8833A;
}

/* 6 ─ STRAW-GOLD UNDERLINE FOR MAIN HEADER */
.event-title::after {
  content: "";
  display: block;
  width: 100%;
  height: 8px;
  margin-top: 8px;
  background: repeating-linear-gradient(
    90deg,
    var(--st-accent-2) 0px,
    var(--st-accent-2) 12px,
    transparent 12px,
    transparent 18px
  );
  opacity: .5;
  animation: harvest-sway 4s ease-in-out infinite;
}
@keyframes harvest-sway {
  0%, 100% { transform: translateX(0); }
  50%      { transform: translateX(6px); }
}

/* 7 ─ WHEAT STALK CURSOR (optional) */
body {
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Cpath fill='%238B5A2B' d='M12 2l1 8 2-6 1 7 2-5v8l-3 10h-2l-3-10v-8l2 5 1-7z'/%3E%3C/svg%3E"), auto;
}

/* 8 ─ FARM-FRESH CARDS WITH BURLAP TEXTURE */
.card,
.stx-card,
.event-section {
  background: linear-gradient(135deg, #FFFEF9 0%, #F9F7F0 100%);
  border: 2px solid var(--st-border);
  border-radius: 8px;
  box-shadow: 
    0 2px 8px rgba(139, 90, 43, .08),
    inset 0 1px 0 rgba(255, 255, 255, .8);
  position: relative;
  overflow: hidden;
}

/* Subtle burlap weave texture */
.card::before,
.stx-card::before,
.event-section::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background-image: 
    repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(139, 90, 43, .015) 2px, rgba(139, 90, 43, .015) 4px),
    repeating-linear-gradient(90deg, transparent, transparent 2px, rgba(139, 90, 43, .015) 2px, rgba(139, 90, 43, .015) 4px);
  pointer-events: none;
  z-index: 1;
}

/* Keep card content above texture */
.card > *,
.stx-card > *,
.event-section > * {
  position: relative;
  z-index: 2;
}

/* 9 ─ GENTLE HOVER LIFT */
.card:hover,
.stx-card:hover,
.btn-primary:hover,
.stx-buy-button:hover {
  transform: translateY(-3px);
  box-shadow: 
    0 6px 20px rgba(46, 125, 50, .15),
    inset 0 1px 0 rgba(255, 255, 255, .9);
  transition: transform .25s ease, box-shadow .25s ease;
}

/* 10 ─ FARM GREEN PRIMARY ELEMENTS */
.bg-primary,
.border-primary,
.text-primary,
.progress-bar,
.badge-primary,
.alert-primary,
.pagination .page-item.active .page-link {
  background-color: var(--st-accent) !important;
  border-color: var(--st-accent) !important;
  color: #fff !important;
}

/* 11 ─ BUTTONS & LINKS WITH HARVEST VIBES */
a {
  color: var(--st-accent) !important;
  text-decoration: none;
  transition: color .2s ease;
}
a:hover {
  color: var(--st-accent-3) !important;
}

.btn-primary,
.stx-buy-button {
  background: linear-gradient(135deg, var(--st-accent) 0%, #236326 100%) !important;
  border: 2px solid #1F5D25 !important;
  color: #fff !important;
  font-weight: 700;
  letter-spacing: .5px;
  box-shadow: 0 3px 8px rgba(46, 125, 50, .25);
  position: relative;
  overflow: hidden;
}

.btn-primary::before,
.stx-buy-button::before {
  content: "";
  position: absolute;
  top: 0; left: -100%;
  width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .2), transparent);
  transition: left .5s ease;
}

.btn-primary:hover::before,
.stx-buy-button:hover::before {
  left: 100%;
}

.btn-primary:hover,
.stx-buy-button:hover {
  background: linear-gradient(135deg, #236326 0%, var(--st-accent) 100%) !important;
  box-shadow: 0 4px 12px rgba(46, 125, 50, .35);
  transform: translateY(-2px);
}

/* 12 ─ PILL BAR NAVIGATION (from your original) */
.leftnav {
  background: #fff;
  border: 1px solid var(--st-border);
  border-radius: 9999px;
  padding: .35rem;
  box-shadow:
    0 10px 20px rgba(46, 125, 50, .06),
    inset 0 1px 0 #fff;
}

.leftnav::after { 
  content: none !important; 
}

.leftnav ul {
  display: flex;
  gap: .25rem;
  align-items: center;
  justify-content: flex-start;
}

.leftnav ul li { 
  margin: 0; 
}

.leftnav ul li a {
  display: block;
  padding: .60rem 1.15rem;
  border-radius: 9999px;
  color: #7A7D71 !important;
  font-weight: 600;
  letter-spacing: .2px;
  transition: background .15s ease, color .15s ease, box-shadow .15s ease;
}

.leftnav ul li a:hover {
  background: linear-gradient(#F8FBF5, #F2F7ED);
  color: #2A311F !important;
}

.leftnav ul li.active a,
.leftnav ul li.selected a,
.leftnav ul li.is-active a {
  background: var(--st-accent);
  color: #fff !important;
  box-shadow: 0 2px 8px rgba(46, 125, 50, .20);
}

/* 13 ─ HARVEST-ORANGE PROMO & LOGIN LINKS */
.b_promo.promocode_link,
.b_promo.promocode_link:hover,
.login_link.section_loginlink,
.login_link.section_loginlink a,
.login_link.section_loginlink a:hover,
.view-cart-link,
.view-cart-link:hover {
  color: var(--harvest-orange) !important;
  text-decoration: none !important;
  cursor: pointer;
  transition: color .2s ease;
}

/* 14 ─ SECTION HEADERS WITH SEED PACKET ACCENT */
.event-section h2:first-of-type,
.event-section h3:first-of-type {
  position: relative;
  padding-top: .75rem;
  margin-top: 1rem;
  border-top: 3px dashed var(--st-accent-2);
}

/* Little decorative "seeds" before headers */
.event-section h2:first-of-type::before,
.event-section h3:first-of-type::before {
  content: "🌾";
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, #F8F5E8 0%, #F2EFE0 100%);
  padding: 0 12px;
  font-size: 1.2em;
}

/* 15 ─ TAB-BAR FIX (page-level tabs) */
.nav-tabs,
.nav-tabs.bg-light,
.nav-tabs.bg-light .nav-item,
.nav-tabs.bg-light .nav-link {
  background: transparent !important;
  border-color: transparent !important;
}

.nav-tabs .nav-link,
.nav-pills .nav-link {
  color: #7A7D71;
  font-weight: 600;
  transition: all .2s ease;
}

.nav-tabs .nav-link:hover,
.nav-tabs .nav-link.active,
.nav-pills .nav-link.active {
  color: var(--st-accent) !important;
  background: #fff !important;
  border-color: var(--st-accent) var(--st-accent) #fff !important;
  box-shadow: 0 -2px 8px rgba(46, 125, 50, .1);
}

/* 16 ─ SVG COLOR OVERRIDE */
svg [fill="#2586B7"],
svg .st0 {
  fill: var(--st-accent) !important;
}

/* 17 ─ ACCESSIBLE FOCUS RING */
:where(a, button, [role="button"], input, select, textarea):focus-visible {
  outline: 3px solid rgba(46, 125, 50, .45);
  outline-offset: 2px;
  border-radius: 6px;
}

/* 18 ─ WOODEN SIGN INPUT FIELDS */
input[type="text"],
input[type="email"],
input[type="number"],
input[type="tel"],
select,
textarea {
  background: #FFFEF9 !important;
  border: 2px solid var(--st-border) !important;
  border-radius: 6px;
  padding: .65rem .9rem;
  font-family: "Cabin", sans-serif;
  color: #2A311F;
  transition: border-color .2s ease, box-shadow .2s ease;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="number"]:focus,
input[type="tel"]:focus,
select:focus,
textarea:focus {
  border-color: var(--st-accent) !important;
  box-shadow: 0 0 0 3px rgba(46, 125, 50, .1);
  outline: none;
}

/* 19 ─ HARVEST BASKET LOADING SPINNER (optional enhancement) */
@keyframes basket-bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.spinner,
.loading-indicator {
  animation: basket-bounce 1s ease-in-out infinite;
}

/* 20 ─ CHECKOUT MODAL STYLING */
.checkout-modal,
.stx-checkout-modal,
.modal-content {
  background: linear-gradient(135deg, #FFFEF9 0%, #F9F7F0 100%) !important;
  border: 3px solid var(--st-accent-3);
  border-radius: 12px;
  box-shadow: 
    0 8px 32px rgba(46, 125, 50, .2),
    inset 0 2px 0 rgba(255, 255, 255, .9);
}

/* Modal header with barn wood accent */
.checkout-modal .modal-header,
.stx-checkout-modal .modal-header {
  background: linear-gradient(135deg, #8B5A2B 0%, #6B4423 100%);
  color: #FFF9E6;
  border-bottom: 3px solid var(--st-accent-2);
  padding: 1.25rem 1.5rem;
  border-radius: 9px 9px 0 0;
}

.checkout-modal .modal-title,
.stx-checkout-modal .modal-title,
.checkout-modal h1,
.stx-checkout-modal h1 {
  color: #FFF9E6 !important;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, .3);
}

/* Ticket item cards in checkout */
.ticket-item,
.stx-ticket-item,
.checkout-item {
  background: #fff;
  border: 2px solid var(--st-border);
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 1rem;
  box-shadow: 0 2px 6px rgba(139, 90, 43, .08);
  transition: transform .2s ease, box-shadow .2s ease;
}

.ticket-item:hover,
.stx-ticket-item:hover,
.checkout-item:hover {
  transform: translateX(4px);
  box-shadow: 0 3px 12px rgba(46, 125, 50, .12);
}

/* Ticket names in checkout */
.ticket-item h3,
.ticket-item .ticket-name,
.stx-ticket-item h3,
.stx-ticket-item .ticket-name {
  color: var(--st-accent) !important;
  font-weight: 700;
  font-size: 1.15rem;
}

/* Price styling */
.ticket-price,
.price-display,
.total-price {
  color: var(--st-accent-3) !important;
  font-weight: 700;
  font-size: 1.25rem;
}

/* Promo code section */
.promo-section,
.promotional-code-section,
a[href*="promo"] {
  color: var(--harvest-orange) !important;
  font-weight: 600;
}

/* Discount/promo banner */
.discount-banner,
.promo-banner,
.alert-success {
  background: linear-gradient(135deg, #E8F5E9 0%, #C8E6C9 100%) !important;
  border: 2px solid var(--st-accent);
  border-radius: 8px;
  color: var(--st-accent) !important;
  padding: .75rem 1rem;
  font-weight: 600;
}

.discount-banner::before,
.promo-banner::before {
  content: "🌾 ";
  margin-right: 8px;
}

/* Checkout button */
.checkout-button,
.stx-checkout-button,
button[type="submit"] {
  background: linear-gradient(135deg, var(--st-accent) 0%, #236326 100%) !important;
  border: 3px solid #1F5D25 !important;
  color: #fff !important;
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: .5px;
  padding: .85rem 2rem;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(46, 125, 50, .3);
  text-transform: uppercase;
  transition: all .3s ease;
}

.checkout-button:hover,
.stx-checkout-button:hover,
button[type="submit"]:hover {
  background: linear-gradient(135deg, #1F5D25 0%, var(--st-accent) 100%) !important;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(46, 125, 50, .4);
}

.checkout-button:disabled,
.stx-checkout-button:disabled,
button[type="submit"]:disabled {
  background: #ccc !important;
  border-color: #999 !important;
  opacity: .6;
  cursor: not-allowed;
  transform: none;
}

/* Quantity selectors */
.quantity-selector,
.qty-input {
  border: 2px solid var(--st-border) !important;
  border-radius: 6px;
  background: #fff;
}

.quantity-selector button,
.qty-button {
  background: var(--st-accent) !important;
  color: #fff !important;
  border: none;
  border-radius: 4px;
  font-weight: 700;
  transition: background .2s ease;
}

.quantity-selector button:hover,
.qty-button:hover {
  background: #236326 !important;
}

/* Login link in checkout */
a[href*="login"] {
  color: var(--st-accent) !important;
  font-weight: 600;
  text-decoration: underline;
}

/* Close button styling */
.modal-close,
.close-button,
button.close {
  color: #FFF9E6 !important;
  opacity: .9;
  transition: opacity .2s ease, transform .2s ease;
}

.modal-close:hover,
.close-button:hover,
button.close:hover {
  opacity: 1;
  transform: rotate(90deg);
}

/* SimpleTix branding in modal */
.powered-by,
.stx-branding {
  opacity: .7;
  font-size: .85rem;
  color: #7A7D71 !important;
}

/* 21 ─ OPTIONAL FOOTER HIDE */
footer,
.footer,
.stx-footer {
  display: none;
}

/* ═══════════════════════════════════════════════════════════
   END FARM MARKET THEME
   ═══════════════════════════════════════════════════════════ */