﻿/* ── Category page layout ───────────────────────────── */
.category-page {
    background: #f7f7f7;
    min-height: 70vh;
}

/* Breadcrumb */
.cat-breadcrumb {
    background: #fff;
    border-bottom: 1px solid #eee;
    padding: 10px 0;
    font-size: 0.87rem;
}

    .cat-breadcrumb a {
        color: #e8673c;
        text-decoration: none;
    }

        .cat-breadcrumb a:hover {
            text-decoration: underline;
        }

    .cat-breadcrumb .sep {
        margin: 0 6px;
        color: #aaa;
    }

    .cat-breadcrumb .current {
        color: #555;
        font-weight: 600;
    }

/* ── Sidebar ───────────────────────────────────────── */
.cat-sidebar {
    background: #fff;
    border-radius: 8px;
    padding: 0;
    box-shadow: 0 1px 4px rgba(0,0,0,.07);
    overflow: hidden;
}

.sidebar-section {
    border-bottom: 1px solid #f0f0f0;
    padding: 16px 18px;
}

    .sidebar-section:last-child {
        border-bottom: none;
    }

.sidebar-title {
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: .6px;
    color: #888;
    text-transform: uppercase;
    margin-bottom: 12px;
}

.filter-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 0;
    cursor: pointer;
    border-radius: 6px;
    transition: background .15s;
    text-decoration: none;
    color: #333;
    font-size: 0.9rem;
}

    .filter-option:hover {
        color: #e8673c;
    }

    .filter-option.active {
        color: #e8673c;
        font-weight: 600;
    }

    .filter-option .dot {
        width: 10px;
        height: 10px;
        border-radius: 50%;
        border: 2px solid #ccc;
        flex-shrink: 0;
        transition: border-color .15s, background .15s;
    }

    .filter-option.active .dot,
    .filter-option:hover .dot {
        border-color: #e8673c;
        background: #e8673c;
    }

.price-btn {
    display: block;
    width: 100%;
    text-align: left;
    padding: 7px 10px;
    margin-bottom: 4px;
    border-radius: 20px;
    border: 1px solid #e0e0e0;
    background: #fafafa;
    font-size: 0.85rem;
    color: #444;
    cursor: pointer;
    transition: all .15s;
    text-decoration: none;
}

    .price-btn:hover, .price-btn.active {
        background: #fff3ef;
        border-color: #e8673c;
        color: #e8673c;
        font-weight: 600;
    }

.btn-clear-filter {
    display: block;
    width: 100%;
    padding: 8px;
    text-align: center;
    background: #f5f5f5;
    border: none;
    border-radius: 6px;
    color: #666;
    font-size: 0.82rem;
    margin-top: 6px;
    cursor: pointer;
    transition: background .15s;
    text-decoration: none;
}

    .btn-clear-filter:hover {
        background: #ffe5dc;
        color: #e8673c;
    }

/* ── Sort bar ──────────────────────────────────────── */
.cat-sort-bar {
    background: #fff;
    border-radius: 8px;
    padding: 12px 18px;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 18px;
    box-shadow: 0 1px 4px rgba(0,0,0,.07);
    flex-wrap: wrap;
}

.sort-label {
    font-size: 0.85rem;
    color: #777;
    white-space: nowrap;
}

.sort-btn {
    padding: 5px 14px;
    border-radius: 20px;
    border: 1px solid #ddd;
    background: #fafafa;
    font-size: 0.83rem;
    color: #444;
    cursor: pointer;
    transition: all .15s;
    text-decoration: none;
}

    .sort-btn:hover, .sort-btn.active {
        background: #e8673c;
        border-color: #e8673c;
        color: #fff;
    }

.result-count {
    margin-left: auto;
    font-size: 0.82rem;
    color: #888;
}

/* ── Product card ──────────────────────────────────── */
.prod-card {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0,0,0,.07);
    transition: transform .2s, box-shadow .2s;
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
}

    .prod-card:hover {
        transform: translateY(-4px);
        box-shadow: 0 6px 20px rgba(0,0,0,.12);
    }

.prod-img-wrap {
    width: 100%;
    padding-top: 100%;
    position: relative;
    overflow: hidden;
    background: #f8f8f8;
}

    .prod-img-wrap img {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
        object-fit: contain;
        padding: 8px;
        transition: transform .25s;
    }

.prod-card:hover .prod-img-wrap img {
    transform: scale(1.05);
}

.prod-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: #e8673c;
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 20px;
    z-index: 2;
}

.badge-soldout {
    background: #999;
}

.prod-body {
    padding: 12px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.prod-name {
    font-size: 0.88rem;
    font-weight: 600;
    color: #222;
    margin-bottom: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
    min-height: 2.5em;
    flex: 1;
}

.prod-price {
    margin-bottom: 10px;
    min-height: 3em;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.price-original {
    font-size: 0.78rem;
    color: #aaa;
    text-decoration: line-through;
    display: block;
}

.price-final {
    font-size: 1rem;
    font-weight: 700;
    color: #e8673c;
}

.price-normal {
    font-size: 1rem;
    font-weight: 700;
    color: #333;
}

.btn-add-cart {
    width: 100%;
    padding: 8px;
    background: linear-gradient(135deg, #ff6b35, #e55a2b);
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
}

.btn-buy-now {
    padding: 8px 12px;
    background: linear-gradient(135deg, #28a745, #20c997);
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
}

.btn-buy-now:hover {
    background: linear-gradient(135deg, #218838, #1e7e34);
}

.btn-buy-now:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.btn-add-cart:hover {
    opacity: .88;
    color: #fff;
}

.btn-add-cart:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* ── Empty state ───────────────────────────────────── */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #aaa;
}

    .empty-state i {
        font-size: 3rem;
        margin-bottom: 16px;
        color: #ddd;
    }

    .empty-state p {
        font-size: 1rem;
    }

/* ── Load more ─────────────────────────────────────── */
.btn-load-more {
    padding: 12px 40px;
    background: linear-gradient(135deg, #ff6b35, #e55a2b);
    color: #fff;
    border: none;
    border-radius: 30px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: opacity .15s, transform .15s;
    box-shadow: 0 4px 12px rgba(232,103,60,.3);
}

    .btn-load-more:hover {
        opacity: .88;
        transform: translateY(-1px);
    }

/* ── Mobile toggle sidebar ─────────────────────────── */
.btn-filter-toggle {
    display: none;
    padding: 8px 16px;
    background: #fff;
    border: 1px solid #e8673c;
    border-radius: 20px;
    color: #e8673c;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    margin-bottom: 12px;
}

@media (max-width: 767px) {
    .btn-filter-toggle {
        display: inline-flex;
        align-items: center;
        gap: 6px;
    }

    .cat-sidebar {
        display: none;
    }

        .cat-sidebar.open {
            display: block;
            margin-bottom: 16px;
        }
    }