/**
 * 4Green PDP Conversion Engine — Design system v1.2
 * Restrained, trustworthy and mobile-first.
 */
:root {
    --fg-brand: #bccf00;
    --fg-brand-dark: #748100;
    --fg-ink: #20251d;
    --fg-muted: #66705f;
    --fg-line: #dfe5da;
    --fg-soft: #f6f8f3;
    --fg-soft-green: #f2f6e8;
    --fg-white: #fff;
    --fg-radius: 10px;
    --fg-shadow: 0 8px 24px rgba(29, 40, 19, .07);
}

#zip-code-wrapper,
#zip-bar-wrapper,
#zip-modal,
body.single-product .summary > p.price,
body.single-product .summary > .woocommerce-Price-amount {
    display: none !important;
}

/* Product facts: quiet, structured, not badge-heavy. */
.fg-kpi-chips-wrapper {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    margin: 14px 0 18px;
}
.fg-kpi-chip {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border: 1px solid var(--fg-line);
    border-radius: 8px;
    background: var(--fg-soft);
    color: var(--fg-ink);
    font-size: 12px;
    line-height: 1.3;
}
.fg-kpi-icon { flex: 0 0 auto; font-size: 14px; line-height: 1; }
.fg-kpi-text { min-width: 0; }
.fg-kpi-label { color: var(--fg-muted); font-weight: 500; }
.fg-kpi-value { color: var(--fg-ink); font-weight: 700; }

/* PLZ card: the main conversion action. */
.fg-plz-card {
    width: 100%;
    box-sizing: border-box;
    margin: 16px 0 20px;
    padding: 20px;
    border: 1px solid #d5dfc3;
    border-radius: var(--fg-radius);
    background: var(--fg-white);
    box-shadow: var(--fg-shadow);
}
.fg-plz-prompt-header {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr);
    gap: 12px;
    align-items: start;
    margin-bottom: 16px;
}
.fg-plz-prompt-icon {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    box-sizing: border-box;
    padding: 0;
    border-radius: 8px;
    background: var(--fg-soft-green);
    font-size: 18px;
}
.fg-plz-prompt-title {
    margin: 0 0 4px;
    color: var(--fg-ink);
    font-size: 17px;
    font-weight: 700;
    line-height: 1.3;
}
.fg-plz-prompt-desc {
    margin: 0;
    color: var(--fg-muted);
    font-size: 13px;
    line-height: 1.45;
}
.fg-plz-input-row,
.fg-modal-input-group {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
}
.fg-plz-input,
.fg-modal-input {
    width: 100%;
    min-width: 0;
    min-height: 46px;
    box-sizing: border-box;
    padding: 11px 13px;
    border: 1px solid #cfd6ca;
    border-radius: 8px;
    outline: none;
    background: #fff;
    color: var(--fg-ink);
    font-size: 16px;
    font-weight: 600;
    letter-spacing: .04em;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.fg-plz-input:focus,
.fg-modal-input:focus {
    border-color: var(--fg-brand-dark);
    box-shadow: 0 0 0 3px rgba(188, 207, 0, .18);
}
.fg-plz-btn,
.fg-modal-btn,
.fg-sticky-cta-btn {
    min-height: 46px;
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 11px 18px !important;
    border: 1px solid #aabd00 !important;
    border-radius: 8px !important;
    background: var(--fg-brand) !important;
    color: #171c0e !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    line-height: 1.2;
    white-space: nowrap;
    cursor: pointer;
    transition: filter .15s ease, transform .1s ease;
}
.fg-plz-btn:hover,
.fg-modal-btn:hover,
.fg-sticky-cta-btn:hover { filter: brightness(.96); }
.fg-plz-btn:active,
.fg-modal-btn:active,
.fg-sticky-cta-btn:active { transform: translateY(1px); }
.fg-plz-error,
.fg-modal-error {
    margin-top: 8px;
    padding: 9px 11px;
    border: 1px solid #ebc0c0;
    border-radius: 7px;
    background: #fff7f7;
    color: #9f2626;
    font-size: 13px;
}

/* Pickup locations: two calm physical-store choices, no shipping claims. */
.fg-plz-prompt-footer,
.fg-modal-pickup-section {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid #e8ece5;
}
.fg-abhol-title,
.fg-modal-pickup-title {
    display: block;
    margin: 0 0 9px;
    color: var(--fg-muted);
    font-size: 12px;
    font-weight: 600;
    line-height: 1.35;
    text-align: left;
}
.fg-abhol-buttons,
.fg-modal-pickup-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    min-width: 0;
}
.fg-pickup-btn,
.fg-modal-pickup-btn {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    min-height: 48px;
    box-sizing: border-box !important;
    padding: 9px 10px !important;
    border: 1px solid #d7ded2 !important;
    border-radius: 8px !important;
    background: var(--fg-soft) !important;
    color: #394033 !important;
    font-family: inherit !important;
    font-size: 12px !important;
    font-weight: 650 !important;
    line-height: 1.35 !important;
    white-space: normal !important;
    overflow-wrap: anywhere;
    text-align: left;
    cursor: pointer;
    transition: background .15s ease, border-color .15s ease;
}
.fg-pickup-btn:hover,
.fg-modal-pickup-btn:hover {
    border-color: #aab59f;
    background: #eef2e9;
}

/* Active delivery/pickup state. */
.fg-plz-active-badge {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 11px 12px;
    border: 1px solid #d6dfc8;
    border-radius: 8px;
    background: var(--fg-soft-green);
}
.fg-badge-left { min-width: 0; display: flex; align-items: center; gap: 8px; }
.fg-badge-icon { flex: 0 0 auto; font-size: 16px; }
.fg-badge-text { min-width: 0; color: #445037; font-size: 13px; line-height: 1.35; }
.fg-badge-text strong { color: var(--fg-ink); font-weight: 700; }
.fg-plz-change-btn {
    flex: 0 0 auto;
    min-height: 36px;
    padding: 7px 10px;
    border: 1px solid #bac6ae;
    border-radius: 7px;
    background: #fff;
    color: #3c4932;
    font-size: 12px;
    font-weight: 650;
    white-space: nowrap;
    cursor: pointer;
}
.fg-plz-transparency-note {
    margin: 9px 2px 0;
    color: var(--fg-muted);
    font-size: 12px;
    line-height: 1.4;
}

/* Existing variation cards, subtly modernized. */
.vv-variations-wrapper { display: flex; flex-direction: column; gap: 9px; margin: 16px 0; }
.vv-variation {
    display: block;
    position: relative;
    border: 1px solid var(--fg-line);
    border-radius: 9px;
    background: #fff;
    cursor: pointer;
    transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.vv-variation:hover { border-color: #b9c4af; background: #fcfdfb; }
.vv-variation.active,
.vv-variation:has(input[type="radio"]:checked) {
    border-color: #96a800 !important;
    background: #fbfdf5 !important;
    box-shadow: 0 0 0 1px #96a800;
}
.vv-variation .vv-content { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 14px; }
.vv-variation .vv-left { min-width: 0; display: flex; align-items: center; gap: 10px; }
.vv-variation .vv-icon { flex: 0 0 auto; width: 36px; height: 36px; object-fit: contain; }
.vv-variation .vv-left-texts { min-width: 0; }
.vv-variation .vv-name { margin: 0 0 2px; color: var(--fg-ink); font-size: 15px; font-weight: 700; }
.vv-variation .vv-info { color: var(--fg-muted); font-size: 12px; line-height: 1.35; }
.vv-variation .vv-right { flex: 0 0 auto; text-align: right; }
.vv-variation .vv-price { color: var(--fg-ink); font-size: 17px; font-weight: 750; line-height: 1.15; }
.vv-variation .vv-price-per-unit { margin-top: 3px; color: var(--fg-muted); font-size: 12px; }

/* Trust section: a compact assurance panel instead of four loud badges. */
.fg-trust-badges-card {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0;
    margin: 20px 0;
    padding: 4px 16px;
    border: 1px solid var(--fg-line);
    border-radius: var(--fg-radius);
    background: var(--fg-soft);
}
.fg-trust-badge {
    min-width: 0;
    display: grid;
    grid-template-columns: 24px minmax(0, 1fr);
    gap: 9px;
    align-items: start;
    padding: 13px 8px;
}
.fg-trust-badge:nth-child(odd) { border-right: 1px solid var(--fg-line); padding-left: 0; padding-right: 14px; }
.fg-trust-badge:nth-child(even) { padding-left: 14px; padding-right: 0; }
.fg-trust-badge:nth-child(-n+2) { border-bottom: 1px solid var(--fg-line); }
.fg-trust-icon {
    display: grid;
    place-items: center;
    width: 24px;
    height: 24px;
    border-radius: 6px;
    background: var(--fg-soft-green);
    font-size: 13px;
}
.fg-trust-info { min-width: 0; display: flex; flex-direction: column; gap: 2px; line-height: 1.3; }
.fg-trust-info strong { color: var(--fg-ink); font-size: 12px; font-weight: 700; }
.fg-trust-info span { color: var(--fg-muted); font-size: 11px; }

/* Mobile sticky buy bar. */
.fg-sticky-bar {
    position: fixed;
    z-index: 9980;
    right: 0;
    bottom: 0;
    left: 0;
    box-sizing: border-box;
    padding: 10px 14px calc(10px + env(safe-area-inset-bottom, 0px));
    border-top: 1px solid var(--fg-line);
    background: rgba(255, 255, 255, .96);
    box-shadow: 0 -6px 20px rgba(24, 34, 17, .1);
    backdrop-filter: blur(10px);
    animation: fgSlideUp .2s ease-out;
}
@keyframes fgSlideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
.fg-sticky-inner { max-width: 600px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.fg-sticky-info { min-width: 0; flex: 1; }
.fg-sticky-title { overflow: hidden; color: var(--fg-muted); font-size: 11px; font-weight: 550; text-overflow: ellipsis; white-space: nowrap; }
.fg-sticky-meta { color: var(--fg-muted); font-size: 12px; }
.fg-sticky-price { color: var(--fg-ink); font-size: 16px; font-weight: 750; }
.fg-sticky-cta-btn { flex: 0 0 auto; min-height: 44px; padding: 10px 15px !important; }
@media (min-width: 1024px) { .fg-sticky-bar { display: none !important; } }

/* PLZ modal. */
.fg-modal-overlay {
    position: fixed;
    z-index: 9995;
    inset: 0;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
    background: rgba(25, 30, 22, .55);
    backdrop-filter: blur(4px);
    animation: fgFadeIn .15s ease-out;
}
@keyframes fgFadeIn { from { opacity: 0; } to { opacity: 1; } }
.fg-modal-dialog {
    position: relative;
    width: 100%;
    max-width: 440px;
    max-height: calc(100vh - 36px);
    overflow: auto;
    box-sizing: border-box;
    padding: 26px 22px 22px;
    border: 1px solid rgba(255,255,255,.5);
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 20px 60px rgba(19, 27, 15, .2);
}
.fg-modal-close {
    position: absolute;
    top: 10px;
    right: 10px;
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: var(--fg-soft);
    color: #4c5547;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
}
.fg-modal-header { margin: 0 34px 20px 0; text-align: left; }
.fg-modal-icon { display: block; margin-bottom: 8px; font-size: 24px; }
.fg-modal-title { margin: 0 0 5px; color: var(--fg-ink); font-size: 19px; font-weight: 700; line-height: 1.3; }
.fg-modal-subtitle { margin: 0; color: var(--fg-muted); font-size: 13px; line-height: 1.45; }
.fg-btn-spinner,
.fg-mbtn-spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(0,0,0,.2);
    border-top-color: #111;
    border-radius: 50%;
    animation: fgSpin .7s linear infinite;
}
@keyframes fgSpin { to { transform: rotate(360deg); } }

/* Responsive: protect all narrow columns, including the desktop summary column. */
@media (max-width: 1180px) {
    .fg-abhol-buttons,
    .fg-modal-pickup-grid { grid-template-columns: 1fr; }
}
@media (max-width: 767px) {
    .fg-kpi-chips-wrapper { grid-template-columns: 1fr 1fr; gap: 6px; }
    .fg-plz-card { padding: 16px; box-shadow: 0 5px 18px rgba(29, 40, 19, .06); }
    .fg-plz-prompt-title { font-size: 16px; }
    .fg-plz-input-row,
    .fg-modal-input-group { grid-template-columns: 1fr; }
    .fg-plz-btn,
    .fg-modal-btn { width: 100%; }
    .fg-abhol-buttons,
    .fg-modal-pickup-grid { grid-template-columns: 1fr; }
    .fg-pickup-btn,
    .fg-modal-pickup-btn { text-align: center; }
    .fg-trust-badges-card { grid-template-columns: 1fr; padding: 4px 14px; }
    .fg-trust-badge,
    .fg-trust-badge:nth-child(odd),
    .fg-trust-badge:nth-child(even) {
        padding: 11px 0;
        border-right: 0;
        border-bottom: 1px solid var(--fg-line);
    }
    .fg-trust-badge:last-child { border-bottom: 0; }
}
@media (max-width: 350px) {
    .fg-kpi-chips-wrapper { grid-template-columns: 1fr; }
    .fg-plz-card { padding: 14px; }
    .fg-plz-prompt-header { grid-template-columns: 34px minmax(0, 1fr); gap: 10px; }
    .fg-plz-prompt-icon { width: 34px; height: 34px; }
    .fg-plz-active-badge { align-items: flex-start; flex-direction: column; }
    .fg-plz-change-btn { width: 100%; }
    .fg-sticky-title { display: none; }
}
@media (prefers-reduced-motion: reduce) {
    .fg-sticky-bar,
    .fg-modal-overlay,
    .fg-btn-spinner,
    .fg-mbtn-spinner { animation: none; }
}
