/*
 * site.css: the only stylesheet for chefsfinefoods.co.uk.
 *
 * Sections, in order:
 *   1. Tokens        colours, fonts, spacing (custom properties)
 *   2. Fonts         @font-face for self-hosted fonts
 *   3. Base          reset and element defaults
 *   4. Layout        container, rows/columns, spacers, bands
 *   5. Components    one block per component: "=== Component: <name> ==="
 *   6. Pages         rare page-specific rules: "=== Page: <path> ==="
 *   7. Utilities     a handful of helpers
 *
 * Breakpoints (the original Elementor ones; media queries can't use custom properties):
 *   mobile  <= 767px    tablet 768px-1024px    desktop >= 1025px
 *   Columns stack only on mobile. The header menu becomes a burger on mobile only;
 *   the footer menu is hidden on tablet and mobile.
 *
 * Editing: change tokens to restyle the site; add new components as new blocks;
 * add modifier classes (.card--wide) instead of changing a component for one page.
 */

/* ============ 1. Tokens ============ */
:root {
  /* Colours (from the original's computed styles) */
  --color-text: #424242;          /* body copy and dark headings */
  --color-navy: #18148a;          /* header bar, menu dropdown, social icons */
  --color-indigo: #170d8b;        /* section backgrounds, gradients, light-button text */
  --color-green: #31bc6b;         /* buttons, gradients, menu hover */
  --color-white: #ffffff;
  --color-link: #0000ee;          /* plain links in body copy (browser default on the original) */
  --color-submenu-text: #33373d;  /* footer menu dropdown text */
  --color-submenu-hover: #3f444b; /* footer menu dropdown hover background */
  --gradient-down: linear-gradient(180deg, var(--color-indigo) 0%, var(--color-green) 100%); /* indigo -> green */
  --gradient-up: linear-gradient(180deg, var(--color-green) 0%, var(--color-indigo) 100%);   /* green -> indigo */

  /* Typography */
  --font-body: "Comfortaa", sans-serif;
  --font-heading: "Signika", sans-serif;

  /* Spacing and shape */
  --container: 1140px;
  --col-pad: 10px;                 /* Elementor's default column padding */
  --widget-gap: 20px;              /* space between stacked widgets */
  --radius-card: 10px;
  --radius-pill: 25px;
  --shadow-card: 0 0 10px 0 rgb(0 0 0 / 0.5);

  /* Motion */
  --duration: 300ms;
  --ease: ease;
}

/* ============ 2. Fonts ============ */
/* Google Fonts, self-hosted (variable latin subsets cover the weights used: Comfortaa 400/500/700, Signika 400/700). */
@font-face { font-family: "Comfortaa"; src: url("/assets/fonts/comfortaa-latin-400-700.woff2") format("woff2"); font-weight: 300 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Signika"; src: url("/assets/fonts/signika-latin-400-700.woff2") format("woff2"); font-weight: 300 700; font-style: normal; font-display: swap; }

/* ============ 3. Base ============ */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; font-family: var(--font-body); font-size: 16px; line-height: normal; color: var(--color-text); background: var(--color-white); overflow-x: hidden; }
img, svg, video, iframe { max-width: 100%; }
img { height: auto; display: block; }
h1, h2, h3 { margin: 0; padding: 0; color: var(--color-text); }
h1 { font-family: var(--font-heading); font-size: 48px; font-weight: 700; line-height: 48px; }
h2 { font-family: var(--font-heading); font-size: 24px; font-weight: 400; line-height: 36px; }
p { margin: 16px 0; }
a { color: var(--color-link); text-decoration: none; }
b, strong { font-weight: 700; }
ul { margin: 0; padding: 0; list-style: none; }
figure { margin: 0; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--color-green); outline-offset: 2px; }

/* ============ 4. Layout ============ */
/* Boxed container: 1140px wide on desktop, full width below that (as Elementor). */
.container { width: 100%; max-width: var(--container); margin-inline: auto; }

/* Rows of columns. Column widths are percentages from the original layout. Stack on mobile. */
.row { display: flex; width: 100%; max-width: var(--container); margin-inline: auto; }
.row--middle { align-items: center; }
.row > .col { flex: 0 0 auto; width: 100%; min-width: 0; padding: var(--col-pad); }
.col--middle { display: flex; flex-direction: column; justify-content: center; }
.col--50 { width: 50% !important; }
.col--33 { width: 33.333% !important; }
.col--25 { width: 25% !important; }
@media (max-width: 767px) {
  .row { flex-wrap: wrap; }
  .row > .col, .col--50, .col--33, .col--25 { width: 100% !important; }
}

/* Widgets stacked in a column are 20px apart (Elementor's widget spacing). */
.stack > :not(:last-child) { margin-bottom: var(--widget-gap); }

/* Vertical spacer sections (the original used empty 50px spacer rows with 10px padding). */
.spacer { height: 70px; }
.spacer--40 { height: 40px; }
.spacer--170 { height: 170px; }

/* Full-width coloured bands */
.band--indigo { background: var(--color-indigo); }
.band--down { background-image: var(--gradient-down); }
.band--up { background-image: var(--gradient-up); }
.band--pattern { background-image: url("/wp-content/uploads/2021/07/Group-102.png"); padding-block: 75px; }
@media (max-width: 767px) { .band--pattern { padding-block: 50px; } }

/* Mobile-only drop the original applied to many first columns (a 149px gap above the heading). */
@media (max-width: 767px) { .col--drop { margin-top: 149px; } }

/* ============ 5. Components ============ */

/* === Component: skip-link === */
.skip-link { position: absolute; left: -9999px; top: 0; z-index: 1000; padding: 8px 16px; background: var(--color-white); color: var(--color-navy); }
.skip-link:focus { left: 16px; }

/* === Component: site-header ===
 * Desktop/tablet: logo | rounded navy menu bar | green "Order now". Sticky: once the page
 * scrolls it stays fixed 20px from the top (Elementor sticky offset 20).
 * Mobile: logo, navy bar with burger (menu slides down inside the bar), "Order now" below. Not sticky.
 */
.site-header { position: relative; z-index: 100; }
.site-header__inner { display: flex; align-items: stretch; width: 100%; }
.site-header__logo { flex: 0 0 14.12%; padding: var(--col-pad); margin-left: 20px; }
.site-header__logo a { display: block; }
.site-header__logo img { width: 219px; max-width: 100%; }
.site-header__bar { flex: 0 0 70.544%; display: flex; align-items: center; justify-content: center; margin: 0 20px; background: var(--color-navy); border-radius: var(--radius-pill); }
.site-header__order { flex: 0 0 14.641%; min-width: 0; display: flex; align-items: center; padding: var(--col-pad); margin-right: 20px; }
.site-header__order .button { font-size: 18px; line-height: 18px; padding: 20px 40px; }
@media (min-width: 768px) {
  .site-header { position: sticky; top: 0; }
  .site-header__inner { transition: none; }
  .site-header.is-scrolled .site-header__inner { transform: translateY(20px); }
  .site-header__logo, .site-header__bar, .site-header__order { min-width: 0; }
  .site-header__logo { flex-basis: calc(14.12% - 20px); }
  .site-header__bar { flex-basis: calc(70.544% - 40px); }
  .site-header__order { flex-basis: calc(14.641% - 20px); }
}
@media (min-width: 768px) and (max-width: 1024px) {
  /* The original button overflowed the page here; slimmer side padding keeps it inside. */
  .site-header__order .button { padding-inline: 12px; }
}
@media (max-width: 767px) {
  .site-header__inner { flex-direction: column; }
  .site-header__logo { margin-left: 20px; display: flex; justify-content: center; }
  .site-header__bar { display: block; padding: 10px; }
  .site-header__order { justify-content: center; margin: 0; padding: 30px 0 20px; }
}

/* === Component: nav-toggle (burger, mobile only) === */
.nav-toggle { display: none; align-items: center; justify-content: center; width: 44px; height: 44px; margin: 0 auto; padding: 0; border: 0; border-radius: 3px; background: none; color: var(--color-navy); cursor: pointer; }
.nav-toggle__box { display: flex; align-items: center; justify-content: center; width: 33px; height: 33px; border-radius: 3px; background: var(--color-white); transition: background-color var(--duration) var(--ease), color var(--duration) var(--ease); }
.nav-toggle svg { width: 22px; height: 22px; fill: currentColor; }
.nav-toggle__close { display: none; }
.nav-toggle[aria-expanded="true"] { color: var(--color-white); }
.nav-toggle[aria-expanded="true"] .nav-toggle__box { background: var(--color-navy); }
.nav-toggle[aria-expanded="true"] .nav-toggle__open { display: none; }
.nav-toggle[aria-expanded="true"] .nav-toggle__close { display: block; }
@media (max-width: 767px) { .nav-toggle { display: flex; } }

/* === Component: main-nav (header menu; horizontal on desktop/tablet, slide-down list on mobile) === */
.main-nav__list { display: flex; flex-wrap: wrap; justify-content: center; }
.main-nav__item { position: relative; }
.main-nav__link { display: flex; align-items: center; gap: 10px; padding: 13px 20px; border: 0; background: none; font: 700 16px/20px var(--font-body); color: var(--color-white); cursor: pointer; transition: transform 400ms var(--ease); }
.main-nav__caret { width: 10px; height: 16px; fill: currentColor; flex: none; }
@media (min-width: 768px) {
  .main-nav__link:hover, .main-nav__link:focus-visible { transform: scale(1.2); }
  .main-nav .submenu { position: absolute; top: 100%; left: 0; z-index: 110; min-width: 12em; background: var(--color-navy); visibility: hidden; opacity: 0; transition: opacity 200ms ease, visibility 200ms; }
  .main-nav__item:hover > .submenu, .main-nav__item:focus-within > .submenu, .main-nav__item.is-open > .submenu { visibility: visible; opacity: 1; }
  .main-nav .submenu a { display: block; padding: 13px 20px; font: 500 13px/20px var(--font-body); color: var(--color-white); white-space: nowrap; }
  .main-nav .submenu a:hover, .main-nav .submenu a:focus-visible { background: var(--color-green); }
}
@media (max-width: 767px) {
  /* Slide-down: grid row 0fr -> 1fr. align-items: stretch keeps the list clipped while it animates. */
  .main-nav { display: grid; grid-template-rows: 0fr; align-items: stretch; transition: grid-template-rows var(--duration) var(--ease); }
  .main-nav.is-open { grid-template-rows: 1fr; }
  .main-nav__list { display: block; min-height: 0; overflow: hidden; margin-top: 0; }
  .main-nav.is-open .main-nav__list { margin-top: 10px; }
  .main-nav__link { width: 100%; justify-content: space-between; padding: 10px 20px; font-weight: 500; text-align: left; }
  .main-nav__link:hover, .main-nav__link:focus-visible { background: var(--color-green); }
  .main-nav .submenu { display: none; }
  .main-nav__item.is-open > .submenu { display: block; }
  .main-nav .submenu a { display: block; padding: 10px 20px 10px 28px; font: 500 13px/20px var(--font-body); color: var(--color-white); }
  .main-nav .submenu a:hover, .main-nav .submenu a:focus-visible { background: var(--color-green); }
}

/* === Component: button === */
.button { display: inline-block; max-width: 100%; padding: 15px 30px; border: 0; border-radius: var(--radius-pill); background: var(--color-green); color: var(--color-white); font: 700 16px/16px var(--font-body); text-align: center; text-decoration: none; cursor: pointer; transition: all var(--duration); }
.button--light { background: var(--color-white); color: var(--color-indigo); }

/* === Component: title (section headings) === */
.title { font-family: var(--font-heading); font-size: 48px; font-weight: 700; line-height: 48px; color: var(--color-text); }
.title--loose { line-height: 62px; }
.title--light { color: var(--color-white); }
.title--center { text-align: center; }

/* === Component: prose (text blocks) === */
.prose { display: flow-root; font-size: 16px; line-height: 26px; }
.prose--24 { line-height: 24px; }
.prose--normal { line-height: normal; }
.prose--light { color: var(--color-white); }
.prose--small { font-size: 12px; line-height: 18px; }
.prose--small p { margin: 12px 0; }
.prose--center { text-align: center; }
@media (max-width: 767px) { .prose--mcenter, .title--mcenter { text-align: center; } }

/* === Component: card (white rounded card with icon, title and text) === */
.cards { display: grid; grid-template-columns: repeat(var(--cards, 3), 1fr); width: 100%; max-width: var(--container); margin-inline: auto; }
.cards--4 { --cards: 4; }
.card { display: flex; flex-direction: column; align-items: center; margin-right: 20px; padding: 30px 20px; background: var(--color-white); border-radius: var(--radius-card); box-shadow: var(--shadow-card); text-align: center; }
.card > :not(:last-child) { margin-bottom: var(--widget-gap); }
.card__icon { margin-inline: auto; }
.card__title { font-family: var(--font-heading); font-size: 24px; font-weight: 400; line-height: 36px; color: var(--color-text); }
.card__text { display: flow-root; width: 100%; font-size: 16px; line-height: 24px; }
.card__text--normal { line-height: normal; }
@media (max-width: 767px) {
  .cards { grid-template-columns: 1fr; }
  .card { margin: 10px 10px 0; padding: 20px 10px; }
}

/* === Component: info-cards (Opening times / Location / Contact us on the patterned band) === */
.info-cards .card { justify-content: flex-start; }
.info-cards .card--tight { padding-inline: 10px; }
@media (max-width: 767px) { .info-cards .card { margin: 10px; } }

/* === Component: cta-box (gradient call-to-action box) === */
.cta-box { max-width: 1000px; margin-inline: auto; padding: 75px 0; background-image: var(--gradient-up); border-radius: var(--radius-card); text-align: center; }
.cta-box__title { padding-bottom: 30px; margin-bottom: var(--widget-gap); }

/* === Component: carousel (Swiper; library CSS in /assets/vendor/swiper-14.3.0/) === */
.carousel .swiper { padding-bottom: 34px; --swiper-theme-color: #000; }
.carousel .swiper-slide img { width: 100%; height: auto; }
.carousel .swiper-button-prev, .carousel .swiper-button-next { top: calc(50% - 17px); width: 20px; height: 20px; margin-top: -10px; padding: 0; border: 0; background: none; color: rgb(238 238 238 / 0.9); --swiper-navigation-size: 20px; }
.carousel .swiper-button-prev { left: 10px; }
.carousel .swiper-button-next { right: 10px; }
.carousel .swiper-pagination { bottom: 8px !important; line-height: 0; }
.carousel .swiper-pagination-bullet { width: 6px; height: 6px; margin: 0 6px !important; background: #000; opacity: 0.2; }
.carousel .swiper-pagination-bullet-active { opacity: 1; }

/* === Component: gallery (WordPress-style 5-column gallery; GLightbox opens a.glightbox links) === */
.gallery { display: grid; grid-template-columns: repeat(5, 1fr); align-items: start; }
.gallery__item { display: flex; justify-content: center; }

.gallery__item a { display: block; }
.gallery--thumbs .gallery__item { padding-inline: 4px; }
@media (max-width: 767px) {
  .gallery { grid-template-columns: 1fr; }
  .gallery--thumbs .gallery__item { padding-bottom: 10px; }
  .gallery--thumbs .gallery__item:last-child { padding-bottom: 0; }
}

/* === Component: lightbox (GLightbox tweaks to match the Elementor lightbox) === */
.glightbox-clean .gslide-description { background: transparent; }
.glightbox-clean .gslide-title { margin: 0; color: var(--color-white); font-family: var(--font-body); font-size: 16px; text-align: center; }
.glightbox-clean .gdesc-inner { padding: 10px; }

/* === Component: site-footer === */
.site-footer { padding-top: 70px; }
.site-footer__cta { padding: 0 0 70px; }
.site-footer__brand { padding-bottom: 10px; }
.site-footer__logo img { width: 219px; }
.site-footer__follow { margin: 0; text-align: right; }
.site-footer__notice { margin: 0; font-size: 14px; font-weight: 700; line-height: 21px; }
.site-footer__rule { padding: 25px 10px !important; }
.site-footer__rule hr { margin: 0; border: 0; border-top: 1px solid var(--color-text); }
.site-footer__copyright { font-size: 14px; font-weight: 700; line-height: 21px; text-align: right; }
.site-footer__copyright p { margin: 0; }
.site-footer__copyright a { color: inherit; }
.site-footer__nav-col { width: 69.911% !important; }
.site-footer__copy-col { width: 30.045% !important; }
.site-footer__logo-col { width: 33.333% !important; }
.site-footer__follow-col { width: 45.613% !important; }
.site-footer__social-col { width: 18.74% !important; }
@media (max-width: 1024px) {
  .site-footer__nav-col { display: none; }
  .site-footer__copy-col { width: 50% !important; }
  .site-footer__follow-col { width: 30% !important; }
  .site-footer__social-col { width: 36% !important; }
}
@media (max-width: 767px) {
  .site-footer__copy-col, .site-footer__logo-col, .site-footer__follow-col, .site-footer__social-col { width: 100% !important; }
  .site-footer__follow { text-align: center; }
  .site-footer__social-col .social { justify-content: center; }
}

/* === Component: social (round navy icons; not links on the original) === */
.social { display: flex; justify-content: flex-end; gap: 5px; }
.social__icon { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%; background: var(--color-navy); color: var(--color-white); }
.social__icon svg { width: 20px; height: 20px; fill: currentColor; }

/* === Component: footer-nav (desktop-only horizontal menu with "About us" dropdown) === */
.footer-nav__list { display: flex; flex-wrap: wrap; }
.footer-nav__item { position: relative; }
.footer-nav__link { display: flex; align-items: center; gap: 10px; padding: 13px 20px; border: 0; background: none; font: 400 16px/20px var(--font-body); color: var(--color-text); cursor: pointer; transition: transform 400ms var(--ease); }
.footer-nav__link:hover, .footer-nav__link:focus-visible { transform: scale(1.2); }
.footer-nav .submenu { position: absolute; top: 100%; left: 0; z-index: 10; min-width: 12em; background: var(--color-white); box-shadow: 0 0 10px rgb(0 0 0 / 0.1); visibility: hidden; opacity: 0; transition: opacity 200ms ease, visibility 200ms; }
.footer-nav__item:hover > .submenu, .footer-nav__item:focus-within > .submenu, .footer-nav__item.is-open > .submenu { visibility: visible; opacity: 1; }
.footer-nav .submenu a { display: block; padding: 13px 20px; font: 500 13px/20px var(--font-body); color: var(--color-submenu-text); white-space: nowrap; }
.footer-nav .submenu a:hover, .footer-nav .submenu a:focus-visible { background: var(--color-submenu-hover); color: var(--color-white); }

/* === Component: contact-email (replaces WordPress forms; not used on this site, kept for consistency) === */
.contact-email { display: grid; gap: 16px; justify-items: start; }
.contact-email__address { font-weight: 700; word-break: break-word; }
.contact-email__phone a { color: inherit; }

/* ============ 6. Pages ============ */

/* === Page: / === */
.hero { min-height: 616px; }
.hero__text { width: 43.771% !important; }
.hero__media { width: 56.229% !important; }
.app__text { width: 41.053% !important; }
.app__media { width: 58.947% !important; }
.benefits { padding: 30px 0 100px; }
.benefits .card { padding: 30px 20px; }
@media (max-width: 1024px) { .benefits { padding: 0 10px 50px 20px; } }
.card__icon--pad-b { margin-bottom: 33px !important; }  /* the original image widgets had 13px/7px padding */
.card__icon--pad-t { margin-top: 7px; }
.card__title--tight { line-height: 24px; }
@media (max-width: 767px) {
  .hero { min-height: 0; margin-top: -4px; }
  .hero__text, .hero__media, .app__text, .app__media { width: 100% !important; }
  .hero__text, .customer-focused__cta { text-align: center; }
  .benefits { padding: 0; }
  .benefits .card { margin: 20px 10px 0; padding: 20px 0; }
  .benefits .card:first-child { margin: 10px 0 0 10px; }
  .benefits .card:last-child { margin-bottom: 40px; padding: 0 10px 20px; }
}

/* === Page: /why-choose-chefs-fine-foods/ === */
.packed { padding-top: 75px; }
.packed__lead { padding: 0 !important; }
.packed__row2 { padding-block: 30px; }
.packed__row3 { padding-bottom: 30px; }
.brands-intro { max-width: 900px; }
@media (max-width: 767px) {
  .packed .card, .packed__row2 .card, .packed__row3 .card { margin: 10px 0 0 10px; padding: 20px 0; }
}

/* === Page: /delivery-information/ === */
.delivery-hero { position: relative; isolation: isolate; border-radius: 8px; background-image: url("/wp-content/uploads/2021/07/Fade-it-behind-delivery-information-text.jpg"); }
.delivery-hero::before { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: 8px; background: rgb(0 0 0 / 0.5); }
.postcodes { padding: 30px 0 50px; }
@media (max-width: 1024px) { .postcodes { padding: 0 10px 50px 20px; } }
@media (max-width: 767px) { .postcodes { padding: 0; } }

/* ============ 7. Utilities ============ */
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.text-center { text-align: center; }

/* ============ Reduced motion ============ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
