/* --- Collection Page Premium Styles --- */
.collection-page-wrapper {
    padding: 20px 5% 60px;
}

/* 1. Pill Breadcrumbs */
.breadcrumb-nav {
    margin-bottom: 30px;
    margin-top: 20px;
}

.breadcrumb-pill {
    display: inline-flex;
    align-items: center;
    background: #f1f1f1;
    padding: 6px 18px;
    border-radius: 100px;
    gap: 12px;
}

.breadcrumb-pill a {
    text-decoration: none;
    color: #666;
    font-size: 13px;
    font-weight: 500;
    transition: color 0.2s;
}

.breadcrumb-pill a:hover {
    color: var(--primary-blue);
}

.breadcrumb-divider {
    width: 1px;
    height: 12px;
    background: #ccc;
}

.current-page {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-dark);
}

/* 2. Brutalist-Apple Typography */
.main-title {
    font-size: 4rem; /* Responsive size */
    font-weight: 800;
    letter-spacing: -2px;
    color: var(--text-dark);
    margin-bottom: 40px;
}

/* 3. Glassmorphic Action Bar */
.action-bar-glass {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-light);
    border-radius: 24px;
 }

/* 4. Filter Button with Primary Blue Accent */
.filter-trigger {
    display: flex;
    align-items: center;
    gap: 12px;
    background: transparent;
    border: none;
    cursor: pointer;
    font-family: var(--font-main);
    font-size: 15px;
    font-weight: 600;
    color: var(--text-dark);
}

.filter-icon-circle {
    width: 38px;
    height: 38px;
    background: var(--text-dark);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.filter-trigger:hover .filter-icon-circle {
    background: var(--primary-blue);
    transform: rotate(90deg);
}

/* 5. Sort Dropdown Pill */
.sort-selector-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sort-selector-wrapper label {
    font-size: 14px;
    color: #888;
}

.custom-select-pill {
    background: var(--white);
    border: 1px solid var(--border-medium);
    padding: 10px 20px;
    border-radius: 100px;
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: border-color 0.3s;
}

.custom-select-pill:hover {
    border-color: var(--primary-blue);
}

.custom-select-pill i {
    font-size: 10px;
    color: var(--primary-blue);
}

/* Styling for the Home PNG in breadcrumbs */
.breadcrumb-icon {
    width: 16px;  /* Adjust size to match text height */
    height: 16px;
    display: block;
    object-fit: contain;
}

/* Styling for the Filter PNG */
.filter-png-icon {
    width: 20px;  /* Adjust based on your PNG's padding */
    height: 20px;
    object-fit: contain;
    filter: brightness(0) invert(1);
    display: block; 
}

/* Optional: If your PNG is black and you want it to turn white on hover */
.filter-trigger:hover .filter-png-icon {
    filter: brightness(0) invert(1);
}

 
/* --- Mobile Optimized CSS (Max-width: 768px) --- */
@media (max-width: 768px) {
    /* Reduce outer container breathing room */
    .collection-page-wrapper {
        padding: 15px 15px 40px;
    }

    /* 1. Compact Breadcrumbs */
    .breadcrumb-nav {
        margin-bottom: 20px;
    }
    
    .breadcrumb-pill {
        padding: 4px 12px;
        gap: 8px;
    }
    
    .breadcrumb-pill a, .current-page {
        font-size: 11px;
    }

    /* 2. Scaled Down Typography */
    .main-title {
        font-size: 2.2rem; /* Much smaller for mobile screens */
        letter-spacing: -1px;
        margin-bottom: 20px;
        line-height: 1.1;
    }

    /* 3. Slimmed Glass Action Bar */
    .action-bar-glass {
        padding: 8px 12px;
        border-radius: 16px;
    }

    /* 4. Filter Button Adjustments */
    .filter-trigger {
        gap: 8px;
        font-size: 13px;
    }

    .filter-icon-circle {
        width: 32px;
        height: 32px;
    }

    .filter-png-icon {
        width: 16px;
        height: 16px;
    }

    /* 5. Compact Sort Selector */
    .sort-selector-wrapper label {
        display: none; /* Hide "Sort by:" text to save width */
    }

    .custom-select-pill {
        padding: 8px 14px;
        font-size: 13px;
        gap: 8px;
    }

    /* Ensure the breadcrumb icon stays small */
    .breadcrumb-icon {
        width: 14px;
        height: 14px;
    }
}




/* --- Shop Section Base --- */
.shop-collection-section {
    padding: 20px 5%;
    background: #f8f9fa;
    overflow: hidden;
}

.shop-shelf-header {
    display: flex;
    justify-content: flex-start;
    margin-bottom: 10px;
}

.shop-main-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1d1d1f;
    letter-spacing: -1px;
}

/* --- Horizontal Scrolling Logic --- */
.shop-products-container {
    display: grid;
    /* This creates 4 equal columns on PC */
    grid-template-columns: repeat(4, 1fr); 
    gap: 20px;
    padding: 20px 0;
    /* Removed overflow-x: auto so it wraps downwards */
}
 

/* --- Card Styling --- */
.shop-card {
    /* Removed flex properties that caused the horizontal scroll */
    width: 100%; 
    background: #ffffff;
    border-radius: 20px;
    text-align: center;
    transition: transform 0.3s ease;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(0,0,0,0.05);
}

/* --- Responsive Overrides (Tablet/Laptop) --- */
@media (max-width: 1024px) {
    .shop-products-container {
        grid-template-columns: repeat(3, 1fr); /* 3 items for small laptops */
    }
}
 

/* --- Image & Actions --- */
.shop-image-wrapper {
    position: relative;
    width: 100%;
    line-height: 0;
}

.shop-img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

.shop-card-actions {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    display: flex;
    gap: 10px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 5;
}

.shop-card:hover .shop-card-actions {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.shop-action-btn {
    width: 40px;
    height: 40px;
    background: #ffffff;
    border: none;
    border-radius: 50%;
    color: #1d1d1f;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transition: all 0.2s ease;
}

.shop-action-btn:hover {
    background: var(--primary-blue);
    color: #ffffff;
}

/* --- Info Area --- */
.shop-info-area {
    padding: 20px;
}

.shop-brand {
    font-size: 10px;
    letter-spacing: 2px;
    color: #86868b;
    display: block;
    margin-bottom: 5px;
}

.shop-product-link {
    text-decoration: none;
    color: #1d1d1f;
    font-size: 18px;
    font-weight: 600;
    display: block;
    margin-bottom: 8px;
    transition: color 0.2s;
}

.shop-product-link:hover {
    color: var(--primary-blue);
}

.shop-price {
    font-size: 14px;
    color: #424245;
    margin-bottom: 15px;
}

/* --- Swatches --- */
.shop-swatches {
    display: flex;
    justify-content: center;
    gap: 8px;
}

.shop-swatch {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 1px solid rgba(0,0,0,0.1);
}

.shop-swatch.orange { background: #f9a03f; }
.shop-swatch.silver { background: #d2d2d7; }
.shop-swatch.blue   { background: #27445a; }

/* --- View All Button (Animated) --- */
.shop-controls-bottom {
    display: flex;
    justify-content: center;
    margin-top: 40px;
}

.shop-view-all-btn {
    padding: 12px 30px;
    background: linear-gradient(135deg, #050505, #494949, #050505);
    background-size: 200% 200%;
    animation: subtleSweep 7s ease-in-out infinite;
    color: #ffffff;
    text-decoration: none;
    border-radius: 30px;
    font-size: 15px;
    font-weight: 500;
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: all 0.4s;
}

.shop-view-all-btn:hover {
    background: #0071e3;
    transform: translateY(-2px);
}

@keyframes subtleSweep {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}
/* --- Updated Mobile Responsive Overrides --- */
@media (max-width: 768px) {
    .shop-collection-section {
        padding: 20px 15px; /* Reduced padding */
    }

    .shop-main-title {
        font-size: 1.5rem; /* Smaller title */
        margin-bottom: 10px;
    }

    .shop-products-container {
        display: grid;
        grid-template-columns: repeat(2, 1fr); /* Exactly 2 items per row */
        gap: 12px; /* Tighter gap */
        overflow-x: visible; /* Disable horizontal scroll */
        padding: 10px 0;
    }

    .shop-card {
        min-width: unset; /* Remove the 280px restriction */
        flex: unset;
        border-radius: 12px; /* Slightly sharper corners for small scale */
    }

    /* Reduce text sizes for mobile */
    .shop-info-area {
        padding: 12px 8px;
    }

    .shop-brand {
        font-size: 8px; /* Tiny brand text */
        margin-bottom: 2px;
    }

    .shop-product-link {
        font-size: 14px; /* Smaller product name */
        margin-bottom: 4px;
        line-height: 1.2;
    }

    .shop-price {
        font-size: 12px; /* Smaller price */
        margin-bottom: 10px;
    }

    .shop-swatch {
        width: 10px; /* Smaller color dots */
        height: 10px;
    }

    

    .shop-action-btn {
        width: 32px;
        height: 32px;
        font-size: 12px;
        background: rgba(255, 255, 255, 0.95);
    }
    
    .shop-view-all-btn {
        width: 100%; /* Make button full width on mobile */
        text-align: center;
        padding: 10px;
        font-size: 14px;
    }
}
/* --- Mobile Optimized Shop Actions --- */
@media (max-width: 768px) {
    
    /* 1. Perfectly Centered Action Container */
    .shop-card-actions {
        display: flex;
        position: absolute;   /* Ensure absolute positioning is active */
        left: 50%;            /* Move to horizontal center */
        bottom: 5px;         /* Tighter to the bottom for mobile */
        transform: translateX(-50%) translateY(10px); /* Center back and offset for animation */
        gap: 8px;             /* Better spacing for thumb taps */
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 10;
    }

    /* 2. Show buttons when the card is active/tapped */
    .shop-card.mobile-active .shop-card-actions {
        opacity: 1;
        visibility: visible;
        transform: translateX(-50%) translateY(0); /* Final centered position */
    }

    /* 3. Visual Feedback for Active Card */
    .shop-card.mobile-active {
        border-color: var(--primary-blue);
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
        transform: translateY(-2px); /* Slight lift on tap */
    }

    /* 4. Balanced Button Sizes for Touch */
    .shop-action-btn {
        width: 34px;          /* Slightly larger than your 30px for better UX */
        height: 34px;
        font-size: 12px;
        background: rgba(255, 255, 255, 0.98);
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
        border: none;
    }

    /* 5. Icon Alignment fix */
    .shop-action-btn i, 
    .shop-action-btn svg {
        display: block;
        line-height: 1;
    }
}

/* Target the label immediately after a checked hidden input */
.filter-pills input:checked + .pill {
    background: var(--primary-blue);
    color: #ffffff;
    border-color: var(--primary-blue);
    transform: scale(1.05);
 }/* Base Style for the color circle */
.color-box {
    position: relative;
    border: 2px solid #eee;
}

/* Hover Effect */
.color-box:hover {
    transform: scale(1.1);
    border-color: #bbb;
}

/* ACTIVE / SELECTED STYLE */
/* This adds a blue ring around the color dot when it is selected */
.color-box.active {
    border-color: #fff; /* White inner border */
    box-shadow: 0 0 0 2px var(--primary-blue); /* Primary Blue outer ring */
    transform: scale(1.1);
}

/* Optional: Add a tiny checkmark icon inside the active color box */
.color-box.active::after {
    content: '\f00c'; /* FontAwesome check icon */
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    font-size: 10px;
    color: white;
    /* Basic centering */
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    /* Text shadow to make it visible on light colors */
    text-shadow: 0px 0px 3px rgba(0,0,0,0.5);
}

/* Optional: Add a smooth transition to the base .pill class if you haven't */
.pill {
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-block;
    cursor: pointer;
    user-select: none; /* Prevents text highlighting on double tap */
}
/* --- 1. Filter Sidebar Base Structure --- */
.filter-sidebar {
    position: fixed;
    top: 0;
    left: -450px; /* Hidden off-screen left */
    width: 400px;
    height: 100vh;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(25px);
    box-shadow: 10px 0 40px rgba(0,0,0,0.08);
    z-index: 4000;
    transition: all 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
    
    /* Layout Logic: Vertical Stack */
    display: flex;
    flex-direction: column;
    padding: 0; 
    overflow: hidden;
}

.filter-sidebar.open { 
    left: 0; 
}

/* PC Desktop Curve (Mirror of your Cart Sidebar) */
@media screen and (min-width: 1025px) {
    .filter-sidebar {
        border-top-right-radius: 60px;
        border-bottom-right-radius: 60px;
        border: 1px solid rgba(0, 0, 0, 0.05);
        border-left: none;
    }
}

/* --- 2. Fixed Header Section --- */
.filter-sidebar .sidebar-header {
    padding: 35px 30px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: transparent;
}

.filter-sidebar .sidebar-header h3 {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: var(--font-main);
    font-weight: 800;
    font-size: 1.8rem;
    color: var(--text-dark);
    letter-spacing: -0.8px;
}

/* --- 3. Scrollable Filter Content --- */
.filter-sidebar-content {
    flex: 1; /* Grows to fill available space */
    overflow-y: auto; /* Enables scrolling for long filter lists */
    padding: 10px 30px 30px 30px;
    
    /* Premium Apple-style Scrollbar */
    scrollbar-width: thin;
    scrollbar-color: #d2d2d7 transparent;
}

.filter-sidebar-content::-webkit-scrollbar {
    width: 5px;
}

.filter-sidebar-content::-webkit-scrollbar-thumb {
    background: #d2d2d7;
    border-radius: 10px;
}

/* Filter Group Containers */
.filter-group {
    margin-bottom: 30px;
}

.filter-group h4 {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #86868b;
    margin-bottom: 15px;
    font-weight: 700;
}

/* Checkbox & Radio Style */
.filter-check {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    font-size: 15px;
    color: var(--text-dark);
    cursor: pointer;
    transition: color 0.2s;
}

.filter-check:hover { color: var(--primary-blue); }

.filter-check input {
    width: 18px;
    height: 18px;
    accent-color: var(--primary-blue);
    cursor: pointer;
}

.filter-check small {
    margin-left: auto;
    color: #bfbfbf;
    font-weight: 500;
}

/* Price Input Fields */
.price-input-flex {
    display: flex;
    gap: 12px;
    align-items: center;
}

.price-field {
    flex: 1;
    background: #f5f5f7;
    padding: 10px 15px;
    border-radius: 14px;
    border: 1px solid transparent;
    transition: border-color 0.3s;
}

.price-field:focus-within { border-color: #d2d2d7; }

.price-field span {
    display: block;
    font-size: 9px;
    color: #86868b;
    text-transform: uppercase;
    font-weight: 700;
    margin-bottom: 2px;
}

.price-field input {
    width: 100%;
    background: transparent;
    border: none;
    outline: none;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dark);
    font-family: var(--font-main);
}

/* Condition & Storage Pills */
.filter-pills {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.pill {
    padding: 10px 20px;
    border: 1px solid #d2d2d7;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    background: #fff;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.pill:hover { border-color: #86868b; }

.pill.active {
    background: var(--primary-blue);
    color: white;
    border-color: var(--primary-blue);
 }

/* Color Dots */
.filter-colors {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.color-dot {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid #fff;
    box-shadow: 0 0 0 1px #d2d2d7;
    transition: transform 0.2s ease;
}

.color-dot:hover { transform: scale(1.15); }

.color-dot.active {
    box-shadow: 0 0 0 2px var(--primary-blue);
}

/* --- 4. Fixed Sticky Footer --- */
.filter-sidebar .cart-footer-actions {
    margin-top: auto;
    padding: 25px 30px 40px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-top: 1px solid #f2f2f7;
    z-index: 10;
}

/* --- 5. Mobile Adjustments (Bottom Sheet Style) --- */
@media (max-width: 768px) {
    .filter-sidebar {
        left: 0 !important;
        bottom: -100%; /* Hidden at bottom */
        top: auto;
        width: 100%;
        height: 88vh; /* Leave gap at top for "Apple" look */
        border-radius: 40px 40px 0 0;
        transition: bottom 0.6s cubic-bezier(0.32, 0.72, 0, 1);
    }

    .filter-sidebar.open {
        bottom: 0;
    }

    /* Grab Handle for Mobile */
    .filter-sidebar::before {
        content: '';
        position: absolute;
        top: 12px;
        left: 50%;
        transform: translateX(-50%);
        width: 45px;
        height: 5px;
        background: #d2d2d7;
        border-radius: 10px;
    }

    .filter-sidebar .sidebar-header {
        padding: 30px 25px 15px;
    }

    .filter-sidebar-content {
        padding: 10px 25px;
    }

    .filter-sidebar .cart-footer-actions {
        padding: 20px 25px calc(20px + env(safe-area-inset-bottom));
    }
    
    /* Hide the PC close button on mobile, use overlay/swipe */
    .filter-sidebar .close-pc-sidebar {
        display: none !important;
    }
}