/* Marsata Phase 34 — compact customer discovery cards, based on Phase 33 homepage.
   Intentional scope: public listing/discovery tiles only (Tours, Stays, Events,
   Destinations, related tours/events, category tiles, Bus departures).
   Never style generic .card, financial summaries, operator UI, navbar or footer.
   All prices, availability, badges and links remain server-owned. */
body.ui-customer {
  --ms34-card-paper:#fffaf5;
  --ms34-card-ink:#123f33;
  --ms34-card-line:#dfe8e2;
  --ms34-card-mint:#edf6ee;
  --ms34-card-shadow:0 5px 15px rgba(21,62,50,.085);
  --ms34-card-width:260px;
}
/* Auto-fill retains empty grid slots: a single result never expands to a huge tile. */
body.ui-customer :is(.tours-page .tour-grid,.ms5-tour-grid,.me-grid,.ms-stay-property-grid,.destinations-grid,.destination-tour-grid,.ms5-category-grid) {
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(min(100%,225px),var(--ms34-card-width))) !important;
  gap:14px;
  justify-content:start;
  align-items:stretch;
  min-width:0;
}
body.ui-customer :is(.tour-card,.me-card,.ms-stay-property,.destinations-card,.destination-tour-card,.ms5-category-card,.td-related-card,.med-related-card) {
  box-sizing:border-box;
  min-width:0;
  max-width:100%;
  height:auto;
  min-height:0 !important;
  border-radius:16px;
  overflow:hidden;
  border:1px solid var(--ms34-card-line);
  background:var(--ms34-card-paper);
  box-shadow:var(--ms34-card-shadow);
  transition:transform .2s ease,box-shadow .2s ease;
  font-family:'DM Sans',system-ui,sans-serif;
}
body.ui-customer :is(.tour-card,.me-card,.ms-stay-property,.destinations-card,.destination-tour-card,.ms5-category-card,.td-related-card,.med-related-card):hover {
  transform:translateY(-2px);
  box-shadow:0 10px 22px rgba(21,62,50,.12);
}
body.ui-customer :is(.tour-card,.me-card,.ms-stay-property,.destinations-card,.destination-tour-card,.ms5-category-card,.td-related-card,.med-related-card) :is(h3,h3 a) {
  font-family:'DM Sans',system-ui,sans-serif;
  font-style:normal;
  font-weight:800;
  font-size:15px;
  line-height:1.25;
  letter-spacing:-.025em;
  color:var(--ms34-card-ink);
}
body.ui-customer :is(.tour-card,.me-card,.ms-stay-property,.destinations-card,.destination-tour-card) h3 a {text-decoration:none !important;}
body.ui-customer :is(.tour-card,.me-card,.ms-stay-property,.destinations-card,.destination-tour-card) h3 {
  margin:0;
  min-height:0;
  display:-webkit-box;
  -webkit-box-orient:vertical;
  -webkit-line-clamp:2;
  overflow:hidden;
  overflow-wrap:anywhere;
}
body.ui-customer :is(.tour-card,.me-card,.ms-stay-property,.destinations-card,.destination-tour-card) :is(.tour-media,.me-card-image,.ms-stay-property-image,.destinations-card-image,.destination-tour-image) {
  position:relative;
  width:100%;
  height:auto;
  aspect-ratio:1.86;
  overflow:hidden;
  flex:0 0 auto;
  background:#dbece5;
}
body.ui-customer :is(.tour-card,.me-card,.ms-stay-property,.destinations-card,.destination-tour-card) :is(.tour-media,.me-card-image,.ms-stay-property-image,.destinations-card-image,.destination-tour-image) img {
  display:block;
  width:100%;height:100%;object-fit:cover;
}
/* Same restrained photo curve as Phase 33; decorative only, not over action controls. */
body.ui-customer :is(.tour-card,.me-card,.ms-stay-property,.destinations-card,.destination-tour-card) :is(.tour-media,.me-card-image,.ms-stay-property-image,.destinations-card-image,.destination-tour-image)::after {
  content:"";
  position:absolute;
  inset:auto 0 -1px 0;
  height:24px;
  background:var(--ms34-card-paper);
  pointer-events:none;
  z-index:1;
  -webkit-mask:url('../images/home/marsata-card-wave.svg') center bottom / 100% 100% no-repeat;
  mask:url('../images/home/marsata-card-wave.svg') center bottom / 100% 100% no-repeat;
}
/* Tour index and category pages all use the same shared tour-card partial. */
body.ui-customer .tour-card {display:flex;flex-direction:column;position:relative;}
body.ui-customer .tour-card .tour-media {max-height:none;}
body.ui-customer .tour-card .wish-btn {z-index:4;top:9px;right:9px;width:31px;height:31px;min-width:31px;border-radius:50%;background:#fff;}
body.ui-customer .tour-card .tour-badges {z-index:3;top:9px;left:9px;max-width:calc(100% - 56px);}
body.ui-customer .tour-card .tour-badges .badge {display:block;max-width:100%;border-radius:999px;padding:5px 8px;font-size:10px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;background:#fff9e9;color:#165440;}
body.ui-customer .tour-card .tour-body {flex:1 1 auto;display:flex;flex-direction:column;padding:0 11px 10px;min-height:135px !important;gap:5px;background:var(--ms34-card-paper);}
body.ui-customer .tour-card .tour-body h3 {font-size:15px !important;}
body.ui-customer .tour-card .tour-kicker {color:#486b60;letter-spacing:0;font-size:10px;line-height:1.25;gap:5px;}
body.ui-customer .tour-card .meta {min-height:0;margin:0;font-size:10px;}
body.ui-customer .tour-card .tour-meta-row {font-size:10px;}
body.ui-customer .tour-card .marsata-tour-excerpt {font-size:10.5px;line-height:1.32;display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical;overflow:hidden;margin:0;}
body.ui-customer .tour-card .tour-footer {margin-top:auto;min-height:39px;display:flex;align-items:center;gap:5px;justify-content:space-between;border:0;border-radius:10px;background:#f8ede1;padding:4px 6px;}
body.ui-customer .tour-card .price {display:flex;flex-wrap:wrap;align-items:center;gap:3px;min-width:0;margin:0;}
body.ui-customer .tour-card .price small {font-size:9px;line-height:1.2;margin:0;}
body.ui-customer .tour-card .price > span:not(.price-range) {display:inline-block;max-width:100%;background:#0e674e;border-radius:999px;padding:5px 7px;color:#fff;font-size:11px;font-weight:800;line-height:1.2;white-space:nowrap;}
body.ui-customer .tour-card .tour-actions {margin:0;flex:0 0 auto;}
body.ui-customer .tour-card .tour-actions a {font-size:0 !important;display:grid;place-items:center;border-radius:50%;width:32px;height:32px;min-width:32px;padding:0;background:#10694e;color:#fff;}
body.ui-customer .tour-card .tour-actions a span {font-size:17px;line-height:1;color:#fff;}
body.ui-customer .tour-card .tour-actions a:focus-visible {outline:3px solid #ed735c;outline-offset:2px;}
/* Stay listing cards: retained date/guest query, room details and price source. */
body.ui-customer .ms-stay-property {display:flex;flex-direction:column;min-height:0;}
body.ui-customer .ms-stay-property-image .ms-stay-type {top:9px;left:9px;border-radius:999px;padding:5px 9px;font-size:10px;background:#fff9e9;color:#165440;z-index:2;}
body.ui-customer .ms-stay-property-body {min-height:135px;flex:1;display:flex;flex-direction:column;gap:5px;padding:0 11px 10px;background:#f9faf2;}
body.ui-customer .ms-stay-property-body h3 {font-size:15px;}
body.ui-customer .ms-stay-property-body .ms-stay-location {font-size:10px;line-height:1.3;margin:0;}
body.ui-customer .ms-stay-property-body .ms-stay-description {display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1;overflow:hidden;font-size:10.5px;line-height:1.3;margin:0;min-height:0;}
body.ui-customer .ms-stay-property-body .ms-stay-card-facts {display:flex;flex-wrap:wrap;gap:4px;margin:0;}
body.ui-customer .ms-stay-property-body .ms-stay-card-facts span {border:1px solid #dde8df;border-radius:999px;padding:3px 6px;font-size:9px;line-height:1.2;}
body.ui-customer .ms-stay-property-body .ms-stay-match-tag {font-size:9px;line-height:1.3;}
body.ui-customer .ms-stay-property-bottom {display:flex;align-items:center;gap:5px;justify-content:space-between;margin-top:auto;padding:5px 6px;border:0;border-radius:10px;background:#eaf4e9;}
body.ui-customer .ms-stay-property-bottom > div {display:flex;flex-wrap:wrap;align-items:center;gap:3px;min-width:0;}
body.ui-customer .ms-stay-property-bottom .tiny {font-size:9px;line-height:1.2;}
body.ui-customer .ms-stay-property-bottom strong {display:inline-block;max-width:100%;border-radius:999px;background:#0e674e;color:#fff;padding:5px 7px;font-size:10.5px;line-height:1.2;white-space:normal;overflow-wrap:anywhere;}
body.ui-customer .ms-stay-property-bottom .button {border-radius:50%;width:32px;height:32px;min-width:32px;min-height:32px;padding:0;font-size:0;display:grid;place-items:center;background:#10694e;color:transparent;}
body.ui-customer .ms-stay-property-bottom .button::after {content:'→';font-size:18px;line-height:1;color:#fff;}
body.ui-customer .ms-stay-property-bottom .button:focus-visible {outline:3px solid #ed735c;outline-offset:2px;}
/* Events — keep date flag, actual available-ticket pricing and ticket links. */
body.ui-customer .me-card {display:flex;flex-direction:column;}
body.ui-customer .me-card-image .me-card-calendar {z-index:3;top:9px;left:9px;width:43px;min-height:45px;border-radius:10px;}
body.ui-customer .me-card-content {flex:1;min-height:135px;display:flex;flex-direction:column;gap:5px;padding:0 11px 10px;background:var(--ms34-card-paper);}
body.ui-customer .me-card-content h3 {font-size:15px;}
body.ui-customer .me-card-meta {margin:0;font-size:10px;line-height:1.3;gap:6px;}
body.ui-customer .me-card-date {font-size:10px;line-height:1.3;margin:0;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1;overflow:hidden;}
body.ui-customer .me-card-bottom {display:flex;align-items:center;justify-content:space-between;gap:5px;margin-top:auto;border:0;border-radius:10px;background:#f8ede1;padding:5px 6px;}
body.ui-customer .me-card-price {display:flex;flex-wrap:wrap;align-items:center;gap:4px;min-width:0;}
body.ui-customer .me-card-price span {font-size:9px;}
body.ui-customer .me-card-price strong {display:inline-block;max-width:100%;border-radius:999px;padding:5px 7px;background:#10694e;color:#fff;font-size:11px;overflow-wrap:anywhere;}
body.ui-customer .me-card-button {display:flex;align-items:center;justify-content:center;gap:4px;padding:7px 9px;border-radius:999px;min-height:32px;font-size:10px;white-space:nowrap;background:#10694e;color:#fff;}
/* Destinations — no prices, only actual destination metadata and explore links. */
body.ui-customer .destinations-card {display:flex;flex-direction:column;min-height:0;}
body.ui-customer .destinations-card-count {z-index:3;top:9px;left:9px;font-size:10px;padding:5px 8px;border-radius:999px;}
body.ui-customer .destinations-card-body {flex:1;display:flex;flex-direction:column;gap:5px;min-height:130px;padding:0 11px 10px;background:var(--ms34-card-paper);}
body.ui-customer .destinations-card-copy {min-height:0;}
body.ui-customer .destinations-card-region {font-size:10px;line-height:1.3;margin:0;}
body.ui-customer .destinations-card-body h3 {font-size:15px;margin:1px 0 3px;}
body.ui-customer .destinations-card-body p {font-size:10.5px;line-height:1.32;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1;overflow:hidden;margin:0;}
body.ui-customer .destinations-card-cta {margin-top:auto;align-self:stretch;display:flex;justify-content:space-between;gap:5px;align-items:center;min-height:34px;padding:5px 9px;font-size:11px;border-radius:10px;background:#eaf4e9 !important;color:#10694e !important;}
/* Related cards preserve full-card links and the existing text affordances. */
body.ui-customer .destination-tour-card {display:flex;flex-direction:column;}
body.ui-customer .destination-tour-info {display:flex;flex-direction:column;flex:1;gap:5px;padding:0 11px 10px;background:var(--ms34-card-paper);}
body.ui-customer .destination-tour-info h3 {font-size:15px;}
body.ui-customer .destination-tour-info p {font-size:10.5px;line-height:1.32;display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical;overflow:hidden;min-height:0;}
body.ui-customer .destination-tour-bottom {margin-top:auto;padding:6px;border-radius:10px;background:#f8ede1;display:flex;align-items:center;gap:5px;}
body.ui-customer .destination-tour-bottom strong {color:#0e674e;font-size:11px;}
body.ui-customer :is(.td-related-card,.med-related-card) :is(h3,strong) {font-family:'DM Sans',system-ui,sans-serif;font-size:12px;font-weight:750;line-height:1.3;}
body.ui-customer :is(.td-related-card,.med-related-card) img {object-fit:cover;aspect-ratio:1.86;height:auto;}
body.ui-customer :is(.td-related-card,.med-related-card) :is(.td-related-body,.med-related-body) {padding:10px;}
/* Bus schedules have no photo; keep their route timeline horizontal and readable. */
body.ui-customer .mbus .mbus-result-card {min-width:0;min-height:0;padding:14px 16px;border-radius:16px;background:var(--ms34-card-paper);border:1px solid var(--ms34-card-line);box-shadow:var(--ms34-card-shadow);}
body.ui-customer .mbus .mbus-result-card h3 {font-family:'DM Sans',system-ui,sans-serif;font-style:normal;font-weight:800;font-size:16px;line-height:1.25;}
body.ui-customer .mbus .mbus-result-card .mbus-result-action {gap:5px;}
body.ui-customer .mbus .mbus-result-card .mbus-result-action strong {color:#0e674e;font-size:17px;}
body.ui-customer .mbus .mbus-result-card .mbus-btn {border-radius:10px;min-height:37px;padding:8px 11px;font-size:11px;}
@media(max-width:800px){
  body.ui-customer :is(.tours-page .tour-grid,.ms5-tour-grid,.me-grid,.ms-stay-property-grid,.destinations-grid,.destination-tour-grid,.ms5-category-grid) {gap:11px;}
}
@media(max-width:610px){
  body.ui-customer :is(.tours-page .tour-grid,.ms5-tour-grid,.me-grid,.ms-stay-property-grid,.destinations-grid,.destination-tour-grid,.ms5-category-grid) {
    grid-template-columns:repeat(auto-fill,minmax(min(100%,225px),var(--ms34-card-width))) !important;
    gap:12px;
  }
  body.ui-customer .mbus .mbus-result-card {padding:12px;}
  /* Related detail cards use their original horizontal mobile layout. */
  body.ui-customer .med-related-card {display:grid;}
}
@media(prefers-reduced-motion:reduce){
  body.ui-customer :is(.tour-card,.me-card,.ms-stay-property,.destinations-card,.destination-tour-card,.ms5-category-card,.td-related-card,.med-related-card){transition:none;}
}
