/* ==========================================================
   Farmer Panel — Shared inner-page styles (fp-*)
   Used by /farmer/* pages alongside FarmerLayout
   ========================================================== */

/* ---- Page header ---- */
.fp-header {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: flex-end;
    justify-content: space-between;
    margin-bottom: 24px;
}

.fp-header-text h1 {
    font-size: 1.75rem;
    font-weight: 800;
    color: #1C2A1E;
    letter-spacing: -0.4px;
    margin-bottom: 4px;
}
.fp-header-text h1 span { color: #E65100; }
.fp-header-text p { color: #789079; font-size: 0.92rem; }

.fp-header-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---- Buttons (panel variant) ---- */
.fp-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.9rem;
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
    line-height: 1.3;
}
.fp-btn-primary {
    background: linear-gradient(135deg, #2E7D32, #1B5E20);
    color: #fff;
    box-shadow: 0 6px 18px rgba(27, 94, 32, 0.25);
}
.fp-btn-primary:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(27, 94, 32, 0.32); color: #fff; }

.fp-btn-accent {
    background: linear-gradient(135deg, #FF8F00, #E65100);
    color: #fff;
    box-shadow: 0 6px 18px rgba(230, 81, 0, 0.28);
}
.fp-btn-accent:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(230, 81, 0, 0.35); color: #fff; }

.fp-btn-ghost {
    background: #fff;
    color: #2E7D32;
    border: 1px solid #CFE2C9;
}
.fp-btn-ghost:hover { background: #F0F7EE; color: #1B5E20; transform: translateY(-1px); }

.fp-btn-danger { background: #FDECEA; color: #C62828; }
.fp-btn-danger:hover { background: #C62828; color: #fff; }

.fp-btn-sm { padding: 7px 14px; font-size: 0.8rem; }

/* ---- Filter / search card ---- */
.fp-filter {
    background: #fff;
    border: 1px solid #EDF2EA;
    border-radius: 16px;
    padding: 16px;
    box-shadow: 0 2px 8px rgba(27, 94, 32, 0.04);
    margin-bottom: 20px;
}

.fp-filter-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr auto;
    gap: 12px;
    align-items: center;
}

.fp-search {
    position: relative;
    display: flex;
    align-items: center;
}
.fp-search::before {
    content: "🔍";
    position: absolute;
    left: 14px;
    font-size: 0.9rem;
    opacity: 0.5;
    pointer-events: none;
}
.fp-search input {
    width: 100%;
    padding: 11px 14px 11px 40px;
    border: 1.5px solid #DFE8DA;
    background: #F8FAF5;
    border-radius: 10px;
    font-size: 0.92rem;
    color: #1C2A1E;
    font-family: inherit;
    outline: none;
    transition: all 0.2s;
}
.fp-search input:focus { background: #fff; border-color: #FFB74D; box-shadow: 0 0 0 4px rgba(255,143,0,0.12); }

.fp-select {
    width: 100%;
    padding: 11px 36px 11px 14px;
    border: 1.5px solid #DFE8DA;
    background: #F8FAF5;
    border-radius: 10px;
    font-size: 0.92rem;
    color: #1C2A1E;
    font-family: inherit;
    outline: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23789079' d='M6 8.825L.35 3.175l.7-.7L6 7.425l4.95-4.95.7.7z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    transition: all 0.2s;
    cursor: pointer;
}
.fp-select:focus { background-color: #fff; border-color: #FFB74D; box-shadow: 0 0 0 4px rgba(255,143,0,0.12); }

/* ---- Category pills ---- */
.fp-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}
.fp-pill {
    padding: 7px 16px;
    border-radius: 20px;
    border: 1px solid #DFE8DA;
    background: #fff;
    color: #456246;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}
.fp-pill:hover { border-color: #2E7D32; color: #1B5E20; transform: translateY(-1px); }
.fp-pill.active {
    background: linear-gradient(135deg, #FF8F00, #E65100);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 4px 10px rgba(230, 81, 0, 0.25);
}

/* ---- Product card grid ---- */
.fp-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 18px;
}

.fp-product {
    background: #fff;
    border: 1px solid #EDF2EA;
    border-radius: 16px;
    padding: 18px;
    cursor: pointer;
    transition: all 0.25s ease;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}
.fp-product::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: linear-gradient(90deg, #2E7D32, #FF8F00);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}
.fp-product:hover {
    border-color: #FFB74D;
    transform: translateY(-4px);
    box-shadow: 0 16px 32px rgba(27, 94, 32, 0.1);
}
.fp-product:hover::before { transform: scaleX(1); }

.fp-product-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.fp-tag {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.2px;
}
.fp-tag-sell { background: #E8F5E9; color: #2E7D32; }
.fp-tag-rent { background: #FFF3E0; color: #E65100; }
.fp-tag-gray { background: #F0F3EC; color: #555F56; }
.fp-tag-green { background: #E8F5E9; color: #2E7D32; }
.fp-tag-orange { background: #FFF3E0; color: #E65100; }
.fp-tag-red { background: #FDECEA; color: #C62828; }
.fp-tag-blue { background: #E3F2FD; color: #0D47A1; }

.fp-product-cat { font-size: 0.75rem; color: #789079; }

.fp-product h3 {
    font-size: 1rem;
    font-weight: 700;
    color: #1C2A1E;
    margin-bottom: 6px;
    line-height: 1.3;
}
.fp-product-desc {
    font-size: 0.82rem;
    color: #789079;
    line-height: 1.5;
    margin-bottom: 14px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

.fp-product-foot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 12px;
    border-top: 1px dashed #EDF2EA;
}
.fp-price {
    font-weight: 800;
    color: #E65100;
    font-size: 1.15rem;
    line-height: 1;
}
.fp-price small { font-size: 0.72rem; color: #789079; font-weight: 500; }

.fp-rating { font-size: 0.82rem; color: #FF8F00; font-weight: 600; }
.fp-rating small { color: #789079; font-weight: 500; }

.fp-product-loc {
    font-size: 0.72rem;
    color: #789079;
    margin-top: 8px;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* ---- Empty / loading ---- */
.fp-empty {
    background: #fff;
    border: 1px dashed #CFE2C9;
    border-radius: 16px;
    padding: 60px 30px;
    text-align: center;
    color: #789079;
}
.fp-empty-emoji { font-size: 3rem; margin-bottom: 12px; opacity: 0.6; }
.fp-empty h3 { color: #1C2A1E; font-weight: 700; margin-bottom: 6px; font-size: 1.1rem; }
.fp-empty p { font-size: 0.9rem; margin-bottom: 18px; }

.fp-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    padding: 60px;
    color: #789079;
}
.fp-spinner {
    width: 42px; height: 42px;
    border: 4px solid #E8F0E3;
    border-top-color: #2E7D32;
    border-radius: 50%;
    animation: fp-spin 0.8s linear infinite;
}
@keyframes fp-spin { to { transform: rotate(360deg); } }

/* ---- Pagination ---- */
.fp-pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 24px;
    padding: 14px 18px;
    background: #fff;
    border: 1px solid #EDF2EA;
    border-radius: 12px;
}
.fp-page-info { font-size: 0.85rem; color: #456246; font-weight: 500; }
.fp-page-btn {
    padding: 8px 16px;
    border-radius: 8px;
    background: #F0F7EE;
    border: 1px solid #CFE2C9;
    color: #2E7D32;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
}
.fp-page-btn:hover:not(:disabled) { background: #2E7D32; color: #fff; border-color: #2E7D32; }
.fp-page-btn:disabled { opacity: 0.45; cursor: not-allowed; }

/* ---- Tabs ---- */
.fp-tabs {
    display: inline-flex;
    background: #fff;
    border: 1px solid #EDF2EA;
    border-radius: 12px;
    padding: 4px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(27, 94, 32, 0.04);
}
.fp-tab {
    padding: 9px 22px;
    border-radius: 9px;
    background: transparent;
    border: none;
    font-weight: 600;
    font-size: 0.88rem;
    color: #789079;
    cursor: pointer;
    transition: all 0.2s;
}
.fp-tab:hover { color: #1B5E20; }
.fp-tab.active {
    background: linear-gradient(135deg, #2E7D32, #1B5E20);
    color: #fff;
    box-shadow: 0 4px 12px rgba(27, 94, 32, 0.25);
}

/* ---- Table / card-list ---- */
.fp-table-card {
    background: #fff;
    border: 1px solid #EDF2EA;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(27, 94, 32, 0.04);
}

.fp-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}
.fp-table thead {
    background: #F8FAF5;
}
.fp-table th {
    text-align: left;
    padding: 14px 18px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: #456246;
    border-bottom: 1px solid #EDF2EA;
}
.fp-table td {
    padding: 14px 18px;
    border-bottom: 1px solid #F0F3EC;
    color: #1C2A1E;
    vertical-align: middle;
}
.fp-table tbody tr:last-child td { border-bottom: none; }
.fp-table tbody tr { transition: background 0.15s; }
.fp-table tbody tr:hover { background: #F8FAF5; }
.fp-table a { color: #1B5E20; font-weight: 600; }
.fp-table a:hover { color: #E65100; }

.fp-amount { font-weight: 700; color: #E65100; }
.fp-muted { color: #789079; font-size: 0.82rem; }

.fp-actions-row { display: flex; gap: 6px; flex-wrap: wrap; }

/* ---- Proposal card ---- */
.fp-proposal-list { display: flex; flex-direction: column; gap: 14px; }

.fp-proposal-card {
    background: #fff;
    border: 1px solid #EDF2EA;
    border-radius: 16px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}
.fp-proposal-card::before {
    content: "";
    position: absolute;
    left: 0; top: 20px; bottom: 20px;
    width: 3px;
    border-radius: 0 3px 3px 0;
    background: linear-gradient(180deg, #2E7D32, #FF8F00);
    opacity: 0;
    transition: opacity 0.2s;
}
.fp-proposal-card:hover {
    border-color: #FFB74D;
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(27, 94, 32, 0.08);
}
.fp-proposal-card:hover::before { opacity: 1; }

.fp-proposal-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 8px;
}
.fp-proposal-badges { display: flex; gap: 6px; flex-wrap: wrap; }
.fp-proposal-author { font-size: 0.78rem; color: #789079; }

.fp-proposal-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #1C2A1E;
    margin-bottom: 6px;
}
.fp-proposal-sub {
    font-size: 0.85rem;
    color: #456246;
    margin-bottom: 12px;
}

.fp-proposal-foot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    padding-top: 12px;
    border-top: 1px dashed #EDF2EA;
}
.fp-proposal-meta {
    display: flex;
    gap: 18px;
    font-size: 0.82rem;
    color: #789079;
}
.fp-proposal-meta strong { color: #1C2A1E; }

/* ---- Alert ---- */
.fp-alert {
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 0.88rem;
    font-weight: 500;
    margin-bottom: 16px;
}
.fp-alert-success { background: #E8F5E9; color: #1B5E20; border-left: 4px solid #2E7D32; }
.fp-alert-error { background: #FDECEA; color: #C62828; border-left: 4px solid #C62828; }

/* ---- Modal ---- */
.fp-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 61, 30, 0.55);
    backdrop-filter: blur(4px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fp-fade 0.2s ease;
}
@keyframes fp-fade { from { opacity: 0; } to { opacity: 1; } }

.fp-modal {
    width: 100%;
    max-width: 620px;
    max-height: 90vh;
    overflow-y: auto;
    background: #fff;
    border-radius: 18px;
    padding: 24px;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.3);
    animation: fp-pop 0.25s ease;
}
@keyframes fp-pop { from { transform: scale(0.95); opacity: 0; } to { transform: scale(1); opacity: 1; } }

.fp-modal-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
    padding-bottom: 14px;
    border-bottom: 1px solid #EDF2EA;
}
.fp-modal-head h3 { font-size: 1.1rem; font-weight: 700; color: #1B5E20; }

.fp-modal-close {
    background: #F0F7EE;
    border: none;
    width: 32px; height: 32px;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    color: #789079;
    transition: all 0.15s;
}
.fp-modal-close:hover { background: #FDECEA; color: #C62828; }

.fp-form-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.fp-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.fp-field label { font-size: 0.82rem; font-weight: 600; color: #456246; }
.fp-field input, .fp-field select, .fp-field textarea {
    padding: 10px 14px;
    border: 1.5px solid #DFE8DA;
    background: #F8FAF5;
    border-radius: 10px;
    font-size: 0.9rem;
    color: #1C2A1E;
    font-family: inherit;
    outline: none;
    transition: all 0.2s;
}
.fp-field input:focus, .fp-field select:focus, .fp-field textarea:focus {
    background: #fff;
    border-color: #FFB74D;
    box-shadow: 0 0 0 4px rgba(255, 143, 0, 0.12);
}

.fp-kv-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px 18px;
    margin-bottom: 14px;
}
.fp-kv-grid > div { font-size: 0.88rem; }
.fp-kv-grid label { display: block; font-size: 0.72rem; color: #789079; margin-bottom: 2px; }
.fp-kv-grid strong { color: #1C2A1E; }

/* ---- Star rating ---- */
.fp-stars { display: flex; gap: 4px; }
.fp-star { font-size: 1.7rem; cursor: pointer; color: #DFE8DA; transition: all 0.15s; }
.fp-star.active { color: #FF8F00; }
.fp-star:hover { transform: scale(1.15); }

/* ---- Form sections / section cards ---- */
.fp-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
    max-width: 960px;
}

.fp-section {
    background: #fff;
    border: 1px solid #EDF2EA;
    border-radius: 18px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(27, 94, 32, 0.04);
    transition: box-shadow 0.2s;
}
.fp-section:hover { box-shadow: 0 8px 22px rgba(27, 94, 32, 0.07); }

.fp-section-head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
    padding-bottom: 14px;
    border-bottom: 1px dashed #EDF2EA;
}

.fp-section-ico {
    width: 40px; height: 40px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    font-size: 1.15rem;
    background: linear-gradient(135deg, #E8F5E9, #C8E6C9);
    color: #1B5E20;
    flex-shrink: 0;
}
.fp-section-ico.accent { background: linear-gradient(135deg, #FFF3E0, #FFE0B2); color: #E65100; }
.fp-section-ico.blue { background: linear-gradient(135deg, #E3F2FD, #BBDEFB); color: #0D47A1; }

.fp-section-title {
    font-size: 1.02rem;
    font-weight: 700;
    color: #1C2A1E;
    line-height: 1.2;
}
.fp-section-sub { font-size: 0.8rem; color: #789079; margin-top: 2px; }

.fp-grid-1 { display: grid; grid-template-columns: 1fr; gap: 14px; }
.fp-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.fp-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }

.fp-field textarea { min-height: 80px; resize: vertical; font-family: inherit; }

.fp-field-inline {
    display: flex;
    gap: 8px;
}
.fp-field-inline input, .fp-field-inline select { flex: 1; }

/* ---- Checkbox cards ---- */
.fp-check-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 10px;
}

.fp-check {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    background: #F8FAF5;
    border: 1.5px solid #DFE8DA;
    border-radius: 12px;
    font-size: 0.88rem;
    font-weight: 500;
    color: #1C2A1E;
    cursor: pointer;
    transition: all 0.2s;
    user-select: none;
}
.fp-check:hover { border-color: #2E7D32; background: #F0F7EE; }
.fp-check input[type="checkbox"] {
    width: 18px; height: 18px;
    accent-color: #2E7D32;
    cursor: pointer;
}
.fp-check:has(input:checked) {
    background: linear-gradient(135deg, #E8F5E9, #F0F7EE);
    border-color: #2E7D32;
    color: #1B5E20;
}

/* ---- Image uploader ---- */
.fp-upload {
    border: 2px dashed #CFE2C9;
    border-radius: 14px;
    padding: 24px;
    text-align: center;
    background: #F8FAF5;
    transition: all 0.2s;
    cursor: pointer;
    position: relative;
}
.fp-upload:hover { border-color: #FFB74D; background: #FFF9EC; }
.fp-upload-ico { font-size: 2rem; margin-bottom: 8px; opacity: 0.7; }
.fp-upload-text { font-size: 0.9rem; color: #456246; font-weight: 600; }
.fp-upload-hint { font-size: 0.76rem; color: #789079; margin-top: 4px; }
.fp-upload input[type="file"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.fp-thumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
}
.fp-thumb {
    position: relative;
    width: 96px; height: 96px;
    border-radius: 12px;
    overflow: hidden;
    border: 1.5px solid #DFE8DA;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}
.fp-thumb img { width: 100%; height: 100%; object-fit: cover; }
.fp-thumb-remove {
    position: absolute;
    top: 4px; right: 4px;
    width: 22px; height: 22px;
    border-radius: 50%;
    background: rgba(198, 40, 40, 0.92);
    color: #fff;
    border: none;
    cursor: pointer;
    font-size: 0.85rem;
    line-height: 1;
    display: grid;
    place-items: center;
    transition: all 0.15s;
}
.fp-thumb-remove:hover { background: #C62828; transform: scale(1.1); }

/* ---- Submit bar ---- */
.fp-submit-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 16px 20px;
    background: #fff;
    border: 1px solid #EDF2EA;
    border-radius: 14px;
    box-shadow: 0 4px 14px rgba(27, 94, 32, 0.06);
    position: sticky;
    bottom: 12px;
    z-index: 10;
}
.fp-submit-hint { font-size: 0.82rem; color: #789079; }
.fp-submit-bar .fp-btn { min-width: 180px; justify-content: center; }

/* ---- Toggle ---- */
.fp-toggle {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    user-select: none;
}
.fp-toggle-track {
    width: 44px;
    height: 24px;
    border-radius: 12px;
    background: #DFE8DA;
    position: relative;
    transition: background 0.2s;
}
.fp-toggle-track::after {
    content: "";
    position: absolute;
    top: 3px; left: 3px;
    width: 18px; height: 18px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.15);
    transition: transform 0.2s;
}
.fp-toggle-track.active { background: linear-gradient(135deg, #2E7D32, #1B5E20); }
.fp-toggle-track.active::after { transform: translateX(20px); }
.fp-toggle-label { font-size: 0.88rem; font-weight: 600; color: #456246; }

/* ---- Profile avatar header ---- */
.fp-profile-head {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 24px;
    background: linear-gradient(130deg, #1B5E20 0%, #2E7D32 55%, #E65100 140%);
    border-radius: 18px;
    color: #fff;
    box-shadow: 0 14px 32px rgba(27, 94, 32, 0.18);
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
}
.fp-profile-head::after {
    content: "";
    position: absolute;
    right: -40px; top: -40px;
    width: 220px; height: 220px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255,255,255,0.15), transparent 70%);
}
.fp-profile-avatar {
    width: 84px; height: 84px;
    border-radius: 50%;
    background: linear-gradient(135deg, #FF8F00, #E65100);
    display: grid;
    place-items: center;
    font-size: 2rem;
    font-weight: 800;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.25), inset 0 0 0 3px rgba(255,255,255,0.2);
    flex-shrink: 0;
    z-index: 1;
}
.fp-profile-meta { z-index: 1; flex: 1; }
.fp-profile-name { font-size: 1.5rem; font-weight: 800; letter-spacing: -0.3px; margin-bottom: 4px; }
.fp-profile-phone { font-size: 0.9rem; opacity: 0.9; }
.fp-profile-roles { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.fp-role-chip {
    padding: 4px 12px;
    background: rgba(255, 255, 255, 0.22);
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 20px;
    font-size: 0.76rem;
    font-weight: 600;
    backdrop-filter: blur(6px);
}

/* ---- Responsive ---- */
@media (max-width: 1024px) {
    .fp-header h1 { font-size: 1.6rem; }
    .fp-product-list { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
    .fp-proposal-list { grid-template-columns: 1fr; }
    .fp-modal { max-width: 92vw; padding: 22px; }
}

@media (max-width: 900px) {
    .fp-filter-grid { grid-template-columns: 1fr 1fr; }
    .fp-grid-3 { grid-template-columns: 1fr 1fr; }
    .fp-section { padding: 18px; }
    .fp-product-list { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; }
    .fp-check-grid { grid-template-columns: repeat(2, 1fr); }
    .fp-profile-head { padding: 24px 20px; flex-wrap: wrap; gap: 16px; }
    .fp-profile-head h1 { font-size: 1.4rem; }
}

@media (max-width: 640px) {
    .fp-header { flex-direction: column; align-items: stretch; gap: 12px; }
    .fp-header h1 { font-size: 1.4rem; }
    .fp-header p { font-size: 0.88rem; }
    .fp-filter-grid { grid-template-columns: 1fr; gap: 10px; }
    .fp-grid-2, .fp-grid-3, .fp-form-grid-2, .fp-kv-grid { grid-template-columns: 1fr; }
    .fp-table th, .fp-table td { padding: 10px 12px; font-size: 0.82rem; }
    .fp-section { padding: 16px; border-radius: 14px; }
    .fp-section-head { gap: 10px; margin-bottom: 14px; }
    .fp-section-ico { width: 36px; height: 36px; font-size: 1rem; }
    .fp-section-head h3 { font-size: 0.95rem; }
    .fp-product-list { grid-template-columns: 1fr 1fr; gap: 12px; }
    .fp-product-card { padding: 12px; }
    .fp-modal { padding: 18px; max-height: 92vh; overflow-y: auto; border-radius: 14px; }
    .fp-modal-head h3 { font-size: 1rem; }
    .fp-pagination { flex-wrap: wrap; gap: 8px; }
    .fp-tabs { flex-wrap: wrap; }
    .fp-tab { font-size: 0.84rem; padding: 8px 12px; }
    .fp-check-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
    .fp-check { padding: 10px 12px; font-size: 0.85rem; }
    .fp-profile-head { padding: 20px 16px; text-align: center; flex-direction: column; }
    .fp-profile-head h1 { font-size: 1.2rem; }
    .fp-profile-avatar { width: 64px; height: 64px; font-size: 1.2rem; }
    .fp-profile-roles { justify-content: center; }
    .fp-submit-bar {
        flex-direction: column-reverse;
        gap: 10px;
        position: sticky;
        bottom: 0;
        margin: 0 -16px -16px;
        padding: 14px 16px;
        background: #fff;
        border-top: 1px solid #EDF2EA;
    }
    .fp-submit-bar .fp-btn { width: 100%; min-width: 0; }
    .fp-btn { padding: 10px 18px; font-size: 0.88rem; }
    .fp-thumbs { gap: 8px; }
    .fp-thumb { width: 80px; height: 80px; }
    .fp-upload { padding: 24px 16px; }
}

@media (max-width: 420px) {
    .fp-product-list { grid-template-columns: 1fr; }
    .fp-check-grid { grid-template-columns: 1fr; }
}

/* ---- Delivery addresses ---- */
.fp-addr-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 14px;
    margin-top: 8px;
}
.fp-addr-card {
    background: #fff;
    border: 1.5px solid #DFE8DA;
    border-radius: 14px;
    padding: 14px 16px;
    display: flex; flex-direction: column;
    transition: border-color .15s, box-shadow .15s;
}
.fp-addr-card.is-default { border-color: #2E7D32; box-shadow: 0 2px 8px rgba(46,125,50,.10); }
.fp-addr-head { display:flex; justify-content:space-between; align-items:center; margin-bottom: 6px; }
.fp-addr-label { display:flex; align-items:center; gap:8px; font-size:.95rem; color:#1B5E20; }
.fp-addr-pin { font-size: 1rem; }
.fp-addr-body { font-size:.86rem; color:#3a4a3b; flex: 1; line-height: 1.45; }
.fp-addr-name { font-weight: 700; color:#1B5E20; margin-bottom: 2px; }
.fp-addr-line { color:#456246; }
.fp-addr-phone { font-size: .82rem; color:#5a705c; margin-top: 6px; }
.fp-addr-foot { display:flex; gap:6px; margin-top: 12px; flex-wrap: wrap; }

/* Picker variant used inside the buy modal */
.fp-addr-picker {
    display: flex; flex-direction: column; gap: 8px;
    max-height: 220px; overflow-y: auto;
    border: 1px solid #EDF2EA; border-radius: 10px; padding: 6px;
}
.fp-addr-pick {
    display: flex; gap: 10px; align-items: flex-start;
    padding: 10px 12px; border-radius: 10px; cursor: pointer;
    border: 1.5px solid transparent; background: #F8FAF5;
}
.fp-addr-pick.active { border-color: #2E7D32; background: #EDF7EE; }
.fp-addr-pick input[type=radio] { margin-top: 4px; accent-color: #2E7D32; }
.fp-addr-pick-head { display:flex; gap:8px; align-items:center; font-size:.92rem; color:#1B5E20; }
.fp-addr-pick-body { font-size:.82rem; color:#456246; line-height: 1.4; margin-top: 2px; }

/* Chip row used for label selector */
.fp-chip-row { display:flex; gap:6px; flex-wrap: wrap; }
.fp-chip {
    background:#F0F7EE; border:1.5px solid #DFE8DA;
    color:#456246; padding:6px 12px; border-radius: 999px;
    font-size:.82rem; cursor:pointer; transition: all .15s;
}
.fp-chip.active { background:#2E7D32; color:#fff; border-color:#2E7D32; }

.fp-checkbox { display:flex; gap:8px; align-items:center; cursor:pointer; user-select:none; }
.fp-checkbox input[type=checkbox] { accent-color: #2E7D32; transform: scale(1.1); }

.req { color:#C62828; }

/* ---- Cart ---- */
.fp-cart-grid {
    display: grid; grid-template-columns: minmax(0, 1fr) 320px;
    gap: 18px; margin-top: 8px;
}
@media (max-width: 920px) { .fp-cart-grid { grid-template-columns: 1fr; } }

.fp-cart-list {
    background: #fff; border: 1px solid #DFE8DA;
    border-radius: 14px; padding: 6px;
}
.fp-cart-row {
    display: grid;
    grid-template-columns: 80px minmax(0,1fr) 130px 130px;
    gap: 14px; align-items: center;
    padding: 14px; border-bottom: 1px solid #EDF2EA;
}
.fp-cart-row:last-of-type { border-bottom: none; }
.fp-cart-row.is-unavailable { opacity: .65; }
.fp-cart-thumb {
    width: 80px; height: 80px; border-radius: 10px;
    background: #F0F7EE; display:flex; align-items:center; justify-content:center; overflow:hidden;
}
.fp-cart-thumb img { width: 100%; height: 100%; object-fit: cover; }
.fp-cart-thumb-ph { font-size: 1.6rem; }
.fp-cart-title { font-weight: 700; color:#1B5E20; text-decoration: none; font-size:.95rem; line-height:1.25; }
.fp-cart-sub { font-size:.78rem; color:#5a705c; margin-top: 2px; }
.fp-cart-seller { font-size:.78rem; color:#456246; margin-top: 2px; }
.fp-cart-qty {
    display: flex; align-items: center; gap: 8px; justify-content: center;
}
.fp-qty-btn {
    width: 28px; height: 28px; border-radius: 6px;
    border: 1.5px solid #DFE8DA; background:#F8FAF5; color:#1B5E20;
    font-size: 1rem; cursor: pointer; display:flex; align-items:center; justify-content:center;
}
.fp-qty-btn:disabled { opacity: .4; cursor: not-allowed; }
.fp-qty-value { min-width: 24px; text-align: center; font-weight: 600; }
.fp-cart-price { text-align: right; }
.fp-cart-line-total { font-weight: 700; color:#1B5E20; font-size:1rem; }
.fp-cart-unit { font-size:.78rem; color:#5a705c; margin-top: 2px; }
.fp-link-danger {
    background: none; border: none; color:#C62828;
    cursor: pointer; padding: 0; font-size: .82rem; margin-top: 4px;
}
.fp-link-danger:hover { text-decoration: underline; }
.fp-link {
    background: none; border: none; color:#2E7D32;
    cursor: pointer; padding: 0; font-size: .85rem; text-decoration: underline;
}
.fp-cart-list-foot { padding: 12px 14px; }
@media (max-width: 600px) {
    .fp-cart-row { grid-template-columns: 60px 1fr; grid-template-areas: "thumb meta" "qty price"; }
    .fp-cart-thumb { width: 60px; height: 60px; grid-area: thumb; }
    .fp-cart-meta { grid-area: meta; }
    .fp-cart-qty  { grid-area: qty; justify-content: flex-start; }
    .fp-cart-price{ grid-area: price; }
}

.fp-cart-summary {
    background: #fff; border: 1.5px solid #DFE8DA; border-radius: 14px;
    padding: 18px; height: fit-content;
}
.fp-cart-summary h3 {
    font-size: 1rem; color:#1B5E20; font-weight: 700;
    padding-bottom: 12px; margin-bottom: 12px; border-bottom: 1px solid #EDF2EA;
}
.fp-summary-row { display: flex; justify-content: space-between; padding: 6px 0; font-size:.88rem; color:#456246; }
.fp-summary-total { font-size: 1rem; color:#1B5E20; font-weight: 700; padding-top: 10px; border-top: 1px solid #EDF2EA; margin-top: 4px; }
.fp-cart-checkout {
    width: 100%; margin-top: 14px;
    padding: 12px; font-size: .92rem;
}

/* Topbar cart icon */
.fm-icon-btn { position: relative; text-decoration: none; }
.fm-cart-btn { font-size: 1.05rem; }
.fm-cart-badge, .fm-nav-badge {
    position: absolute; top: -4px; right: -4px;
    background: #FF6F00; color: #fff;
    font-size: .68rem; font-weight: 700;
    min-width: 18px; height: 18px; border-radius: 9px;
    display: inline-flex; align-items: center; justify-content: center;
    padding: 0 4px; border: 2px solid #fff;
}
.fm-nav-badge {
    position: static; margin-left: auto;
    border: none; background: #FF6F00; color: #fff;
}

/* Marketplace card → "Add to cart" tucked at the bottom */
.fp-product-cart { margin-top: 10px; width: 100%; }

/* Filter pill search box */
.fp-pill-search {
    border: 1.5px solid #DFE8DA; background:#F8FAF5;
    border-radius: 999px; padding: 6px 14px; font-size:.85rem; color:#1C2A1E;
    outline: none; min-width: 200px; max-width: 100%; margin-left: auto;
}
.fp-pill-search:focus { background:#fff; border-color:#FFB74D; }

/* ==========================================================================
   PDP — Product detail page (farmer)
   ========================================================================== */

.pdp-topbar {
    display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 4px 0 14px;
}
.pdp-back {
    display: inline-flex; align-items: center; gap: 2px; font-weight: 600;
    flex-shrink: 0;
}
.pdp-crumbs {
    display: flex; gap: 6px; align-items: center;
    font-size: .82rem; color: #5a705c;
    flex-wrap: wrap;
}
.pdp-crumbs a { color: #2E7D32; text-decoration: none; font-weight: 600; }
.pdp-crumbs a:hover { text-decoration: underline; }
.pdp-crumbs span { color: #9aaa9c; }

.pdp-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 380px;
    gap: 24px;
    align-items: flex-start;
}
@media (max-width: 1080px) { .pdp-grid { grid-template-columns: 1fr; } }

.pdp-main {
    background: #fff; border: 1px solid #DFE8DA; border-radius: 18px;
    padding: 22px;
}

/* ----- Gallery ----- */
.pdp-gallery {
    display: flex; flex-direction: column; gap: 10px; margin-bottom: 18px;
}
.pdp-gallery-main {
    position: relative;
    aspect-ratio: 4 / 3;
    background: linear-gradient(135deg, #F0F7EE, #E8F5E9);
    border-radius: 14px;
    overflow: hidden;
    display: flex; align-items: center; justify-content: center;
}
.pdp-gallery-main img {
    width: 100%; height: 100%; object-fit: contain;
    background: #fff;
}
.pdp-gallery-ph {
    color: #789079; display: flex; flex-direction: column; align-items: center; gap: 8px;
    font-size: .82rem;
}
.pdp-gallery-ph span { font-size: 3.4rem; opacity: .6; }
.pdp-gallery-nav {
    position: absolute; top: 50%; transform: translateY(-50%);
    width: 38px; height: 38px; border-radius: 50%;
    background: rgba(255,255,255,0.92); border: 1px solid #DFE8DA;
    color: #1B5E20; font-size: 1.4rem; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: transform .15s, box-shadow .15s;
}
.pdp-gallery-nav.prev { left: 12px; }
.pdp-gallery-nav.next { right: 12px; }
.pdp-gallery-nav:hover { transform: translateY(-50%) scale(1.05); box-shadow: 0 4px 12px rgba(0,0,0,0.12); }

.pdp-offer-badge {
    position: absolute; top: 12px; left: 12px;
    background: linear-gradient(135deg, #DC2626, #B91C1C);
    color: #fff; font-weight: 700; padding: 6px 12px;
    border-radius: 999px; font-size: .82rem;
    display: inline-flex; align-items: center; gap: 6px;
    box-shadow: 0 4px 12px rgba(220,38,38,0.30);
}
.pdp-offer-badge small { font-weight: 500; opacity: .9; font-size: .72rem; }

.pdp-gallery-thumbs {
    display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px;
}
.pdp-thumb {
    flex: 0 0 64px; height: 64px; border-radius: 10px;
    border: 2px solid #DFE8DA; padding: 0; overflow: hidden;
    background: #fff; cursor: pointer; transition: border-color .15s, transform .15s;
}
.pdp-thumb img { width: 100%; height: 100%; object-fit: cover; }
.pdp-thumb.active { border-color: #2E7D32; transform: scale(1.05); }

/* ----- Header ----- */
.pdp-head { padding-bottom: 14px; border-bottom: 1px solid #EDF2EA; margin-bottom: 18px; }
.pdp-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.pdp-tox.tox-red    { background: #FEE2E2; color: #991B1B; }
.pdp-tox.tox-yellow { background: #FEF3C7; color: #92400E; }
.pdp-tox.tox-blue   { background: #DBEAFE; color: #1E40AF; }
.pdp-tox.tox-green  { background: #DCFCE7; color: #166534; }

.pdp-title {
    font-size: 1.55rem; font-weight: 800; color: #1B5E20;
    line-height: 1.25; margin: 4px 0 6px;
}
.pdp-subline { color: #456246; font-size: .92rem; margin: 0 0 12px; }
.pdp-subline strong { color: #1B5E20; }

.pdp-meta-row {
    display: flex; gap: 16px; flex-wrap: wrap;
    font-size: .85rem; color: #456246;
}
.pdp-meta-item { display: flex; gap: 6px; align-items: center; }
.pdp-meta-item strong { color: #1B5E20; }
.pdp-stars { color: #F59E0B; letter-spacing: 1px; font-size: .92rem; }

/* ----- Sections ----- */
.pdp-section {
    padding: 18px 0;
    border-bottom: 1px solid #EDF2EA;
}
.pdp-section:last-child { border-bottom: none; padding-bottom: 0; }
.pdp-section h2 {
    font-size: 1.05rem; color: #1B5E20; font-weight: 700;
    margin: 0 0 10px;
    display: flex; align-items: baseline; gap: 8px;
}
.pdp-section h2 small { font-weight: 500; color: #789079; font-size: .82rem; }
.pdp-sub-h {
    font-size: .92rem; color: #1B5E20; font-weight: 700;
    margin: 14px 0 6px;
}
.pdp-prose { color: #3a4a3b; line-height: 1.65; font-size: .92rem; margin: 0; }

.pdp-spec-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 10px 16px;
    margin-bottom: 8px;
}
.pdp-spec {
    display: flex; flex-direction: column; gap: 2px;
    padding: 10px 12px; background: #F8FAF5;
    border: 1px solid #EDF2EA; border-radius: 10px;
}
.pdp-spec label { font-size: .72rem; color: #789079; font-weight: 600; text-transform: uppercase; letter-spacing: .03em; }
.pdp-spec span { font-size: .9rem; color: #1B5E20; font-weight: 600; }

.pdp-callout {
    background: #F0F7EE; border: 1px solid #DFE8DA;
    border-left: 4px solid #2E7D32;
    padding: 10px 14px; border-radius: 10px;
    color: #1B5E20; font-size: .88rem; line-height: 1.55;
    margin-top: 8px;
}
.pdp-callout strong { color: #1B5E20; margin-right: 4px; }
.pdp-callout-warn { background: #FFF7ED; border-color: #FED7AA; border-left-color: #F59E0B; color: #9A3412; }
.pdp-callout-warn strong { color: #9A3412; }
.pdp-callout-info { background: #EFF6FF; border-color: #BFDBFE; border-left-color: #3B82F6; color: #1E3A8A; }
.pdp-callout-info strong { color: #1E3A8A; }

/* ----- Reviews ----- */
.pdp-reviews { display: flex; flex-direction: column; gap: 10px; margin-bottom: 10px; }
.pdp-review {
    background: #F8FAF5; border: 1px solid #EDF2EA;
    border-radius: 10px; padding: 12px 14px;
}
.pdp-review header { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 4px; }
.pdp-review p { color: #3a4a3b; font-size: .88rem; line-height: 1.55; margin: 4px 0 6px; }

/* ----- Right buy panel ----- */
.pdp-buy { position: sticky; top: 88px; }
@media (max-width: 1080px) { .pdp-buy { position: static; } }

.pdp-buy-card {
    background: #fff; border: 1px solid #DFE8DA;
    border-radius: 18px; padding: 22px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.04);
}

.pdp-price-row {
    display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px;
}
.pdp-price-now {
    font-size: 1.85rem; font-weight: 800; color: #1B5E20;
}
.pdp-price-mrp {
    font-size: .95rem; color: #9aaa9c; text-decoration: line-through;
}
.pdp-price-unit { font-size: .85rem; color: #789079; }
.pdp-save {
    font-size: .78rem; font-weight: 700; color: #166534;
    background: #DCFCE7; border-radius: 999px; padding: 2px 10px;
    margin-left: 4px;
}

.pdp-stock {
    margin: 14px 0 18px; padding: 8px 12px; border-radius: 10px;
    display: flex; align-items: center; gap: 8px;
    font-size: .85rem; font-weight: 600;
}
.pdp-stock-dot { width: 8px; height: 8px; border-radius: 50%; }
.pdp-stock.ok  { background: #DCFCE7; color: #166534; }
.pdp-stock.ok  .pdp-stock-dot { background: #22C55E; }
.pdp-stock.low { background: #FEF3C7; color: #92400E; }
.pdp-stock.low .pdp-stock-dot { background: #F59E0B; }
.pdp-stock.off { background: #FEE2E2; color: #991B1B; }
.pdp-stock.off .pdp-stock-dot { background: #DC2626; }

.pdp-qty-row {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 12px;
}
.pdp-qty-row label { color: #456246; font-size: .9rem; font-weight: 600; }

.pdp-stepper {
    display: inline-flex; align-items: center;
    border: 1.5px solid #DFE8DA; border-radius: 10px;
    overflow: hidden; background: #F8FAF5;
}
.pdp-stepper button {
    width: 36px; height: 36px; border: none; background: transparent;
    color: #1B5E20; font-size: 1.1rem; cursor: pointer;
    transition: background .15s;
}
.pdp-stepper button:hover:not(:disabled) { background: #E8F5E9; }
.pdp-stepper button:disabled { opacity: .4; cursor: not-allowed; }
.pdp-stepper input {
    width: 50px; height: 36px; border: none; background: transparent;
    text-align: center; font-weight: 700; color: #1B5E20;
    outline: none;
}

.pdp-total-row {
    display: flex; justify-content: space-between; align-items: baseline;
    padding: 12px 0; border-top: 1px dashed #DFE8DA;
    margin-bottom: 14px;
    font-size: .92rem; color: #456246;
}
.pdp-total-row strong { color: #1B5E20; font-size: 1.1rem; }

.pdp-btn {
    width: 100%; padding: 12px 16px; font-weight: 700;
    margin-bottom: 10px; font-size: .92rem;
}
.pdp-btn:last-of-type { margin-bottom: 0; }

.pdp-trust {
    list-style: none; padding: 0; margin: 16px 0 0;
    display: grid; gap: 6px;
    border-top: 1px solid #EDF2EA; padding-top: 14px;
    font-size: .82rem; color: #456246;
}
.pdp-trust li { display: flex; align-items: center; gap: 6px; }

/* ----- Modal summary line ----- */
.pdp-modal-summary {
    display: flex; justify-content: space-between; align-items: baseline;
    padding: 10px 12px; margin-top: 6px;
    background: #F8FAF5; border: 1px solid #EDF2EA; border-radius: 10px;
    font-size: .88rem; color: #456246;
}
.pdp-modal-summary strong { font-size: 1.05rem; color: #1B5E20; }

/* ----- Mobile tweaks ----- */
@media (max-width: 640px) {
    .pdp-main { padding: 16px; }
    .pdp-buy-card { padding: 16px; }
    .pdp-title { font-size: 1.25rem; }
    .pdp-price-now { font-size: 1.5rem; }
    .pdp-spec-grid { grid-template-columns: 1fr; }
}

/* ==========================================================================
   Information Hub
   ========================================================================== */

/* Tag colour extras used by the hub */
.fp-tag-violet { background:#EDE9FE; color:#5B21B6; }
.fp-tag-red    { background:#FEE2E2; color:#991B1B; }
.fp-tag-blue   { background:#DBEAFE; color:#1E40AF; }
.fp-tag-gray   { background:#F0F7EE; color:#456246; }

/* ----- Hub landing tiles ----- */
.ih-tile-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
}
.ih-tile {
    background: #fff; border: 1px solid #DFE8DA;
    border-top: 3px solid var(--ih-tint, #2E7D32);
    border-radius: 16px; padding: 22px;
    text-decoration: none; color: inherit;
    display: flex; flex-direction: column; gap: 8px;
    transition: transform .15s, box-shadow .15s, border-color .15s;
}
.ih-tile:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.06);
    border-color: var(--ih-tint, #2E7D32);
}
.ih-tile-icon {
    font-size: 2.4rem; line-height: 1;
    background: color-mix(in srgb, var(--ih-tint, #2E7D32) 12%, #fff);
    width: 56px; height: 56px; border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
}
.ih-tile h3 {
    font-size: 1.05rem; color: #1B5E20; margin: 4px 0 2px;
    font-weight: 700;
}
.ih-tile p { color: #5a705c; font-size: .88rem; line-height: 1.45; margin: 0; }
.ih-tile-cta {
    margin-top: auto; padding-top: 8px;
    color: var(--ih-tint, #2E7D32); font-size: .82rem; font-weight: 700;
}

/* ----- Filters strip used by mandi / hub sub-pages ----- */
.ih-filters {
    display: grid; grid-template-columns: repeat(3, minmax(0,1fr));
    gap: 12px; margin-bottom: 14px;
}
.ih-filter { display: flex; flex-direction: column; gap: 4px; }
.ih-filter label { font-size: .78rem; color: #789079; font-weight: 600; }
.ih-filter select, .ih-filter input {
    padding: 10px 12px; border: 1.5px solid #DFE8DA; background:#F8FAF5;
    border-radius: 10px; font-size: .9rem; color:#1C2A1E; outline: none;
}
.ih-filter select:focus, .ih-filter input:focus { background:#fff; border-color:#FFB74D; }
.ih-filter-search { grid-column: span 1; }
@media (max-width: 720px) {
    .ih-filters { grid-template-columns: 1fr; }
}

/* ----- Card grid (news / help / insurance) ----- */
.ih-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
    gap: 14px;
}
.ih-card {
    background: #fff; border: 1px solid #DFE8DA;
    border-radius: 14px; padding: 16px;
    display: flex; flex-direction: column; gap: 8px;
    transition: transform .15s, box-shadow .15s;
}
.ih-card:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(0,0,0,0.05); }
.ih-card.news      { border-top: 3px solid #3B82F6; }
.ih-card.scheme    { border-top: 3px solid #10B981; }
.ih-card.help      { border-top: 3px solid #8B5CF6; }
.ih-card.insurance { border-top: 3px solid #DC2626; }
.ih-card header { display: flex; gap: 6px; flex-wrap: wrap; }
.ih-card h3 {
    font-size: .98rem; color:#1B5E20; font-weight: 700;
    margin: 4px 0 2px; line-height: 1.35;
}
.ih-card p { font-size: .85rem; line-height: 1.5; margin: 0; }
.ih-card-body {
    color: #3a4a3b; font-size: .82rem;
    display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical;
    overflow: hidden;
}
.ih-card footer {
    margin-top: auto; padding-top: 8px;
    display: flex; justify-content: space-between; align-items: center; gap: 6px;
    border-top: 1px solid #EDF2EA;
}

.ih-tags-row { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-bottom: 6px; }

/* ----- Insurance banner ----- */
.ih-insurance-banner {
    display: flex; align-items: center; justify-content: space-between; gap: 14px;
    padding: 14px 18px; background: linear-gradient(135deg, #FEE2E2, #FFE4E6);
    border: 1px solid #FECACA; border-radius: 14px;
    margin-bottom: 14px; color: #991B1B; font-size: .9rem; line-height: 1.5;
}
.ih-insurance-banner strong { color:#7F1D1D; margin-right: 4px; }

/* ----- Government links grid ----- */
.ih-link-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 12px;
}
.ih-link {
    display: grid; grid-template-columns: 48px 1fr 24px;
    gap: 12px; align-items: center;
    padding: 14px 16px; background:#fff; border:1px solid #DFE8DA;
    border-radius: 14px; text-decoration: none; color: inherit;
    transition: border-color .15s, transform .15s, box-shadow .15s;
}
.ih-link:hover { border-color:#2E7D32; transform: translateY(-1px); box-shadow:0 6px 16px rgba(0,0,0,0.05); }
.ih-link-icon {
    width: 48px; height: 48px; border-radius: 12px;
    background:#F0F7EE; display:flex; align-items:center; justify-content:center;
    font-size: 1.5rem;
}
.ih-link h3 { font-size:.95rem; color:#1B5E20; margin: 0; font-weight: 700; }
.ih-link p { font-size:.8rem; color:#5a705c; margin:2px 0 0; line-height: 1.4; }
.ih-link-arrow { color:#789079; font-size: 1rem; }

/* ----- Weather page ----- */
.iw-now {
    display: grid; grid-template-columns: minmax(0,1.2fr) minmax(0,1fr);
    gap: 14px;
    background: linear-gradient(135deg, #DBEAFE, #E0F2FE);
    border: 1px solid #BFDBFE;
    border-radius: 18px; padding: 22px;
    margin-bottom: 18px;
}
@media (max-width: 720px) { .iw-now { grid-template-columns: 1fr; } }
.iw-now-main { display: flex; align-items: center; gap: 16px; }
.iw-now-emoji { font-size: 4.6rem; line-height: 1; }
.iw-now-temp {
    font-size: 3.4rem; font-weight: 800; color: #1E3A8A; line-height: 1;
}
.iw-now-temp small { font-size: 1.2rem; font-weight: 600; color: #1E40AF; }
.iw-now-desc { display: flex; flex-direction: column; gap: 2px; }
.iw-now-desc strong { color: #1E3A8A; font-size: 1rem; }
.iw-now-stats {
    display: grid; grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}
.iw-stat {
    background: rgba(255,255,255,0.7); border: 1px solid #BFDBFE;
    border-radius: 10px; padding: 8px 12px;
    display: flex; flex-direction: column; gap: 2px;
}
.iw-stat span { color: #1E40AF; font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .03em; }
.iw-stat strong { color: #1E3A8A; font-size: .95rem; }

.iw-section-title {
    font-size: 1.1rem; color: #1B5E20; font-weight: 700;
    margin: 6px 0 12px;
}
.iw-daily-grid {
    display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px;
}
@media (max-width: 720px) {
    .iw-daily-grid { grid-template-columns: repeat(2, 1fr); }
}
.iw-day {
    background:#fff; border:1px solid #DFE8DA; border-radius: 14px;
    padding: 14px 12px; text-align: center;
    display: flex; flex-direction: column; gap: 4px; align-items: center;
}
.iw-day-name { font-weight: 700; color:#1B5E20; }
.iw-day-date { font-size:.78rem; color:#789079; }
.iw-day-emoji { font-size: 2.2rem; line-height: 1; margin: 4px 0; }
.iw-day-desc { font-size:.8rem; color:#5a705c; min-height: 32px; }
.iw-day-temps strong { color:#1B5E20; font-size: 1.05rem; }
.iw-day-temps span { color:#789079; font-size:.85rem; margin-left: 2px; }
.iw-day-rain { font-size:.78rem; color:#1E40AF; font-weight: 600; }

.iw-tip {
    margin-top: 18px; padding: 12px 16px;
    background: #F0F7EE; border: 1px solid #DFE8DA;
    border-left: 4px solid #2E7D32; border-radius: 12px;
    color: #1B5E20; font-size: .9rem; line-height: 1.5;
}
.iw-tip strong { color: #1B5E20; margin-right: 4px; }

/* ==========================================================================
   Farmer Shop (storefront)
   ========================================================================== */

/* Toolbar — search + sort */
.fs-toolbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 200px;
    gap: 10px;
    margin-bottom: 12px;
}
@media (max-width: 600px) { .fs-toolbar { grid-template-columns: 1fr; } }

.fs-search {
    position: relative;
    display: flex; align-items: center;
}
.fs-search-icon {
    position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
    color: #789079; pointer-events: none;
}
.fs-search input {
    width: 100%; padding: 12px 14px 12px 40px;
    background: #fff; border: 1.5px solid #DFE8DA;
    border-radius: 12px; font-size: .92rem; color: #1C2A1E;
    outline: none; transition: border-color .15s, box-shadow .15s;
}
.fs-search input:focus {
    border-color: #FFB74D;
    box-shadow: 0 0 0 4px rgba(255, 143, 0, 0.12);
}
.fs-search-clear {
    position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
    width: 26px; height: 26px; border-radius: 50%;
    border: none; background: #F0F7EE; color: #789079;
    cursor: pointer; font-size: .8rem;
}
.fs-search-clear:hover { background: #FDECEA; color: #C62828; }

.fs-sort {
    padding: 12px 14px; background: #fff;
    border: 1.5px solid #DFE8DA; border-radius: 12px;
    font-size: .9rem; color: #1C2A1E; outline: none;
    transition: border-color .15s;
}
.fs-sort:focus { border-color: #FFB74D; }

/* Pills — categories + toggles */
.fs-pills {
    display: flex; gap: 6px; flex-wrap: wrap; align-items: center;
    margin-bottom: 12px;
}
.fs-pill {
    background: #fff; border: 1.5px solid #DFE8DA;
    color: #456246; padding: 8px 14px;
    border-radius: 999px; font-size: .85rem; font-weight: 600;
    cursor: pointer; transition: all .15s;
    display: inline-flex; align-items: center; gap: 6px;
}
.fs-pill:hover { border-color: #2E7D32; color: #1B5E20; }
.fs-pill.active {
    background: linear-gradient(135deg, #2E7D32, #1B5E20);
    color: #fff; border-color: #1B5E20;
    box-shadow: 0 2px 6px rgba(46,125,50,.2);
}
.fs-pill span { font-weight: 600; }

.fs-divider {
    width: 1px; height: 22px; background: #DFE8DA;
    margin: 0 4px;
}
.fs-toggle {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 8px 12px; background: #F8FAF5;
    border: 1.5px solid #DFE8DA; border-radius: 999px;
    font-size: .82rem; color: #456246;
    cursor: pointer; user-select: none;
}
.fs-toggle input { accent-color: #2E7D32; }
.fs-toggle:has(input:checked) {
    background: #DCFCE7; border-color: #166534; color: #166534;
}

/* Result bar */
.fs-result-bar {
    display: flex; gap: 12px; align-items: center;
    margin: 4px 0 14px;
    font-size: .82rem;
}
.fs-result-bar strong { color: #1B5E20; }

/* Grid */
.fs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
}

/* Card */
.fs-card {
    background: #fff;
    border: 1px solid #DFE8DA;
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    transition: transform .15s, box-shadow .15s, border-color .15s;
    display: flex; flex-direction: column;
}
.fs-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 28px rgba(0,0,0,0.08);
    border-color: #2E7D32;
}
.fs-card.is-out { opacity: .7; }
.fs-card.is-out:hover { transform: none; }

/* Card media */
.fs-card-media {
    position: relative;
    aspect-ratio: 4 / 3;
    background: linear-gradient(135deg, #F0F7EE, #E8F5E9);
    overflow: hidden;
    display: flex; align-items: center; justify-content: center;
}
.fs-card-media img {
    width: 100%; height: 100%; object-fit: cover;
    transition: transform .3s;
}
.fs-card:hover .fs-card-media img { transform: scale(1.04); }
.fs-card-ph { font-size: 3rem; opacity: .55; color: #789079; }
.fs-card-ph span { line-height: 1; }

.fs-card-badges {
    position: absolute; top: 10px; left: 10px; right: 10px;
    display: flex; justify-content: space-between; gap: 6px;
    pointer-events: none;
    z-index: 1;
}
.fs-badge {
    padding: 4px 10px; border-radius: 999px;
    font-size: .7rem; font-weight: 700;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}
.fs-badge.offer {
    background: linear-gradient(135deg, #DC2626, #B91C1C);
    color: #fff;
}
.fs-badge.returnable {
    background: rgba(255, 255, 255, 0.95);
    color: #166534;
}

.fs-out-overlay {
    position: absolute; inset: 0;
    background: rgba(255,255,255,0.7);
    display: flex; align-items: center; justify-content: center;
    backdrop-filter: blur(2px);
}
.fs-out-overlay span {
    background: #991B1B; color: #fff;
    padding: 6px 16px; border-radius: 999px;
    font-weight: 700; font-size: .82rem;
    transform: rotate(-6deg);
}

/* Card body */
.fs-card-body {
    padding: 14px 16px;
    display: flex; flex-direction: column; gap: 6px;
    flex: 1;
}
.fs-card-cat {
    font-size: .68rem; font-weight: 700; color: #2E7D32;
    text-transform: uppercase; letter-spacing: .04em;
}
.fs-card-title {
    font-size: .95rem; font-weight: 700; color: #1B5E20;
    margin: 0; line-height: 1.3;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: calc(.95rem * 1.3 * 2);
}
.fs-card-pack {
    font-size: .78rem; color: #5a705c;
    margin: 0; line-height: 1.4;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
    overflow: hidden;
}
.fs-card-pack strong { color: #1B5E20; }

.fs-card-meta {
    display: flex; gap: 4px; align-items: center;
    font-size: .76rem;
}
.fs-stars { color: #F59E0B; font-weight: 700; }
.fs-meta-dot { color: #C5D2C7; }

.fs-card-price {
    display: flex; align-items: baseline; gap: 6px;
    flex-wrap: wrap;
    margin-top: 2px;
}
.fs-price-now {
    font-size: 1.15rem; font-weight: 800; color: #1B5E20;
}
.fs-price-mrp {
    font-size: .85rem; color: #9aaa9c; text-decoration: line-through;
}
.fs-price-unit {
    font-size: .78rem; color: #789079;
}

.fs-card-stock {
    display: flex; align-items: center; gap: 6px;
    font-size: .78rem; font-weight: 600;
    margin: 2px 0 6px;
}
.fs-stock-dot {
    width: 7px; height: 7px; border-radius: 50%;
}
.fs-card-stock.ok  { color: #166534; }
.fs-card-stock.ok  .fs-stock-dot { background: #22C55E; }
.fs-card-stock.low { color: #92400E; }
.fs-card-stock.low .fs-stock-dot { background: #F59E0B; }
.fs-card-stock.off { color: #991B1B; }
.fs-card-stock.off .fs-stock-dot { background: #DC2626; }

.fs-card-actions {
    display: flex; gap: 6px;
    margin-top: auto; padding-top: 6px;
}
.fs-buy-btn { flex: 1; }
.fs-cart-btn { flex: 0 0 auto; padding-left: 12px; padding-right: 12px; }

/* Pager */
.fs-pager {
    display: flex; gap: 12px; align-items: center; justify-content: center;
    margin-top: 22px; padding: 16px;
    background: #fff; border: 1px solid #DFE8DA; border-radius: 12px;
}
.fs-pager strong { color: #1B5E20; }

/* Skeleton loaders */
.fs-skeleton {
    background: #fff; border: 1px solid #DFE8DA;
    border-radius: 16px; overflow: hidden; padding: 14px;
}
.fs-sk-media {
    aspect-ratio: 4 / 3; border-radius: 10px;
    background: linear-gradient(90deg, #F0F7EE 25%, #E8F5E9 50%, #F0F7EE 75%);
    background-size: 200% 100%;
    animation: fs-sk 1.4s linear infinite;
    margin-bottom: 12px;
}
.fs-sk-line {
    height: 14px; border-radius: 6px;
    background: linear-gradient(90deg, #F0F7EE 25%, #E8F5E9 50%, #F0F7EE 75%);
    background-size: 200% 100%;
    animation: fs-sk 1.4s linear infinite;
    margin-bottom: 8px;
}
.fs-sk-line.short { width: 60%; }
.fs-sk-line.tiny { width: 40%; height: 10px; }
@keyframes fs-sk {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ---- Master panel disabled screen ---- */
.km-panel-disabled {
    position: fixed; inset: 0;
    display: flex; align-items: center; justify-content: center;
    background: #F5F7F9;
    padding: 24px;
    z-index: 9999;
}
.km-panel-disabled-card {
    background: #fff;
    border-radius: 18px;
    padding: 36px 32px 28px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.12);
    max-width: 460px;
    text-align: center;
}
.km-panel-disabled-icon { font-size: 64px; line-height: 1; margin-bottom: 12px; }
.km-panel-disabled-card h1 { margin: 0 0 10px; font-size: 1.5rem; color: #1B5E20; }
.km-panel-disabled-card p  { margin: 0 0 22px; color: #475569; font-size: .95rem; line-height: 1.55; }

/* Shown while feature flags load — keeps the shell hidden so disabled
   features never flash in before the flag map arrives. */
.km-panel-loading {
    position: fixed; inset: 0;
    display: flex; align-items: center; justify-content: center;
    background: #F5F7F9;
    z-index: 9999;
}
.km-panel-loading-spinner {
    width: 42px; height: 42px;
    border: 4px solid #C8E6C9;
    border-top-color: #1B5E20;
    border-radius: 50%;
    animation: km-panel-spin .8s linear infinite;
}
@keyframes km-panel-spin { to { transform: rotate(360deg); } }

/* ---- Welcome tour (first-login overlay) ---- */
.km-tour-backdrop {
    position: fixed; inset: 0;
    background: rgba(15, 23, 42, 0.55);
    z-index: 9500;
    backdrop-filter: blur(2px);
}
.km-tour-modal {
    position: fixed;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: min(420px, calc(100vw - 32px));
    background: #fff;
    border-radius: 18px;
    padding: 28px 22px 20px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.25);
    z-index: 9600;
    text-align: center;
}
.km-tour-emoji { font-size: 56px; line-height: 1; margin-bottom: 8px; }
.km-tour-title { margin: 0 0 8px; font-size: 1.3rem; color: #1B5E20; }
.km-tour-body  { margin: 0 0 16px; color: #475569; font-size: .95rem; line-height: 1.5; }
.km-tour-dots {
    display: flex; justify-content: center; gap: 6px; margin-bottom: 18px;
}
.km-tour-dot {
    width: 8px; height: 8px; border-radius: 50%;
    background: #CBD5E1;
    transition: background 0.2s ease, transform 0.2s ease;
}
.km-tour-dot.is-active { background: #1B5E20; transform: scale(1.3); }
.km-tour-actions {
    display: flex; justify-content: space-between; gap: 10px;
}
.km-tour-btn-ghost, .km-tour-btn-primary {
    flex: 1; padding: 11px 16px; border-radius: 10px;
    font-size: .92rem; font-weight: 600; cursor: pointer;
    border: 1px solid transparent;
    transition: opacity 0.15s ease;
}
.km-tour-btn-ghost {
    background: transparent; color: #64748B; border-color: #E2E8F0;
}
.km-tour-btn-ghost:hover { background: #F8FAFC; }
.km-tour-btn-primary {
    background: #1B5E20; color: white;
}
.km-tour-btn-primary:hover { opacity: 0.92; }

/* ---- Voice input mic button (Marketplace search) ---- */
.mp-mic-btn {
    position: absolute;
    top: 50%;
    right: 8px;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid #CBD5E1;
    background: #F8FAFC;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s ease;
}
.mp-mic-btn:hover { background: #E2E8F0; }
.mp-mic-btn.is-listening {
    background: #FEE2E2;
    border-color: #FCA5A5;
    animation: mp-mic-pulse 1s ease-in-out infinite;
}
@keyframes mp-mic-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.4); }
    50%      { box-shadow: 0 0 0 8px rgba(220, 38, 38, 0); }
}

