/**
 * GS Kleurstalen Styles - Modern Design
 */

/* Reset and base */
.gs-kleurstalen-wrapper {
    max-width: 1400px;
    margin: 0 auto;
    padding: 30px 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    color: #1a1a1a;
    line-height: 1.5;
}

.gs-kleurstalen-wrapper * {
    box-sizing: border-box;
}

/* Header */
.gs-kleurstalen-header {
    text-align: center;
    margin-bottom: 40px;
}

.gs-kleurstalen-header h1 {
    font-size: 32px;
    font-weight: 700;
    margin: 0 0 12px;
    color: #1a1a1a;
    letter-spacing: -0.5px;
}

.gs-kleurstalen-header p {
    font-size: 16px;
    color: #666;
    margin: 0 auto;
    max-width: 550px;
}

/* Main Container */
.gs-kleurstalen-container {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 40px;
    align-items: start;
}

/* ===================== */
/* MODERN FILTER SIDEBAR */
/* ===================== */

.gs-kleurstalen-filters {
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 16px;
    padding: 24px;
    position: sticky;
    top: 100px;
}

.gs-kleurstalen-filters h3 {
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #999;
    margin: 0 0 20px;
    padding: 0;
    border: none;
}

.gs-filter-group {
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid #f0f0f0;
}

.gs-filter-group:last-of-type {
    margin-bottom: 20px;
    padding-bottom: 0;
    border-bottom: none;
}

.gs-filter-group h4 {
    font-size: 14px;
    font-weight: 600;
    margin: 0 0 12px;
    color: #1a1a1a;
}

.gs-filter-options {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.gs-radio,
.gs-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 14px;
    color: #444;
    padding: 8px 12px;
    margin: 0 -12px;
    border-radius: 8px;
    transition: background 0.15s;
}

.gs-radio:hover,
.gs-checkbox:hover {
    background: #f8f8f8;
}

.gs-radio input,
.gs-checkbox input {
    width: 18px;
    height: 18px;
    margin: 0;
    cursor: pointer;
    accent-color: #e74c3c;
}

.gs-reset-filters {
    width: 100%;
    padding: 12px 16px;
    background: #f5f5f5;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    color: #666;
    transition: all 0.2s;
}

.gs-reset-filters:hover {
    background: #eee;
    color: #333;
}

/* Main Content */
.gs-kleurstalen-main {
    min-height: 500px;
}

.gs-kleurstalen-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 24px;
    gap: 16px;
}

.gs-toolbar-left {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.gs-sample-count {
    font-size: 14px;
    color: #888;
    font-weight: 500;
}

/* Search Bar */
.gs-search-wrap {
    position: relative;
    width: 100%;
    max-width: 460px;
}

.gs-search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    color: #aaa;
    pointer-events: none;
}

.gs-search-input {
    width: 100% !important;
    padding: 13px 44px 13px 48px !important;
    border: 2px solid #e8e8e8 !important;
    border-radius: 12px !important;
    font-size: 14px !important;
    font-family: inherit;
    background: #fff !important;
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
    box-sizing: border-box !important;
}

.gs-search-input:focus {
    border-color: #e74c3c;
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.1);
}

.gs-search-input::placeholder {
    color: #bbb;
}

.gs-search-clear {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 28px;
    height: 28px;
    border: none;
    background: #f0f0f0;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: #888;
    transition: all 0.15s;
    line-height: 1;
}

.gs-search-clear:hover {
    background: #e0e0e0;
    color: #333;
}

/* ======================== */
/* STICKY FLOATING CART BTN */
/* ======================== */

.gs-sticky-cart-btn {
    position: fixed;
    bottom: 28px;
    right: 28px;
    z-index: 9990;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s, transform 0.3s;
    pointer-events: none;
}

.gs-sticky-cart-btn.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.gs-sticky-cart-btn button {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px 28px;
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%) !important;
    color: #fff !important;
    border: none;
    border-radius: 16px;
    cursor: pointer;
    font-size: 15px !important;
    font-weight: 700 !important;
    font-family: inherit;
    box-shadow: 0 8px 30px rgba(231, 76, 60, 0.4), 0 2px 8px rgba(0,0,0,0.1);
    transition: all 0.2s;
    white-space: nowrap;
}

.gs-sticky-cart-btn button:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 36px rgba(231, 76, 60, 0.5), 0 4px 12px rgba(0,0,0,0.15);
}

.gs-sticky-cart-btn button svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.gs-sticky-label {
    font-size: 15px;
}

.gs-sticky-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 28px;
    padding: 0 8px;
    background: #fff;
    color: #e74c3c !important;
    border-radius: 14px;
    font-size: 14px !important;
    font-weight: 800 !important;
    line-height: 1;
}

/* Samples Grid - 4 columns */
.gs-kleurstalen-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.gs-loading {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 40px;
    color: #888;
    font-size: 15px;
}

.gs-no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 40px;
    color: #888;
    background: #f8f8f8;
    border-radius: 16px;
    font-size: 15px;
}

/* Sample Card */
.gs-sample-card {
    background: #fff;
    border: 2px solid #f0f0f0;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.gs-sample-card:hover {
    border-color: #ddd;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.gs-sample-card.selected {
    border-color: #e74c3c;
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.15);
}

.gs-sample-card.selected::after {
    content: '\2713';
    position: absolute;
    top: 12px;
    right: 12px;
    width: 28px;
    height: 28px;
    background: #e74c3c;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: bold;
    box-shadow: 0 2px 8px rgba(231, 76, 60, 0.4);
}

.gs-sample-image-wrap {
    position: relative;
    overflow: hidden;
}

.gs-sample-image {
    width: 100%;
    aspect-ratio: 4/3;
    object-fit: cover;
    display: block;
}

.gs-magnify-btn {
    position: absolute;
    bottom: 10px;
    right: 10px;
    width: 32px;
    height: 32px;
    background: rgba(0, 0, 0, 0.6);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.2s;
    z-index: 2;
}

.gs-sample-card:hover .gs-magnify-btn {
    opacity: 1;
}

.gs-magnify-btn:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: scale(1.1);
}

.gs-magnify-btn svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: #fff;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* Image Modal */
.gs-image-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
    padding: 40px;
}

.gs-image-modal.active {
    opacity: 1;
    visibility: visible;
}

.gs-image-modal-content {
    position: relative;
    max-width: 95vw;
    max-height: 95vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.gs-image-modal-img {
    width: auto;
    height: auto;
    max-width: 95vw;
    max-height: 80vh;
    min-width: 500px;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    object-fit: contain;
}

@media (max-width: 600px) {
    .gs-image-modal-img {
        min-width: auto;
        max-width: 95vw;
    }
}

.gs-image-modal-close {
    position: absolute;
    top: -15px;
    right: -15px;
    width: 40px;
    height: 40px;
    background: #fff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #333;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    transition: transform 0.2s;
}

.gs-image-modal-close:hover {
    transform: scale(1.1);
}

.gs-image-modal-info {
    text-align: center;
    margin-top: 20px;
    color: #fff;
}

.gs-image-modal-name {
    font-size: 20px;
    font-weight: 600;
    margin: 0 0 5px;
}

.gs-image-modal-product {
    font-size: 14px;
    color: #aaa;
    margin: 0;
}

.gs-sample-info {
    padding: 14px 16px;
}

.gs-sample-name {
    font-size: 14px;
    font-weight: 600;
    margin: 0 0 4px;
    color: #1a1a1a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gs-sample-product {
    font-size: 12px;
    color: #888;
    margin: 0 0 10px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gs-sample-specs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.gs-spec-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 500;
    background: #f5f5f5;
    border-radius: 6px;
    color: #666;
}

.gs-spec-icon {
    font-size: 12px;
}

.gs-spec-verduisterend .gs-spec-icon::before { content: '\1F319'; }
.gs-spec-semi-transparant .gs-spec-icon::before { content: '\25D0'; }
.gs-spec-transparant .gs-spec-icon::before { content: '\25CB'; }

/* ===================== */
/* MODERN SLIDE-OUT CART */
/* ===================== */

.gs-cart-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.gs-cart-overlay.active {
    opacity: 1;
    visibility: visible;
}

.gs-kleurstalen-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 420px;
    max-width: 100vw;
    height: 100vh;
    background: #fff;
    z-index: 9999;
    transform: translateX(-100%);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
}

.gs-kleurstalen-sidebar.active {
    transform: translateX(0);
    box-shadow: 20px 0 60px rgba(0, 0, 0, 0.15);
}

.gs-cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 28px;
    border-bottom: 1px solid #f0f0f0;
    flex-shrink: 0;
}

.gs-cart-header h3 {
    font-size: 20px;
    font-weight: 700;
    margin: 0;
    color: #1a1a1a;
}

.gs-cart-count {
    font-size: 14px;
    font-weight: 500;
    color: #888;
    margin-left: 8px;
}

.gs-cart-close {
    width: 40px;
    height: 40px;
    background: #f5f5f5;
    border: none;
    border-radius: 12px;
    color: #666;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.gs-cart-close:hover {
    background: #eee;
    color: #333;
}

.gs-cart-content {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.gs-cart-items {
    padding: 20px 28px;
    flex: 1;
}

.gs-cart-empty {
    color: #aaa;
    font-size: 15px;
    text-align: center;
    padding: 40px 20px;
}

.gs-cart-empty::before {
    content: '';
    display: block;
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: #f5f5f5;
    border-radius: 50%;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23ccc'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M20 7l-8-4-8 4m16 0l-8 4m8-4v10l-8 4m0-10L4 7m8 4v10M4 7v10l8 4'/%3E%3C/svg%3E");
    background-size: 40px;
    background-repeat: no-repeat;
    background-position: center;
}

.gs-cart-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    margin-bottom: 12px;
    background: #fafafa;
    border-radius: 14px;
    transition: background 0.2s;
}

.gs-cart-item:hover {
    background: #f5f5f5;
}

.gs-cart-item:last-child {
    margin-bottom: 0;
}

.gs-cart-item-image {
    width: 70px;
    height: 70px;
    border-radius: 10px;
    object-fit: cover;
    flex-shrink: 0;
}

.gs-cart-item-info {
    flex: 1;
    min-width: 0;
}

.gs-cart-item-name {
    font-size: 15px;
    font-weight: 600;
    margin: 0 0 4px;
    color: #1a1a1a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gs-cart-item-product {
    font-size: 13px;
    color: #888;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gs-cart-item-remove {
    width: 36px;
    height: 36px;
    border: none;
    background: #fff;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #bbb;
    transition: all 0.2s;
    flex-shrink: 0;
}

.gs-cart-item-remove:hover {
    background: #fee;
    color: #e74c3c;
}

/* Cart Form */
.gs-cart-form {
    padding: 24px 28px;
    border-top: 1px solid #f0f0f0;
    background: #fafafa;
    flex-shrink: 0;
}

.gs-cart-form h4 {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 20px;
    color: #1a1a1a;
}

.gs-form-row {
    margin-bottom: 16px;
}

.gs-form-row label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
    color: #444;
}

.gs-form-row input {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    font-size: 15px;
    transition: all 0.2s;
    background: #fff;
}

.gs-form-row input:focus {
    outline: none;
    border-color: #e74c3c;
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.1);
}

.gs-form-row input::placeholder {
    color: #bbb;
}

.gs-form-row-split {
    display: flex;
    gap: 12px;
}

.gs-form-field {
    flex: 1;
}

.gs-form-field-small {
    flex: 0 0 90px;
}

.gs-submit-btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%) !important;
    color: #fff !important;
    border: none;
    border-radius: 12px;
    font-size: 16px !important;
    font-weight: 700 !important;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 8px;
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.3);
}

.gs-submit-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(231, 76, 60, 0.4);
}

.gs-submit-btn:disabled {
    background: #ccc;
    box-shadow: none;
    cursor: not-allowed;
    transform: none;
}

/* Success State */
.gs-cart-success {
    padding: 50px 28px;
    text-align: center;
}

.gs-success-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #27ae60 0%, #219a52 100%);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    margin: 0 auto 24px;
    box-shadow: 0 8px 24px rgba(39, 174, 96, 0.3);
}

.gs-cart-success h4 {
    font-size: 22px;
    font-weight: 700;
    margin: 0 0 12px;
    color: #1a1a1a;
}

.gs-cart-success p {
    font-size: 15px;
    color: #666;
    margin: 0 0 8px;
}

#gs-request-code {
    font-size: 20px;
    color: #27ae60;
    font-weight: 700;
}

.gs-new-request-btn {
    margin-top: 28px;
    padding: 14px 28px;
    background: #1a1a1a;
    color: #fff;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.2s;
}

.gs-new-request-btn:hover {
    background: #333;
}

/* Toast Notifications */
.gs-toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: #1a1a1a;
    color: #fff;
    padding: 14px 28px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
    z-index: 10000;
    animation: fadeInOut 2.5s ease;
    pointer-events: none;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.gs-toast.error {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
}

.gs-toast.success {
    background: linear-gradient(135deg, #27ae60 0%, #219a52 100%);
}

@keyframes fadeInOut {
    0% { opacity: 0; transform: translateX(-50%) translateY(20px); }
    10% { opacity: 1; transform: translateX(-50%) translateY(0); }
    90% { opacity: 1; transform: translateX(-50%) translateY(0); }
    100% { opacity: 0; transform: translateX(-50%) translateY(-10px); }
}

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

@media (max-width: 992px) {
    .gs-kleurstalen-container {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .gs-kleurstalen-filters {
        position: static;
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
        gap: 20px;
        padding: 20px;
    }

    .gs-kleurstalen-filters h3 {
        grid-column: 1 / -1;
        margin-bottom: 10px;
    }

    .gs-filter-group {
        margin-bottom: 0;
        padding-bottom: 0;
        border-bottom: none;
    }

    .gs-reset-filters {
        grid-column: 1 / -1;
        max-width: 200px;
    }

    .gs-kleurstalen-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

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

    .gs-kleurstalen-sidebar {
        width: 100%;
    }

    .gs-cart-header,
    .gs-cart-items,
    .gs-cart-form {
        padding-left: 20px;
        padding-right: 20px;
    }
}

@media (max-width: 600px) {
    .gs-kleurstalen-wrapper {
        padding: 20px 16px;
    }

    .gs-kleurstalen-header h1 {
        font-size: 24px;
    }

    .gs-kleurstalen-header p {
        font-size: 14px;
    }

    .gs-kleurstalen-filters {
        grid-template-columns: 1fr;
    }

    .gs-kleurstalen-grid {
        gap: 12px;
    }

    .gs-sample-info {
        padding: 12px 14px;
    }

    .gs-sample-name {
        font-size: 13px;
    }

    .gs-search-wrap {
        max-width: 100%;
    }

    .gs-sticky-cart-btn {
        bottom: 16px;
        right: 16px;
        left: 16px;
    }

    .gs-sticky-cart-btn button {
        width: 100%;
        justify-content: center;
        padding: 14px 24px;
        border-radius: 14px;
    }
}
