/* ===== Katalog Publik (marketplace) ===== */
:root {
    --ink: #1b221d;
    --ink-soft: #5c6a61;
    --paper: #ffffff;
    --paper-alt: #f5f7f3;
    --line: #e5e9e1;
    --green: #1e7a46;
    --green-dark: #155c34;
    --green-soft: #e4f3ea;
    --orange: #a93f0b;
    --orange-soft: #fcebdd;
    --red: #a93226;
    --red-soft: #fbe6e2;
    --radius-s: 8px;
    --radius-m: 14px;
    --shadow:
        0 2px 6px rgba(27, 34, 29, 0.06), 0 10px 24px rgba(27, 34, 29, 0.06);
}
.catalog-body {
    font-family: "Inter", sans-serif;
    color: var(--ink);
    background: var(--paper);
    -webkit-font-smoothing: antialiased;
    padding-bottom: 88px; /* ruang untuk mobile-cart-bar fixed agar tidak menutupi footer */
}
.catalog-body h1,
.catalog-body h2,
.catalog-body h3,
.catalog-body h4 {
    font-family: "Sora", sans-serif;
    margin: 0;
}

.top-bar {
    background: var(--green-dark);
    color: #dceae0;
    font-size: 12px;
    padding: 6px 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 50px;
}
.top-bar p {
    width: 75%;
}
.topbar-login {
    color: #dceae0;
    text-decoration: none;
    font-size: 11px;
    border: 1px solid white;
    border-radius: 999px;
    padding: 4px 6px;
}
.cust-nav {
    background: #fff;
    border-bottom: 1px solid var(--line);
    padding: 14px 20px;
    display: flex;
    align-items: center;
    gap: 18px 18px;
    position: sticky;
    top: 0;
    z-index: 40;
    flex-wrap: wrap;
    max-width: 1180px;
    margin: 0 auto;
}
.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--ink);
}
.brand-mark {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: var(--green);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: "Sora";
    font-weight: 800;
    font-size: 16px;
    flex: none;
}
.brand-text .name {
    font-family: "Sora";
    font-weight: 700;
    font-size: 16px;
    line-height: 1.1;
}
.brand-text .tag {
    font-size: 11px;
    color: var(--ink-soft);
}
.nav-search {
    flex: 1 1 100%;
    order: 3;
    min-width: 0;
    max-width: 640px;
    display: flex;
    align-items: center;
    background: var(--paper-alt);
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 0 6px 0 16px;
    height: 44px;
}
.nav-search input {
    border: none;
    background: transparent;
    flex: 1;
    font-size: 14px;
    font-family: inherit;
    color: var(--ink);
}
.nav-search input:focus {
    outline: 2px solid var(--green);
    outline-offset: -2px;
}
button:focus-visible,
a:focus-visible {
    outline: 2px solid var(--green);
    outline-offset: 2px;
}
.nav-search button {
    background: var(--green);
    color: #fff;
    border: none;
    border-radius: 999px;
    height: 32px;
    padding: 0 16px;
    font-size: 12.5px;
    font-weight: 700;
}
.nav-search-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: var(--paper-alt);
    color: var(--ink);
    margin-left: auto;
    flex: none;
}
.cart-pill {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--paper-alt);
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 8px 16px 8px 12px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    color: var(--ink);
    min-height: 44px;
    margin-left: auto;
}
.cart-pill .badge {
    background: var(--orange);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 1px 7px;
    border-radius: 999px;
}

.cat-strip {
    max-width: 1180px;
    margin: 18px auto 0;
    padding: 0 20px;
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 4px;
}
.cat-pill {
    flex: none;
    display: flex;
    align-items: center;
    gap: 8px;
    background: #fff;
    border: 1.5px solid var(--line);
    border-radius: 999px;
    padding: 9px 16px;
    font-size: 13px;
    font-weight: 600;
    color: var(--ink-soft);
    text-decoration: none;
    min-height: 44px;
}
.cat-pill:hover {
    border-color: var(--green);
    color: var(--green-dark);
}
.cat-pill.active {
    background: var(--green-soft);
    border-color: var(--green);
    color: var(--green-dark);
}

.promo-banner {
    max-width: 1180px;
    margin: 18px auto 0;
    padding: 0 20px;
}
.promo-banner-link {
    display: block;
    text-decoration: none;
    color: inherit;
}
.promo-inner {
    background: var(--green);
    border-radius: var(--radius-m);
    padding: 26px 28px;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}
.promo-inner h1 {
    font-size: clamp(19px, 3vw, 25px);
    font-weight: 700;
    max-width: 480px;
    line-height: 1.3;
}
.promo-inner p {
    margin: 8px 0 0;
    color: #d7eedd;
    font-size: 13.5px;
    max-width: 420px;
}
.promo-badge {
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 999px;
    padding: 8px 16px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.banner-slider {
    position: relative;
    max-width: 1180px;
    margin: 18px auto 0;
    padding: 0 20px;
}
.banner-slides {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 16px;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.banner-slides::-webkit-scrollbar {
    display: none;
}
.banner-slide {
    scroll-snap-align: start;
    flex: none;
    width: 100%;
    min-height: 160px;
    border-radius: var(--radius-m);
    padding: 24px 28px;
    background: linear-gradient(135deg, #0f7a52, #0e6a47);
    background-size: cover;
    background-position: center;
    color: #fff;
    text-decoration: none;
    display: flex;
    align-items: flex-end;
    position: relative;
    overflow: hidden;
}
.banner-slide-content {
    position: relative;
    z-index: 1;
}
.banner-slide::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--radius-m);
    background: linear-gradient(135deg, rgba(15,122,82,0.7), rgba(14,106,71,0.5));
    pointer-events: none;
}
.banner-slide[style*="background-image"]::after {
    background: linear-gradient(to right, rgba(0,0,0,0.6) 0%, rgba(0,0,0,0.1) 100%);
}
.banner-slide h2 {
    font-weight: 700;
    font-size: clamp(17px, 2.5vw, 22px);
}
.banner-slide p {
    color: #d7eedd;
    margin-top: 6px;
    font-size: 13.5px;
    max-width: 420px;
}
.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 34px;
    height: 34px;
    border: none;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.35);
    color: #fff;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    z-index: 1;
}
.slider-btn.prev {
    left: 8px;
}
.slider-btn.next {
    right: 8px;
}
.banner-slider[data-count="1"] .slider-btn {
    display: none;
}
.slider-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 12px;
}
.slider-dots button {
    width: 8px;
    height: 8px;
    border: none;
    border-radius: 50%;
    padding: 0;
    background: var(--line);
    cursor: pointer;
    transition: background 0.2s;
}
.slider-dots button.active {
    background: var(--green);
}

.catalog {
    max-width: 1180px;
    margin: 26px auto 90px;
    padding: 0 20px;
}
.catalog-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 14px;
}
.catalog-head h2 {
    font-size: 17px;
}
.catalog-head .count {
    font-size: 12.5px;
    color: var(--ink-soft);
}

.grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
}
@media (min-width: 640px) {
    .grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 18px;
    }
}
@media (min-width: 960px) {
    .grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 20px;
    }
}

.card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius-m);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition:
        box-shadow 0.15s ease,
        transform 0.15s ease;
}
.card:hover {
    box-shadow: var(--shadow);
    transform: translateY(-3px);
}
.card-photo {
    aspect-ratio: 1/1;
    background: var(--paper-alt);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.card-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.card-photo .ph-icon {
    width: 32%;
    height: 32%;
    opacity: 0.22;
    color: var(--green-dark);
}
.badge-corner {
    position: absolute;
    top: 10px;
    left: 10px;
    border-radius: 999px;
    padding: 4px 10px;
    font-size: 10.5px;
    font-weight: 700;
}
.badge-corner.low {
    background: var(--orange-soft);
    color: var(--orange);
}
.badge-corner.out {
    background: var(--red-soft);
    color: var(--red);
}
.badge-corner.ok {
    background: var(--green-soft);
    color: var(--green-dark);
}

.card-body {
    padding: 12px 14px 14px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
}
.card-cat {
    font-size: 10.5px;
    color: var(--ink-soft);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-weight: 600;
}
.card-name {
    font-size: 13.5px;
    font-weight: 600;
    line-height: 1.34;
    min-height: 36px;
}
.card-price {
    font-family: "Sora";
    font-weight: 700;
    font-size: 16px;
    color: var(--ink);
}
.card-price span {
    font-size: 11px;
    font-weight: 500;
    color: var(--ink-soft);
    font-family: "Inter";
}
.card-foot {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 6px;
}
.qty-stepper {
    display: flex;
    align-items: center;
    border: 1px solid var(--line);
    border-radius: 999px;
    height: 36px;
    overflow: hidden;
}
.qty-stepper button {
    width: 36px;
    height: 100%;
    border: none;
    background: var(--paper-alt);
    font-size: 15px;
    font-weight: 700;
    color: var(--ink);
}
.qty-stepper input {
    width: 36px;
    border: none;
    text-align: center;
    font-size: 13px;
    font-family: "Inter";
    font-weight: 600;
}
.add-btn {
    background: var(--green);
    color: #fff;
    border: none;
    border-radius: 999px;
    height: 36px;
    padding: 0 14px;
    font-size: 12px;
    font-weight: 700;
    flex: 1;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.add-btn:disabled,
.add-btn.disabled {
    background: #dadfd8;
    color: #8b968e;
    cursor: not-allowed;
}

.mobile-cart-bar {
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    bottom: 12px;
    z-index: 50;
    width: calc(100% - 24px);
    max-width: 1180px;
    background: var(--ink);
    color: #fff;
    padding: 13px 18px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 13px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
    text-decoration: none;
}
.mobile-cart-bar strong {
    font-family: "Sora";
}
.mobile-cart-cta {
    background: var(--orange);
    color: #fff;
    border: none;
    border-radius: 999px;
    padding: 9px 16px;
    font-weight: 700;
    font-size: 12.5px;
    display: inline-flex;
    align-items: center;
    min-height: 44px;
}

/* ===== Halaman keranjang, checkout, status order ===== */
.sheet {
    max-width: 1180px;
    margin: 30px auto 90px;
    padding: 0 20px;
}
.sheet h1 {
    font-size: 22px;
    margin-bottom: 4px;
}
.sheet .sub {
    font-size: 12.5px;
    color: var(--ink-soft);
    margin-bottom: 20px;
}
.panel {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius-m);
    margin-bottom: 20px;
    overflow: hidden;
}
.panel-head {
    padding: 16px 18px;
    border-bottom: 1px solid var(--line);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}
.panel-body {
    padding: 16px 18px;
}
.panel-foot {
    padding: 16px 18px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
}
.total-tr td {
    border-top: 1px solid var(--line);
    font-weight: 600;
}
.total-label {
    font-size: 13px;
    color: var(--ink-soft);
}
.total-amount {
    font-family: "Sora";
    font-size: 17px;
    color: var(--ink);
}
.panel-head h2 {
    font-size: 15px;
}
.table-wrap {
    overflow-x: auto;
}
.table-wrap table {
    width: 100%;
    border-collapse: collapse;
    min-width: 560px;
}
.table-wrap th {
    text-align: left;
    font-size: 10.5px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--ink-soft);
    padding: 11px 18px;
    border-bottom: 1px solid var(--line);
    background: var(--paper-alt);
    white-space: nowrap;
}
.table-wrap td {
    padding: 13px 18px;
    border-bottom: 1px solid var(--line);
    font-size: 13.5px;
    vertical-align: middle;
}
.table-wrap tr:last-child td {
    border-bottom: none;
}
.cart-product {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 200px;
}
.cart-product .thumb {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: var(--paper-alt);
    object-fit: cover;
    flex: none;
}
.cart-product .nm {
    font-weight: 600;
    font-size: 13px;
}
.cart-product .sk {
    font-size: 11px;
    color: var(--ink-soft);
}
.qty-inline {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--line);
    border-radius: 999px;
    height: 44px;
    overflow: hidden;
}
.qty-inline button {
    width: 40px;
    height: 100%;
    border: none;
    background: var(--paper-alt);
    font-weight: 700;
}
.qty-inline input {
    width: 40px;
    border: none;
    text-align: center;
    font-size: 12.5px;
    font-weight: 600;
}
.remove-link {
    color: var(--red);
    font-size: 12.5px;
    font-weight: 600;
    background: none;
    border: none;
    text-decoration: underline;
    padding: 0;
}
.cart-remove {
    margin-top: 6px;
}
.order-id {
    font-family: "IBM Plex Mono", monospace;
    font-size: 12px;
    color: var(--ink-soft);
}
.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 11.5px;
    font-weight: 700;
    border-radius: 999px;
    padding: 5px 11px;
}
.status-pill.pending {
    color: var(--orange);
    background: var(--orange-soft);
}
.status-pill.processed {
    color: #3355c8;
    background: #e9eefb;
}
.status-pill.approved {
    color: var(--green-dark);
    background: var(--green-soft);
}
.status-pill.rejected {
    color: var(--red);
    background: var(--red-soft);
}
.status-pill .dot {
    width: 6px;
    height: 6px;
    border-radius: 999px;
    background: currentColor;
}
.fail-tag {
    font-size: 11.5px;
    color: var(--red);
    font-weight: 600;
}

.form-field {
    margin-bottom: 16px;
}
.form-field label {
    display: block;
    font-size: 12.5px;
    font-weight: 600;
    margin-bottom: 6px;
}
.form-field input,
.form-field textarea {
    width: 100%;
    border: 1.5px solid var(--line);
    border-radius: 10px;
    padding: 14px 16px;
    font-size: 15px;
    font-family: inherit;
    color: var(--ink);
    background: #fff;
    min-height: 52px;
}
.form-field input:focus,
.form-field textarea:focus {
    outline: none;
    border-color: var(--green);
}
.form-field .err {
    color: var(--red);
    font-size: 11.5px;
    margin-top: 4px;
}
.btn-primary {
    background: var(--green);
    color: #fff;
    border: none;
    border-radius: 999px;
    padding: 12px 22px;
    font-weight: 700;
    font-size: 13px;
    text-decoration: none;
    display: inline-block;
}
.btn-ghost {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 12px 22px;
    font-weight: 600;
    font-size: 13px;
    color: var(--ink);
    text-decoration: none;
    display: inline-block;
}
.alert-note {
    border-radius: var(--radius-s);
    padding: 12px 16px;
    font-size: 13px;
    margin-bottom: 16px;
}
.alert-note.error {
    background: var(--red-soft);
    color: var(--red);
}
.alert-note.warn {
    background: var(--orange-soft);
    color: var(--orange);
}
.alert-note.ok {
    background: var(--green-soft);
    color: var(--green-dark);
}

.cust-footer {
    border-top: 1px solid var(--line);
    padding: 24px 20px;
    text-align: center;
    font-size: 12px;
    color: var(--ink-soft);
}

/* ===== Override mobile (harus di akhir agar menang atas rule dasar) ===== */
@media (max-width: 639px) {
    .card-foot {
        flex-direction: column;
        align-items: stretch;
    }
    .card-foot form {
        flex-direction: column;
        width: 100%;
    }
    .qty-stepper {
        justify-content: center;
    }
    .qty-stepper button {
        flex: 1;
        width: auto;
        min-width: 0;
    }
    .qty-stepper input {
        flex: 1;
        width: auto;
        min-width: 0;
        height: 100%;
    }
    .add-btn {
        width: 100%;
        flex: none;
    }
    .nav-search {
        display: none;
    }
    .nav-search.open {
        display: flex;
    }
    .nav-search-toggle {
        display: inline-flex;
    }
    .table-wrap {
        overflow: visible;
    }
    .table-wrap table {
        min-width: 0;
    }
    .table-wrap thead {
        display: none;
    }
    .table-wrap tr {
        display: grid;
        grid-template-columns: 1fr;
        gap: 10px 0;
        padding: 14px 16px;
        border-bottom: 1px solid var(--line);
    }
    .table-wrap td {
        display: flex;
        align-items: center;
        gap: 8px;
        padding: 0;
        border: none;
        font-size: 13px;
    }
    .table-wrap td:nth-child(1) {
        grid-row: 1;
        grid-column: 1;
        display: block;
        position: relative;
        padding-right: 48px;
    }
    .table-wrap td:nth-child(3) {
        grid-row: 2;
        grid-column: 1;
        justify-content: flex-end;
    }
    .table-wrap td:nth-child(2),
    .table-wrap td:nth-child(4) {
        grid-column: 1 / -1;
        justify-content: space-between;
    }
    .table-wrap td:nth-child(2)::before,
    .table-wrap td:nth-child(4)::before {
        content: attr(data-label);
        color: var(--ink-soft);
        font-size: 11px;
        font-weight: 600;
        flex: none;
    }
    .cart-remove .remove-link {
        position: absolute;
        top: 0;
        right: 0;
        margin: 0;
    }
    .cart-product {
        min-width: 0;
    }
    .cart-product > div {
        min-width: 0;
    }
    .cart-product .nm {
        word-wrap: break-word;
    }
    .qty-inline {
        height: 36px;
    }
    .qty-inline button,
    .qty-inline input {
        width: 36px;
    }
    .panel-foot {
        flex-direction: column;
        align-items: stretch;
    }
    .table-wrap .total-tr {
        display: flex;
        justify-content: space-between;
        align-items: center;
        border-top: 1px solid var(--line);
        border-bottom: none;
        margin-top: 2px;
    }
    .table-wrap .total-tr td {
        display: block;
        border: none;
        padding: 0;
    }
    .table-wrap .total-tr .total-amount {
        font-size: 15px;
    }
    .banner-slide {
        padding: 20px;
    }
    .banner-slider .slider-btn {
        display: none;
    }
}
