/* Product List UI Styles for Burhani Timber */
/* Enhanced sidebar navigation with theme-consistent styling */

/* Main Product List Container */
.product-list-container {
    background: linear-gradient(45deg, #71594b, #4c3b31, #6b574b, #3f322b);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 15px 35px rgba(80, 64, 55, 0.15);
    border: 2px solid var(--theme-color-bd_color);
    position: relative;
    overflow: hidden;
    margin-bottom: 2rem;
    transition: all 0.3s ease;
}

/* Decorative top border */
.product-list-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--theme-color-text_link), var(--theme-color-text_hover), var(--theme-color-text_link));
    border-radius: 20px 20px 0 0;
}

/* Container hover effect */
.product-list-container:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 45px rgba(80, 64, 55, 0.2);
}

/* Product List Title */
.product-list-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 1.5rem;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    position: relative;
    padding-bottom: 1rem;
}

.product-list-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--theme-color-text_link), var(--theme-color-text_hover));
    border-radius: 2px;
}

/* Search Container */
.product-list-search {
    margin-bottom: 2rem;
    position: relative;
}

.product-list-search input {
    width: 100%;
    padding: 1rem 3rem 1rem 1.2rem; /* Added right padding for icon */
    border: 2px solid var(--theme-color-bd_color);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.95);
    color: #333333; /* Dark text color for visibility */
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    position: relative;
}

.product-list-search input::placeholder {
    color: var(--theme-color-text_light);
    font-style: italic;
}

.product-list-search input:focus {
    outline: none;
    border-color: var(--theme-color-text_link);
    box-shadow: 0 6px 20px rgba(177, 136, 87, 0.2);
    transform: translateY(-1px);
    background: rgba(255, 255, 255, 1);
    color: #000000; /* Darker text color when focused */
}

/* Search icon animation on focus */
.product-list-search input:focus + .product-list-search::before {
    color: var(--theme-color-text_link);
    transform: translateY(-50%) scale(1.1);
}

/* Search icon */
.product-list-search::before {
    content: '\f002';
    font-family: 'FontAwesome';
    position: absolute;
    right: 1.2rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.1rem;
    color: var(--theme-color-text_link);
    pointer-events: none;
    z-index: 2;
    font-weight: 900;
}

/* Product List */
.product-list {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 400px;  
    overflow-y: scroll;
    scrollbar-width: none;
    -ms-overflow-style: none;
    position: relative;
    scroll-behavior: smooth;
    padding-right: 0;
    border-right: none;
}

/* Hide scrollbar for webkit browsers */
.product-list::-webkit-scrollbar {
    display: none;
    width: 0;
    background: transparent;
}

/* Product List Items */
.product-list-item {
    margin-bottom: 0.5rem;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
}

.product-list-item:last-child {
    margin-bottom: 0;
}

/* Product Links */
.product-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.2rem;
    color: #ffffff !important;
    text-decoration: none !important;
    font-weight: 500;
    font-size: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

/* Hover effect for product links */
.product-link:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--theme-color-text_link);
    color: #ffffff !important;
    transform: translateX(5px);
    box-shadow: 0 4px 15px rgba(177, 136, 87, 0.3);
    text-decoration: none;
    font-weight: 500;
    font-size: 1rem;
}

/* Active state for product links */
.product-link.active {
    background: linear-gradient(135deg, var(--theme-color-text_link), var(--theme-color-text_hover));
    border-color: var(--theme-color-text_link);
    color: #ffffff !important;
    transform: translateX(8px);
    box-shadow: 0 6px 20px rgba(177, 136, 87, 0.4);
    font-weight: 600;
    text-decoration: none;
    font-size: 1rem;
}

/* Glowing effect for active items */
.product-link.active::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Product counter badge */
.product-link::after {
    content: attr(data-count);
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.3rem 0.6rem;
    border-radius: 8px;
    min-width: 24px;
    text-align: center;
    transition: all 0.3s ease;
}

.product-link:hover::after {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.product-link.active::after {
    background: rgba(255, 255, 255, 0.4);
    transform: scale(1.2);
}

/* Hidden items for search functionality */
.product-list-item.hidden {
    display: none;
    opacity: 0;
    transform: translateX(-20px);
}

/* Loading animation */
.product-list-container.loading {
    position: relative;
    overflow: hidden;
}

.product-list-container.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* Product card highlight effect */
.product-card.highlighted {
    animation: highlightPulse 3s ease-in-out;
    border-color: var(--theme-color-text_link);
    box-shadow: 0 0 30px rgba(177, 136, 87, 0.6);
}

@keyframes highlightPulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 6px 25px rgba(0, 0, 0, 0.1);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 0 40px rgba(177, 136, 87, 0.8);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .product-list-container {
        padding: 1.5rem;
        margin-bottom: 1.5rem;
    }
    
    .product-list-title {
        font-size: 1.5rem;
        margin-bottom: 1rem;
    }
    
    .product-list-search input {
        padding: 0.8rem 1rem;
        font-size: 0.9rem;
    }
    
    .product-link {
        padding: 0.8rem 1rem;
        font-size: 0.9rem;
    }
    
    .product-list {
        max-height: 350px;
        overflow-y: scroll;
    }
}

@media (max-width: 576px) {
    .product-list-container {
        padding: 1rem;
        border-radius: 15px;
    }
    
    .product-list-title {
        font-size: 1.3rem;
        letter-spacing: 1px;
    }
    
    .product-link {
        padding: 0.7rem 0.8rem;
        font-size: 0.85rem;
    }
    
    .product-link::after {
        font-size: 0.7rem;
        padding: 0.2rem 0.4rem;
        min-width: 20px;
    }
}

/* Accessibility improvements */
.product-link:focus {
    outline: 2px solid var(--theme-color-text_link);
    outline-offset: 2px;
    color: #ffffff !important;
    text-decoration: none !important;
}

/* Ensure text styling is preserved in all states */
.product-link,
.product-link:hover,
.product-link:focus,
.product-link:active,
.product-link.active {
    color: #ffffff !important;
    text-decoration: none !important;
    font-family: inherit;
    line-height: 1.4;
}

/* Prevent any default link styling from overriding */
.product-link:visited {
    color: #ffffff !important;
    text-decoration: none !important;
}

/* Ensure text is always visible and properly styled */
.product-link span,
.product-link strong,
.product-link em {
    color: inherit !important;
    font-weight: inherit !important;
    font-style: inherit !important;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .product-list-container {
        border-width: 3px;
    }
    
    .product-link {
        border-width: 2px;
    }
    
    .product-link.active {
        border-width: 3px;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .product-list-container,
    .product-link,
    .product-card {
        transition: none;
        animation: none;
    }
    
    .product-link:hover {
        transform: none;
    }
    
    .product-link.active {
        transform: none;
    }
}

/* Dark mode support (if needed) */
@media (prefers-color-scheme: dark) {
    .product-list-search input {
        background: rgba(0, 0, 0, 0.3);
        color: #ffffff;
    }
    
    .product-list-search input::placeholder {
        color: rgba(255, 255, 255, 0.7);
    }
}

/* Print styles */
@media print {
    .product-list-container {
        background: #ffffff;
        color: #000000;
        box-shadow: none;
        border: 1px solid #000000;
    }
    
    .product-list-title {
        color: #000000;
    }
    
    .product-link {
        color: #000000;
        background: #f5f5f5;
        border: 1px solid #000000;
    }
}


