/* Main Layout */
.main-content {
    display: flex;
    gap: 2rem;
    padding: 0 1rem;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

/* Search Header */
.search-header {
    background-color: #f8f9fa;
    padding: 2rem 0;
    margin-bottom: 2rem;
    border-bottom: 1px solid #e9ecef;
}

.search-form {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 1rem;
    position: relative;
}

.search-form .input-group {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    align-items: stretch;
    border: none !important;
}

.search-form input.form-control {
    border: 1px solid #e0e0e0 !important;
    padding: 1rem 1.5rem;
    font-size: 1.1rem;
    height: auto;
    border-radius: 0 !important;
    border-right: none !important;
    outline: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
    transition: border-color 0.3s ease;
    box-shadow: none !important;
}

.search-form input.form-control:focus,
.search-form input.form-control:focus-within,
.search-form input.form-control:active,
.search-form input.form-control:focus-visible {
    box-shadow: none !important;
    border-color: #e0e0e0 !important;
    outline: none !important;
}

.search-form input.form-control:-webkit-autofill,
.search-form input.form-control:-webkit-autofill:hover,
.search-form input.form-control:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0 30px white inset !important;
    -webkit-text-fill-color: inherit !important;
    transition: background-color 5000s ease-in-out 0s;
    border-color: #e0e0e0 !important;
}

/* Override Bootstrap's default focus styles */
.form-control:focus {
    border-color: #e0e0e0 !important;
    box-shadow: none !important;
    outline: none !important;
}

/* Remove any potential outline from the input group */
.input-group:focus-within {
    box-shadow: none !important;
    outline: none !important;
}

/* Ensure no border appears on the right side of the input */
.search-form .input-group > .form-control:not(:last-child) {
    border-top-right-radius: 12px !important;
    border-bottom-right-radius: 12px !important;
    border-right: none !important;
}

.search-form .btn-primary {
    padding: 0.75rem 2rem;
    font-size: 1.1rem;
    background-color: #FFDB58;
    border: 1px solid #e0e0e0 !important;
    border-left: none !important;
    color: #333;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    border-radius: 0 !important;
    min-width: 140px;
    justify-content: center;
    box-shadow: none !important;
}

.search-form .btn-primary i {
    font-size: 1.2rem;
}

.search-form .btn-primary span {
    display: inline-block;
}

.search-form .btn-primary:hover {
    background-color: #e6c13d;
    color: #222;
    transform: translateY(-1px);
    box-shadow: none !important;
}

.search-form .btn-primary:active {
    transform: translateY(0);
    box-shadow: none !important;
}

/* Filter Toggle Button */
.filter-toggle-btn {
    display: none;
    width: 100%;
    padding: 0.75rem;
    margin-bottom: 1rem;
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    font-weight: 500;
    color: #495057;
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-toggle-btn:hover {
    background-color: #e9ecef;
}

.filter-toggle-btn i {
    margin-left: 0.5rem;
    transition: transform 0.2s ease;
}

.filter-toggle-btn.active i {
    transform: rotate(180deg);
}

/* Filters Sidebar */
.filters-sidebar {
    width: 280px;
    flex-shrink: 0;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.05);
    padding: 1.5rem;
    height: fit-content;
    position: sticky;
    top: 2rem;
    transition: all 0.3s ease;
}

.filter-section {
    margin-bottom: 1.5rem;
}

.filter-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e9ecef;
}

.filter-group {
    margin-bottom: 1.5rem;
    width: 100%;
    padding: 0;
}

.filter-group h5 {
    font-size: 1rem;
    font-weight: 600;
    color: #495057;
    margin-bottom: 1rem;
}

.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #6c757d;
    cursor: pointer;
    transition: color 0.2s ease;
}

.checkbox-item:hover {
    color: #007bff;
}

.checkbox-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    border-radius: 4px;
    border: 2px solid #dee2e6;
    cursor: pointer;
}

.price-range input {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    font-size: 0.9rem;
}

/* Search Results */
.search-results {
    flex: 1;
    min-width: 0;
}





.dorsa-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 50%, #e9ecef 100%);
    position: relative;
    overflow: hidden;
}

.dorsa-placeholder::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, 
        rgba(255,255,255,0.1) 25%, 
        transparent 25%, 
        transparent 50%, 
        rgba(255,255,255,0.1) 50%, 
        rgba(255,255,255,0.1) 75%, 
        transparent 75%, 
        transparent);
    background-size: 20px 20px;
    opacity: 0.5;
}

.dorsa-placeholder span {
    font-size: 3rem;
    font-weight: 800;
    color: #2c3e50;
    opacity: 0.08;
    letter-spacing: 4px;
    transform: rotate(-15deg);
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
    position: relative;
    z-index: 1;
}

.dorsa-placeholder::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 150px;
    height: 150px;
    background: radial-gradient(circle, rgba(255,255,255,0.8) 0%, rgba(255,255,255,0) 70%);
    border-radius: 50%;
    z-index: 0;
}

.product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.product-header {
    margin-bottom: 10px;
}

.product-header h3 {
    margin: 0 0 5px 0;
    font-size: 1.2rem;
    color: #333;
}

.product-header .brand-name {
    margin: 0;
    font-weight: 700;
    color: #2c3e50;
    font-size: 1rem;
}

.product-codes {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.product-code {
    display: inline-block;
    padding: 4px 8px;
    background-color: #f5f5f5;
    border-radius: 4px;
    font-family: monospace;
    direction: ltr;
    font-size: 0.85rem;
    color: #495057;
    border: 1px solid #e9ecef;
}

.product-code:hover {
    background-color: #e9ecef;
    border-color: #dee2e6;
}

.product-details {
    color: #444;
    margin-bottom: 12px;
    font-size: 0.9rem;
}

.product-details p {
    margin: 4px 0;
}

.product-details p:last-child {
    font-weight: 700;
    color: #2c3e50;
    font-size: 1rem;
}

.product-price {
    color: #e44d26;
    font-weight: bold;
    font-size: 1.1rem;
}

/* Pagination Styles */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 3rem;
    padding: 1rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.05);
}

.pagination-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.pagination button {
    background-color: white;
    color: #2c3e50;
    border: 2px solid #e9ecef;
    padding: 0.75rem 1.25rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 120px;
    justify-content: center;
}

.pagination button:hover {
    background-color: #007bff;
    color: white;
    border-color: #007bff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.15);
}

.pagination button:active {
    transform: translateY(0);
}

.pagination button i {
    font-size: 0.9rem;
}

.pagination-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0 1rem;
    color: #6c757d;
    font-size: 0.95rem;
}

.pagination-info .current-page {
    background-color: #007bff;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-weight: 600;
    min-width: 40px;
    text-align: center;
}

.pagination-info .total-pages {
    color: #495057;
    font-weight: 500;
}

.pagination-info .separator {
    color: #dee2e6;
}

.pagination-info .total-items {
    color: #6c757d;
    font-size: 0.9rem;
}

/* Responsive Pagination */
@media (max-width: 768px) {
    .pagination {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }

    .pagination-controls {
        width: 100%;
        justify-content: space-between;
    }

    .pagination button {
        min-width: 100px;
        padding: 0.6rem 1rem;
    }

    .pagination-info {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }

    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
}

/* Loading State */
.loading {
    text-align: center;
    padding: 2rem;
    color: #666;
}

.loading::after {
    content: '';
    display: inline-block;
    width: 2rem;
    height: 2rem;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Error and No Results States */
.error-message, .no-results {
    text-align: center;
    padding: 3rem;
    color: #6c757d;
}

.error-message i, .no-results i {
    font-size: 3rem;
    color: #dc3545;
    margin-bottom: 1rem;
}

.no-results i {
    color: #6c757d;
}

/* Responsive Design */
@media (max-width: 992px) {
    .main-content {
        flex-direction: column;
    }

    .filter-toggle-btn {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .filters-sidebar {
        width: 100%;
        position: static;
        margin-bottom: 2rem;
        display: none;
    }

    .filters-sidebar.show {
        display: block;
    }

    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
}

@media (max-width: 768px) {
    .search-header {
        padding: 1.5rem 0;
    }

    .search-form {
        padding: 0 0.75rem;
    }

    .search-form .input-group {
        border-radius: 10px;
    }

    .search-form input.form-control {
        padding: 0.875rem 1.25rem;
        font-size: 1rem;
        border-radius: 0 !important;
    }

    .search-form .btn-primary {
        min-width: auto;
        padding: 0.75rem;
    }
    
    .search-form .btn-primary span {
        display: none;
    }
    
    .search-form .btn-primary i {
        margin: 0;
    }

    .products-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .search-header {
        padding: 1rem 0;
    }

    .search-form {
        padding: 0 0.5rem;
    }

    .search-form .input-group {
        border-radius: 8px;
    }

    .search-form input.form-control {
        padding: 0.75rem 1rem;
        font-size: 0.95rem;
        border-radius: 0 !important;
    }

    .search-form .btn-primary {
        padding: 0.75rem 1rem;
        font-size: 0.95rem;
        min-width: 100px;
        gap: 6px;
        border-radius: 0 !important;
    }

    .search-form .btn-primary i {
        font-size: 1rem;
    }

    .products-grid {
        grid-template-columns: 1fr;
    }
}

.container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.result-card {
    padding: 1.5rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    transition: box-shadow 0.2s;
}

.result-card:hover {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.result-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #1a202c;
}

.result-description {
    color: #4a5568;
    margin-bottom: 1rem;
}

.result-link {
    color: #3b82f6;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.result-link:hover {
    color: #2563eb;
}

.search-container {
    background-color: var(--bs-primary);
    min-height: 200px;
    display: flex;
    align-items: center;
}

.search-form-container {
    width: 100%;
}

.search-form-container .form-control {
    height: 48px;
    font-size: 1rem;
    border: none;
    border-radius: 8px 0 0 8px;
}

.search-form-container .btn {
    height: 48px;
    padding: 0 1.5rem;
    border-radius: 0 8px 8px 0;
    font-weight: 500;
}

.search-results-container {
    background-color: var(--bs-light);
    min-height: calc(100vh - 200px);
}

.card {
    border: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.card-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--bs-dark);
}

.card-text {
    font-size: 0.9rem;
    color: var(--bs-gray-600);
}

.price {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--bs-primary);
}

.badge {
    font-size: 0.8rem;
    padding: 0.5rem 0.75rem;
}

.loading-results {
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

@media (max-width: 768px) {
    .search-container {
        min-height: 150px;
    }
    
    .search-form-container .form-control,
    .search-form-container .btn {
        height: 40px;
    }
}

.product-info {
    margin-top: 10px;
    padding: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
}

.product-info .inventory {
    color: #495057;
    font-weight: 500;
}

.product-info .price {
    color: #000000;
    font-weight: 600;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 4px;
}

.product-info .price.out-of-stock {
    color: #e74c3c;
}

.product-info .price::before {
    content: 'قیمت:';
    color: #666;
    font-size: 0.9rem;
    font-weight: normal;
}

.product-info .price.out-of-stock::after {
    content: '(ناموجود)';
    color: #e74c3c;
    font-size: 0.9rem;
    font-weight: normal;
    margin-right: 8px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .product-info {
        font-size: 0.85rem;
        padding: 6px;
    }
}

@media (max-width: 480px) {
    .product-info {
        flex-direction: column;
        gap: 4px;
        align-items: flex-start;
    }
}

/* Color Filter Styles */
.color-options {
    position: relative;
    padding: 0 10px;
    width: 100%;
}

.initial-colors,
.additional-colors {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    width: 100%;
}

.color-options .form-check {
    display: flex;
    align-items: center;
    margin-bottom: 0.75rem;
    gap: 12px;
    width: 100%;
}

.color-options .color-circle {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    display: inline-block;
    vertical-align: middle;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    margin-left: 0;
    flex-shrink: 0;
}

.color-options .form-check-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    gap: 8px;
    width: 100%;
}

.color-options .form-check-input {
    margin-left: 8px;
    flex-shrink: 0;
}

.show-more-colors {
    width: auto;
    text-align: center;
    padding: 0.5rem 0;
    margin-top: 0.5rem;
    color: #2ecc71;
    border: none;
    background: none;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    font-size: 0.9rem;
    cursor: pointer;
}

.show-more-colors:hover {
    color: #27ae60;
    background: none;
    border: none;
}

.show-more-colors i {
    font-size: 0.8rem;
    transition: transform 0.3s ease;
}

.show-more-colors:hover i {
    transform: translateY(2px);
}

/* Filter Buttons */
.filter-buttons {
    margin-top: 2rem;
}

.filter-buttons .btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0.75rem 1.5rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.filter-buttons .btn-primary {
    background: linear-gradient(135deg, #2ecc71 0%, #27ae60 100%);
    border: none;
    box-shadow: 0 2px 8px rgba(46, 204, 113, 0.2);
}

.filter-buttons .btn-primary:hover {
    background: linear-gradient(135deg, #27ae60 0%, #219a52 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(46, 204, 113, 0.3);
}

.filter-buttons .btn-outline-secondary {
    border: 1px solid #e9ecef;
    color: #6c757d;
}

.filter-buttons .btn-outline-secondary:hover {
    background-color: #f8f9fa;
    color: #495057;
    border-color: #dee2e6;
}

.filter-buttons .btn i {
    font-size: 1.1rem;
}

/* Price Range Styles */
.price-display {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    gap: 10px;
    width: 100%;
}

.price-value {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f8f9fa;
    padding: 8px 12px;
    border-radius: 6px;
    border: 1px solid #e9ecef;
    flex: 1;
    min-width: 0;
    justify-content: center;
}

.price-value .label {
    color: #6c757d;
    font-size: 14px;
    white-space: nowrap;
}

.price-value .value {
    font-family: 'Dorsa', sans-serif;
    font-weight: 600;
    color: #2c3e50;
    direction: ltr;
    display: inline-block;
    min-width: 60px;
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
}

.price-unit {
    color: #6c757d;
    font-size: 16px;
    white-space: nowrap;
    display: flex;
    align-items: center;
    height: 100%;
    background: none !important;
    border: none !important;
    border-radius: 0 !important;
    padding: 0 !important;
    margin-right: 8px;
}

.price-slider {
    position: relative;
    height: 40px;
    display: flex;
    align-items: center;
    padding: 0;
    width: 100%;
}

.slider-track {
    position: absolute;
    width: 100%;
    height: 4px;
    background: #e9ecef;
    border-radius: 2px;
}

.slider-track::before {
    content: '';
    position: absolute;
    height: 100%;
    background: #FFDB58;
    border-radius: 2px;
    left: 0;
    right: 0;
}

.price-slider input[type="range"] {
    position: absolute;
    width: 100%;
    height: 4px;
    background: none;
    pointer-events: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

.price-slider input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    height: 20px;
    width: 20px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid #FFDB58;
    cursor: pointer;
    pointer-events: auto;
    box-shadow: 0 2px 6px rgba(255, 219, 88, 0.2);
    transition: all 0.2s ease;
}

.price-slider input[type="range"]::-moz-range-thumb {
    height: 20px;
    width: 20px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid #FFDB58;
    cursor: pointer;
    pointer-events: auto;
    box-shadow: 0 2px 6px rgba(255, 219, 88, 0.2);
    transition: all 0.2s ease;
}

.price-slider input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.1);
    box-shadow: 0 3px 8px rgba(255, 219, 88, 0.3);
    background: #FFDB58;
    border-color: #fff;
}

.price-slider input[type="range"]::-moz-range-thumb:hover {
    transform: scale(1.1);
    box-shadow: 0 3px 8px rgba(255, 219, 88, 0.3);
    background: #FFDB58;
    border-color: #fff;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .price-display {
        flex-direction: column;
        gap: 10px;
    }

    .price-value {
        width: 100%;
        justify-content: space-between;
    }

    .price-value .value {
        min-width: 80px;
    }
}

/* Filter Group Styles */
.filter-group {
    margin-bottom: 1.5rem;
    width: 100%;
}

.filter-group h5 {
    font-size: 1rem;
    font-weight: 600;
    color: #495057;
    margin-bottom: 1rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .price-display {
        flex-direction: column;
        gap: 10px;
    }

    .price-value {
        width: 100%;
        justify-content: space-between;
    }

    .price-value .value {
        min-width: 80px;
    }
}

.search-suggestions {
    position: absolute;
    top: 100%;
    left: 1rem;
    right: 1rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    margin-top: 5px;
    z-index: 1000;
    display: none;
}

.search-suggestions.active {
    display: block;
}

.suggestion-item {
    padding: 10px 15px;
    cursor: pointer;
    transition: background-color 0.2s;
    display: flex;
    align-items: center;
    gap: 10px;
}

.suggestion-item:hover {
    background-color: #f8f9fa;
}

.suggestion-item i {
    color: #6c757d;
    font-size: 14px;
}

.suggestion-item span {
    color: #2c3e50;
    font-size: 14px;
}

.purchase-btn {
    width: 100%;
    padding: 12px;
    margin-top: 15px;
    background: linear-gradient(135deg, #2ecc71 0%, #27ae60 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 2px 8px rgba(46, 204, 113, 0.2);
}

.purchase-btn i {
    font-size: 1.1rem;
}

.purchase-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(46, 204, 113, 0.3);
    background: linear-gradient(135deg, #27ae60 0%, #219a52 100%);
}

.purchase-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(46, 204, 113, 0.2);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .purchase-btn {
        padding: 10px;
        font-size: 0.95rem;
    }
}

.colors-section {
    margin-top: 8px;
    padding: 6px;
    border-radius: 4px;
    display: flex;
    justify-content: center;
}

.product-colors {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    padding: 3px;
    justify-content: center;
}

.color-circle {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
    position: relative;
}

.color-circle:hover {
    transform: scale(1.1);
    box-shadow: 0 2px 4px rgba(0,0,0,0.15);
}

.color-circle:hover::after {
    content: attr(title);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 2px 5px;
    border-radius: 3px;
    font-size: 10px;
    white-space: nowrap;
    z-index: 1;
    margin-bottom: 3px;
}

/* Add border for light colors */
.color-circle[style*="background-color: #FFFFFF"],
.color-circle[style*="background-color: #F5F5F5"],
.color-circle[style*="background-color: #E8E8E8"] {
    border: 1px solid #ddd;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .color-circle {
        width: 18px;
        height: 18px;
    }
    
    .product-colors {
        gap: 4px;
    }
}

@media (max-width: 480px) {
    .color-circle {
        width: 16px;
        height: 16px;
    }
    
    .product-colors {
        gap: 3px;
    }
}

.action-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 15px;
    width: 100%;
    padding: 0 10px;
}

.action-btn {
    width: 100%;
    padding: 14px 20px;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    position: relative;
    overflow: hidden;
}

.action-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.action-btn:hover::before {
    opacity: 1;
}

.action-btn i {
    font-size: 1.2rem;
    transition: transform 0.3s ease;
}

.action-btn:hover i {
    transform: translateY(-2px);
}

.add-to-cart {
    background: linear-gradient(135deg, #2ecc71 0%, #27ae60 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(46, 204, 113, 0.25);
}

.add-to-cart:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(46, 204, 113, 0.35);
    background: linear-gradient(135deg, #27ae60 0%, #219a52 100%);
}

.view-details {
    background: rgba(108, 117, 125, 0.15);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(108, 117, 125, 0.3);
    color: #2c3e50;
    box-shadow: 0 4px 15px rgba(108, 117, 125, 0.15);
}

.view-details:hover {
    transform: translateY(-3px);
    background: rgba(108, 117, 125, 0.25);
    border: 1px solid rgba(108, 117, 125, 0.4);
    box-shadow: 0 6px 20px rgba(108, 117, 125, 0.25);
}

.view-details:active {
    transform: translateY(-1px);
    background: rgba(108, 117, 125, 0.2);
    box-shadow: 0 2px 8px rgba(108, 117, 125, 0.15);
}

/* Add fallback for browsers that don't support backdrop-filter */
@supports not (backdrop-filter: blur(10px)) {
    .view-details {
        background: rgba(108, 117, 125, 0.2);
    }
    
    .view-details:hover {
        background: rgba(108, 117, 125, 0.3);
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .action-buttons {
        padding: 0 10px;
    }

    .action-btn {
        padding: 16px 20px;
        font-size: 1.1rem;
        border-radius: 10px;
    }

    .action-btn i {
        font-size: 1.3rem;
    }
}

@media (max-width: 480px) {
    .action-buttons {
        padding: 0 5px;
    }

    .action-btn {
        padding: 14px 16px;
        font-size: 1rem;
    }

    .action-btn i {
        font-size: 1.2rem;
    }
}

.color-circle.selectable {
    cursor: pointer;
    transition: all 0.2s ease;
}

.color-circle.selectable:hover {
    transform: scale(1.1);
}

.color-circle.selectable.selected {
    box-shadow: 0 0 0 1px #000000;
}

.selected-color-indicator {
    width: 24px;
    height: 24px;
    margin: 8px auto;
    border: 2px solid #e9ecef;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.action-btn.add-to-cart.disabled {
    background: #e9ecef;
    color: #6c757d;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.action-btn.add-to-cart.disabled:hover {
    background: #e9ecef;
    transform: none;
    box-shadow: none;
}

.add-to-cart-success {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: #2ecc71;
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 12px rgba(46, 204, 113, 0.3);
    z-index: 1000;
    animation: slideUp 0.3s ease;
}

.add-to-cart-success i {
    font-size: 1.2rem;
}

@keyframes slideUp {
    from {
        transform: translate(-50%, 100%);
        opacity: 0;
    }
    to {
        transform: translate(-50%, 0);
        opacity: 1;
    }
}

.size-selection {
    margin-top: 12px;
    padding: 10px;
    border-radius: 8px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    transition: all 0.2s ease;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.size-title {
    font-size: 0.85rem;
    color: #495057;
    margin-bottom: 8px;
    font-weight: 500;
    text-align: center;
}

.size-options {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
    width: 100%;
}

.size-option {
    padding: 6px 12px;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    background: white;
    color: #495057;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 4px;
    min-width: 45px;
    justify-content: center;
    flex: 0 1 auto;
}

.size-option:hover {
    border-color: #2ecc71;
    color: #2ecc71;
}

.size-option.selected {
    background: #2ecc71;
    color: white;
    border-color: #2ecc71;
}

.size-inventory {
    font-size: 0.75rem;
    color: #6c757d;
}

.size-option.selected .size-inventory {
    color: rgba(255, 255, 255, 0.9);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .size-selection {
        padding: 8px;
        width: 100%;
    }
}

@media (max-width: 480px) {
    .size-selection {
        width: 100%;
    }
}

.action-button {
    position: relative;
}

.cart-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: #2ecc71;
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    opacity: 0;
    transform: scale(0);
    transition: all 0.3s ease;
}

.cart-badge.show {
    opacity: 1;
    transform: scale(1);
}

.cart-badge.pulse {
    animation: pulse 0.5s ease;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
    }
}

.brand-select, #sortSelect {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    background-color: white;
    font-size: 0.95rem;
    color: #495057;
    cursor: pointer;
    transition: all 0.2s ease;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23495057' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: left 1rem center;
    background-size: 16px;
    padding-left: 2.5rem;
    height: 46px;
}

.brand-select:hover {
    border-color: #2ecc71;
}

.brand-select:focus {
    border-color: #2ecc71;
    box-shadow: 0 0 0 0.2rem rgba(46, 204, 113, 0.15);
    outline: none;
}

.brand-select option {
    padding: 0.5rem;
    font-size: 0.95rem;
}

/* Custom scrollbar for the select dropdown */
.brand-select::-webkit-scrollbar {
    width: 8px;
}

.brand-select::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.brand-select::-webkit-scrollbar-thumb {
    background: #2ecc71;
    border-radius: 4px;
}

.brand-select::-webkit-scrollbar-thumb:hover {
    background: #27ae60;
}

/* Sort Select Styles */
#sortSelect:hover {
    border-color: #2ecc71;
}

#sortSelect:focus {
    border-color: #2ecc71;
    box-shadow: 0 0 0 0.2rem rgba(46, 204, 113, 0.15);
    outline: none;
}

#sortSelect option {
    padding: 0.5rem;
    font-size: 0.95rem;
} 


.product-header h3 {
    height: 2.8em;
    line-height: 1.4;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    margin-bottom: 0.5rem;
}