/* ================================================================
   FryCuisine Food Grid — Frontend Styles
   ================================================================ */

:root {
  --fcg-accent: #e63946;
  --fcg-cols: 3;
  --fcg-gap: 12px;
  --fcg-radius: 10px;
  --fcg-txt: #1a1a1a;
  --fcg-txt-light: #666;
  --fcg-bg: #fff;
  --fcg-shadow: 0 4px 18px rgba(0,0,0,.10);
  --fcg-shadow-hover: 0 8px 32px rgba(0,0,0,.18);
  --fcg-transition: .3s cubic-bezier(.4,0,.2,1);
}

.fcg-wrapper * { box-sizing: border-box; margin: 0; padding: 0; }

.fcg-no-items {
  padding: 20px;
  background: #f8f8f8;
  border: 2px dashed #ccc;
  border-radius: var(--fcg-radius);
  color: var(--fcg-txt-light);
  text-align: center;
}

/* ── Shared item link ──────────────────────────────────────────── */
.fcg-link {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  height: 100%;
  border-radius: var(--fcg-radius);
  overflow: hidden;
  background: var(--fcg-bg);
  box-shadow: var(--fcg-shadow);
  transition: transform var(--fcg-transition), box-shadow var(--fcg-transition);
}
.fcg-link:hover {
  transform: translateY(-3px);
  box-shadow: var(--fcg-shadow-hover);
}
.fcg-link:hover .fcg-img-wrap img {
  transform: scale(1.06);
}

.fcg-img-wrap {
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}
.fcg-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform var(--fcg-transition);
}

.fcg-cat-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: var(--fcg-accent);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  padding: 3px 8px;
  border-radius: 4px;
}

.fcg-content {
  padding: 10px 12px 12px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.fcg-date {
  font-size: 10px;
  color: var(--fcg-txt-light);
  text-transform: uppercase;
  letter-spacing: .06em;
}
.fcg-title {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--fcg-txt);
}
.fcg-excerpt {
  font-size: 12px;
  color: var(--fcg-txt-light);
  line-height: 1.5;
}

/* ================================================================
   LAYOUT 1 — MAGAZINE (screenshot style)
   ================================================================ */

.fcg-layout-magazine .fcg-magazine {
  display: flex;
  flex-direction: column;
  gap: var(--fcg-gap);
}

/* Hero */
.fcg-layout-magazine .fcg-hero {
  width: 100%;
}
.fcg-layout-magazine .fcg-hero .fcg-link {
  flex-direction: row;
  min-height: 260px;
}
.fcg-layout-magazine .fcg-hero .fcg-img-wrap {
  width: 60%;
  min-height: 260px;
}
.fcg-layout-magazine .fcg-hero .fcg-content {
  width: 40%;
  justify-content: flex-end;
  padding: 20px;
}
.fcg-layout-magazine .fcg-hero .fcg-title {
  font-size: 22px;
  line-height: 1.2;
}
.fcg-layout-magazine .fcg-hero .fcg-excerpt {
  font-size: 13px;
  margin-top: 6px;
}
.fcg-layout-magazine .fcg-hero .fcg-cat-badge {
  top: auto;
  bottom: 14px;
  left: 14px;
  font-size: 11px;
  padding: 4px 10px;
}

/* Grid below hero */
.fcg-layout-magazine .fcg-grid {
  display: grid;
  grid-template-columns: repeat( var(--fcg-cols), 1fr );
  gap: var(--fcg-gap);
}
.fcg-layout-magazine .fcg-item {
  display: flex;
  flex-direction: column;
}
.fcg-layout-magazine .fcg-item .fcg-img-wrap {
  height: 160px;
}

/* ================================================================
   LAYOUT 2 — MOSAIC (varied sizes)
   ================================================================ */

.fcg-layout-mosaic .fcg-mosaic {
  display: grid;
  grid-template-columns: repeat( var(--fcg-cols), 1fr );
  grid-auto-rows: 150px;
  gap: var(--fcg-gap);
}
.fcg-layout-mosaic .fcg-item { }
.fcg-layout-mosaic .fcg-item .fcg-link { height: 100%; }
.fcg-layout-mosaic .fcg-item .fcg-img-wrap { flex: 1; min-height: 0; }

.fcg-layout-mosaic .fcg-mosaic-tall  { grid-row: span 2; }
.fcg-layout-mosaic .fcg-mosaic-wide  { grid-column: span 2; }
.fcg-layout-mosaic .fcg-mosaic-small { /* default */ }

/* ================================================================
   LAYOUT 3 — CARD GRID (equal cards, deeper shadow)
   ================================================================ */

.fcg-layout-card .fcg-card-grid {
  display: grid;
  grid-template-columns: repeat( var(--fcg-cols), 1fr );
  gap: 20px;
}
.fcg-layout-card .fcg-card-item { display: flex; flex-direction: column; }
.fcg-layout-card .fcg-link {
  border-radius: 14px;
  box-shadow: 0 2px 8px rgba(0,0,0,.08), 0 1px 3px rgba(0,0,0,.06);
  border: 1px solid rgba(0,0,0,.06);
}
.fcg-layout-card .fcg-link:hover {
  box-shadow: 0 12px 40px rgba(0,0,0,.15);
}
.fcg-layout-card .fcg-img-wrap {
  height: 200px;
  border-radius: 14px 14px 0 0;
}
.fcg-layout-card .fcg-content {
  padding: 14px 16px 16px;
}
.fcg-layout-card .fcg-title { font-size: 15px; }

/* ================================================================
   LAYOUT 4 — EDITORIAL (alternating large + small rows)
   ================================================================ */

.fcg-layout-editorial .fcg-editorial {
  display: flex;
  flex-direction: column;
  gap: var(--fcg-gap);
}

.fcg-layout-editorial .fcg-editorial-row {
  display: grid;
  gap: var(--fcg-gap);
}

/* Even rows: first item is double-wide */
.fcg-layout-editorial .fcg-row-wide {
  grid-template-columns: 2fr repeat( calc(var(--fcg-chunk-count) - 1), 1fr );
}
.fcg-layout-editorial .fcg-row-wide .fcg-item:first-child .fcg-img-wrap {
  height: 240px;
}
.fcg-layout-editorial .fcg-row-wide .fcg-item:not(:first-child) .fcg-img-wrap {
  height: 140px;
}

/* Odd rows: equal columns */
.fcg-layout-editorial .fcg-row-equal {
  grid-template-columns: repeat( var(--fcg-chunk-count), 1fr );
}
.fcg-layout-editorial .fcg-row-equal .fcg-img-wrap {
  height: 170px;
}

.fcg-layout-editorial .fcg-item { display: flex; flex-direction: column; }
.fcg-layout-editorial .fcg-link { height: 100%; }
.fcg-layout-editorial .fcg-img-wrap { flex-shrink: 0; }
.fcg-layout-editorial .fcg-title { font-size: 14px; }

/* ================================================================
   RESPONSIVE
   ================================================================ */

@media ( max-width: 900px ) {
  .fcg-layout-magazine .fcg-grid,
  .fcg-layout-card .fcg-card-grid,
  .fcg-layout-mosaic .fcg-mosaic {
    grid-template-columns: repeat( 2, 1fr ) !important;
  }
  .fcg-layout-magazine .fcg-hero .fcg-img-wrap { width: 55%; }
  .fcg-layout-editorial .fcg-row-wide,
  .fcg-layout-editorial .fcg-row-equal {
    grid-template-columns: 1fr 1fr !important;
  }
}

@media ( max-width: 560px ) {
  .fcg-layout-magazine .fcg-hero .fcg-link {
    flex-direction: column;
    min-height: auto;
  }
  .fcg-layout-magazine .fcg-hero .fcg-img-wrap { width: 100%; min-height: 200px; }
  .fcg-layout-magazine .fcg-hero .fcg-content  { width: 100%; }
  .fcg-layout-magazine .fcg-grid,
  .fcg-layout-card .fcg-card-grid,
  .fcg-layout-mosaic .fcg-mosaic {
    grid-template-columns: 1fr !important;
  }
  .fcg-layout-mosaic .fcg-mosaic-tall,
  .fcg-layout-mosaic .fcg-mosaic-wide { grid-column: 1; grid-row: span 1; }
  .fcg-layout-editorial .fcg-row-wide,
  .fcg-layout-editorial .fcg-row-equal {
    grid-template-columns: 1fr !important;
  }
}
