/* Color Picker */
.color-picker-container {
    position: relative;
    display: inline-block;
    margin-right: 10px;
    z-index: 1;
}

.color-picker-trigger {
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid #ddd;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    transition: all 0.2s ease;
}

.color-picker-trigger:hover {
    transform: scale(1.05);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.3);
}

.color-picker-trigger img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.color-picker-dropdown {
    position: absolute;
    top: 45px;
    left: 0;
    width: 220px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    padding: 10px;
    display: none;
    grid-template-columns: repeat(5, 1fr);
    grid-gap: 8px;
    z-index: 1000;
    transition: all 0.3s ease;
}

.color-picker-dropdown.show {
    display: grid !important;
    animation: fadeIn 0.3s ease;
}

.color-option {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid #eee;
    transition: transform 0.2s ease, border-color 0.2s ease;
    position: relative;
}

.color-option:hover {
    transform: scale(1.1);
    border-color: #ccc;
}

.color-option.active {
    border: 3px solid #333;
    transform: scale(1.1);
}

.color-option.active::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    text-shadow: 0 0 2px black;
    font-weight: bold;
}

.color-option-tooltip {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background-color: #333;
    color: white;
    padding: 3px 6px;
    border-radius: 4px;
    font-size: 12px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.color-option:hover .color-option-tooltip {
    opacity: 1;
    visibility: visible;
    bottom: calc(100% + 5px);
}

/* Fix for color display in color picker */
.color-option[data-color="Green"] {
    background-color: #008000 !important;
}

.color-option[data-color="Red"] {
    background-color: #FF0000 !important;
}

.color-option[data-color="Orange"] {
    background-color: #FFA500 !important;
}

.color-option[data-color="Yellow"] {
    background-color: #FFFF00 !important;
}

.color-option[data-color="Light Blue"] {
    background-color: #ADD8E6 !important;
}

.color-option[data-color="Blue"] {
    background-color: #0000FF !important;
}

.color-option[data-color="Purple"] {
    background-color: #800080 !important;
}

.color-option[data-color="Pink"] {
    background-color: #FFC0CB !important;
}

.color-option[data-color="Brown"] {
    background-color: #A52A2A !important;
}

.color-option[data-color="Black"] {
    background-color: #000000 !important;
}

.color-option[data-color="Black-White"] {
    background-color: #F5F5F5 !important;
}

.color-option[data-color="Gray"] {
    background-color: #808080 !important;
}

.color-option[data-color="Beige"] {
    background-color: #F5F5DC !important;
}

.color-option[data-color="Turquoise"] {
    background-color: #40E0D0 !important;
}

.color-option[data-color="Cyan"] {
    background-color: #00FFFF !important;
}

.color-option[data-color="Peach"] {
    background-color: #FFDAB9 !important;
}

.color-option[data-color="Gold"] {
    background-color: #FFD700 !important;
}

.color-option[data-color="Silver"] {
    background-color: #C0C0C0 !important;
}


/* Styling for the sort dropdown */
.sort-dropdown select {
    padding: 6px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: white;
    font-size: 14px;
    color: #666;
    min-width: 150px;
    cursor: pointer;
    transition: border-color 0.2s;
}

.sort-dropdown select:hover {
    border-color: #aaa;
}

.sort-dropdown select:focus {
    outline: none;
    border-color: #666;
    box-shadow: 0 0 0 1px rgba(0,0,0,0.1);
}

/* Fix for color picker dropdown */
.color-picker-container {
    position: relative;
    z-index: 1;
}

.color-picker-dropdown {
    position: absolute;
    top: 45px;
    left: 0;
    width: 220px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    padding: 10px;
    display: none;
    grid-template-columns: repeat(5, 1fr);
    grid-gap: 8px;
    z-index: 9999;
}

.color-picker-dropdown.show {
    display: grid !important;
}

/* Enhanced styling for color options */
.color-option {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid #eee;
    transition: all 0.2s ease;
    position: relative;
}

.color-option:hover {
    transform: scale(1.1);
    border-color: #aaa;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* Improved active state */
.color-option.active {
    border: 3px solid #333;
    transform: scale(1.15);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.color-option.active::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    text-shadow: 0 0 2px black, 0 0 3px rgba(0, 0, 0, 0.5);
    font-weight: bold;
    font-size: 16px;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 4 COLUMNS + DIFFERENT HEIGHTS */
.catalog-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    /* Changes from 3 to 4 columns */
    gap: 30px;
    width: 100%;
    max-width: 1400px;
    /* Adjust based on your needs */
    margin: 0 auto;
}

.artwork-card {
    width: 100%;
    display: flex;
    flex-direction: column;
}

.artwork-image-container {
    width: 100%;
    position: relative;
    overflow: hidden;
}

.artwork-image {
    width: 100%;
    height: auto;
    object-fit: contain;
    /* This maintains aspect ratio */
    display: block;
}

/* Responsive adjustments */
@media (max-width: 1200px) {
    .catalog-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .catalog-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

@media (max-width: 480px) {
    .catalog-grid {
        grid-template-columns: 1fr;
    }
}

/* GALLETY ITEMS */
.gallery-item {
    margin-bottom: 30px;
    position: relative;
    transition: transform 0.3s ease;
}

.gallery-item:hover {
    transform: translateY(-5px);
}

.artwork-image {
    width: 100%;
    height: 500px;
    object-fit: cover;
    margin-bottom: 15px;
}

.artwork-title {
    font-size: 1.1rem;
    font-weight: 500;
    margin-bottom: 5px;
}

.artist-name {
    color: #666;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.artwork-details {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
}

.artwork-price {
    font-weight: 500;
    color: #333;
}

.artwork-meta {
    color: #999;
    font-size: 0.8rem;
}

.action-icons {
    display: flex;
    gap: 15px;
}

.icon-button {
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    transition: color 0.3s ease;
}

.icon-button:hover {
    color: #000;
}

.original-price {
    font-size: 0.9em;
    color: #999;
}

.discount-price {
    color: black;
    /* or any color you prefer for highlighting the discount */
    font-weight: bold;
}


#jq-notification {
    position: fixed;
    top: 100px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #333;
    /* Dark background */
    color: white;
    padding: 15px 25px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    z-index: 9999;
    display: none;
    /* Initially hidden */
    font-size: 16px;
    font-weight: 500;
    min-width: 200px;
    text-align: center;
}

/* Animation for the notification */
@keyframes slideInDown {
    from {
        transform: translateX(-50%) translateY(-100%);
        opacity: 0;
    }

    to {
        transform: translateX(-50%) translateY(0);
        opacity: 1;
    }
}

#jq-notification.show {
    display: block;
    animation: slideInDown 0.3s ease-out;
}

/* Error message styling */
#jq-notification.error-message {
    background-color: #f8d7da;
    color: #721c24;
}

/* FILTERS FILTERS FILTERS */

.action-buttons {
    display: flex;
    flex-direction: row;
    /* Make items horizontal */
    gap: 20px;
    align-items: center;
}

.filter-container {
    background-color: #f8f8f8;
    padding: 20px;
    font-family: Arial, sans-serif;
}

.header {
    margin-bottom: 20px;
}

.title {
    color: #666;
    font-size: 14px;
}

.filters-row {
    display: flex;
    gap: 30px;
    margin-bottom: 20px;
    align-items: center;
    justify-content: center;
    width: 100%;
}

/* Size Filter Styles */
.size-filter label {
    display: block;
    font-size: 12px;
    color: #666;
    margin-bottom: 8px;
}

.size-buttons {
    display: flex;
    gap: 8px;
}

.size-buttons button {
    padding: 5px 12px;
    border: none;
    background: #f0f0f0;
    border-radius: 2px;
    cursor: pointer;
}

.size-buttons button.active {
    background: #000;
    color: white;
}

/* Range Filter Styles */

.range-filter {
    position: relative;
    margin-bottom: 15px;
}

.range-values {
    position: absolute;
    top: 0;
    right: 0;
    font-size: 12px;
    color: #666;
}

/* Optional: Add transition for smooth value updates */
.range-values {
    transition: all 0.1s ease;
}

.range-filters {
    display: flex;
    gap: 30px;
}

.range-filter label {
    display: block;
    font-size: 12px;
    color: #666;
    margin-bottom: 8px;
}

.range-filter input[type="range"] {
    width: 200px;
    height: 2px;
    background: #ddd;
    border-radius: 2px;
    -webkit-appearance: none;
}

.range-filter input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 15px;
    height: 15px;
    background: white;
    border: 2px solid #666;
    border-radius: 50%;
    cursor: pointer;
}

.range-values {
    font-size: 12px;
    color: #666;
    margin-left: 10px;
}

/* Orientation Filter Styles */
.orientation-filter label {
    display: block;
    font-size: 12px;
    color: #666;
    margin-bottom: 8px;
}

.orientation-buttons {
    display: flex;
    gap: 8px;
}

.orientation-buttons button {
    width: 30px;
    height: 30px;
    border: 1px solid #ddd;
    background: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.orientation-buttons .portrait::after {
    content: '';
    display: block;
    width: 12px;
    height: 18px;
    background: #666;
}

.orientation-buttons .landscape::after {
    content: '';
    display: block;
    width: 18px;
    height: 12px;
    background: #666;
}

.orientation-buttons .square::after {
    content: '';
    display: block;
    width: 15px;
    height: 15px;
    background: #666;
}

/* Dropdown Filters Styles */
.dropdown-filters {
    display: flex;
    gap: 15px;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.filter-select {
    padding: 8px 25px 8px 12px;
    border: 1px solid #ddd;
    border-radius: 2px;
    background: white;
    font-size: 12px;
    color: #666;
    appearance: none;
    background-image: url('data:image/svg+xml;utf8,<svg fill="%23666" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M7 10l5 5 5-5z"/></svg>');
    background-repeat: no-repeat;
    background-position: right 5px center;
    background-size: 20px;
    min-width: 120px;
}

.color-picker,
.search-btn {
    width: 30px;
    height: 30px;
}

.clear-btn {
    padding: 8px 15px;
    border: 1px solid #ddd;
    background: white;
    color: #666;
    font-size: 12px;
    cursor: pointer;
    border-radius: 2px;
}

/* Hover States */
.size-buttons button:hover,
.orientation-buttons button:hover,
.clear-btn:hover {
    background-color: #f5f5f5;
}

.filter-select:hover {
    border-color: #999;
}

/* Tablet Styles */
@media screen and (max-width: 1024px) {
    .filters-row {
        flex-direction: column;
        gap: 20px;
    }

    .range-filters {
        flex-direction: column;
        gap: 15px;
    }

    .range-filter input[type="range"] {
        width: 100%;
    }

    .dropdown-filters {
        flex-wrap: wrap;
        gap: 10px;
    }

    .filter-select {
        min-width: calc(50% - 10px);
        /* 2 columns with gap */
    }
}

/* Mobile Styles */
@media screen and (max-width: 768px) {
    .filter-container {
        padding: 15px;
    }

    .size-buttons {
        flex-wrap: wrap;
    }

    .size-buttons button {
        flex: 1;
        min-width: 40px;
    }

    .range-filters {
        width: 100%;
    }

    .orientation-buttons {
        justify-content: center;
    }

    .dropdown-filters {
        flex-direction: column;
        width: 100%;
    }

    .filter-select {
        width: 100%;
        min-width: 100%;
    }

    /* Action buttons container */
    .action-buttons {
        width: 100%;
        justify-content: center;
        margin-top: 10px;
    }

    /* Wrap color picker, search and clear buttons */
    .color-picker,
    .search-btn,
    .clear-btn {
        flex: 1;
        max-width: 100px;
        height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

/* Small Mobile Styles */
@media screen and (max-width: 480px) {
    .title {
        font-size: 12px;
        text-align: center;
    }

    .size-buttons button {
        padding: 4px 8px;
        font-size: 11px;
    }

    .range-values {
        font-size: 11px;
    }

    .filter-select {
        font-size: 11px;
    }

    .clear-btn {
        font-size: 11px;
        padding: 6px 12px;
    }
}