/* ============================================
   WebVerse — Products Page
   File: products.css
   ============================================ */
@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,wght@0,700;0,900;1,300&family=DM+Sans:wght@300;400;500;600&display=swap');

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background: #F7F5F2;
    font-family: 'DM Sans', sans-serif;
}

.wp-main {
    padding: 2.5rem 5%;
}

.wp-container {
    max-width: 1280px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 2rem;
    align-items: start;
}

/* ── Sidebar ── */
.wp-sidebar {
    position: sticky;
    top: 84px;
    background: #fff;
    border-radius: 16px;
    padding: 1.5rem;
    border: 1px solid rgba(15, 14, 12, 0.07);
    box-shadow: 0 2px 12px rgba(15, 14, 12, 0.05);
}

.wp-sidebar__block {
    margin-bottom: 1.8rem;
}

.wp-sidebar__block:last-of-type {
    margin-bottom: 1rem;
}

.wp-sidebar__title {
    font-family: 'Fraunces', serif;
    font-size: 0.85rem;
    font-weight: 700;
    color: #0f0e0c;
    letter-spacing: -0.01em;
    margin-bottom: 0.85rem;
    padding-bottom: 0.6rem;
    border-bottom: 1px solid rgba(15, 14, 12, 0.07);
}

.wp-sidebar__list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.wp-filter-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: transparent;
    border: none;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.82rem;
    font-weight: 400;
    color: rgba(15, 14, 12, 0.6);
    padding: 0.5rem 0.7rem;
    border-radius: 8px;
    cursor: pointer;
    text-align: left;
    transition: background 0.18s ease, color 0.18s ease;
}

.wp-filter-btn:hover {
    background: rgba(15, 14, 12, 0.04);
    color: #0f0e0c;
}

.wp-filter-btn.active {
    background: rgba(232, 67, 10, 0.07);
    color: #E8430A;
    font-weight: 600;
}

.wp-filter-count {
    font-size: 0.7rem;
    color: rgba(15, 14, 12, 0.35);
    background: rgba(15, 14, 12, 0.05);
    padding: 1px 7px;
    border-radius: 20px;
}

.wp-filter-btn.active .wp-filter-count {
    background: rgba(232, 67, 10, 0.12);
    color: #E8430A;
}

.wp-reset-btn {
    width: 100%;
    background: #0f0e0c;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.8rem;
    font-weight: 500;
    padding: 0.65rem;
    cursor: pointer;
    transition: background 0.2s ease;
}

.wp-reset-btn:hover {
    background: #E8430A;
}

/* ── Content area ── */
.wp-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.4rem;
}

.wp-result-count {
    font-size: 0.82rem;
    color: rgba(15, 14, 12, 0.5);
}

.wp-result-count span {
    font-weight: 600;
    color: #0f0e0c;
}

/* ── Products Grid ── */
.wp-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.1rem;
}

/* ── Card ── */
.wp-card {
    background: #fff;
    border-radius: 14px;
    overflow: visible;
    border: 1px solid rgba(15, 14, 12, 0.07);
    transition: transform 0.28s ease, box-shadow 0.28s ease;
    position: relative;
}

.wp-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 32px rgba(15, 14, 12, 0.10);
}

.wp-card__img {
    position: relative;
    height: 200px;
    overflow: hidden;
    border-radius: 14px 14px 0 0;
    background: linear-gradient(145deg, #f5f0ea, #ede8e0);
}

.wp-card__img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.45s ease;
}

.wp-card:hover .wp-card__img img {
    transform: scale(1.05);
}

.wp-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    padding: 0.22rem 0.55rem;
    border-radius: 6px;
}

.wp-badge--new {
    background: #0f0e0c;
    color: #fff;
}

.wp-badge--sale {
    background: #E8430A;
    color: #fff;
}

.wp-discount {
    position: absolute;
    bottom: 10px;
    left: 10px;
    background: rgba(232, 67, 10, 0.12);
    color: #E8430A;
    border: 1px solid rgba(232, 67, 10, 0.3);
    font-size: 0.65rem;
    font-weight: 700;
    padding: 0.2rem 0.5rem;
    border-radius: 5px;
}

.wp-cart-icon {
    position: absolute;
    top: -11px;
    right: -11px;
    width: 34px;
    height: 34px;
    background: #0f0e0c;
    border: 2px solid #F7F5F2;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    cursor: pointer;
    box-shadow: 0 3px 10px rgba(15, 14, 12, 0.2);
    transition: background 0.2s ease, transform 0.2s ease;
    opacity: 0;
    transform: scale(0.8) translateY(-3px);
    z-index: 5;
}

.wp-card:hover .wp-cart-icon {
    opacity: 1;
    transform: scale(1) translateY(0);
}

.wp-cart-icon:hover {
    background: #E8430A;
}

.wp-cart-icon.added {
    background: #16a34a;
    opacity: 1;
    transform: scale(1);
}

.wp-cart-icon.added:hover {
    transform: scale(1);
}

/* Card Info */
.wp-card__info {
    padding: 0.9rem 1rem 1rem;
}

.wp-card__cat {
    display: block;
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #E8430A;
    margin-bottom: 0.25rem;
}

.wp-card__name {
    font-family: 'Fraunces', serif;
    font-size: 0.95rem;
    font-weight: 700;
    color: #0f0e0c;
    line-height: 1.25;
    margin-bottom: 0.4rem;
}

.wp-card__stars {
    font-size: 0.72rem;
    color: #f59e0b;
    margin-bottom: 0.65rem;
    display: flex;
    align-items: center;
    gap: 4px;
}

.wp-card__stars span {
    color: rgba(15, 14, 12, 0.45);
    font-size: 0.7rem;
}

.wp-card__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.wp-card__prices {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.wp-price {
    font-family: 'Fraunces', serif;
    font-size: 1rem;
    font-weight: 700;
    color: #0f0e0c;
}

.wp-old-price {
    font-size: 0.75rem;
    color: #bbb;
    text-decoration: line-through;
}

.wp-shop-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #0f0e0c;
    color: #fff;
    text-decoration: none;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.48rem 0.85rem;
    border-radius: 7px;
    white-space: nowrap;
    transition: background 0.2s ease, transform 0.18s ease;
    flex-shrink: 0;
}

.wp-shop-btn:hover {
    background: #E8430A;
    transform: translateY(-1px);
}

.wp-shop-btn svg {
    transition: transform 0.2s ease;
}

.wp-shop-btn:hover svg {
    transform: translateX(3px);
}

/* Empty state */
.wp-empty {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    text-align: center;
    gap: 1rem;
}

.wp-empty span {
    font-size: 3rem;
}

.wp-empty p {
    font-size: 0.9rem;
    color: rgba(15, 14, 12, 0.5);
}

.wp-empty button {
    background: #0f0e0c;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.82rem;
    font-weight: 500;
    padding: 0.65rem 1.5rem;
    cursor: pointer;
    transition: background 0.2s ease;
}

.wp-empty button:hover {
    background: #E8430A;
}

/* ── Responsive ── */
@media (max-width: 1024px) {
    .wp-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .wp-container {
        grid-template-columns: 1fr;
    }

    .wp-sidebar {
        position: static;
    }

    .wp-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .wp-cart-icon {
        opacity: 1;
        transform: scale(1);
    }
}

@media (max-width: 480px) {
    .wp-main {
        padding: 1.5rem 4%;
    }

    .wp-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }

    .wp-card__img {
        height: 160px;
    }
}