/*
 * Theme Name:  Mickelberry's
 * Theme URI:   https://overtimeagency.com
 * Description: Mickelberry's child theme for IPC Base. Brand overrides only — no structural CSS.
 * Author:      Jason Ackerman
 * Author URI:  https://overtimeagency.com
 * Template:    ipc-base
 * Version:     1.0.0
 * Text Domain: mickelberry
 *
 * Brand Palette:
 *   Green  #337443  — primary, header, footer
 *   Red    #ed1b2e  — secondary, CTAs, accents
 *   White  #ffffff  — text on dark, accent
 */

/* ============================================================
   1. BRAND COLOR TOKENS
   ============================================================ */

:root {
    --color-primary:           #337443;
    --color-primary-dark:      #255533;
    --color-primary-light:     #4a9a5c;
    --color-secondary:         #ed1b2e;
    --color-accent:            #ffffff;

    --btn-bg:                  #ed1b2e;
    --btn-bg-hover:            #be1525;
    --btn-border-color:        #ed1b2e;
    --btn-color:               #ffffff;

    /* Set directly — prevents variable chain from pulling red */
    --header-top-bg:           #337443;
    --header-brand-bg:         #337443;
    --header-text-color:       #ffffff;
    --header-hover-color:      #ed1b2e;

    --footer-bg:               #337443;
    --footer-text:             #ffffff;
    --footer-link-color:       rgba(255,255,255,0.8);
    --footer-link-hover:       #ffffff;

    --nav-color:               #ffffff;
    --nav-hover-color:         #ed1b2e;

    --product-flip-bg:         #337443;
    --product-flip-back-bg:    #ed1b2e;
    --product-nutrition-bg:    #337443;
    --product-scroll-arrow-bg: #337443;
    --product-tab-active-color:#337443;

    --recipe-tag-bg:           #337443;
    --recipe-tag-hover-bg:     #ed1b2e;
    --recipe-meta-color:       #337443;
}


/* ============================================================
   2. TYPOGRAPHY TOKENS
   ============================================================ */

:root {
    --font-display:  'cooper-black-std', Georgia, serif;
    --font-heading:  'cooper-black-std', Georgia, serif;
    --font-primary:  'cronos-pro', 'Helvetica Neue', Arial, sans-serif;
    --font-body:     'cronos-pro', 'Helvetica Neue', Arial, sans-serif;
    --font-script:   'caveat-brush', sans-serif;
}


/* ============================================================
   3. TYPOGRAPHY OVERRIDES
   ============================================================ */

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display) !important;
}

.btn {
    font-family: 'cronos-pro', sans-serif !important;
    font-weight: 700 !important;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 0.5em 1.75em;
    border-radius: var(--radius-sm);
}


/* ============================================================
   4. HEADER — SINGLE GREEN BAR + HANGING LOGO
   .header-brand is collapsed to zero height but kept visible
   so the logo (which lives inside it) can hang out the bottom.
   ============================================================ */

.header-top {
    background-color: #337443;
}

/* Collapse brand row to zero height — logo hangs out via overflow */
.header-brand {
    background-color: #337443;
    height: 0;
    line-height: 0;
    font-size: 0;
    overflow: visible;
    position: relative;
    z-index: 200;
}

.header-brand .site-wrapper {
    min-height: 0;
    height: 0;
    padding-top: 0;
    padding-bottom: 0;
    overflow: visible;
    position: relative;
}

/* Logo sits at the top of the zero-height row, transform pulls it up 50% */
.site-branding {
    position: absolute;
    top: 0;
    left: var(--wrapper-padding);
    transform: translateY(-20%);
    z-index: 201;
}

.site-logo {
    max-width: 320px !important;
    max-height: none !important;
    height: auto !important;
    width: auto;
    display: block;
    transition: max-width var(--transition-base);
}

/* Hero flush to green bar — no gap */
.home-banner {
    margin-top: 0;
}


/* ============================================================
   5. NAVIGATION — RIGHT-ALIGNED + PIPE SEPARATORS
   ============================================================ */

/* Nav pushes itself right with margin-left: auto */
.primary-nav {
    flex: 0 !important;
    margin-left: auto;
}

/* Pipe separators — li must be flex so ::before sits inline with <a> */
.primary-nav .nav-menu li {
    display: flex;
    align-items: center;
}

.primary-nav .nav-menu li + li::before {
    content: '|';
    color: rgba(255, 255, 255, 0.45);
    font-weight: 300;
    pointer-events: none;
    speak: none;
    padding: 0 0.2rem;
    line-height: 1;
}

.primary-nav .nav-menu li a {
    padding: 0.75rem 0.6rem;
    font-family: var(--font-primary);
}


/* ============================================================
   6. STICKY HEADER — stays green, logo shrinks
   ============================================================ */

.site-header.is-sticky {
    background-color: #337443;
}

.site-header.is-sticky .header-top,
.site-header.is-sticky .header-brand {
    background-color: #337443;
}

.site-header.is-sticky .site-logo {
    max-width: 180px !important;
}


/* ============================================================
   7. HERO — full width, no content box, clean overlay
   ============================================================ */

.home-banner-track,
.home-banner-slide {
    min-height: 560px;
}

.home-banner-slide::before {
    background: rgba(0, 0, 0, 0.25);
}

.home-banner .home-banner-content {
    background: none;
    text-align: left;
    padding: var(--space-xl) var(--space-2xl);
    max-width: 680px;
}

.home-banner .home-banner-heading {
    font-family: var(--font-display) !important;
    font-size: clamp(2.2rem, 5vw, 3.8rem);
    font-weight: 700;
    color: #ffffff;
    text-transform: none;
    letter-spacing: 0;
    line-height: 1.15;
    margin: 0;
    text-shadow: 0 2px 8px rgba(0,0,0,0.5);
}

@media (max-width: 640px) {
    .home-banner-track,
    .home-banner-slide { min-height: 360px; }
    .home-banner .home-banner-content { padding: var(--space-lg); }
}


/* ============================================================
   8. SECTION COLOR UTILITIES
   ============================================================ */

.has-red-bg,
.red-container-block {
    background-color: #ed1b2e;
    color: #ffffff;
}

.has-red-bg h2, .has-red-bg h3,
.red-container-block h2, .red-container-block h3 {
    color: #ffffff;
}

.has-green-bg,
.join-form-section {
    background-color: #337443;
    color: #ffffff;
}

.has-green-bg h2, .has-green-bg h3,
.join-form-section h2, .join-form-section h3 {
    color: #ffffff;
    font-family: var(--font-display);
}


/* ============================================================
   9. CIRCLE FLIP — VALUE PROPS
   ============================================================ */

.circle-flip-section {
    background-color: #222222;
}

.circle-flip-item {
    width: 320px;
}

.circle-flip-card {
    width: 300px;
    height: 300px;
}

.circle-flip-title {
    color: #ffffff;
    font-size: 2rem;
    font-family: var(--font-script) !important;
    font-weight: 400;
}

.circle-flip-front {
    background-color: transparent;
    border: none;
    outline: none;
    box-shadow: none;
}

.circle-flip-front img {
    border-radius: 50%;
}

.circle-flip-back p {
    font-size: 1.5rem;
    line-height: 1.35;
}


/* ============================================================
   10. BARN BANNER — SECTION 3
   ============================================================ */

#barn-banner .home-banner-track,
#barn-banner .home-banner-slide {
    min-height: 500px;
}

/* Lighter overlay — let the barn photo breathe */
#barn-banner .home-banner-slide::before {
    background: rgba(0, 0, 0, 0.15);
}

/* Center button vertically and horizontally */
#barn-banner .home-banner-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: none;
    padding: var(--space-2xl) var(--wrapper-padding);
    width: 100%;
}

/* Button centered, no heading image involved */
#barn-banner .btn {
    margin: 0 auto;
}



/* ============================================================
   11. PRODUCT ASSORTMENT IMAGE
   ============================================================ */

.wp-block-image.product-assortment {
    background-color: #ed1b2e;
    text-align: center;
    margin-top: -20%;
    margin-bottom: 0;
    padding: 0 var(--wrapper-padding);
}

.wp-block-image.product-assortment img {
    max-width: 400px;
    width: 100%;
    display: block;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

/* Barn banner button — white glow to stand out against the photo */
#barn-banner .btn {
    box-shadow: 0 0 30px 15px rgba(255, 255, 255, 0.5);
}


/* ============================================================
   12. PRODUCTS SECTION
   ============================================================ */

/* Paragraph max-width */
.brand-container p {
    max-width: 680px;
    margin-left: auto;
    margin-right: auto;
}

/* Product card label — caveat font, green */
.product-category-card__label {
    font-family: var(--font-script) !important;
    color: #337443 !important;
    font-size: 1.25rem;
}

/* Product card back — green bg, white text */
.product-category-card__back {
    background-color: #337443 !important;
}

.product-category-card__back p {
    color: #ffffff !important;
}

/* All Products button — caveat font */
.brand-container .wp-block-button .wp-block-button__link,
.brand-container .btn {
    font-family: var(--font-script) !important;
    font-size: 1.25rem;
    letter-spacing: 0.03em;
    text-transform: none;
}


/* ============================================================
   13. RECIPES CTA — TWO COLUMN OVERRIDE
   ============================================================ */

.recipes-cta--mickelberry {
    background-color: #ed1b2e;
    background-image: none !important;
    padding: var(--space-3xl) 0;
}

.recipes-cta--mickelberry::before {
    display: none;
}

.recipes-cta.recipes-cta--mickelberry .recipes-cta-inner {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: center;
    gap: var(--space-3xl);
    text-align: left;
}

.recipes-cta-polaroid {
    flex: 0 0 auto;
    max-width: 420px;
}

.recipes-cta-polaroid img {
    width: 100%;
    height: auto;
    display: block;
}

.recipes-cta-content {
    flex: 0 1 420px;
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.recipes-cta--mickelberry h2 {
    color: #ffffff;
    font-family: 'cooper-black-std', serif;
    font-size: clamp(1.8rem, 3vw, 2.8rem);
    line-height: 1.2;
    margin: 0;
}

.recipes-cta-subtitle {
    font-family: 'caveat-brush', sans-serif !important;
    font-size: 1.6rem;
    color: #ffffff;
    margin: 0;
    line-height: 1.3;
}

.recipes-cta--mickelberry .btn {
    align-self: flex-start;
    font-family: 'caveat-brush', sans-serif !important;
    font-size: 1.25rem;
    text-transform: none;
    border: 2px solid #ffffff;
    color: #ffffff;
    background: transparent;
    padding: 0.5em 2em;
}

.recipes-cta--mickelberry .btn:hover {
    background: #ffffff;
    color: #ed1b2e;
}

@media (max-width: 768px) {
    .recipes-cta--mickelberry .recipes-cta-inner {
        flex-direction: column;
        text-align: center;
    }
    .recipes-cta--mickelberry .btn { align-self: center; }
    .recipes-cta-polaroid { max-width: 280px; }
}


/* ============================================================
   14. LOYALTY CLUB — JOIN FORM SECTION
   ============================================================ */

/* Green background — override the dark default */
.join-form-section {
    background-color: #337443 !important;
    padding-top: var(--space-2xl);
}

/* Header — centered layout */
.join-form-inner {
    display: flex !important;
    flex-direction: column !important;
    align-items: center;
    text-align: center;
    gap: var(--space-xl);
}

.join-form-header {
    align-items: center;
    text-align: center;
    max-width: 680px;
}

.join-form-header h2 {
    font-family: 'cooper-black-std', serif !important;
    color: #ffffff;
    font-size: clamp(2rem, 4vw, 3rem);
    order: 1;
}

.join-form-header .eyebrow {
    font-family: 'caveat-brush', sans-serif !important;
    font-size: 1.5rem;
    color: #ffffff;
    order: 2;
}

.join-form-header p {
    order: 3;
    color: rgba(255,255,255,0.85);
}

/* Ham product image */
.wp-block-image.loyalty-ham {
    background-color: #337443;
    text-align: center;
    margin-top: -8%;
    margin-bottom: 0;
    padding: 0;
}

.wp-block-image.loyalty-ham img {
    max-width: 250px;
    width: 100%;
    display: block;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

/* ---- Mailchimp embed overrides ---- */

/* Hide Facebook widget */
.join-form-section .fb-like,
.join-form-section .fb_iframe_widget {
    display: none !important;
}

/* Reset Mailchimp CDN styles */
.join-form-section #mc_embed_signup {
    background: transparent !important;
    font-family: 'cronos-pro', sans-serif !important;
    width: 100%;
    max-width: 760px;
    margin: 0 auto;
}

/* 2-column grid for fields */
.join-form-section #mc_embed_signup_scroll {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-sm) var(--space-md);
}

/* Full-width items */
.join-form-section .mc-field-group.acceptance,
.join-form-section #mce-responses,
.join-form-section .clear {
    grid-column: 1 / -1;
}

/* Input styling */
.join-form-section .mc-field-group input[type="text"],
.join-form-section .mc-field-group input[type="email"] {
    width: 100%;
    padding: 0.75rem 1rem;
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.4);
    border-radius: var(--radius-sm);
    color: #ffffff;
    font-size: 0.95rem;
    font-family: 'cronos-pro', sans-serif;
    box-sizing: border-box;
}

.join-form-section .mc-field-group input::placeholder {
    color: rgba(255,255,255,0.6);
}

/* Checkbox row */
.join-form-section .mc-field-group.acceptance {
    color: rgba(255,255,255,0.7);
    font-size: 0.8rem;
    text-align: left;
}

.join-form-section .mc-field-group.acceptance label {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    cursor: pointer;
}

.join-form-section .mc-field-group.acceptance input[type="checkbox"] {
    flex-shrink: 0 !important;
    margin-top: 0.2rem;
    width: 18px !important;
    height: 18px !important;
    min-width: 18px !important;
    max-width: 18px !important;
    accent-color: #ed1b2e;
}

.join-form-section .mc-field-group.acceptance input[type="checkbox"] {
    display: inline-block !important;
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    min-width: 18px;
    margin: 2px 0 0;
    accent-color: #ed1b2e;
    cursor: pointer;
}

/* Submit button — red, caveat font */
.join-form-section #mc-embedded-subscribe {
    background-color: #ed1b2e !important;
    color: #ffffff !important;
    border: none !important;
    font-family: 'caveat-brush', sans-serif !important;
    font-size: 1.4rem !important;
    line-height: 0 !important;
    padding: 0.6em 2.5em !important;
    border-radius: var(--radius-sm) !important;
    cursor: pointer;
    text-transform: none !important;
    line-height: 1 !important;
    width: auto !important;
    min-width: 200px;
    display: block;
    margin: var(--space-md) auto 0;
    transition: background-color var(--transition-base);
}

.join-form-section #mc-embedded-subscribe:hover {
    background-color: #be1525 !important;
}
