/* --- SHOP PAGE (Premium Redesign) --- */

.shop-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 3rem;
    align-items: start;
    padding-top: 1rem;
}

/* ── Sidebar ── */
@media (min-width: 993px) {
    .shop-sidebar {
        position: sticky;
        top: 100px;
        height: fit-content;
    }
}

.shop-sidebar {
    background: #fff;
    padding: 1.5rem;
    border-radius: var(--radius-md);
    border: 1px solid rgba(190, 24, 93, 0.1);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.filter-group {
    margin-bottom: 2rem;
}

.filter-group:last-child {
    margin-bottom: 0;
}

.filter-title {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-main);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1.25rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--accent-light);
}

.filter-options {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.filter-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.6rem 0.75rem;
    font-size: 0.9rem;
    color: var(--text-muted);
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.filter-link:hover {
    background: var(--bg-soft);
    color: var(--accent-primary);
    padding-left: 1rem;
}

.filter-link.active {
    background: var(--accent-light);
    color: var(--accent-primary);
    font-weight: 600;
}

/* ── Controls ── */
.shop-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding: 1rem 1.5rem;
    background: #fff;
    border-radius: var(--radius-md);
    border: 1px solid rgba(190, 24, 93, 0.1);
}

.result-count {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.sort-dropdown {
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: 0.85rem;
    color: var(--text-main);
    outline: none;
    cursor: pointer;
    transition: var(--transition);
}

.sort-dropdown:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px var(--accent-light);
}

/* ── Product Grid ── */
.product-grid {
    display: grid;
    /* Increased min-width for larger cards, reduced gap */
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.product-card {
    background: #fff;
    border-radius: 4px;
    /* Standardize with style.css */
    border: 1px solid #f0f0f0;
    overflow: hidden;
    transition: var(--transition);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-2px);
    /* Subtle modern lift */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    /* Consistent modern shadow */
    border-color: #e0e0e0;
}

.product-img-container {
    position: relative;
    width: 100%;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: #fff;
}

.product-img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
    object-position: center;
    transition: transform 0.6s ease;
}

.product-card:hover .product-img {
    transform: scale(1.04);
}

.product-badges {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 2;
}

.badge-stock {
    background: #374151;
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.product-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.03);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
}

.product-card:hover .product-overlay {
    opacity: 1;
}

.product-info {
    padding: 1rem 0.75rem;
    /* Tighter padding */
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.product-brand {
    font-size: 0.7rem;
    /* Subdued brand text */
    font-weight: 600;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 0.5px;
    margin-bottom: 0.25rem;
}

.product-name-link {
    font-family: var(--font-body);
    /* Standard sans-serif */
    font-size: 0.95rem;
    /* Smaller, cleaner */
    font-weight: 400;
    /* Regular weight */
    color: var(--text-main);
    margin-bottom: 0.4rem;
    display: block;
    line-height: 1.3;
}

.product-name-link:hover {
    color: var(--accent-primary);
    text-decoration: underline;
    /* Standard e-commerce hover */
}

.product-cat {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}

.product-footer {
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 0.75rem;
    /* Removed heavy top border for a flat, modern design */
}

.product-price {
    font-family: var(--font-body);
    /* Sans-serif numbres */
    font-size: 1.1rem;
    /* Slightly smaller */
    font-weight: 700;
    color: var(--text-heading);
    /* Standard dark price */
}

.view-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--bg-soft);
    color: var(--accent-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.view-btn:hover {
    background: var(--accent-primary);
    color: #fff;
    transform: rotate(90deg);
}

/* ── Mobile Filter ── */
#mobileFilterBtn {
    display: none;
    width: 100%;
    margin-bottom: 1.5rem;
    padding: 12px;
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-main);
}

/* ── Responsive ── */
@media (max-width: 992px) {
    .shop-layout {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    #mobileFilterBtn {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .shop-sidebar {
        position: fixed;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%) scale(0.9);
        width: 90%;
        max-width: 400px;
        height: auto;
        max-height: 85vh;
        z-index: 2000;
        background: #fff;
        box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
        padding: 2.5rem 1.5rem 1.5rem;
        transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.2s ease, visibility 0.2s;
        overflow-y: auto;
        opacity: 0;
        visibility: hidden;
        border-radius: var(--radius-md);
    }

    .shop-sidebar.active {
        opacity: 1;
        visibility: visible;
        transform: translate(-50%, -50%) scale(1);
    }

    .sidebar-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        z-index: 1999;
        opacity: 0;
        visibility: hidden;
        transition: var(--transition);
    }

    .sidebar-overlay.active {
        opacity: 1;
        visibility: visible;
    }
}

/* ── Mobile Product Grid (2 Columns) ── */
@media (max-width: 576px) {
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
        /* Tighter gap for mobile */
    }
}