/* Diamond Navigation Sidebar */
.diamond-nav-sidebar {
    position: fixed;
    left: 0;
    top: 115px; /* Adjust based on header height */
    width: 280px;
    height: calc(100vh - 115px);
    background: #ffffff;
    border-right: 1px solid #e0e0e0;
    box-shadow: 2px 0 8px rgba(0,0,0,0.05);
    z-index: 999999;
    overflow-y: auto;
    transition: transform 0.3s ease;
    padding-top: 0px;
}

.sidebar-content {
    padding: 20px;
}

/* Mobile Toggle Button (hidden on desktop) */
.sidebar-toggle-mobile {
    display: none;
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: white;
    border: none;
    border-radius: 50px;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,123,255,0.4);
    z-index: 1000;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.sidebar-toggle-mobile:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0,123,255,0.5);
}

.toggle-icon {
    font-size: 18px;
}

/* Close button at bottom (mobile only) */
.sidebar-close-bottom {
    display: none;
    width: 100px;
    margin: 20px 20px;
    padding: 10px 20px;
    background: #0056b3;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    align-items: center;
    justify-content: center;
    gap: 8px;
    /* box-shadow: 0 2px 8px rgba(220, 53, 69, 0.3); */
    position: absolute;
    bottom: 0px;
    right: 0px;
    font-weight: 600;
}

.sidebar-close-bottom:hover {
    background: #c82333;
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.4);
}

.sidebar-close-bottom svg {
    flex-shrink: 0;
}

/* Filters Title */
.sidebar-filters-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 20px 0;
    padding: 0;
    letter-spacing: -0.5px;
}

/* Active Selection Display */
.sidebar-active-display {
    background: linear-gradient(135deg, #274265 0%, #335a8d 100%);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 24px;
    /* box-shadow: 0 4px 12px rgba(0,123,255,0.3); */
}

.active-display-row {
    margin-bottom: 8px;
}

.active-display-row:last-child {
    margin-bottom: 0;
}

.active-shape-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.active-shape-icon {
    width: 80px;
    height: auto;
    object-fit: contain;
    /* filter: brightness(0) invert(1); */
    /* opacity: 0.95; */
    margin-left: -10px;
}

.active-type,
.active-shape,
.active-carat {
    color: white;
    font-weight: 600;
}

.active-type {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.9;
}

.active-shape {
    font-size: 20px;
    font-weight: 700;
}

.active-carat {
    font-size: 16px;
    opacity: 0.95;
    margin-bottom: 0;
}

/* Sidebar Sections */
.sidebar-section {
    margin-bottom: 16px;
    /* border-bottom: 1px solid #e0e0e0; */
}

.sidebar-section:last-child {
    border-bottom: none;
}

.sidebar-section-header {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: transparent;
    border: none;
    padding: 10px 18px 9px 18px;
    cursor: pointer;
    transition: background 0.3s ease;
    border: 1px solid #f0f0f0;
    border-radius: 7px;
    background: #f8f9fa;
}

.sidebar-section-header:hover {
    background: #f8f9fa;
    border-radius: 8px;
}

.sidebar-section-title {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    color: #333;
    margin: 0;
    letter-spacing: 0.5px;
}

.section-toggle {
    font-size: 20px;
    font-weight: 700;
    color: #666;
    transition: transform 0.3s ease;
}

.sidebar-section:not(.sidebar-section-expanded) .section-toggle {
    transform: rotate(0deg);
}
.sidebar-section-expanded .section-toggle {
    transform: rotate(-90deg);
}

.sidebar-section-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
    padding: 0 8px;
}

.sidebar-section-expanded .sidebar-section-content {
    max-height: 1000px;
    padding: 12px 8px 7px;
}

/* Type Buttons */
.sidebar-type-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.sidebar-type-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 12px 8px;
    /* background: #f8f9fa; */
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    text-decoration: none;
    color: #333;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: pointer;
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
}

.sidebar-type-btn:hover {
    background: #e9ecef;
    border-color: #27426547;
    transform: translateY(-2px);
}

.sidebar-type-btn.active {
    background: linear-gradient(135deg, #274265 0%, #335a8d 100%);
    color: white;
    border-color: #274265;
    /* box-shadow: 0 4px 8px rgba(0,123,255,0.3); */
}

.type-icon {
    font-size: 20px;
    display: none;
}

/* Shape Items */
.sidebar-shapes {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.sidebar-shape-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 12px 8px;
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    text-decoration: none;
    color: #333;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

.sidebar-shape-item:hover {
    background: #e9ecef;
    border-color: #27426547;
    transform: translateY(-2px);
    /* box-shadow: 0 2px 6px rgba(0,123,255,0.2); */
}

.sidebar-shape-item.active {
    background: linear-gradient(135deg, #274265 0%, #335a8d 100%);
    color: white;
    border-color: #274265;
    /* box-shadow: 0 2px 6px rgba(0,123,255,0.3); */
}

.shape-item-icon {
    width: 58px;
    height: 58px;
    object-fit: contain;
    filter: grayscale(100%);
    transition: filter 0.3s ease;
}

.sidebar-shape-item:hover .shape-item-icon {
    filter: grayscale(0%);
}

.sidebar-shape-item.active .shape-item-icon {
    /* filter: brightness(0) invert(1); */
}

.sidebar-shape-item span {
    text-align: center;
    font-weight: 600;
    font-size: 18px;
}

/* Carat Items */
.sidebar-carats {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.sidebar-carat-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    text-decoration: none;
    color: #333;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

.sidebar-carat-item:hover {
    /* background: #e9ecef; */
    /* border-color: #007bff; */
    /* transform: translateX(4px); */
    background: #e9ecef;
    border-color: #27426547;
    /* transform: translateY(-2px); */
}

.sidebar-carat-item.active {
    background: linear-gradient(135deg, #274265 0%, #335a8d 100%);
    color: white;
    border-color: #274265;
    /* box-shadow: 0 2px 6px rgba(0,123,255,0.3); */
}

.carat-label {
    font-weight: 600;
}

.carat-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    background: #28a745;
    color: white;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 10px;
    font-weight: 700;
}

/* Popular Links */
.sidebar-popular {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    padding: 16px;
    border: 1px solid #dee2e6;
}

.popular-links {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.popular-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    background: white;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    text-decoration: none;
    color: #333;
    transition: all 0.3s ease;
}

.popular-link:hover {
    border-color: #007bff;
    transform: translateX(4px);
    box-shadow: 0 2px 6px rgba(0,123,255,0.2);
}

.popular-badge {
    font-size: 11px;
    font-weight: 700;
    color: #007bff;
    text-transform: uppercase;
}

.popular-carat {
    font-size: 14px;
    font-weight: 700;
    color: #333;
}

/* Overlay for mobile */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 899;
    opacity: 0;
    transition: opacity 0.3s ease;
    display: none!important;
}

.sidebar-overlay.active {
    opacity: 1;
    display: block!important;
}

/* Adjust main content when sidebar is present */
.mainStructure {
    margin-left: 0px;
    transition: margin-left 0.3s ease;
    /* padding-left: 280px; */
}

/* Mobile Responsive */
@media (max-width: 1024px) {
    .diamond-nav-sidebar {
        transform: translateX(-100%);
        /* top: 0; */
        /* height: 100vh; */
        z-index: 1001;
    }

    .diamond-nav-sidebar.active {
        transform: translateX(0);
    }

    .sidebar-toggle-mobile {
        display: flex;
        display: none;
    }

    .sidebar-close-bottom {
        display: flex;
        display: none;
    }

    .sidebar-overlay {
        display: block;
    }

    .mainStructure {
        margin-left: 0;
    }

    .sidebar-content {
        padding-top: 41px;
    }
    .mainStructure section{
        padding: 140px 95px 0px 100px;
    }
}

/* Scrollbar styling */
.diamond-nav-sidebar::-webkit-scrollbar {
    width: 6px;
}

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

.diamond-nav-sidebar::-webkit-scrollbar-thumb {
    background: #27426533;
    border-radius: 3px;
}

.diamond-nav-sidebar::-webkit-scrollbar-thumb:hover {
    background: #0056b3;
}


span.section-toggle svg {
    width: 20px;
    height: auto;
}
h3.sidebar-section-title span {
    color: #2563eb!important;
    font-size: 12px;
}