/*
Theme Name: Lozano Child
Template: hello-elementor
*/

/* ============================================================
   1. VARIABLES & RESET (Optional)
   ============================================================ */
:root {
  --primary-gold: #B98A2E;
  --secondary-gold: #B98A2E;
  --accent-orange: #FF5900;
  --accent-dark-orange: #FF5900;
  --white: #fff;
  --text-shadow: 0 2px 8px rgba(0,0,0,0.55);
  --card-shadow: 0 18px 38px rgba(0,0,0,0.18);
  --card-shadow-hover: 0 30px 60px rgba(0,0,0,0.28);
}

/* ============================================================
   2. EXPERIENCE CARDS (GRID)
   ============================================================ */

/* Grid Container */
.lozano-exp-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2rem;
}

/* Main Card Wrapper */
.exp-card {
  position: relative;
  border-radius: 3px;
  overflow: hidden;
  cursor: pointer;
  height: 400px;
  display: flex;
  justify-content: flex-end;
  transition: transform .25s ease, box-shadow .25s ease;
  box-shadow: var(--card-shadow);
}

.exp-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--card-shadow-hover);
}

/* Background Image & Overlay */
.exp-card__bg {
  position: absolute;
  inset: 0;
}

.exp-card__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.95);
  transition: .3s ease;
}

.exp-card:hover .exp-card__bg img {
  filter: brightness(1.06);
}

.exp-card__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0,0,0,0.00) 0%,
    rgba(0,0,0,0.0) 25%,
    rgba(0,0,0,0.42) 55%,
    rgba(0,0,0,0.72) 78%,
    rgba(0,0,0,0.88) 100%
  );
  pointer-events: none;
}

/* Card Content & Typography */
.exp-card__content {
  position: absolute;
  bottom: 0;
  padding: 1.6rem;
  color: var(--white);
  z-index: 3;
  width: 100%;
}

.exp-card__title {
  font-family: "Platypi";
  font-size: 1.28rem;
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 0.35rem;
  text-shadow: var(--text-shadow);
}

.exp-card__title a {
  color: var(--white) !important;
  text-decoration: none !important;
}

.exp-card__excerpt {
  font-family: "Gothic A1";
  font-size: .92rem;
  line-height: 1.35;
  font-weight: 400;
  color: rgba(255,255,255,0.98);
  text-shadow: 0 2px 6px rgba(0,0,0,0.55);
  margin-bottom: 0.7rem;
}

/* Meta Info Bar */
.exp-card__meta {
  font-size: .83rem;
  color: #eddcb8;
  font-weight: 500;
  display: flex;
  gap: 0.3rem;
  align-items: center;
  opacity: .92;
}

.exp-card__infobar {
  font-size: .78rem;
  opacity: 0.75;
  display: flex;
  align-items: center;
  gap: .4rem;
  margin-top: .4rem;
}

.exp-meta__idiomas,
.exp-meta__duracion {
  font-weight: 500;
}

.exp-meta__dot {
  opacity: 0.4;
  font-weight: 600;
}

/* Badges (Pills) */
.exp-card__badges {
  position: absolute;
  top: 1rem;
  left: 1rem;
  display: flex;
  gap: 0.35rem;
  z-index: 10;
}

.exp-pill {
  padding: 0.32rem 0.65rem;
  font-size: .72rem;
  font-weight: 600;
  border-radius: 999px;
  backdrop-filter: blur(6px);
  letter-spacing: .25px;
  color: var(--white);
  text-transform: capitalize;
}

.exp-pill--reserva {
  background: var(--primary-gold);
}

.exp-pill--estado {
  background: var(--accent-orange);
  padding-top: calc(0.32rem - 1px);
  padding-bottom: calc(0.32rem + 1px);
}


.exp-pill--estado::before {
  content: "★";
  font-size: .75rem;
  margin-right: 0.35rem;
}


/* Call to Action (CTA) Button */
.exp-card__cta {
  position: absolute;
  bottom: 1.2rem;
  right: 1.2rem;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--white);
  color: var(--primary-gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.28rem;
  font-weight: 700;
  line-height: 1;
  padding-bottom: 3px; /* Nudge arrow for visual centering */
  transition: .25s ease;
}

.exp-card__cta:hover {
  background: var(--primary-gold);
  color: var(--white);
  transform: scale(1.05);
}

/* ============================================================
   3. QUICK FILTERS (PILLS)
   ============================================================ */

.lozano-quick-filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .5rem .75rem;
  margin: 0 auto 2rem auto;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid rgba(0,0,0,0.08);
  max-width: 1200px;
}

.quick-pill {
  background: var(--white) !important; /* Force white background when not active */
  border: 1px solid var(--primary-gold) !important;
  color: var(--primary-gold) !important;
  font-weight: 600;
  cursor: pointer;
  font-size: .78rem;
  padding: .45rem .85rem;
  border-radius: 2px;
  transition: all .2s ease;
  outline: none !important;
  box-shadow: none !important;
}

/* Hover & Active States */
.quick-pill:not(.active):hover {
  background: var(--primary-gold) !important;
  color: var(--white) !important;
}

.quick-pill.active {
  background: var(--primary-gold) !important;
  color: var(--white) !important;
  border-color: var(--primary-gold) !important;
}

/* ============================================================
   4. CAROUSEL (SWIPER) IMPLEMENTATION
   ============================================================ */

.lozano-exp-carousel-wrapper {
  position: relative;
  padding-inline: 56px;
  box-sizing: border-box;
}

@media (max-width: 1023px) {
  .lozano-exp-carousel-wrapper {
    padding-inline: 0;
  }
}

.lozano-exp-carousel {
  overflow: hidden;
  padding-bottom: 1.5rem;
}

/* Carousel Specific Card Adjustments */
.lozano-exp-carousel .exp-card,
.lozano-exp-carousel .exp-card:hover {
  box-shadow: none !important;
  transform: none !important;
}

.lozano-exp-carousel .exp-card__cta {
  display: none !important;
}

/* Swiper Slides */
/* 
   👇 THE NEW FIX: We don't force a width with !important.
   Instead, we set a min-width to prevent smushing.
   Swiper will now be able to calculate its math correctly.
*/
.lozano-exp-carousel .swiper-slide {
  min-width: 280px; /* Prevents smushing in narrow containers */
  max-width: 100%;
  height: auto;
  display: flex;
}

.lozano-exp-carousel .swiper-slide .exp-card {
  width: 100%; /* Card fills the slide */
}

/* Ensure the carousel container itself handles the overflow correctly */
.lozano-exp-carousel.swiper {
  width: 100%;
  overflow: hidden;
}

/* Scrollbar Styling */
.lozano-exp-carousel .swiper-scrollbar {
  position: relative;
  margin-top: 1rem;
  height: 6px;
  background: rgba(0,0,0,0.1);
  border-radius: 999px;
}

.lozano-exp-carousel .swiper-scrollbar-drag {
  background: var(--primary-gold);
  border-radius: 999px;
}

/* Desktop Interaction */
@media (min-width: 1024px) {
  .lozano-exp-carousel {
    cursor: grab;
  }
  .lozano-exp-carousel:active {
    cursor: grabbing;
  }
}

/* ============================================================
   5. NAVIGATION ARROWS (EXTERNAL)
   ============================================================ */

/* Hide internal Swiper arrows */
.swiper-button-prev,
.swiper-button-next {
  display: none !important;
}

/* Custom External Arrows */
.lozano-exp-arrow {
  display: none; /* Hidden by default (mobile) */
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid var(--primary-gold);
  background: rgba(0,0,0,0.35);
  color: var(--white);
  font-size: 1.25rem;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 30;
  transition: background .2s ease, transform .2s ease, opacity .2s ease;
  outline: none !important;
  box-shadow: none !important;
}

.lozano-exp-arrow:focus,
.lozano-exp-arrow:active {
  outline: none !important;
  box-shadow: none !important;
  background: rgba(0,0,0,0.35) !important;
}

@media (min-width: 1024px) {
  .lozano-exp-arrow {
    display: flex;
    opacity: 0.55;
  }
  .lozano-exp-arrow:hover {
    background: var(--primary-gold);
    transform: scale(1.06) translateY(-50%);
    opacity: 1;
  }
  .lozano-exp-arrow--prev { left: 8px; }
  .lozano-exp-arrow--next { right: 8px; }
}

/* ============================================================
   6. WOOCOMMERCE NOTICES
   ============================================================ */

.woocommerce-notices-wrapper {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 9999;
}

.admin-bar .woocommerce-notices-wrapper {
  top: 32px;
}

.woocommerce-message,
.woocommerce-error,
.woocommerce-info {
  margin: 0;
  border-radius: 0;
}

/* Desktop: Hide add-to-cart notice */
@media (min-width: 1025px) {
  .woocommerce-notices-wrapper {
    display: none !important;
  }
}

/* Mobile: Fade out notice after 4s */
@media (max-width: 1024px) {
  .woocommerce-message {
    animation: wc-toast-fade 4s ease forwards;
  }
}

@keyframes wc-toast-fade {
  0%, 80% { opacity: 1; }
  100% { opacity: 0; }
}

/* ============================================================
   7. RESPONSIVE BREAKPOINTS
   ============================================================ */

@media (max-width: 768px) {
  /* Experience Cards */
  .exp-card { height: 340px; }
  .exp-card__title { font-size: 1.18rem; }
  .exp-card__content { padding: 1.3rem 1.2rem 1.6rem; }

  /* Filter Bar Mobile Scroll */
  .lozano-quick-filters {
    justify-content: flex-start !important;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-left: 1rem;
    margin-bottom: 1rem !important;
    padding-bottom: 1rem !important;
  }

  .lozano-quick-filters::-webkit-scrollbar {
    display: none;
  }

  .quick-pill {
    flex: 0 0 auto;
    scroll-snap-align: start;
  }

  /* Fade effect for scrollable filters */
  .lozano-quick-filters::after {
    content: "";
    position: absolute;
    right: 0;
    top: 0;
    height: 100%;
    width: 40px;
    background: linear-gradient(to right, transparent, white);
    pointer-events: none;
  }

  .lozano-exp-grid {
    margin-top: 0 !important;
  }

  /* Fix for untoggled filter pills on mobile */
  /* We target multiple states because mobile browsers often "stick" to hover/focus states after a tap */
  .quick-pill:not(.active),
  .quick-pill:not(.active):hover,
  .quick-pill:not(.active):focus,
  .quick-pill:not(.active):active {
    background: var(--white) !important;
    color: var(--primary-gold) !important;
    border-color: var(--primary-gold) !important;
  }
}

/* ============================================================
   8. UTILITIES & ACCESSIBILITY
   ============================================================ */

.exp-carousel-heading {
  position: relative;
  height: 1px;
  margin: 0;
  padding: 0;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}
