/* ==========================================================================
   All Packages (#browse) - Cascading Horizontal Slider with MMT Cards
   ========================================================================== */

#browse {
  position: relative;
  padding: 1.25rem 1rem 1.25rem;
  background: var(--background, #ffffff);
  overflow: hidden;
}

.dark-theme #browse {
  background: var(--background, #0b1322);
}

.browse-header-wrap {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 0.85rem;
}

.browse-heading {
  flex: 1;
  text-align: left;
}

.browse-heading .eyebrow {
  display: inline-block;
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--brand-accent, #b9935a);
  margin: 0 0 0.35rem;
  text-align: left;
}

.browse-heading h2 {
  font-family: var(--font-serif);
  font-size: clamp(1.85rem, 3.5vw, 2.5rem);
  font-weight: 800;
  color: var(--brand-ink, #0b2330);
  margin: 0 0 0.45rem;
  line-height: 1.2;
  text-align: left;
}

.dark-theme .browse-heading h2 {
  color: #f3f4f6;
}

.browse-subtitle {
  font-size: 0.95rem;
  color: #64748b;
  margin: 0;
  line-height: 1.5;
}

.dark-theme .browse-subtitle {
  color: #94a3b8;
}

/* In-Window Semi-Transparent Glassmorphism Arrows */
.browse-slider-arrow {
  position: absolute;
  top: 125px;
  transform: translateY(-50%);
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.6);
  color: #0f172a;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 15;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.12);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  font-size: 1rem;
  outline: none;
  opacity: 0.85;
}

.browse-slider-arrow.prev {
  left: 12px;
}

.browse-slider-arrow.next {
  right: 12px;
  animation: pulseRightHint 2.5s infinite ease-in-out;
}

.browse-slider-arrow:hover {
  opacity: 1;
  background: var(--brand-ink, #0b2330);
  color: #ffffff;
  border-color: var(--brand-ink, #0b2330);
  transform: translateY(-50%) scale(1.08);
  box-shadow: 0 6px 20px rgba(11, 35, 48, 0.35);
}

.browse-slider-arrow:active {
  transform: translateY(-50%) scale(0.95);
}

.dark-theme .browse-slider-arrow {
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #f8fafc;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
  opacity: 0.85;
}

.dark-theme .browse-slider-arrow:hover {
  opacity: 1;
  background: #38bdf8;
  color: #0b1322;
  border-color: #38bdf8;
  box-shadow: 0 6px 20px rgba(56, 189, 248, 0.45);
}

/* Horizontal Slider Wrap & Track */
.browse-slider-wrap {
  position: relative;
  width: 100%;
  overflow: visible;
}

.browse-grid {
  display: flex;
  flex-wrap: nowrap;
  gap: 1.5rem;
  overflow-x: auto;
  overflow-y: visible;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 0.5rem 0.25rem 1.5rem;
  align-items: stretch;
}

.browse-grid::-webkit-scrollbar {
  display: none;
}

/* Premium Holiday Card Architecture */
.mmt-exact-card {
  display: flex;
  flex-direction: column;
  background: #ffffff;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid #e7eaf0;
  box-shadow:
    0 4px 16px -2px rgba(15, 23, 42, 0.05),
    0 2px 6px -1px rgba(15, 23, 42, 0.02);
  transition:
    transform 0.35s cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 0.35s cubic-bezier(0.16, 1, 0.3, 1),
    border-color 0.25s ease;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  position: relative;
  height: auto;
  align-self: stretch;
  box-sizing: border-box;
}

.dark-theme .mmt-exact-card {
  background: #141f2e;
  border-color: #233147;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
}

.dark-theme .mmt-exact-card:hover {
  border-color: #3b82f6;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.55);
}

/* Card Image Container */
.mmt-card-img-wrap {
  position: relative;
  height: 215px;
  width: 100%;
  overflow: hidden;
  background: #0b192c;
  flex-shrink: 0;
}

.mmt-card-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.mmt-exact-card:hover .mmt-card-img-wrap img {
  transform: scale(1.05);
}

/* Top-Left Badges */
.mmt-badge-bestseller {
  position: absolute;
  top: 0.85rem;
  left: 0.85rem;
  background: #ffffff;
  color: #7b1fa2;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.22rem 0.65rem;
  border-radius: 999px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
  z-index: 2;
  letter-spacing: 0.01em;
  pointer-events: none;
}

/* Top-Right Co-brand Logo */
.mmt-cobrand {
  position: absolute;
  top: 0.85rem;
  right: 0.85rem;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  z-index: 2;
  pointer-events: none;
}

.mmt-cobrand-text {
  font-size: 0.5rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.85);
  letter-spacing: 0.05em;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.7);
}

.mmt-cobrand-logo {
  font-size: 0.95rem;
  font-weight: 900;
  color: #ffffff;
  letter-spacing: 0.06em;
  line-height: 1.1;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8);
}

/* Card Content Body */
.mmt-card-content {
  padding: 1.15rem 1.25rem 1.25rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

/* Title & Duration Pill Row */
.mmt-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.35rem;
  min-height: 2.8rem;
}

.mmt-card-title {
  font-size: 1.14rem;
  font-weight: 800;
  color: #111827;
  margin: 0;
  line-height: 1.32;
  letter-spacing: -0.015em;
  flex: 1;
}

.dark-theme .mmt-card-title {
  color: #f9fafb;
}

.mmt-duration-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid var(--brand-accent, #b9935a);
  color: var(--brand-accent, #b9935a);
  background: #ffffff;
  font-size: 0.72rem;
  font-weight: 800;
  border-radius: 6px;
  padding: 0.16rem 0.48rem;
  white-space: nowrap;
  flex-shrink: 0;
}

.dark-theme .mmt-duration-pill {
  background: #1e293b;
  border-color: #38bdf8;
  color: #38bdf8;
}

/* Itinerary Breakdown Line */
.mmt-itinerary {
  font-size: 0.82rem;
  color: #4b5563;
  margin: 0 0 0.75rem;
  line-height: 1.45;
  font-weight: 500;
  white-space: normal;
  min-height: 2.4rem;
}

.dark-theme .mmt-itinerary {
  color: #9ca3af;
}

.mmt-dot {
  color: #9ca3af;
  font-size: 0.55rem;
  margin: 0 0.15rem;
}

/* Divider */
.mmt-card-divider {
  border: none;
  border-top: 1px solid #eef1f6;
  margin: 0 0 0.85rem;
}

.dark-theme .mmt-card-divider {
  border-top-color: #233147;
}

/* Inclusions Grid (Two Columns) */
.mmt-inclusions-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.35rem 0.85rem;
  margin-bottom: 0.85rem;
}

.mmt-inc-col {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.mmt-inc-bullet {
  font-size: 0.81rem;
  color: #374151;
  font-weight: 500;
  line-height: 1.38;
  white-space: normal;
  word-break: normal;
}

.dark-theme .mmt-inc-bullet {
  color: #d1d5db;
}

/* Activity Highlights with Teal Checkmarks */
.mmt-highlights {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 1rem;
  flex: 1;
  min-height: 5.2rem;
}

.mmt-hl-item {
  display: flex;
  align-items: flex-start;
  gap: 0.45rem;
  font-size: 0.79rem;
  line-height: 1.35;
  color: #1a5c3a;
  font-weight: 500;
}

.mmt-hl-item i {
  color: #1a5c3a;
  font-size: 0.72rem;
  margin-top: 0.2rem;
  flex-shrink: 0;
}

.mmt-hl-item span {
  white-space: normal;
  line-height: 1.35;
}

.dark-theme .mmt-hl-item {
  color: #2dd4bf;
}

.dark-theme .mmt-hl-item i {
  color: #14b8a6;
}

/* Bottom Offer & Price Container */
.mmt-offer-price-box {
  background: #f5f6f8;
  border-radius: 12px;
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: auto;
  min-height: 68px;
  box-sizing: border-box;
}

.dark-theme .mmt-offer-price-box {
  background: #0f172a;
  border: 1px solid #1e293b;
}

.mmt-offer-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: #e11d48;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  white-space: nowrap;
}

.dark-theme .mmt-offer-label {
  color: #fb7185;
}

.mmt-price-wrap {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  text-align: right;
}

.mmt-price-main {
  display: flex;
  align-items: baseline;
  gap: 0.15rem;
}

.mmt-price-curr {
  font-size: 1.25rem;
  font-weight: 900;
  color: #111827;
  letter-spacing: -0.02em;
  line-height: 1;
}

.dark-theme .mmt-price-curr {
  color: #f9fafb;
}

.mmt-price-unit {
  font-size: 0.75rem;
  font-weight: 500;
  color: #4b5563;
}

.dark-theme .mmt-price-unit {
  color: #9ca3af;
}

.mmt-total-price {
  font-size: 0.68rem;
  color: #6b7280;
  margin-top: 0.15rem;
}

.dark-theme .mmt-total-price {
  color: #9ca3af;
}

/* Card Action Button */
.mmt-card-action {
  margin-top: 0.85rem;
  width: 100%;
}

.btn-mmt-details {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  width: 100%;
  padding: 0.58rem 1rem;
  border-radius: 999px;
  background: var(--brand-ink, #0b2330);
  color: #ffffff !important;
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-decoration: none !important;
  transition: all 0.22s ease;
  box-shadow: 0 3px 10px rgba(11, 35, 48, 0.2);
  box-sizing: border-box;
}

.mmt-exact-card:hover .btn-mmt-details {
  background: var(--brand-accent, #b9935a);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(185, 147, 90, 0.35);
}

.btn-mmt-details i {
  font-size: 0.76rem;
  transition: transform 0.2s ease;
}

.mmt-exact-card:hover .btn-mmt-details i {
  transform: translateX(3px);
}

.dark-theme .btn-mmt-details {
  background: #14b8a6;
  color: #042f2c !important;
  box-shadow: 0 3px 10px rgba(20, 184, 166, 0.25);
}

.dark-theme .mmt-exact-card:hover .btn-mmt-details {
  background: #2dd4bf;
  color: #042f2c !important;
  box-shadow: 0 5px 16px rgba(45, 212, 191, 0.35);
}

/* ==========================================================================
   Responsive Widths with Peek Affordance & Cascading Vertical Animation
   (Shows next cards peeking into view on all screen sizes!)
   ========================================================================== */

/* 1. Ultra-Wide Desktop (>= 1650px): 4 full cards + peek of 5th card */
@media screen and (min-width: 1650px) {
  .browse-grid .mmt-exact-card {
    flex: 0 0 calc((100% - 4.4 * 1.5rem) / 4.55);
    min-width: calc((100% - 4.4 * 1.5rem) / 4.55);
    max-width: calc((100% - 4.4 * 1.5rem) / 4.55);
    scroll-snap-align: start;
  }
}

/* 2. Wide Desktop (1400px - 1649px): 3 full cards + peek of 4th card */
@media screen and (min-width: 1400px) and (max-width: 1649px) {
  .browse-grid .mmt-exact-card {
    flex: 0 0 calc((100% - 3.4 * 1.5rem) / 3.55);
    min-width: calc((100% - 3.4 * 1.5rem) / 3.55);
    max-width: calc((100% - 3.4 * 1.5rem) / 3.55);
    scroll-snap-align: start;
    transform: none;
  }

  .browse-grid .mmt-exact-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 32px -4px rgba(15, 23, 42, 0.14);
  }
}

/* 3. Standard Desktop (1024px - 1399px): 2 full cards + wide peek of 3rd card */
@media screen and (min-width: 1024px) and (max-width: 1399px) {
  .browse-grid .mmt-exact-card {
    flex: 0 0 calc((100% - 2.4 * 1.5rem) / 2.65);
    min-width: calc((100% - 2.4 * 1.5rem) / 2.65);
    max-width: calc((100% - 2.4 * 1.5rem) / 2.65);
    scroll-snap-align: start;
    transform: none;
  }

  .browse-grid .mmt-exact-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 32px -4px rgba(15, 23, 42, 0.14);
  }
}

/* 3. Tablet (641px - 1023px): 1 full card + generous peek of 2nd card */
@media screen and (min-width: 641px) and (max-width: 1023px) {
  .browse-grid .mmt-exact-card {
    flex: 0 0 calc((100% - 1.6 * 1.25rem) / 1.75);
    min-width: calc((100% - 1.6 * 1.25rem) / 1.75);
    max-width: calc((100% - 1.6 * 1.25rem) / 1.75);
    scroll-snap-align: start;
    transform: none !important;
  }
  .browse-grid .mmt-exact-card:hover {
    transform: translateY(-4px) !important;
  }
}

/* 4. Mobile (<= 640px): 1 card (84% width) + clear peek of next card */
@media screen and (max-width: 640px) {
  #browse {
    padding: 1rem 0.25rem 1rem;
    overflow: hidden;
  }

  .browse-header-wrap {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
    margin-bottom: 0.75rem;
    padding: 0 0.35rem;
  }

  .browse-heading h2 {
    font-size: 1.65rem;
    margin-bottom: 0.25rem;
  }

  .browse-subtitle {
    font-size: 0.86rem;
  }

  .browse-slider-wrap {
    position: relative;
    width: 100%;
  }

  .browse-grid {
    gap: 0.85rem;
    padding: 0.25rem 0.35rem 0.75rem;
    scroll-padding: 0 0.35rem;
    scroll-behavior: smooth;
    align-items: stretch;
  }

  .browse-grid .mmt-exact-card {
    flex: 0 0 84%;
    min-width: 84%;
    max-width: 84%;
    scroll-snap-align: start;
    height: auto;
    align-self: stretch;
    transform: none !important;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease;
  }

  .browse-grid .mmt-exact-card:hover {
    transform: none !important;
  }

  
  .browse-slider-arrow {
    top: 115px;
    width: 38px;
    height: 38px;
    font-size: 0.88rem;
    background: rgba(255, 255, 255, 0.85);
  }
  .mmt-card-header {
    min-height: 2.7rem;
  }
  .mmt-inc-bullet {
    font-size: 0.78rem;
    line-height: 1.35;
    white-space: normal;
  }
  .mmt-hl-item span {
    font-size: 0.76rem;
    white-space: normal;
  }
  .mmt-itinerary {
    font-size: 0.79rem;
    white-space: normal;
    min-height: 2.35rem;
  }
  .mmt-highlights {
    min-height: 5.2rem;
  }
  .mmt-offer-price-box {
    min-height: 64px;
  }


  .browse-slider-arrow.prev {
    left: 4px;
  }

  .browse-slider-arrow.next {
    right: 4px;
  }
}

/* Global Arrow Pulse Animation */
@keyframes pulseRightHint {
  0%, 100% {
    transform: translateY(-50%) scale(1);
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.12);
  }
  50% {
    transform: translateY(-50%) scale(1.08);
    box-shadow: 0 6px 20px rgba(0, 86, 179, 0.35);
  }
}
