/*
Theme Name: Fantastico
Theme URI: https://www.fantastico.co.th
Author: Fantastico
Author URI: https://www.fantastico.co.th
Description: Custom block theme for Fantastico — importer of Italian wines and extra virgin olive oil from Puglia to Thailand. Built on native Gutenberg with theme.json as the single source of truth for design tokens.
Version: 0.14.0
Requires at least: 6.5
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: fantastico
*/

/* =========================================================
   Supplementary CSS — only what theme.json cannot express.
   ========================================================= */

:root{
  --fc-line: rgba(92,34,53,.15);
  --fc-line-gold: rgba(184,147,58,.5);
}

/* Remove the default vertical gaps between header / main / footer
   so the hero sits flush under the header and the footer sits flush
   under the content (sections manage their own padding). */
.wp-site-blocks > *{ margin-block: 0; }

/* ---- Eyebrow label (small-caps gold kicker above titles) ---- */
.fc-eyebrow{
  font-family: var(--wp--preset--font-family--jost);
  font-weight: 500;
  font-size: .72rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--wp--preset--color--gold);
  display: block;
}

/* =========================================================
   HEADER
   ========================================================= */
.site-head{
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--fc-line-gold);
}
/* Frosted-glass background on a separate layer. Keeping backdrop-filter off
   .site-head itself is essential: an element with backdrop-filter becomes the
   containing block for fixed-position descendants, which would trap the mobile
   navigation overlay inside the header instead of letting it cover the screen. */
.site-head::before{
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgba(246,240,228,.92);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.site-head__in{
  max-width: 1180px;
  margin-inline: auto;
  padding: 14px 26px;
}
.fc-tagline{
  font-family: var(--wp--preset--font-family--jost);
  font-weight: 500;
  font-size: .58rem;
  letter-spacing: .32em;
  text-transform: uppercase;
  color: var(--wp--preset--color--gold);
  margin: 0;
  padding-left: 2px;
}
.site-head .wp-block-navigation a,
.site-head .wp-block-navigation .wp-block-navigation-item__content{
  font-family: var(--wp--preset--font-family--jost);
  font-size: .82rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--wp--preset--color--wine);
}
.site-head .wp-block-navigation a:hover,
.site-head .wp-block-navigation a:focus{
  color: var(--wp--preset--color--gold);
}

/* ---- Language flag switcher (opposite language only) ---- */
.site-nav{ align-items: center; }
/* The shortcode block can wrap its output in a paragraph — keep it inert so the
   flag sits flush next to the menu / hamburger without stray spacing. */
.site-nav > p{ margin: 0; line-height: 0; }
.fc-lang-switch{ display: inline-flex; align-items: center; gap: 8px; }
.fc-lang{
  display: inline-flex;
  align-items: center;
  line-height: 0;
  border-radius: 3px;
  overflow: hidden;
  opacity: .92;
  box-shadow: 0 0 0 1px var(--fc-line-gold);
  transition: box-shadow .18s ease, transform .18s ease, opacity .18s ease;
}
.fc-lang:hover,
.fc-lang:focus-visible{
  opacity: 1;
  transform: translateY(-1px);
  box-shadow: 0 0 0 2px var(--wp--preset--color--gold);
}
.fc-lang__flag{ display: block; width: 24px; height: auto; }
.fc-lang__code{
  font-family: var(--wp--preset--font-family--jost);
  font-weight: 600;
  font-size: .72rem;
  letter-spacing: .1em;
  line-height: 1;
  padding: 4px 7px;
  color: var(--wp--preset--color--wine);
}

/* =========================================================
   FOOTER
   ========================================================= */
.site-foot{
  background: var(--wp--preset--color--wine-deep);
  color: rgba(255,250,240,.75);
  border-top: 3px solid var(--wp--preset--color--gold);
}
.site-foot p{ color: rgba(255,250,240,.75); }
.site-foot a{ color: rgba(255,250,240,.85); text-decoration: none; }
.site-foot a:hover{ color: var(--wp--preset--color--cream); }

/* brand title in footer */
.site-foot .wp-block-site-title,
.site-foot .wp-block-site-title a{
  color: var(--wp--preset--color--cream);
  font-family: var(--wp--preset--font-family--cormorant);
  font-size: 1.6rem;
  font-weight: 600;
  letter-spacing: .06em;
}

/* the 3-column grid */
.fc-foot-grid{ gap: 40px; margin-bottom: 6px; }
.fc-foot-grid.wp-block-columns{ flex-wrap: wrap; }

/* column heading */
.fc-foot-h{
  font-family: var(--wp--preset--font-family--jost);
  font-weight: 500;
  font-size: .76rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--wp--preset--color--gold) !important;
  margin: 0 0 18px;
}
/* contact / info text */
.fc-foot-info{
  font-size: .92rem;
  line-height: 1.7;
  color: rgba(255,250,240,.7) !important;
  margin: 12px 0 0;
}
.site-foot .wp-block-site-title + .fc-foot-info{ margin-top: 16px; }

/* useful links list */
.fc-foot-links{
  list-style: none;
  margin: 0;
  padding: 0;
}
.fc-foot-links li{ margin: 0 0 10px; }
.fc-foot-links a{
  font-size: .92rem;
  color: rgba(255,250,240,.78);
}
.fc-foot-links a:hover{ color: var(--wp--preset--color--gold); }

/* subscription form */
.fc-sub{
  display: flex;
  gap: 10px;
  margin-top: 16px;
  max-width: 360px;
  flex-wrap: wrap;
}
.fc-sub-input{
  flex: 1 1 160px;
  min-width: 0;
  background: rgba(255,250,240,.06);
  border: 1px solid rgba(255,250,240,.22);
  color: var(--wp--preset--color--cream);
  font-family: var(--wp--preset--font-family--jost);
  font-size: .92rem;
  padding: 13px 14px;
  border-radius: 0;
}
.fc-sub-input::placeholder{ color: rgba(255,250,240,.45); }
.fc-sub-input:focus{ outline: none; border-color: var(--wp--preset--color--gold); }
.fc-sub-btn{
  background: var(--wp--preset--color--gold);
  color: var(--wp--preset--color--wine-deep);
  font-family: var(--wp--preset--font-family--jost);
  font-size: .78rem; font-weight: 500;
  letter-spacing: .12em; text-transform: uppercase;
  border: 1px solid var(--wp--preset--color--gold);
  padding: 13px 22px;
  cursor: pointer;
}
.fc-sub-btn:hover{ background: #cda64a; border-color: #cda64a; }

/* disclaimer + bottom bar */
.fc-foot-legal{
  font-size: .78rem;
  line-height: 1.6;
  color: rgba(255,250,240,.5) !important;
  max-width: 980px;
}
.fc-foot-bottom{
  font-size: .8rem;
  border-top: 1px solid rgba(255,250,240,.14);
}
.fc-foot-bottom p{ color: rgba(255,250,240,.55) !important; margin: 0; font-size: .8rem; }

/* =========================================================
   AGE / TRADE GATE (site-wide)
   ========================================================= */
.fc-gate{
  position: fixed; inset: 0; z-index: 99999;
  background: rgba(40,15,20,.97);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
}
.fc-gate-box{ max-width: 520px; text-align: center; }
.fc-gate-mark{ display: flex; justify-content: center; margin-bottom: 14px; }
.fc-gate-brand{
  font-family: var(--wp--preset--font-family--cormorant);
  font-weight: 600; font-size: 1.7rem; letter-spacing: .14em;
  color: var(--wp--preset--color--cream); margin-bottom: 16px;
}
.fc-gate-box .fc-eyebrow{ color: var(--wp--preset--color--gold); }
.fc-gate-box h2{
  font-family: var(--wp--preset--font-family--cormorant);
  font-weight: 500; font-size: 1.85rem;
  color: var(--wp--preset--color--cream); margin: 6px 0 16px;
}
.fc-gate-text{
  font-size: .95rem; line-height: 1.6;
  color: rgba(255,250,240,.78); max-width: 440px; margin: 0 auto;
}
.fc-gate-th{ margin-top: 12px; color: rgba(255,250,240,.6); font-size: .9rem; }
.fc-gate-actions{
  margin-top: 26px; display: flex; gap: 14px;
  justify-content: center; flex-wrap: wrap;
}
.fc-gate-btn{
  font-family: var(--wp--preset--font-family--jost);
  font-size: .82rem; font-weight: 500; letter-spacing: .12em; text-transform: uppercase;
  padding: 14px 30px; cursor: pointer; border: 1px solid var(--wp--preset--color--gold);
}
.fc-gate-btn--in{ background: var(--wp--preset--color--gold); color: var(--wp--preset--color--wine-deep); }
.fc-gate-btn--in:hover{ background: #cda64a; }
.fc-gate-btn--out{ background: transparent; color: rgba(255,250,240,.8); border-color: rgba(255,250,240,.3); }
.fc-gate-btn--out:hover{ border-color: var(--wp--preset--color--cream); color: var(--wp--preset--color--cream); }

/* footer columns stack on small screens */
@media (max-width: 781px){
  .fc-foot-grid{ gap: 30px; }
}

/* ---- 404 page (styled here because style.css loads everywhere) ---- */
.fc-404{
  max-width: 680px;
  margin-inline: auto;
  padding: clamp(80px, 12vw, 150px) 26px clamp(90px, 13vw, 160px);
  text-align: center;
}
.fc-404 .fc-eyebrow{ margin-bottom: 12px; }
.fc-404-title{
  font-family: var(--wp--preset--font-family--cormorant);
  font-weight: 500;
  color: var(--wp--preset--color--wine);
  font-size: clamp(2.2rem, 5vw, 3.2rem);
  line-height: 1.08;
  margin: 0;
}
.fc-404-text{
  margin: 18px auto 0;
  max-width: 480px;
  color: var(--wp--preset--color--muted);
  font-size: 1.06rem;
}
.fc-404-actions{ justify-content: center; margin-top: 34px; }

/* ---- Footer social icons ---- */
.fc-social{
  display: flex;
  gap: 10px;
  margin-top: 16px;
}
.fc-social-btn{
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid rgba(255,250,240,.3);
  color: var(--wp--preset--color--cream);
  transition: background-color .2s, border-color .2s, color .2s;
}
.fc-social-btn:hover{
  background: var(--wp--preset--color--gold);
  border-color: var(--wp--preset--color--gold);
  color: var(--wp--preset--color--wine-deep);
}

/* =========================================================
   v0.9.0 — contact form in the Get-in-touch section (form id 1)
   The section has a dark wine-deep background, so labels are lightened.
   ========================================================= */
.fc-cta-form{
  max-width: 560px;
  margin: 34px auto 0;
  text-align: left;
}
.fc-cta-form .fluentform{ margin: 0; }

/* Labels readable on the dark background */
.fc-cta-form .ff-el-input--label label,
.fc-cta-form .ff-el-input--label{
  color: var(--wp--preset--color--cream) !important;
  font-family: var(--wp--preset--font-family--jost);
}
.fc-cta-form .ff-el-input--content .ff-el-help-message{ color: rgba(255,250,240,.6); }

/* Inputs on a light field so typed text is readable */
.fc-cta-form .ff-el-form-control{
  background: rgba(255,250,240,.97);
  border: 1px solid rgba(255,250,240,.32);
  color: var(--wp--preset--color--ink);
  border-radius: 3px;
}
.fc-cta-form .ff-el-form-control::placeholder{ color: rgba(26,26,26,.5); }
.fc-cta-form .ff-el-form-control:focus{
  border-color: var(--wp--preset--color--gold);
  outline: none;
  box-shadow: 0 0 0 3px rgba(184,147,58,.35);
}

/* Submit button in brand gold */
.fc-cta-form .ff-btn-submit{
  background: var(--wp--preset--color--gold);
  border: 1px solid var(--wp--preset--color--gold);
  color: var(--wp--preset--color--cream);
  font-family: var(--wp--preset--font-family--jost);
  letter-spacing: .1em;
  text-transform: uppercase;
  border-radius: 0;
}
.fc-cta-form .ff-btn-submit:hover{
  background: var(--wp--preset--color--cream);
  border-color: var(--wp--preset--color--cream);
  color: var(--wp--preset--color--wine);
}

/* Success / error messages on the dark background */
.fc-cta-form .ff-message-success{ color: var(--wp--preset--color--cream); }
.fc-cta-form .error.text-danger,
.fc-cta-form .ff-el-is-error .text-danger{ color: #ffd9c2; }

/* =========================================================
   v0.12.0 — Blog single article
   (a) Featured image capped as a banner — was too tall on desktop
   (b) In-article product cards styled like the catalogue cards
   Lives here (not catalog.css) because catalog.css is not loaded
   on single posts; style.css is loaded everywhere.
   ========================================================= */

/* (a) Featured image — nice wide banner, height under control */
.fc-post-hero img{
  display: block;
  width: 100%;
  height: clamp(260px, 32vw, 430px);
  object-fit: cover;
  border-radius: 4px;
}

/* (b) Product cards inside an article — mirror .fc-card look */
.fc-prodcards{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 18px;
  margin: 8px 0 4px;
}
.fc-prodcard{
  background: var(--wp--preset--color--white, #fff);
  border: 1px solid var(--fc-line);
  padding: 22px 18px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  text-decoration: none;
  transition: transform .3s, box-shadow .3s, border-color .3s;
}
.fc-prodcard:hover{
  transform: translateY(-6px);
  box-shadow: 0 22px 40px rgba(0,0,0,.13);
  border-color: var(--fc-line-gold);
}
.fc-prodcard:focus-visible{
  outline: 2px solid var(--wp--preset--color--gold);
  outline-offset: 3px;
}
.fc-prodcard-img{
  width: 100%;
  height: 200px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  margin-bottom: 14px;
}
.fc-prodcard-img img{
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}
.fc-prodcard-name{
  font-family: var(--wp--preset--font-family--cormorant);
  font-weight: 500;
  font-size: 1.4rem;
  line-height: 1.15;
  color: var(--wp--preset--color--wine);
}
.fc-prodcard-type{
  margin-top: 4px;
  font-family: var(--wp--preset--font-family--jost);
  font-size: .72rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--wp--preset--color--muted);
}
@media (max-width: 600px){
  .fc-prodcards{ grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .fc-prodcard-img{ height: 160px; }
}

/* Related products section appended to the end of an article */
.fc-related{
  margin-top: var(--wp--preset--spacing--50, 40px);
  padding-top: var(--wp--preset--spacing--40, 28px);
  border-top: 1px solid var(--fc-line-gold);
}
.fc-related > h2{ margin-top: 0; }
.fc-related > p{ margin-bottom: 20px; }
