/* Premium Modern eCommerce Shop Catalog CSS */
body {
    background: #f4f5f7; /* Soft luxurious off-white to make the white cards pop */
}

.shop-breadcrumbs-bar {
    background: var(--white);
    border-bottom: 1px solid var(--border-light);
    padding: 1.5rem 0;
    margin-bottom: 2rem;
}

.shop-page-title {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-top: 0.5rem;
}

.item-count {
    color: var(--text-secondary);
    font-size: 1.2rem;
    font-weight: 400;
}

.shop-layout {
    display: flex;
    gap: 30px;
    align-items: flex-start;
    padding-bottom: 5rem;
}

/* Sidebar Styling */
.filter-sidebar {
    width: 250px;
    flex-shrink: 0;
    position: sticky;
    top: 100px; /* Below sticky header */
    height: calc(100vh - 120px);
    overflow-y: auto;
    border: 1px solid var(--border-light);
    border-radius: 12px;
    background: var(--white);
    padding: 1.5rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.02);
}

.filter-sidebar::-webkit-scrollbar {
    width: 4px;
}

.filter-sidebar::-webkit-scrollbar-track {
    background: #f1f1f1; 
}

.filter-sidebar::-webkit-scrollbar-thumb {
    background: #ccc; 
    border-radius: 4px;
}

.filter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.filter-header h3 {
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 1px;
    color: var(--text-primary);
}

.clear-all {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--theme-color, #ff3e6c); /* Myntra pinkish accent or var(--primary) */
    text-decoration: none;
    text-transform: uppercase;
}

.filter-group {
    padding: 1.2rem 0;
    border-top: 1px solid var(--border-light);
}

.border-none {
    border-bottom: 1px solid var(--border-light);
}

.filter-title {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
}

.filter-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Custom Checkbox/Radio */
.custom-checkbox, .custom-radio {
    display: flex;
    align-items: center;
    position: relative;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--text-secondary);
    user-select: none;
}

.custom-checkbox input, .custom-radio input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.check-mark, .radio-mark {
    width: 16px;
    height: 16px;
    border: 1px solid #ccc;
    margin-right: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
}

.custom-checkbox .check-mark {
    border-radius: 2px;
}

.custom-radio .radio-mark {
    border-radius: 50%;
}

.custom-checkbox:hover .check-mark, .custom-radio:hover .radio-mark {
    border-color: #888;
}

.custom-checkbox input:checked ~ .check-mark,
.custom-radio input:checked ~ .radio-mark {
    background-color: var(--theme-color, #ff3e6c);
    border-color: var(--theme-color, #ff3e6c);
}

.check-mark:after, .radio-mark:after {
    content: "";
    display: none;
}

.custom-checkbox input:checked ~ .check-mark:after,
.custom-radio input:checked ~ .radio-mark:after {
    display: block;
}

.custom-checkbox .check-mark:after {
    width: 4px;
    height: 8px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
    margin-bottom: 2px;
}

.custom-radio .radio-mark:after {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: white;
}

.filter-label {
    flex: 1;
}

.filter-count {
    font-size: 0.8rem;
    color: #999;
    margin-left: 5px;
}

/* Grid Section Layout */
.shop-grid-section {
    flex: 1;
    min-width: 0; /* Prevents flex blowout */
}

/* Sort Header */
.sort-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid var(--border-light);
    border-radius: 12px;
    background: var(--white);
    padding: 1rem 1.5rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.02);
    margin-bottom: 2rem;
}

.quick-links {
    display: flex;
    gap: 1.5rem;
    list-style: none;
}

.quick-links a {
    text-decoration: none;
    font-size: 0.95rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.quick-links a:hover, .quick-links a.active {
    color: var(--text-primary);
    border-bottom: 2px solid var(--text-primary);
    padding-bottom: 0.5rem;
}

.sort-dropdown {
    position: relative;
    padding: 8px 15px;
    border: 1px solid var(--border-light);
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Product Grid (Myntra Style Cards) */
.shop-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 30px;
}

.shop-item-card {
    position: relative;
    transition: all 0.3s ease;
    border: 1px solid var(--border-light);
    border-radius: 12px;
    background: var(--white);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.shop-item-card:hover {
    box-shadow: 0 12px 30px rgba(0,0,0,0.06);
    transform: translateY(-4px);
    border-color: #e5e5e5;
}

.shop-item-image {
    position: relative;
    display: block;
    overflow: hidden;
    background: #f5f5f5;
    padding-top: 133%; /* 3:4 Aspect Ratio roughly */
}

.shop-item-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.shop-item-card:hover .shop-item-image img {
    transform: scale(1.05);
}

.product-actions-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    transform: translateY(100%);
    transition: transform 0.3s ease;
    display: flex;
    border-top: 1px solid var(--border-light);
}

.shop-item-card:hover .product-actions-overlay {
    transform: translateY(0);
}

.action-btn {
    flex: 1;
    text-align: center;
    padding: 12px 0;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    cursor: pointer;
}

.action-btn:hover {
    color: var(--theme-color, #ff3e6c);
}

.shop-item-info {
    padding: 16px 14px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.shop-item-brand {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.shop-item-name {
    font-size: 0.9rem;
    color: var(--text-secondary);
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 8px;
    text-decoration: none;
}

.shop-item-price-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
}

.shop-item-price {
    font-weight: 600;
    color: var(--text-primary);
}

.shop-item-price-strike {
    color: #999;
    text-decoration: line-through;
    font-size: 0.85rem;
}

.shop-item-discount {
    color: #ff905a;
    font-size: 0.8rem;
    font-weight: 500;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 4rem;
    gap: 10px;
    border-top: 1px solid var(--border-light);
    padding-top: 2rem;
}

.page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 0.95rem;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.page-link.active {
    background: var(--text-primary);
    color: var(--white);
    font-weight: 500;
}

.page-link:hover:not(.active):not(.dots) {
    background: #f1f1f1;
}

.page-link.next {
    width: auto;
    padding: 0 15px;
    gap: 5px;
}

/* Responsive */
@media (max-width: 900px) {
    .shop-layout {
        flex-direction: column;
    }
    .filter-sidebar {
        display: none; /* Hide by default to save space */
        width: 100%;
        height: auto;
        position: static;
        border-bottom: 1px solid var(--border-light);
        margin-bottom: 1.5rem;
    }
    .filter-sidebar.active {
        display: block !important; /* Show when toggled */
    }
    .mobile-filter-bar {
        display: flex !important;
    }
    .sort-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    .shop-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
}

/* Out of Stock card overlay */
.out-of-stock-card {
    opacity: 0.75;
}
.oos-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.35);
    display: flex;
    align-items: center;
    justify-content: center;
}
.oos-overlay span {
    background: #fff;
    color: #991b1b;
    font-weight: 700;
    font-size: 0.85rem;
    padding: 6px 16px;
    border-radius: 100px;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.15);
}
