:root {
    --maroon-dark: #4d1220;
    --maroon: #6d1a2b;
    --maroon-light: #9c3a4d;
    --cream: #f3ece1;
    --cream-light: #faf7f2;
    --gold: #b8935f;
    --text-dark: #2b2320;
    --text-muted: #8a7f74;
    --white: #ffffff;
    --border: #eae2d4;
    --radius: 14px;
    --red: #e0342b;
    --red-dark: #b8241c;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Poppins', sans-serif;
    color: var(--text-dark);
    background: var(--white);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    padding-top: 81px;
}

h1,
h2,
h3,
h4 {
    font-family: 'Playfair Display', serif;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

img,
svg {
    display: block;
}

.icon {
    stroke: currentColor;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 32px;
}

/* ---------- Bottom nav (mobile only) ---------- */
.bottom-nav {
    display: none;
}

.bn-fab-slot {
    display: none;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 13px 26px;
    background: var(--maroon);
    color: #fff;
    font-size: 13px;
    letter-spacing: 1px;
    font-weight: 600;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: .25s;
}

.btn:hover {
    background: var(--maroon-dark);
}

/* ---------- Header ---------- */
header.site {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: var(--maroon-dark);
    border-bottom: 1px solid var(--red-dark);
}

.nav-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo .mark {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1.5px solid #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    color: #fff;
    font-size: 20px;
}

.logo .txt strong {
    display: block;
    font-family: 'Playfair Display', serif;
    font-size: 19px;
    letter-spacing: 2px;
    color: #fff;
}

.logo .txt span {
    display: block;
    font-size: 9.5px;
    letter-spacing: 3px;
    color: rgba(255, 255, 255, .78);
    margin-top: 2px;
}

.main-nav {
    display: flex;
    gap: 38px;
}

.main-nav a {
    font-size: 14.5px;
    font-weight: 500;
    color: rgba(255, 255, 255, .85);
    position: relative;
    padding-bottom: 4px;
}

.main-nav a.active {
    color: #fff;
}

.main-nav a.active::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -2px;
    height: 2px;
    background: #fff;
}

.nav-icons {
    display: flex;
    align-items: center;
    gap: 22px;
}

.nav-icons button {
    background: none;
    border: none;
    cursor: pointer;
    color: #fff;
    position: relative;
    padding: 4px;
}

.cart-badge {
    position: absolute;
    top: -5px;
    right: -4px;
    background: #fff;
    color: var(--red);
    font-size: 10px;
    width: 17px;
    height: 17px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

.mobile-filter-toggle {
    display: none;
}

/* ---------- Panel pencarian di header ---------- */
.search-panel {
    max-height: 0;
    overflow: hidden;
    background: var(--cream-light);
    border-bottom: 1px solid transparent;
    transition: max-height .25s ease, border-color .25s ease;
}

.search-panel.open {
    max-height: 90px;
    border-bottom-color: var(--border);
}

.search-panel .container {
    padding: 16px 0;
}

.search-panel-form {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 6px 8px 6px 16px;
}

.search-panel-form .icon {
    color: var(--text-muted);
    flex-shrink: 0;
}

.search-panel-form input[type="search"] {
    flex: 1;
    border: none;
    outline: none;
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    background: transparent;
    padding: 10px 0;
}

.search-panel-form .search-submit {
    background: var(--maroon);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 10px 20px;
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: .2s;
}

.search-panel-form .search-submit:hover {
    background: var(--red-dark);
}

.search-panel-form .search-close {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 6px;
    display: flex;
    flex-shrink: 0;
}

/* ---------- Page head ---------- */
.page-head {
    padding-top: 38px;
    padding-bottom: 8px;
}

.page-head h1 {
    font-size: 32px;
    color: var(--maroon-dark);
    font-weight: 600;
}

/* ---------- Layout ---------- */
.layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 36px;
    padding-top: 24px;
    padding-bottom: 56px;
    align-items: start;
}

/* ---------- Sidebar ---------- */
.search-box {
    position: relative;
    margin-bottom: 26px;
}

.search-box input {
    width: 100%;
    padding: 12px 14px 12px 40px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-family: 'Poppins', sans-serif;
    font-size: 13.5px;
    background: var(--cream-light);
}

.search-box .icon {
    position: absolute;
    left: 13px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.filter-block {
    border-bottom: 1px solid var(--border);
    padding-bottom: 20px;
    margin-bottom: 20px;
}

.filter-block summary {
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 16px;
}

.filter-block summary::-webkit-details-marker {
    display: none;
}

.filter-block summary .icon {
    color: var(--text-muted);
    transition: .2s;
}

.filter-block[open] summary .icon {
    transform: rotate(180deg);
}

.filter-opt {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 13px;
    font-size: 13.5px;
    color: var(--text-dark);
    cursor: pointer;
}

.filter-opt input {
    accent-color: var(--maroon);
    width: 15px;
    height: 15px;
    cursor: pointer;
}

.filter-opt:last-child {
    margin-bottom: 0;
}

.size-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.size-grid label {
    border: 1px solid var(--border);
    border-radius: 6px;
    text-align: center;
    padding: 8px 0;
    font-size: 12.5px;
    cursor: pointer;
    position: relative;
}

.size-grid input {
    position: absolute;
    opacity: 0;
    inset: 0;
    cursor: pointer;
}

.size-grid input:checked+span {
    color: var(--maroon);
}

.size-grid label:has(input:checked) {
    border-color: var(--maroon);
    background: var(--cream);
}

.reset-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    border: 1px solid var(--maroon);
    color: var(--maroon);
    background: #fff;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.reset-btn:hover {
    background: var(--cream-light);
}

/* ---------- Toolbar ---------- */
.toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 22px;
}

.result-count {
    font-size: 13px;
    color: var(--text-muted);
}

.toolbar-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sort-select {
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 10px 14px;
    font-size: 13px;
    color: var(--text-dark);
    cursor: pointer;
    background: #fff;
    position: relative;
    user-select: none;
}

.sort-select .icon {
    transition: .2s;
}

.sort-select.open .icon {
    transform: rotate(180deg);
}

.sort-menu {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 200px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: 0 14px 34px rgba(43, 35, 32, .12);
    padding: 6px;
    z-index: 30;
    cursor: default;
}

.sort-select.open .sort-menu {
    display: block;
}

.sort-menu li {
    list-style: none;
    padding: 10px 12px;
    font-size: 13px;
    color: var(--text-dark);
    border-radius: 6px;
    cursor: pointer;
}

.sort-menu li:hover {
    background: var(--cream);
}

.sort-menu li.active {
    background: var(--cream);
    color: var(--maroon);
    font-weight: 600;
}

.view-toggle {
    display: flex;
    border: 1px solid var(--border);
    border-radius: 6px;
    overflow: hidden;
}

.view-toggle button {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
}

.view-toggle button.active {
    background: var(--cream);
    color: var(--maroon);
}

/* ---------- Product grid ---------- */
.p-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 22px;
}

.p-card {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    background: #fff;
    transition: .25s;
}

.p-card:hover {
    box-shadow: 0 14px 30px rgba(43, 35, 32, .08);
    transform: translateY(-3px);
}

.p-thumb {
    background: var(--cream);
    aspect-ratio: 1/1;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.p-icon {
    width: 84px;
    height: 84px;
    border-radius: 50%;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--maroon);
    box-shadow: 0 6px 16px rgba(77, 18, 32, .08);
}

.p-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: .5px;
    padding: 5px 10px;
    border-radius: 2px;
    color: #fff;
    z-index: 2;
}

.p-badge.new {
    background: var(--maroon-dark);
}

.p-badge.sale {
    background: #b5342f;
}

.p-wish {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #fff;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    box-shadow: 0 4px 10px rgba(0, 0, 0, .08);
    z-index: 2;
}

.p-info {
    padding: 16px 16px 18px;
}

.p-info h4 {
    font-family: 'Poppins', sans-serif;
    font-size: 13.5px;
    font-weight: 500;
    color: var(--text-dark);
    margin-bottom: 8px;
    line-height: 1.4;
}

.p-price-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.p-price {
    font-weight: 700;
    font-size: 14px;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: 8px;
}

.p-price .old {
    font-weight: 400;
    font-size: 12px;
    color: var(--text-muted);
    text-decoration: line-through;
}

.p-price.sale-price {
    color: #b5342f;
}

.rating {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text-dark);
}

.rating .icon {
    color: var(--gold);
}

.p-swatches {
    display: flex;
    align-items: center;
    gap: 6px;
}

.swatch {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 1px solid rgba(0, 0, 0, .08);
}

.swatch-more {
    font-size: 11px;
    color: var(--text-muted);
}

/* ---------- Product grid: list view ---------- */
.p-grid.list-view {
    grid-template-columns: 1fr;
    gap: 14px;
}

.p-grid.list-view .p-card {
    display: flex;
    flex-direction: row;
    align-items: stretch;
}

.p-grid.list-view .p-card:hover {
    transform: translateY(-1px);
}

.p-grid.list-view .p-thumb {
    width: 190px;
    flex-shrink: 0;
    aspect-ratio: auto;
}

.p-grid.list-view .p-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 18px 26px;
}

.p-grid.list-view .p-info h4 {
    font-size: 15px;
}

.p-grid.list-view .p-price-row {
    max-width: 260px;
}

/* ---------- Pagination ---------- */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 44px;
}

.pagination a {
    width: 38px;
    height: 38px;
    border-radius: 6px;
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    color: var(--text-dark);
}

.pagination a.active {
    background: var(--maroon-dark);
    border-color: var(--maroon-dark);
    color: #fff;
}

.pagination a.dots {
    border: none;
}

/* ---------- Features ---------- */
.features {
    background: var(--cream-light);
    border-radius: var(--radius);
    padding: 30px 20px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 14px;
}

.feature-item .f-icon {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--maroon);
    flex-shrink: 0;
}

.feature-item h5 {
    font-size: 12.5px;
    letter-spacing: .5px;
    font-weight: 700;
    margin-bottom: 3px;
}

.feature-item p {
    font-size: 12px;
    color: var(--text-muted);
}

/* ---------- Footer ---------- */
footer.site {
    background: var(--maroon-dark);
    color: #e9dfd7;
    margin-top: 40px;
}

.footer-top {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1fr 1.3fr;
    gap: 30px;
    padding: 56px 0 40px;
}

.footer-brand .logo .txt strong,
.footer-brand .logo .mark {
    color: #fff;
    border-color: #fff;
}

.footer-brand p {
    font-size: 13px;
    color: #cdbdb2;
    margin: 16px 0 20px;
    max-width: 230px;
}

.social {
    display: flex;
    gap: 10px;
}

.social a {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, .25);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
}

.footer-col h6 {
    font-size: 12.5px;
    letter-spacing: 1.5px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 18px;
}

.footer-col ul li {
    margin-bottom: 11px;
}

.footer-col ul li a {
    font-size: 13px;
    color: #cdbdb2;
}

.footer-col ul li a:hover {
    color: #fff;
}

.news-form {
    display: flex;
    margin-top: 16px;
    border-radius: 2px;
    overflow: hidden;
}

.news-form input {
    flex: 1;
    border: none;
    padding: 12px 14px;
    font-size: 13px;
    font-family: 'Poppins', sans-serif;
}

.news-form button {
    background: var(--maroon);
    border: none;
    color: #fff;
    padding: 0 16px;
    cursor: pointer;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, .12);
    padding: 20px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12.5px;
    color: #cdbdb2;
}

.footer-bottom .links {
    display: flex;
    gap: 24px;
}

/* ---------- Responsive ---------- */
@media(max-width:1080px) {
    .p-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .features {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-top {
        grid-template-columns: 1fr 1fr;
    }
}

@media(max-width:900px) {
    .layout {
        grid-template-columns: 1fr;
    }
}

@media(max-width:720px) {
    footer.site {
        display: none;
    }

    /* Bottom nav — curved notch with floating cart button */
    body {
        padding-bottom: 78px;
        padding-top: 65px;
    }

    .bottom-nav {
        display: flex;
        align-items: flex-start;
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        height: 66px;
        background: #fff;
        border-radius: 20px 20px 0 0;
        z-index: 50;
        padding: 0 6px;
        box-shadow: 0 -6px 18px rgba(43, 35, 32, .1);
    }

    .bn-side {
        flex: 1;
        display: flex;
        justify-content: space-around;
        padding-top: 14px;
    }

    .bn-side a {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 4px;
        color: var(--text-muted);
        font-size: 10.5px;
    }

    .bn-side a.active {
        color: var(--maroon);
    }

    /* Floating cart button (red), sitting in the notch */
    .bn-fab-slot {
        display: flex;
        flex-direction: column;
        align-items: center;
        width: 76px;
        flex-shrink: 0;
    }

    .bn-fab {
        position: relative;
        width: 58px;
        height: 58px;
        border-radius: 50%;
        background: var(--maroon);
        color: #fff;
        display: flex;
        align-items: center;
        justify-content: center;
        margin-top: -26px;
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.4), 0 0 0 6px #fff;
        transition: .2s;
    }

    .bn-fab-badge {
        position: absolute;
        top: -2px;
        right: -2px;
        min-width: 20px;
        height: 20px;
        padding: 0 5px;
        border-radius: 10px;
        background: #f2b100;
        color: #2b2320;
        font-size: 10.5px;
        font-weight: 700;
        line-height: 20px;
        text-align: center;
        box-shadow: 0 0 0 2px #fff;
    }

    .bn-fab:hover,
    .bn-fab.active {
        background: var(--red-dark);
    }

    .bn-fab .icon {
        width: 24px;
        height: 24px;
        stroke: #fff;
    }

    .bn-fab-label {
        margin-top: 5px;
        font-size: 10.5px;
        color: var(--maroon);
        font-weight: 600;
    }

    .container {
        padding: 0 32px;
    }

    .main-nav {
        display: none;
    }

    /* Header mobile: logo kiri - icons kanan */
    .nav-wrap {
        display: grid;
        grid-template-columns: auto 1fr;
        align-items: center;
        padding: 14px 12px;
    }

    .logo {
        gap: 8px;
    }

    .logo .mark {
        width: 36px;
        height: 36px;
        font-size: 16px;
    }

    .logo .txt strong {
        font-size: 15px;
        letter-spacing: 1px;
    }

    .logo .txt span {
        font-size: 7.5px;
        letter-spacing: 2px;
    }

    .nav-icons {
        justify-self: end;
        gap: 16px;
    }

    .nav-icons .icon-wishlist,
    .nav-icons .icon-cart,
    .nav-icons .icon-account {
        display: none;
    }

    /* Page head */
    .page-head {
        padding-top: 22px;
        padding-bottom: 4px;
    }

    .page-head h1 {
        font-size: 24px;
    }

    /* Khusus halaman Koleksi: judul + dropdown urutkan sejajar satu baris */
    .page-head-koleksi {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
    }

    .page-head-actions {
        flex-shrink: 0;
    }

    /* Layout: toolbar -> tombol filter -> sidebar (collapsible) -> grid -> pagination */
    .layout {
        display: flex;
        flex-direction: column;
        gap: 14px;
        padding-top: 16px;
        padding-bottom: 40px;
    }

    main {
        display: contents;
    }

    .toolbar {
        display: none;
    }

    .result-count {
        font-size: 11.5px;
    }

    .toolbar-right {
        gap: 8px;
    }

    .sort-select {
        font-size: 11px;
        padding: 8px 10px;
        gap: 5px;
        white-space: nowrap;
    }

    .view-toggle {
        display: none;
    }

    .mobile-filter-toggle {
        display: none;
    }

    .mobile-filter-toggle .left {
        display: flex;
        align-items: center;
        gap: 8px;
    }

    .mobile-filter-toggle .chev {
        display: flex;
        transition: .2s;
    }

    .mobile-filter-toggle.open .chev {
        transform: rotate(180deg);
    }

    .sidebar {
        order: 3;
        display: none;
        width: 100%;
        background: var(--cream-light);
        border: 1px solid var(--border);
        border-radius: 10px;
        padding: 18px;
    }

    .sidebar.open {
        display: block;
    }

    .p-grid {
        order: 4;
        grid-template-columns: repeat(3, 1fr);
        gap: 14px;
    }

    .p-grid.list-view {
        grid-template-columns: 1fr;
    }

    .p-grid.list-view .p-thumb {
        width: 110px;
    }

    .p-grid.list-view .p-info {
        padding: 10px 14px;
    }

    .p-icon {
        width: 52px;
        height: 52px;
    }

    .p-info {
        padding: 10px 8px 12px;
    }

    .p-info h4 {
        font-size: 11px;
        margin-bottom: 6px;
    }

    .p-price-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 3px;
        margin-bottom: 6px;
    }

    .p-price {
        font-size: 12px;
        gap: 5px;
    }

    .p-price .old {
        font-size: 10px;
    }

    .rating {
        font-size: 10.5px;
    }

    .swatch {
        width: 11px;
        height: 11px;
    }

    .p-badge {
        font-size: 9px;
        padding: 4px 7px;
        top: 8px;
        left: 8px;
    }

    .p-wish {
        width: 26px;
        height: 26px;
        top: 8px;
        right: 8px;
    }

    .pagination {
        order: 5;
        gap: 5px;
    }

    .pagination a {
        width: 30px;
        height: 30px;
        font-size: 11.5px;
        border-radius: 5px;
    }

    .features {
        grid-template-columns: repeat(4, 1fr);
        gap: 8px;
        padding: 22px 12px;
    }

    .feature-item {
        flex-direction: column;
        text-align: center;
        gap: 6px;
    }

    .feature-item .f-icon {
        width: 36px;
        height: 36px;
    }

    .feature-item h5 {
        font-size: 9px;
        letter-spacing: 0;
    }

    .feature-item p {
        font-size: 8px;
    }

    .footer-top {
        grid-template-columns: 1fr;
    }
}

@media(max-width:480px) {
    .p-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 14px;
    }
}