
:root {
    --ps-orange:        #F97316;
    --ps-orange-light:  #FFF7ED;
    --ps-orange-mid:    #FDBA74;

    --ps-green:         #16a34a;
    --ps-green-dark:    #14532d;
    --ps-green-light:   #f0fdf4;
    --ps-green-mid:     #86efac;

    --ps-blue:          #1e40af;
    --ps-blue-light:    #eff6ff;
    --ps-blue-mid:      #93c5fd;

    --ps-text:          #0f172a;
    --ps-muted:         #64748b;
    --ps-bg:            #ffffff;
    --ps-card-bg:       #f8fafc;
    --ps-border:        #e2e8f0;

    --ps-radius:        20px;
    --ps-shadow:        0 4px 24px rgba(0,0,0,.07);
    --ps-shadow-hover:  0 12px 40px rgba(0,0,0,.14);
}

/* ── BASE SECTION ── */
.partner-section {
    width: 100%;
    max-width: 1240px;
    margin: 0 auto 80px;
    padding: 0 24px;
    font-family: 'Inter', sans-serif;
}

/* ── SHARED HEADER ── */
.ps-header {
    text-align: center;
    margin-bottom: 48px;
}

.ps-label {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    margin-bottom: 12px;
}
.ps-label--orange { color: var(--ps-orange); }
.ps-label--green  { color: var(--ps-green); }
.ps-label--blue   { color: var(--ps-blue); }

.ps-label__line {
    display: block;
    width: 36px;
    height: 2px;
    border-radius: 2px;
    background: currentColor;
}

.ps-title {
    font-size: clamp(28px, 4vw, 44px);
    font-weight: 800;
    color: var(--ps-text);
    line-height: 1.15;
    margin: 0 0 12px;
}
.ps-title--green { color: var(--ps-green-dark); }
.ps-title--blue  { color: var(--ps-blue); }

.ps-sub {
    font-size: 15px;
    color: var(--ps-muted);
    max-width: 560px;
    margin: 0 auto;
    line-height: 1.65;
}

/* ── BODY LAYOUTS ── */
.ps-body {
    display: flex;
    align-items: center;
    gap: 32px;
    min-height: 320px;
}
.ps-body--horeca    { flex-direction: row; }
.ps-body--farmer    { flex-direction: row-reverse; }

@media (max-width: 768px) {
    .ps-body { flex-direction: column !important; }
}

/* ── STAT CARD ── */
.ps-stat-card {
    flex: 0 0 220px;
    min-width: 180px;
    border-radius: var(--ps-radius);
    padding: 32px 28px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    align-self: stretch;
}
.ps-stat-card--orange { background: var(--ps-orange-light); }
.ps-stat-card--green  { background: var(--ps-green-light); }

.ps-stat-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
}
.ps-stat-icon--orange { background: var(--ps-orange); color: #fff; }
.ps-stat-icon--green  { background: var(--ps-green);  color: #fff; }

.ps-stat-label {
    font-size: 11px;
    color: var(--ps-muted);
    margin: 0 0 4px;
}

.ps-stat-number {
    font-size: clamp(28px, 5vw, 40px);
    font-weight: 900;
    line-height: 1;
    margin: 0 0 2px;
}
.ps-stat-number--orange { color: var(--ps-orange); }
.ps-stat-number--green  { color: var(--ps-green); }

.ps-stat-type {
    font-size: 16px;
    font-weight: 800;
    color: var(--ps-text);
    margin: 0 0 8px;
}
.ps-stat-type--green { color: var(--ps-green-dark); }

.ps-stat-divider {
    width: 36px;
    height: 3px;
    border-radius: 2px;
    margin-bottom: 12px;
}
.ps-stat-divider--orange { background: var(--ps-orange); }
.ps-stat-divider--green  { background: var(--ps-green); }

.ps-stat-desc {
    font-size: 11px;
    color: var(--ps-muted);
    line-height: 1.6;
    margin: 0;
}

/* ── LOGOS WRAP & MARQUEE ── */
.ps-logos-wrap {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.ps-direction {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 600;
    color: var(--ps-orange);
    margin-bottom: 8px;
    letter-spacing: .04em;
}
.ps-direction--right { justify-content: flex-end; }
.ps-direction--left  { justify-content: flex-start; margin-top: 8px; }
.ps-direction--green { color: var(--ps-green); }

.ps-dir-line {
    flex: 1;
    height: 1.5px;
    background: var(--ps-orange);
    border-radius: 1px;
}
.ps-dir-line--green { background: var(--ps-green); }

/* Marquee rows */
.ps-marquee-row {
    overflow: hidden;
    padding: 16px 0;
}

.ps-marquee-track {
    display: flex;
    gap: 24px;
    width: max-content;
}

.ps-marquee--left  .ps-marquee-track { animation: ps-scroll-left  35s linear infinite; }
.ps-marquee--right .ps-marquee-track { animation: ps-scroll-right 35s linear infinite; }

@keyframes ps-scroll-left {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}
@keyframes ps-scroll-right {
    from { transform: translateX(-50%); }
    to   { transform: translateX(0); }
}

.ps-marquee-row:hover .ps-marquee-track { animation-play-state: paused; }

/* Logo items — HORECA */
.ps-logo-item {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--ps-bg);
    border: 1.5px solid var(--ps-border);
    border-radius: 12px;
    padding: 14px 24px;
    min-width: 140px;
    height: 76px;
    transition: box-shadow .2s, transform .2s;
    flex-shrink: 0;
}
.ps-logo-item:hover {
    box-shadow: var(--ps-shadow-hover);
    transform: translateY(-2px);
}
.ps-logo-item img {
    max-height: 48px;
    max-width: 120px;
    object-fit: contain;
    filter: grayscale(30%);
    transition: filter .2s;
}
.ps-logo-item:hover img { filter: none; }

/* Logo items — FARMER (with name + region below) */
.ps-logo-item--farmer {
    flex-direction: column;
    height: auto;
    min-width: 110px;
    padding: 16px 12px 12px;
    gap: 6px;
}
.ps-logo-item--farmer img {
    width: 64px;
    height: 64px;
    object-fit: contain;
    border-radius: 50%;
}
.ps-farmer-name {
    font-size: 11px;
    font-weight: 700;
    color: var(--ps-green-dark);
    text-align: center;
    text-transform: uppercase;
    letter-spacing: .04em;
    line-height: 1.3;
}
.ps-farmer-region {
    font-size: 10px;
    color: var(--ps-muted);
    text-align: center;
    letter-spacing: .06em;
}

/* Logo placeholders */
.ps-logo-placeholder {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    font-weight: 800;
    color: #fff;
}
.ps-logo-placeholder--orange { background: var(--ps-orange); }
.ps-logo-placeholder--green  { background: var(--ps-green); }

/* Divider between rows */
.ps-logos-divider {
    height: 1px;
    background: var(--ps-border);
    margin: 0;
}

/* ── FOOTNOTE ── */
.ps-footnote {
    text-align: center;
    font-size: 12px;
    color: var(--ps-muted);
    margin-top: 28px;
}
.ps-footnote--icon {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}


/* ================================================================
   DISTRIBUTOR — Gallery Grid
   ================================================================ */
.ps-dist-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 200px;
    gap: 12px;
}

/* Every 4-item row: items 2 & 3 are slightly taller for masonry effect */
.ps-dist-card:nth-child(4n+2),
.ps-dist-card:nth-child(4n+3) {
    grid-row: span 1;
}

.ps-dist-card {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    background: var(--ps-blue-light);
}
.ps-dist-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .4s ease;
}
.ps-dist-card:hover img { transform: scale(1.07); }

.ps-dist-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(30,64,175,.72) 0%, transparent 60%);
    display: flex;
    align-items: flex-end;
    padding: 14px 16px;
    opacity: 0;
    transition: opacity .3s;
}
.ps-dist-card:hover .ps-dist-overlay { opacity: 1; }

.ps-dist-overlay span {
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;
}

.ps-dist-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 64px 0;
    color: var(--ps-muted);
}
.ps-dist-empty svg { opacity: .4; }

@media (max-width: 900px) {
    .ps-dist-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 540px) {
    .ps-dist-grid { grid-template-columns: 1fr 1fr; grid-auto-rows: 150px; }
}

/* ----------------------------------------------------------------
   HORECA LANDING — Card logo + nama usaha
   Mengikuti persis pola .partner-logo dari admin.css:
     - ukuran, border, background, overflow, transition sama
     - border-radius dikontrol CSS variable --logo-radius (set JS)
   ---------------------------------------------------------------- */
 
/* Card wrapper: logo di atas, nama di bawah */
.lp-horeca-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
    cursor: default;
    transition: transform .2s;
}
 
.lp-horeca-card:hover {
    transform: translateY(-3px);
}
 
/*
 * .lp-horeca-logo — PERSIS seperti .partner-logo di admin.css
 * Ukuran, border, background, overflow, transition identik.
 * border-radius menggunakan var(--logo-radius) yang dikontrol JS,
 * sama persis dengan cara admin panel bekerja.
 */
.lp-horeca-logo {
    width: 80px;                              /* sama dengan --logo-size di admin */
    height: 80px;
    border-radius: var(--logo-radius, 50%);  /* dikontrol JS, default bulat */
    border: 2px solid rgba(249, 115, 22, .3);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: #FFFBF5;
    transition: border-radius 0.35s ease,    /* animasi transisi sama dengan admin */
                box-shadow   0.2s ease;
}
 
.lp-horeca-card:hover .lp-horeca-logo {
    box-shadow: 0 6px 20px rgba(249, 115, 22, .2);
    border-color: rgba(249, 115, 22, .55);
}
 
/* Gambar di dalam logo */
.lp-horeca-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
 
/* Placeholder inisial — jika tidak ada gambar */
.lp-horeca-logo-placeholder {
    font-size: 1.75rem;
    font-weight: 700;
    color: #F97316;
    line-height: 1;
    user-select: none;
}
 
/* Nama usaha di bawah logo */
.lp-horeca-name {
    font-size: 12px;
    font-weight: 600;
    color: #1a3726;          /* --forest dari admin */
    text-align: center;
    line-height: 1.35;
    letter-spacing: .01em;
    max-width: 96px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}
 
 
/* ----------------------------------------------------------------
   Override .ps-logo-item untuk HORECA agar tidak mempengaruhi
   card farmer/distributor yang tetap menggunakan .ps-logo-item
   ----------------------------------------------------------------
   NOTE: .lp-horeca-card TIDAK extend .ps-logo-item — class terpisah
   agar tidak ada konflik dengan section lain.
   ---------------------------------------------------------------- */
 
 
/* ----------------------------------------------------------------
   Responsive
   ---------------------------------------------------------------- */
@media (max-width: 480px) {
    .lp-horeca-logo {
        width: 60px;
        height: 60px;
    }
 
    .lp-horeca-logo-placeholder {
        font-size: 1.375rem;
    }
 
    .lp-horeca-name {
        font-size: 10px;
        max-width: 72px;
    }
}

.lp-farmer-logo {
    width: 80px;
    height: 80px;
    border-radius: var(--lp-farmer-radius, 50%);
    border: 2px solid rgba(22, 163, 74, .35);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: #F0FDF4;
    transition: border-radius .35s ease,
                box-shadow    .2s  ease,
                border-color  .2s  ease;
}
 
.lp-farmer-card:hover .lp-farmer-logo {
    box-shadow:   0 6px 20px rgba(22, 163, 74, .2);
    border-color: rgba(22, 163, 74, .6);
}
 
.lp-farmer-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
 
/* Placeholder inisial jika tidak ada gambar */
.lp-farmer-logo-placeholder {
    font-size: 1.75rem;
    font-weight: 700;
    color: #16a34a;
    line-height: 1;
    user-select: none;
}
 
/* Nama petani di bawah logo */
.lp-farmer-name {
    font-size: 11px;
    font-weight: 700;
    color: #14532d;                /* --ps-green-dark */
    text-align: center;
    text-transform: uppercase;
    letter-spacing: .04em;
    line-height: 1.3;
    max-width: 96px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}
 
/* Komoditas / daerah asal di bawah nama */
.lp-farmer-region {
    font-size: 10px;
    font-weight: 500;
    color: #64748b;                /* --ps-muted */
    text-align: center;
    letter-spacing: .06em;
    max-width: 96px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}
 
 
/* ================================================================
   Responsive — mobile
   ================================================================ */
@media (max-width: 480px) {
 
    /* HORECA */
    .lp-horeca-logo {
        width: 60px;
        height: 60px;
    }
    .lp-horeca-logo-placeholder { font-size: 1.375rem; }
    .lp-horeca-name { font-size: 10px; max-width: 72px; }
 
    /* FARMER */
    .lp-farmer-logo {
        width: 60px;
        height: 60px;
    }
    .lp-farmer-logo-placeholder { font-size: 1.375rem; }
    .lp-farmer-name  { font-size: 9px;  max-width: 72px; }
    .lp-farmer-region{ font-size: 9px;  max-width: 72px; }
}

.lp-farmer-area {
    font-size: 12px;
    color: rgba(26,55,38,0.6);
    font-weight: 500;
}

/* ── FARMER CARD wrapper ── */
.lp-farmer-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    flex-shrink: 0;
    text-align: center;
    cursor: default;
    transition: transform .2s;
    min-width: 100px;
}

.lp-farmer-card:hover {
    transform: translateY(-3px);
}