/* Base styles */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;600;700&display=swap');

body {
  margin: 0;
  font-family: 'Montserrat', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.frame {
  padding: 32px;
  height: 100vh;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.grid {
  flex: 1;
  display: grid;
  gap: 18px;
  align-content: start;
}

/* 16:9 — standard landscape */
.layout-16x9 {
  background: #000;
  color: #fff;
}

.layout-16x9 .frame {
  background: #000;
}

.layout-16x9 .grid {
  grid-template-columns: repeat(3, 1fr);
}

.layout-16x9 .promo {
  grid-column: 1 / -1;
}

/* 16x9: promo alignment and spacing */
.layout-16x9 .promo {
  display: flex;
  align-items: center;
  gap: 20px;
  justify-content: flex-start;
  margin-bottom: 32px;
}

.layout-16x9 .promo-media {
  flex: 0 0 auto;
}

.layout-16x9 .promo-text {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* 16x9: tighten spacing between name and price */
.layout-16x9 .item {
  justify-content: flex-start;
  gap: 12px;
}

.layout-16x9 .item-left {
  gap: 12px;
}

.layout-16x9 .item-price {
  margin-left: 32px;
}

/* 16x9: White text for all elements */
.layout-16x9 .title,
.layout-16x9 .subtitle,
.layout-16x9 .clock,
.layout-16x9 .card-title,
.layout-16x9 .item-name,
.layout-16x9 .item-price,
.layout-16x9 .footer,
.layout-16x9 .promo-head,
.layout-16x9 .promo-sub,
.layout-16x9 .version {
  color: #fff;
}

/* 16x9: Larger images for commercial display */
.layout-16x9 .item-img,
.layout-16x9 .item-img.placeholder {
  width: 256px;
  height: 256px;
}

.layout-16x9 .promo-img {
  width: 256px;
  height: 256px;
  object-fit: cover;
  display: block;
  margin: 0;
}

/* 9:16 — portrait: single column + larger text + promo at top */
.layout-9x16 .frame {
  padding: 28px;
}

.layout-9x16 .title {
  font-size: 60px;
}

.layout-9x16 .grid {
  grid-template-columns: 1fr;
}

.layout-9x16 .promo {
  order: -1; /* promo appears before cards if promo is inside main; if not, we'll adjust template */
  margin-bottom: 18px;
}

/* 32:9 — ultra-wide: more columns + tighter header + promo as a side panel */
.layout-32x9 .frame {
  padding: 20px;
}

.layout-32x9 .title {
  font-size: 40px;
}

.layout-32x9 .header {
  align-items: center;
}

.layout-32x9 .grid {
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
}

.layout-32x9 .card {
  padding: 14px;
}

.layout-32x9 .item-name,
.layout-32x9 .item-price {
  font-size: 16px;
}
.wide {
    flex: 1;
    display: grid;
    grid-template-columns: 4fr 1.2fr;
    gap: 14px;
    align-items: start;
  }
  
  .wide-side {
    display: flex;
    flex-direction: column;
    gap: 14px;
  }
  
  .side-meta {
    background: #121a24;
    border: 1px solid #223042;
    border-radius: 16px;
    padding: 14px;
    color: #fff;
  }
  
  .side-clock { font-weight: 700; margin-bottom: 8px; }
  .side-legal { opacity: 0.75; font-size: 14px; }
  .item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
  }
  
  .item-left {
    display: flex;
    align-items: center;
    gap: 16px;
    min-width: 0; /* enables text truncation if needed */
  }
  
  .item-img {
    width: 256px;
    height: 256px;
    border-radius: 16px;
    object-fit: cover;
    flex: 0 0 auto;
  }
  
  .item-img.placeholder {
    width: 256px;
    height: 256px;
    border-radius: 16px;
    background: #223042;
  }

  .layout-9x16 .item-img,
  .layout-9x16 .item-img.placeholder,
  .layout-32x9 .item-img,
  .layout-32x9 .item-img.placeholder {
    width: 256px;
    height: 256px;
  }

/* Larger typography for readability on large displays */
.title {
  font-size: 56px;
  font-weight: 700;
}

.subtitle {
  font-size: 28px;
  font-weight: 500;
}

.card-title {
  font-size: 32px;
  font-weight: 600;
}

.item-name {
  font-size: 28px;
  font-weight: 500;
}

.item-price {
  font-size: 28px;
  font-weight: 600;
}

.clock {
  font-size: 22px;
  font-weight: 500;
}

.promo-head {
  font-size: 30px;
  font-weight: 700;
}

.promo-sub {
  font-size: 22px;
}
