/* ==========================================================================
   Alluvium Custom Styles
   Shared across all pages for Barba.js PJAX compatibility
   ========================================================================== */

/* --- Header: Logo & Nav Centering --- */
@media (min-width: 992px) {
  .header__controls > .row {
    justify-content: center !important;
  }
  .header__controls > .row > .order-lg-1,
  .header__controls > .row > .order-lg-3 {
    flex: 1 1 0;
  }
  .header__controls > .row > .order-lg-1 {
    text-align: right;
    padding-right: 20px;
  }
  .header__controls > .row > .order-lg-3 {
    text-align: left;
    padding-left: 20px;
  }
  .header__controls > .row > .order-lg-2 {
    flex: 0 0 auto;
    text-align: center;
  }
}

/* Remove template's 35px right margin on logo image wrapper */
.logo__wrapper-img {
  margin-right: 0 !important;
}

/* Hide custom cursor */
#js-arts-cursor { display: none !important; }

/* Heading weight */
.section-content h2.h2,
h2.h2 {
  font-weight: 300;
}

/* --- Homepage: Clouds Animation --- */
.clouds {
  position: absolute;
  top: 0;
  left: 0;
  width: 100% !important;
  height: 100% !important;
  overflow: hidden;
  pointer-events: none;
  z-index: 2;
  animation: fade-in 10s 1s;
  transform: rotate(180deg);
}
.clouds img {
  position: absolute;
  bottom: 0;
  max-width: 100%;
  animation: clouds calc(4s * var(--i)) linear infinite;
  opacity: .7;
}
@keyframes clouds {
  0%   { opacity: 0; transform: scale(1); }
  25%, 75% { opacity: 0.2; }
  100% { opacity: 0; transform: scale(3); }
}

/* --- Homepage: Discover Grid --- */
.discover-grid .hover-zoom__inner {
  width: 100%;
  height: 350px;
  overflow: hidden;
}
.discover-grid .hover-zoom__zoom {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* --- Inner Pages: Hero Masthead --- */
.section-hero {
  position: relative;
  height: 70vh;
  min-height: 500px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.section-hero__bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}
.section-hero__overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.35);
  z-index: 1;
}
.section-hero__content {
  position: relative;
  z-index: 2;
  transition: opacity 1.2s ease;
}
/* Hide hero text during Barba PJAX transitions; JS removes class + fades in after */
.hero-transitioning .section-hero__content {
  opacity: 0 !important;
}

/* --- Age Gate Popup --- */
.popup-container {
  box-sizing: border-box;
  position: relative;
  width: 100%;
  max-width: 350px;
  padding: 40px;
  margin: 20% auto 0;
  background: white;
  text-align: center;
  box-shadow: 0 0 15px 10px rgba(0, 0, 0, 0.1);
}
@media (max-width: 640px) {
  .popup-container {
    padding: 40px 20px;
  }
}
.popup-body {
  box-sizing: border-box;
  font-size: 24px;
  margin-bottom: 25px;
  line-height: 1.35;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
}
@media (max-width: 640px) {
  .popup-body {
    font-size: 26px;
    margin-bottom: 15px;
  }
}
.popup-btn {
  box-sizing: border-box;
  padding: 10px 20px;
  margin-right: 10px;
  border: none;
  font-size: 20px;
  cursor: pointer;
  border-radius: 4px;
  color: white;
  background-color: rgba(0,0,0,.8);
}

/* --- Our Wines: Wine Divider Headers (tighter padding) --- */
.wine-divider {
  padding-top: 40px !important;
  padding-bottom: 0 !important;
}
/* Remove top padding/margin on slider sections so they sit tight under the divider */
.wine-divider + .section-slider-images {
  padding-top: 0 !important;
  margin-top: 0 !important;
}

/* --- Our Wines: Vintage Slider Slides --- */
.wine-slide {
  display: flex;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 60px 40px;
  text-align: left;
  gap: 60px;
}
.wine-slide__text {
  flex: 1 1 55%;
  min-width: 0;
}
.wine-slide__text h3 {
  margin-bottom: 16px;
  font-size: 1.6rem;
}
.wine-slide__text p {
  line-height: 1.7;
}
.wine-slide__image {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
}
.wine-slide__image img {
  max-width: 280px;
  height: auto;
  filter: drop-shadow(5px 5px 6px rgba(0, 0, 0, 0.2));
}
/* Cadmia placeholder bottle area */
.wine-slide__image--placeholder {
  width: 280px;
  min-height: 420px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.wine-slide__placeholder {
  color: #999;
  font-size: 14px;
  font-style: italic;
  text-align: center;
  border: 1px dashed #ccc;
  padding: 40px 20px;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}
/* Responsive: stack on mobile */
@media (max-width: 767px) {
  .wine-slide {
    flex-direction: column;
    align-items: flex-start;
    padding: 40px 20px;
    gap: 30px;
    text-align: left;
  }
  .wine-slide__image {
    order: -1;
    align-self: center;
  }
  .wine-slide__image img {
    max-width: 200px;
  }
  .wine-slide__image--placeholder {
    width: 200px;
    min-height: 300px;
  }
  /* Move arrows higher on mobile so they sit near the bottle */
  .section-slider-images .slider__arrow_absolute {
    top: 30% !important;
  }
}
/* Ensure slider arrows are visible on wine sections */
.section-slider-images .slider__arrow {
  z-index: 10;
  font-size: 36px;
  width: 60px;
  height: 60px;
}
/* --- Subtle hover on buttons/links (magnetic disabled via JS) --- */
.button, .underline-hover {
  transition: opacity 0.3s ease;
}
.button:hover, .underline-hover:hover {
  opacity: 0.7;
}

/* Wine slider arrows: subtle directional hover */
.wine-arrow {
  transition: transform 0.3s ease;
}
.wine-arrow--left:hover {
  transform: translateX(-50%) translateY(-50%) translateX(-4px);
}
.wine-arrow--right:hover {
  transform: translateX(50%) translateY(-50%) translateX(4px);
}

/* ================================================================
   ALLOCATION PAGE
   ================================================================ */

/* --- Quote --- */
.alloc-quote {
  border-left: 3px solid #917c0e;
  padding: 15px 20px;
  margin: 20px 0 0;
}
.alloc-quote p { margin: 0; }

/* --- Video Cards (image-backed) --- */
.alloc-video-card {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  display: flex;
  flex-direction: column;
}
.alloc-video-card .alloc-video-label {
  display: block;
  font-size: 14px;
  color: #333;
  line-height: 1.5;
  padding: 10px 4px 8px;
  order: -1;
}
.alloc-video-card .alloc-video-thumb {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  display: block;
  border-radius: 6px;
  transition: transform 0.4s ease, filter 0.4s ease;
}
.alloc-video-card:hover .alloc-video-thumb {
  transform: scale(1.03);
  filter: brightness(0.8);
}
.alloc-video-card .alloc-video-play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 24px;
  color: #fff;
  background: rgba(145,124,14,0.85);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s ease;
}
.alloc-video-card:hover .alloc-video-play {
  background: rgba(145,124,14,1);
}
/* Dark section labels */
.bg-dark-2 .alloc-video-card .alloc-video-label {
  color: #ccc;
}

/* --- Wine Meta Tags --- */
.alloc-wine-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.alloc-inventory-tag {
  display: inline-block;
  background: #fdf5e6;
  color: #917c0e;
  padding: 6px 14px;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.5px;
}
.alloc-price-tag {
  display: inline-block;
  background: #f0f0f0;
  color: #333;
  padding: 6px 14px;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 600;
}
.alloc-maker-badge {
  display: inline-block;
  background: #917c0e;
  color: #fff;
  padding: 5px 14px;
  font-size: 12px;
  letter-spacing: 1px;
  border-radius: 3px;
}

/* --- Tech Sheet --- */
.alloc-tech-sheet {
  background: #fff;
  border: 1px solid #e8e8e8;
  border-radius: 8px;
  padding: 25px;
  margin-bottom: 16px;
}
.alloc-tech-table {
  width: 100%;
  font-size: 14px;
}
.alloc-tech-table td {
  padding: 7px 0;
  border-bottom: 1px solid #f0f0f0;
  color: #555;
  vertical-align: top;
}
.alloc-tech-table td:first-child {
  font-weight: 600;
  color: #333;
  width: 40%;
  padding-right: 12px;
}
.alloc-tech-table tr:last-child,
.alloc-tech-table tr:last-child td {
  border-bottom: none !important;
  border-bottom-width: 0 !important;
  padding-bottom: 0;
}

/* --- Buttons --- */
.alloc-btn {
  font-family: inherit;
  font-size: 14px;
  letter-spacing: 0.5px;
  padding: 12px 28px;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  border-radius: 4px;
  display: inline-block;
}
.alloc-btn-interest {
  background: #917c0e;
  color: #fff;
  font-weight: 500;
}
.alloc-btn-interest:hover {
  background: #7a6a0c;
}
.alloc-btn-sample {
  background: transparent;
  border: 1px solid #917c0e;
  color: #917c0e;
  margin-left: 10px;
}
.alloc-btn-sample:hover {
  background: #917c0e;
  color: #fff;
}
.alloc-btn-add {
  background: #917c0e;
  color: #fff;
}
.alloc-btn-add:hover {
  background: #7a6a0c;
}
.alloc-btn-submit {
  width: 100%;
  background: #917c0e;
  color: #fff;
  padding: 14px;
  font-size: 14px;
  letter-spacing: 1px;
  margin-top: 10px;
  border-radius: 6px;
}
.alloc-btn-submit:hover {
  background: #7a6a0c;
}
.alloc-chapter-cta {
  padding-top: 20px;
  border-top: 1px solid rgba(0,0,0,0.08);
}

/* --- Floating Inquiry FAB --- */
.alloc-cart-fab {
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 999;
}
.alloc-cart-fab-btn {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #917c0e;
  color: #fff;
  border: none;
  cursor: pointer;
  font-size: 20px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.25);
  position: relative;
  transition: transform 0.3s ease, background 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}
.alloc-cart-fab-btn:hover {
  transform: scale(1.1);
  background: #7a6a0c;
}
.alloc-cart-fab-icon {
  font-size: 22px;
  line-height: 1;
}
.alloc-cart-count {
  position: absolute;
  top: -4px;
  right: -4px;
  background: #c00;
  color: #fff;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.alloc-cart-dropdown {
  position: absolute;
  bottom: 70px;
  right: 0;
  width: 320px;
  background: #1a1a1a;
  border: 1px solid #2a2a2a;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.4);
  display: none;
  color: #ccc;
  max-height: 70vh;
  overflow-y: auto;
}
.alloc-cart-fab.open .alloc-cart-dropdown,
.alloc-cart-fab.has-items .alloc-cart-dropdown {
  /* only show when toggled open */
}
.alloc-cart-fab.open .alloc-cart-dropdown {
  display: block;
}
.alloc-cart-dropdown h5 {
  color: #fff;
  margin: 0 0 12px;
  font-size: 16px;
}
.alloc-cart-empty {
  color: #666;
  font-size: 13px;
  line-height: 1.5;
  padding: 10px 0;
}
.alloc-cart-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid #222;
}
.alloc-cart-item-info strong {
  display: block;
  color: #fff;
  font-size: 14px;
}
.alloc-cart-item-info span {
  color: #888;
  font-size: 12px;
}
.alloc-cart-item-right { display: flex; align-items: center; }
.alloc-cart-remove {
  background: none;
  border: none;
  color: #666;
  font-size: 20px;
  cursor: pointer;
  padding: 0 4px;
}
.alloc-cart-remove:hover { color: #c00; }
.alloc-cart-total {
  display: flex;
  justify-content: space-between;
  padding: 12px 0 8px;
  border-top: 1px solid #2a2a2a;
  margin-top: 8px;
  color: #ccc;
  font-size: 14px;
}
.alloc-cart-total strong {
  color: #917c0e;
  font-size: 16px;
}

/* --- Modals --- */
.alloc-modal-overlay {
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0,0,0,0.75);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
}
.alloc-modal {
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  padding: 40px;
  width: 90%;
  max-width: 550px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  color: #333;
}
.alloc-modal-sm {
  max-width: 400px;
  text-align: center;
}
.alloc-modal h3 {
  color: #222;
  margin-bottom: 10px;
}
.alloc-modal-close {
  position: absolute;
  top: 15px; right: 20px;
  background: none; border: none;
  color: #999; font-size: 28px; cursor: pointer;
}
.alloc-modal-close:hover { color: #333; }
.alloc-modal input,
.alloc-modal select,
.alloc-modal textarea {
  width: 100%;
  padding: 12px 15px;
  margin-bottom: 10px;
  background: #f9f9f9;
  border: 1px solid #ddd;
  border-radius: 6px;
  color: #333;
  font-family: inherit;
  font-size: 14px;
}
.alloc-modal input::placeholder,
.alloc-modal textarea::placeholder { color: #999; }
.alloc-modal select { -webkit-appearance: auto; appearance: auto; }
.alloc-order-line {
  padding: 8px 0;
  border-bottom: 1px solid #eee;
  color: #555;
  font-size: 14px;
}
.alloc-order-total {
  padding: 12px 0;
  color: #917c0e;
  font-weight: 700;
  font-size: 16px;
  margin-bottom: 20px;
}

/* --- Email Capture Form --- */
.alloc-email-form {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  max-width: 600px;
  margin: 0 auto;
}
.alloc-email-form input {
  padding: 12px 18px;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 6px;
  color: #333;
  font-family: inherit;
  font-size: 14px;
  flex: 1;
  min-width: 180px;
}
.alloc-email-form input::placeholder { color: #999; }

/* --- FAQ Section --- */
.alloc-faq-section {
  padding: 40px 0 20px;
  border-top: 1px solid rgba(0,0,0,0.06);
}

/* --- Accordion --- */
.alloc-accordion {
  max-width: 800px;
  margin: 0 auto;
}
.alloc-accordion-item {
  border-bottom: 1px solid rgba(0,0,0,0.08);
}
.alloc-accordion-item:first-child {
  border-top: 1px solid rgba(0,0,0,0.08);
}
.alloc-accordion-trigger {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 20px 8px;
  background: none;
  border: none;
  font-family: inherit;
  font-size: 20px;
  font-weight: 400;
  color: #222;
  text-align: left;
  cursor: pointer;
  transition: color 0.3s ease;
  line-height: 1.4;
}
.alloc-accordion-trigger::before {
  content: '+';
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  margin-right: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 300;
  color: #917c0e;
  border: 1px solid #917c0e;
  border-radius: 50%;
  transition: transform 0.3s ease, background 0.3s ease;
}
.alloc-accordion-item.open .alloc-accordion-trigger::before {
  content: '\2212';
  background: #917c0e;
  color: #fff;
}
.alloc-accordion-trigger:hover {
  color: #917c0e;
}
.alloc-accordion-panel {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
  padding: 0 8px;
}
.alloc-accordion-item.open .alloc-accordion-panel {
  padding-bottom: 20px;
}
.alloc-accordion-panel .alloc-video-card {
  max-width: 600px;
  margin: 0 auto;
}

/* --- Responsive --- */
@media (max-width: 767px) {
  .alloc-chapter-cta .alloc-btn {
    display: block;
    width: 100%;
    margin: 8px 0;
    text-align: center;
  }
  .alloc-btn-sample { margin-left: 0; }
  .alloc-wine-meta { flex-direction: column; }
  .alloc-email-form { flex-direction: column; }
  .alloc-cart-dropdown { width: 280px; right: -10px; }
}
