:root{
  --sand:#fffaf0;
  --sand2:#f4e3bf;
  --ink:#1a1a1a;
}

*{ box-sizing:border-box; }

body{
  margin:0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: var(--sand);
  color: var(--ink);
}

.content{ padding: 12px 12px 24px; }
.panel{ display:none; }
.panel.active{ display:block; }

/* Header */
.topbar-landing{
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 10px 12px 10px;
  background: #fffaf0;
}

.top-icons{
  display:flex;
  gap:10px;
  align-items:center;
  margin-bottom: 10px;
}

.icon-btn{
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 0;
  background: #111;
  display:grid;
  place-items:center;
  padding:0;
  cursor:pointer;
}

.icon-btn svg{ width:18px; height:18px; fill:#fff; }

.landing-lang{
  display:flex;
  gap:10px;
  overflow-x:auto;
  -webkit-overflow-scrolling: touch;
}

.lang-btn{
  border:0;
  border-radius: 0;
  padding: 12px 12px;
  min-height: 48px;
  font-weight: 900;
  letter-spacing: 0.4px;
  background: #f4e3bf;
  cursor:pointer;
  white-space:nowrap;
}

.lang-btn.active{ background:#e2c67f; }

/* Landing tiles */
.landing-tiles{
  display:flex;
  flex-direction:column;
  gap:14px;
}

.tile{
  position:relative;
  display:block;
  overflow:hidden;
  text-decoration:none;
}

.tile img{
  width:100%;
  height: 150px;
  object-fit: cover;
  display:block;
}

.tile-overlay{
  position:absolute;
  inset:0;
  background: linear-gradient(to top, rgba(0,0,0,0.55), rgba(0,0,0,0.15));
}

.tile-title{
  position:absolute;
  left:0;
  right:0;
  bottom: 18px;
  text-align:center;
  color:#fff;
  font-weight: 900;
  font-size: 28px;
  letter-spacing: 1px;
  text-transform: uppercase;
  text-shadow: 0 6px 18px rgba(0,0,0,0.55);
}

.tile:active{ transform: scale(0.99); }

/* Shared cards */
.restaurant-widget-container{ max-width:100%; margin:0 auto; }

.restaurant-grid{
  display:grid;
  grid-template-columns:1fr;
  gap:14px;
}

.restaurant-card{
  background:#fff;
  border-radius:16px;
  overflow:hidden;
  box-shadow: 0 10px 22px rgba(0,0,0,0.08);
  position: relative;
}

.restaurant-image{
  width:100%;
  height:180px;
  object-fit:cover;
  display:block;
}

.restaurant-title{
  font-weight:900;
  padding:12px 14px 4px;
  letter-spacing:0.2px;
}

.restaurant-subtitle{
  padding:0 14px 10px;
  opacity:0.7;
  font-size:13px;
}

.restaurant-info{
  padding:0 14px 14px;
  font-size:14px;
  line-height:1.3;
}

.restaurant-info p{ 
  margin:8px 0; 
  position: relative;
  padding-left: 28px;
}

.restaurant-info p::before{
  content: "✓";
  position: absolute;
  left: 0;
  top: 2px;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: #111;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Safe styling for Restaurant Guide fragment */
.title-section h1{
  margin: 12px 0 2px;
  font-size:12px;
  letter-spacing:2px;
  opacity:0.7;
}

.title-section .main-title{
  font-size:20px;
  font-weight:900;
  margin-bottom:10px;
  letter-spacing:0.5px;
}

.meal-tabs{
  display:flex;
  gap:10px;
  margin: 10px 0 12px;
  overflow-x:auto;
  -webkit-overflow-scrolling: touch;
}

.meal-tab-btn{
  border:0;
  border-radius:14px;
  padding:12px 14px;
  font-weight:800;
  min-height:48px;
  cursor:pointer;
  white-space:nowrap;
  background: rgba(0,0,0,0.06);
}

.meal-tab-btn.active{
  background: var(--sand2);
  box-shadow: 0 8px 18px rgba(0,0,0,0.08);
}

.meal-content{ display:none; }
.meal-content.active{ display:block; }

.tab-content{ display:none; }
.tab-content.active{ display:block; }

.discount-badge{
  position:absolute;
  right:12px;
  top:12px;
  background: rgba(255,255,255,0.92);
  border-radius:14px;
  padding:10px 10px;
  box-shadow: 0 10px 20px rgba(0,0,0,0.10);
}

.badge{
  position:absolute;
  left:12px;
  top:12px;
  background:#1a1a1a;
  color:#fff;
  border-radius:14px;
  padding:10px 10px;
  font-weight:900;
  font-size:12px;
  line-height:1.05;
  box-shadow: 0 10px 20px rgba(0,0,0,0.15);
}

.restaurantdealsbtn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:100%;
  margin-top:10px;
  border-radius:14px;
  min-height:48px;
  font-weight:900;
  text-decoration:none;
  background: var(--sand2);
  color: var(--ink);
  box-shadow: 0 10px 22px rgba(0,0,0,0.08);
}


.restaurant-card{ position: relative; }

/* ===== Nearby image overlay badges + map button ===== */
.map-btn:active{ transform: scale(0.99); }

/* ===== Nearby distance badge + maps button ===== */
.image-wrap{
  position: relative;
}

.image-wrap .distance-badge{
  position: absolute;
  right: 12px;
  bottom: 12px;
  background: rgba(0,0,0,0.75);
  color: #fff;
  padding: 6px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 900;
  z-index: 5;
}

.map-btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: calc(100% - 28px);
  margin: 0 14px 14px;
  min-height: 48px;
  border-radius: 14px;
  background: #111;
  color: #fff;
  text-decoration: none;
  font-weight: 900;
  letter-spacing: 0.2px;
}
.map-btn:active{ transform: scale(0.99); }

/* ===== Small-phone fit (<= 380px width) ===== */
html, body{
  max-width: 100%;
  overflow-x: hidden;
}

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

@media (max-width: 380px){
  .content{ padding: 10px 10px 20px; }

  /* Header icons + language tabs */
  .topbar-landing{ padding: 8px 10px 8px; }
  .top-icons{ gap: 8px; margin-bottom: 8px; }
  .icon-btn{ width: 32px; height: 32px; }
  .icon-btn svg{ width: 16px; height: 16px; }

  .landing-lang{ gap: 8px; }
  .lang-btn{
    padding: 10px 10px;
    min-height: 44px;
    font-size: 12px;
    letter-spacing: 0.2px;
  }

  /* Landing tiles */
  .tile img{ height: 132px; }
  .tile-title{
    font-size: 24px;
    bottom: 14px;
  }

  /* Cards */
  .restaurant-card{ border-radius: 14px; }
  .restaurant-image{ height: 165px; }

  .restaurant-title{
    padding: 10px 12px 4px;
    font-size: 14px;
  }
  .restaurant-subtitle{
    padding: 0 12px 10px;
    font-size: 12px;
  }
  .restaurant-info{
    padding: 0 12px 12px;
    font-size: 13px;
  }

  /* Checkmark bullets tighter */
  .restaurant-info p{ padding-left: 26px; }
  .restaurant-info p::before{
    width: 16px; height: 16px;
    font-size: 11px;
    top: 2px;
  }

  /* Titles */
  .title-section h1{ font-size: 11px; letter-spacing: 1.6px; }
  .title-section .main-title{ font-size: 18px; }

  /* Meal tabs + tags */
  .meal-tabs{ gap: 8px; }
  .meal-tab-btn{
    padding: 10px 12px;
    min-height: 44px;
    font-size: 12px;
    border-radius: 12px;
  }
  .tags{ gap: 6px; }
  .tag{ padding: 7px 9px; font-size: 11px; border-radius: 10px; }

  /* Discount badges */
  .discount-badge{
    right: 10px;
    top: 10px;
    padding: 8px 9px;
    border-radius: 12px;
  }
  .discount-label, .discount-amount{ font-size: 11px; }

  /* Map button */
  .map-btn{
    width: calc(100% - 24px);
    margin: 0 12px 12px;
    min-height: 44px;
    border-radius: 12px;
    font-size: 13px;
  }

  /* Distance badge */
  .image-wrap .distance-badge{
    right: 10px;
    bottom: 10px;
    padding: 5px 9px;
    border-radius: 12px;
    font-size: 11px;
  }
}

/* Ultra-small phones (<= 340px) */
@media (max-width: 340px){
  .lang-btn{ padding: 9px 9px; font-size: 11px; }
  .tile img{ height: 120px; }
  .tile-title{ font-size: 22px; }
  .restaurant-image{ height: 150px; }
  .title-section .main-title{ font-size: 17px; }
}

/* ===== Prevent badge overlap on small screens (no wrap, same row) ===== */
.restaurant-card{
  position: relative;
}

/* Keep both badges in one visual row: left badge + right discount badge */
.badge,
.discount-badge{
  max-width: calc(50% - 18px);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Left badge (black) */
.badge{
  left: 12px;
  right: auto;
  padding: 6px 8px;
  border-radius: 12px;
  font-size: 11px;
  line-height: 1.1;
}

/* Right badge (discount) on one line */
.discount-badge{
  right: 12px;
  left: auto;
  padding: 6px 8px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.discount-badge .discount-label,
.discount-badge .discount-amount{
  display: inline !important;
  white-space: nowrap;
  font-size: 11px;
  font-weight: 900;
  line-height: 1.1;
}

.discount-badge .discount-amount{
  font-weight: 800;
  opacity: 0.8;
}

/* Even tighter on very small phones */
@media (max-width: 380px){
  .badge,
  .discount-badge{
    max-width: calc(50% - 16px);
  }
  .badge{
    padding: 5px 7px;
    font-size: 10.5px;
  }
  .discount-badge{
    padding: 5px 7px;
  }
  .discount-badge .discount-label,
  .discount-badge .discount-amount{
    font-size: 10.5px;
  }
}

@media (max-width: 340px){
  .badge,
  .discount-badge{
    max-width: calc(50% - 14px);
  }
  .badge{
    font-size: 10px;
  }
  .discount-badge .discount-label,
  .discount-badge .discount-amount{
    font-size: 10px;
  }
}

/* ===== Amenities image gallery ===== */
.gallery{ width: 100%; }

.gallery-thumbs{
  display:flex;
  gap:8px;
  padding:10px 12px 12px;
  overflow-x:auto;
  -webkit-overflow-scrolling: touch;
}

.thumb{
  border:0;
  padding:0;
  background:transparent;
  border-radius:12px;
  overflow:hidden;
  flex:0 0 auto;
  width:68px;
  height:48px;
  cursor:pointer;
  outline:none;
  box-shadow: 0 6px 14px rgba(0,0,0,0.10);
}

.thumb img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}

.thumb.active{
  outline:2px solid rgba(0,0,0,0.55);
  outline-offset:2px;
}

@media (max-width: 380px){
  .thumb{ width:62px; height:44px; border-radius:10px; }
  .gallery-thumbs{ padding:8px 10px 10px; gap:7px; }
}

/* Sailboat image fully visible */
.sailboat-fit{
  object-fit: contain !important;
  background: #000;
}

/* ===== ACTIVITIES: Taller images to fully show content ===== */
#activities .restaurant-image,
#activities .gallery-main{
  height: 220px;
}

@media (max-width: 380px){
  #activities .restaurant-image,
  #activities .gallery-main{
    height: 240px;
  }
}

@media (max-width: 340px){
  #activities .restaurant-image,
  #activities .gallery-main{
    height: 260px;
  }
}

/* ===== Landing: remove gaps between tiles ===== */
.landing-tiles{
  gap: 0 !important;
}

.tile{
  margin: 0 !important;
  border-radius: 0 !important;
}



/* Keep only the overall page padding; tiles touch each other */
.landing{
  padding-left: 0 !important;
  padding-right: 0 !important;
}

/* Slight rounding only on very top and bottom if needed */
.tile:first-child{
  border-top-left-radius: 14px !important;
  border-top-right-radius: 14px !important;
}
.tile:last-child{
  border-bottom-left-radius: 14px !important;
  border-bottom-right-radius: 14px !important;
}

/* Ensure tile images fill edge-to-edge */
.tile img{
  width: 100%;
  display: block;
  object-fit: cover;
}

/* Activities landing image: show bottom portion */
.tile-img-bottom{
  object-position: center bottom !important;
}

/* ===== Landing: black divider between sections ===== */


/* Ensure divider spans full width */
.landing-tiles{
  overflow: hidden;
}

/* ===== Landing: gold divider between sections ===== */

/* ===== Landing: gold divider between sections ===== */
.tile + .tile{
  border-top: 2px solid #C9A24D;
}

/* ===== AMENITIES: Mobile-premium gallery layout ===== */
#amenities .restaurant-card{
  background: #fff;
  border-radius: 18px;
  overflow: hidden;
}

/* Consistent main image ratio (prevents super-tall images on mobile) */
#amenities .gallery-main,
#amenities .restaurant-image{
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: center;
  display: block;
}

/* Thumbnails: smaller + cleaner */
#amenities .gallery-thumbs{
  padding: 10px 12px 12px;
  gap: 8px;
}

#amenities .thumb{
  width: 56px;
  height: 42px;
  border-radius: 10px;
  box-shadow: 0 6px 14px rgba(0,0,0,0.10);
}

#amenities .thumb.active{
  outline: 2px solid rgba(201,162,77,0.75);
  outline-offset: 2px;
}

/* Tighten text spacing */
#amenities .restaurant-title{
  padding: 10px 12px 4px;
  font-size: 14px;
}

#amenities .restaurant-subtitle{
  padding: 0 12px 10px;
  font-size: 12px;
}

#amenities .restaurant-info{
  padding: 0 12px 12px;
  font-size: 13px;
}

/* Small phones */
@media (max-width: 380px){
  #amenities .gallery-main,
  #amenities .restaurant-image{
    aspect-ratio: 16 / 11;
  }
  #amenities .thumb{
    width: 52px;
    height: 40px;
  }
}

@media (max-width: 340px){
  #amenities .thumb{
    width: 48px;
    height: 38px;
  }
}

/* ===== Landing ACTIVITIES image override ===== */
.tile.activities,
.tile[data-tile="activities"]{
  background-image: url('https://marianasbeachresort.com/wp-content/uploads/2026/02/Pool-v1.jpg') !important;
  background-position: center bottom !important;
  background-size: cover !important;
}
