/*
Theme Name: 123 Foods Divi Child
Theme URI: https://123goodfoods.com/
Description: Client-approved 123 Foods child theme for Divi 4. Contains the shared brand CSS and product-information modal styling.
Author: Red Calabash
Template: Divi
Version: 1.0.0
Text Domain: 123-foods-divi-child
*/

/* The project CSS begins below. */

/*
123 Foods Divi 4 Global CSS
Purpose: shared typography, header/footer alignment, responsive cards and approved brand details.
Install: Divi > Theme Options > General > Custom CSS, or the child theme style.css.
*/

:root {
  --rc123-olive: #788235;
  --rc123-olive-dark: #4c5a19;
  --rc123-charcoal: #232323;
  --rc123-black: #171817;
  --rc123-paper: #fafaf7;
  --rc123-white: #ffffff;
  --rc123-grey: #969696;
  --rc123-border: #dedbd2;
}

body { color: var(--rc123-charcoal); }
.rc123-black { color: var(--rc123-black); }
.rc123-olive { color: var(--rc123-olive-dark); }

.rc123-global-header { position: relative; z-index: 999; }
.rc123-header-row,
.rc123-header-actions,
.rc123-cta-row {
  display: flex;
  align-items: center;
}
.rc123-header-logo img { max-height: 76px; width: auto; }
.rc123-header-actions { justify-content: flex-end; gap: 14px; }
.rc123-header-phone a,
.rc123-global-header a,
.rc123-global-footer a,
.rc123-footer-bottom a {
  color: #fff;
}
.rc123-primary-menu .et-menu > li > a { font-family: Poppins, sans-serif; font-weight: 600; }
.rc123-primary-menu .current-menu-item > a { border-bottom: 2px solid #a6b548; }
.rc123-social { margin-bottom: 0 !important; }
.rc123-social li a.icon { background-color: #fff !important; }
.rc123-social li a.icon:before { color: #171817 !important; }
.rc123-footer-logo img { max-width: 235px; width: 100%; }
.rc123-footer-bottom p { margin: 0; }

.rc123-home-hero .et_pb_column,
.rc123-about-section .et_pb_column { display: flex; flex-direction: column; justify-content: center; }
.rc123-hero-left { padding: clamp(35px, 5vw, 85px); }
.rc123-hero-image img { min-height: 560px; height: 100%; object-fit: cover; }
.rc123-about-image img { min-height: 485px; height: 100%; object-fit: cover; }

.rc123-inline-button {
  display: inline-block;
  margin-right: 12px !important;
  margin-bottom: 10px !important;
}
.rc123-button-primary .et_pb_button,
.rc123-button-secondary .et_pb_button { min-width: 180px; }

.rc123-benefit { height: 100%; padding: 18px 12px; }
.rc123-benefits-section .et_pb_column:not(:last-child) { border-right: 1px solid #dfdbd1; }
.rc123-extrusion-panel {
  background: #efeee8;
  border-radius: 9px;
  padding: 22px;
  margin-top: 20px;
}
.rc123-preview-card,
.rc123-product-card {
  overflow: hidden;
  border: 1px solid #ece9e0;
  transition: transform .2s ease, box-shadow .2s ease;
}
.rc123-preview-card:hover,
.rc123-product-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 30px rgba(35,35,35,.10);
}
.rc123-preview-image img,
.rc123-product-image img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}
.rc123-category-preview { padding: 15px 16px 22px; }
.rc123-product-card-copy { padding: 18px 18px 8px; }
.rc123-product-price {
  color: var(--rc123-olive-dark);
  font-family: Poppins, sans-serif;
  font-weight: 700;
  font-size: 23px;
}
.rc123-card-nutrition { font-size: 14px; line-height: 1.55; }
.rc123-product-modal-trigger { margin: 8px 18px 0 !important; }
.rc123-products-cta .et_pb_column { display: flex; flex-direction: column; justify-content: center; }
.rc123-contact-detail {
  padding-bottom: 15px;
  border-bottom: 1px solid #e6e2d9;
  margin-bottom: 15px !important;
}
.rc123-contact-detail:last-child { border-bottom: 0; }
.rc123-contact-form input,
.rc123-contact-form textarea,
.rc123-contact-form select {
  border: 1px solid #cbc6ba !important;
  border-radius: 4px !important;
}
.rc123-contact-form textarea { min-height: 140px; }
.rc123-faq-toggle { border: 1px solid #e4e0d7 !important; margin-bottom: 8px !important; }
.rc123-contact-help-image img { min-height: 390px; object-fit: cover; }

@media (max-width: 980px) {
  .rc123-header-row,
  .rc123-header-actions,
  .rc123-cta-row { display: block; }
  .rc123-home-hero .et_pb_row,
  .rc123-about-section .et_pb_row { display: flex; flex-direction: column; }
  .rc123-hero-left { padding: 46px 8vw 34px; order: 1; }
  .rc123-home-hero .et_pb_column:last-child { order: 2; }
  .rc123-hero-image img { min-height: 400px; }
  .rc123-benefits-section .et_pb_column { border-right: 0 !important; border-bottom: 1px solid #dfdbd1; }
  .rc123-preview-row { display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
  .rc123-preview-row .et_pb_column { width: 100% !important; margin: 0 !important; }
  .rc123-products-row { display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
  .rc123-products-row .et_pb_column { width: 100% !important; margin: 0 !important; }
}

@media (max-width: 767px) {
  .rc123-hero-copy h1 { font-size: 42px !important; }
  .rc123-hero-image img { min-height: 320px; }
  .rc123-preview-row,
  .rc123-products-row { grid-template-columns: 1fr; }
  .rc123-about-image img,
  .rc123-contact-help-image img { min-height: 280px; }
  .rc123-contact-info-card,
  .rc123-contact-form-card { padding: 25px !important; }
  .rc123-footer-bottom p { text-align: center !important; }
}

/*
123 Foods Product Modal CSS
Purpose: accessible desktop modal and full-screen mobile information panel.
Why CSS is required: Divi 4 has no native modal interaction.
Install: directly after 123-foods-global.css.
*/

html.rc123-modal-open,
html.rc123-modal-open body { overflow: hidden; }

.rc123-modal[aria-hidden="true"] { display: none; }
.rc123-modal {
  position: fixed;
  inset: 0;
  z-index: 1000000;
  display: grid;
  place-items: center;
  padding: 24px;
}
.rc123-modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(12, 13, 12, .72);
  backdrop-filter: blur(3px);
}
.rc123-modal__dialog {
  position: relative;
  z-index: 1;
  width: min(1050px, 96vw);
  max-height: 92vh;
  overflow: auto;
  background: #fafaf7;
  border-radius: 10px;
  box-shadow: 0 28px 80px rgba(0,0,0,.34);
  padding: clamp(24px, 4vw, 45px);
}
.rc123-modal__close {
  position: sticky;
  float: right;
  top: 0;
  z-index: 2;
  width: 44px;
  height: 44px;
  border: 0;
  background: transparent;
  color: #4c5a19;
  font-size: 38px;
  line-height: 1;
  cursor: pointer;
}
.rc123-modal__grid {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  gap: 36px;
  clear: both;
}
.rc123-modal__visual img {
  width: 100%;
  border-radius: 7px;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}
.rc123-modal__price {
  display: inline-block;
  margin-top: -18px;
  margin-left: 14px;
  position: relative;
  background: #788235;
  color: #fff;
  border-radius: 8px;
  padding: 9px 15px;
  font: 700 24px/1 Poppins, sans-serif;
}
.rc123-modal__meta {
  display: grid;
  gap: 10px;
  margin-top: 24px;
}
.rc123-modal__meta span {
  display: block;
  border: 1px solid #d6d1c6;
  border-radius: 6px;
  padding: 12px 14px;
}
.rc123-modal__actions {
  display: flex;
  gap: 10px;
  margin-top: 18px;
  flex-wrap: wrap;
}
.rc123-modal__button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 44px;
  padding: 10px 16px;
  background: #788235;
  border: 1px solid #788235;
  border-radius: 4px;
  color: #fff !important;
  font: 600 14px/1.2 Poppins, sans-serif;
  text-transform: uppercase;
}
.rc123-modal__button--outline {
  background: transparent;
  color: #4c5a19 !important;
}
.rc123-modal__eyebrow {
  color: #788235;
  font: 700 14px/1.2 Poppins, sans-serif;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.rc123-modal__information h2 {
  margin-top: 6px;
  color: #232323;
  font: 700 clamp(25px, 3vw, 36px)/1.18 Poppins, sans-serif;
}
.rc123-modal__detail {
  border-bottom: 1px dotted #c9c4b9;
  padding: 12px 0;
}
.rc123-modal__detail summary {
  cursor: pointer;
  color: #4c5a19;
  font: 700 16px/1.35 Poppins, sans-serif;
}
.rc123-modal__detail > div {
  padding-top: 9px;
  font: 400 15px/1.55 Karla, sans-serif;
}
.rc123-modal__table-wrap { overflow-x: auto; }
.rc123-modal table {
  width: 100%;
  border-collapse: collapse;
  font: 400 14px/1.4 Karla, sans-serif;
}
.rc123-modal th,
.rc123-modal td {
  border: 1px solid #d7d3c8;
  padding: 8px 10px;
  text-align: left;
}
.rc123-modal th { font-weight: 600; width: 58%; }
.rc123-modal__disclaimer {
  margin: 22px 0 0;
  text-align: center;
  color: #6d6d68;
  font-size: 13px;
}

@media (max-width: 767px) {
  .rc123-modal { padding: 0; align-items: stretch; }
  .rc123-modal__dialog {
    width: 100%;
    max-height: 100vh;
    min-height: 100vh;
    border-radius: 0;
    padding: 18px;
  }
  .rc123-modal__grid { grid-template-columns: 1fr; gap: 20px; }
  .rc123-modal__visual img { max-height: 290px; }
  .rc123-modal__information h2 { font-size: 24px; }
  .rc123-modal__detail:not([open]) > div { display: none; }
  .rc123-modal__actions { display: grid; grid-template-columns: 1fr; }
}
