
/* Philly Loft layout system - stable container, card, and banner rules */
:root{
  --pl-max: 1200px;
  --pl-gutter: 20px;
  --pl-gutter-mobile: 16px;
}

.wrap,
.phillyloft-container{
  width:min(var(--pl-max), calc(100% - (var(--pl-gutter) * 2)));
  margin-left:auto;
  margin-right:auto;
  box-sizing:border-box;
}

@media (max-width: 640px){
  .wrap,
  .phillyloft-container{
    width:min(var(--pl-max), calc(100% - (var(--pl-gutter-mobile) * 2)));
  }
}

/* Booking hub cards */
.phillyloft-unit-grid{
  display:grid !important;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:24px;
  align-items:stretch;
}
.phillyloft-unit-card{
  display:flex !important;
  flex-direction:column;
  min-height:100%;
  height:100%;
}
.phillyloft-unit-card__content{
  display:flex !important;
  flex-direction:column;
  flex:1 1 auto;
  min-height:0;
}
.phillyloft-unit-card__title{
  min-height:3.1em;
}
.phillyloft-unit-card__text{
  min-height:5.2em;
}
.phillyloft-unit-card__buttons{
  margin-top:auto !important;
  display:flex;
  flex-wrap:wrap;
  gap:12px;
  align-items:center;
}
.phillyloft-unit-card__media-link,
.phillyloft-unit-card__title-link{
  display:block;
  color:inherit;
  text-decoration:none;
}
.phillyloft-unit-card__title-link:hover .phillyloft-unit-card__title{
  text-decoration:underline;
}

/* World Cup banner on booking hub */
.phillyloft-worldcup-banner{
  width:100%;
  max-width:100%;
  margin-top:32px;
  padding:32px 24px !important;
  background:#111 !important;
  color:#fff !important;
  border-radius:16px !important;
  box-sizing:border-box;
  overflow:hidden;
}
.phillyloft-worldcup-banner__inner{
  display:flex !important;
  align-items:center;
  justify-content:space-between;
  gap:24px;
  width:100%;
  max-width:100%;
  box-sizing:border-box;
}
.phillyloft-worldcup-banner__text{
  flex:1 1 auto;
  min-width:0;
  max-width:760px;
  text-align:left;
}
.phillyloft-worldcup-banner__eyebrow,
.phillyloft-worldcup-banner h2,
.phillyloft-worldcup-banner h3,
.phillyloft-worldcup-banner p{
  margin-left:0 !important;
  text-align:left !important;
}
.phillyloft-worldcup-banner__action{
  flex:0 0 auto;
  display:flex;
  align-items:center;
  justify-content:flex-start;
}
.phillyloft-worldcup-banner .phillyloft-btn{
  white-space:normal;
}

/* Unit pages shared layout stability */
.world-cup-card,
.card.worldcup{
  width:100%;
  max-width:100%;
  padding:24px !important;
  border-radius:18px !important;
  box-sizing:border-box !important;
  overflow:hidden !important;
}
.world-cup-card-inner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:24px;
  width:100%;
  max-width:100%;
}
.world-cup-card-copy{
  flex:1 1 auto;
  min-width:0;
}
.world-cup-card-eyebrow,
.world-cup-card h2,
.world-cup-card h3,
.world-cup-card p{
  margin-left:0 !important;
  text-align:left !important;
}
.world-cup-card-actions{
  flex:0 0 auto;
  display:flex;
  flex-wrap:wrap;
  gap:12px;
  align-items:center;
  justify-content:flex-start;
}
.world-cup-card .btn{
  white-space:normal;
}
.booking-grid,
.split,
.local-grid,
.fit-grid,
.review-grid{
  align-items:start;
}
.booking-widget{
  width:100%;
  max-width:100%;
  box-sizing:border-box;
}
.widget-shell,
.widget-shell iframe{
  width:100% !important;
  max-width:100%;
  box-sizing:border-box;
}

/* Safer responsive behavior */
@media (max-width: 991px){
  .phillyloft-unit-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
  .phillyloft-worldcup-banner__inner,
  .world-cup-card-inner{
    flex-direction:column;
    align-items:flex-start;
  }
  .phillyloft-worldcup-banner__action,
  .world-cup-card-actions{
    width:100%;
  }
}

@media (max-width: 767px){
  .phillyloft-unit-grid{
    grid-template-columns:1fr;
    gap:20px;
  }
  .phillyloft-unit-card__buttons{
    flex-direction:column;
  }
  .phillyloft-unit-card__buttons .phillyloft-btn{
    width:100%;
  }
  .phillyloft-worldcup-banner{
    padding:24px !important;
  }
  .phillyloft-worldcup-banner__action .phillyloft-btn{
    width:100%;
  }
  .world-cup-card{
    padding:24px !important;
  }
  .world-cup-card-actions .btn{
    width:100%;
    text-align:center;
  }
}
