/**
 * Duo Flagpin Configurator - Main Styles
 * Exact replica of index.html design
 */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&family=Playfair+Display:wght@600&display=swap');

/*:root {
    --bg-primary: #faf9f7;
    --bg-card: #ffffff;
    --text-primary: #1a1a1a;
}
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}*/

body {
    font-family: 'Outfit', sans-serif;
    color: #000;
    margin: 0;
}
.container {
    max-width: 1336px;
    margin: 0 auto;
    padding: 80px 24px;
}
h5 {
    font-size: 18px;
    font-weight: 700;
    color: #000;
    margin: 0;
    line-height: 24px;
}

#configurator {
    font-family: 'Outfit', sans-serif;
    color: #000;

    display: grid;
    grid-template-columns: 260px 1fr 260px;
    gap: 16px;
    align-items: start;
}

/* Selection Panels */
.selection-panel {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0px 6px 8.6px 0px #ABABAB14;
    overflow: hidden;
    border: 1px solid #F2F2F2;
    position: relative;
    /*height: 100%;*/
}
.panel-header {
    padding: 16px 16px 0 24px;
    /* border-bottom: 1px solid #F2F2F2; */
    display: flex;
    align-items: center;
    gap: 12px;
}
.search-container {
    padding: 16px 20px 24px;
    display: flex;
    gap: 10px;
    align-items: center;
}
.search-input {
    flex: 1;
    padding: 10px 14px;
    border: none;
    border-radius: 8px;
    font-family: 'Outfit', sans-serif;
    font-size: 16px;
    background: #F2F2F2;
    transition: all 0.2s ease;
    width: 100%;
}
/*.search-input:focus {
    outline: none;
    border-color: #F16014;
    box-shadow: 0 0 0 3px #f160141a;
}*/
.search-input::placeholder {
    color: #989898;
}

.filter-btn {
    width: 30px;
    height: 40px;
    border: none;
    background: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    color: #989898;
}
.filter-btn:hover {
    color: #F16014;
}
.filter-btn.active {
    color: #F16014;
}

.filters-section {
    padding: 20px;
    border-bottom: 1px solid #F2F2F2;
    display: none;
    background: #F2F2F2;
    position: absolute;
    height: 100%;
    width: 100%;
}

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

.filter-group {
    margin-bottom: 20px;
}

.filter-group:last-child {
    margin-bottom: 0;
}

.filter-group-title {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    color: #989898;
    margin-bottom: 10px;
    letter-spacing: 0.05em;
}

.filter-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.filter-option {
    padding: 6px 12px;
    border: 1px solid #F2F2F2;
    border-radius: 8px;
    background: white;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.8rem;
    font-weight: 500;
    color: #000;
    user-select: none;
}

.filter-option:hover {
    border-color: #F16014;
    background: #f160141a;
}

.filter-option.selected {
    border-color: #F16014;
    background: #F16014;
    color: white;
}

.filter-actions {
    display: flex;
    gap: 8px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #F2F2F2;
}

.filter-actions button {
    flex: 1;
    padding: 8px 12px;
    border: none;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    /*transition: all 0.2s ease;*/
    font-size: 0.8rem;
}

.filter-actions .cancel-btn {
    border: 1px solid #F2F2F2;
    background: transparent;
    color: #000;
}

.filter-actions .cancel-btn:hover {
    background: #F2F2F2;
}

.filter-actions .save-btn {
    background: #180A57;
    color: white;
}

.filter-actions .save-btn:hover {
    background: linear-gradient(0deg, #180A57, #180A57),linear-gradient(0deg, rgba(0, 0, 0, 0.16), rgba(0, 0, 0, 0.16));
}

.flag-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    padding: 2px 20px 20px 20px;
    height: 489px;
    overflow-y: auto;
}
.flag-grid::-webkit-scrollbar {
    width: 3px;
}
.flag-grid::-webkit-scrollbar-track {
    background: transparent;
}
.flag-grid::-webkit-scrollbar-thumb {
    background: #F2F2F2;
    border-radius: 3px;
}

.flag-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px 8px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid transparent;
    background: #f9fafa;
}
.flag-item:hover {
    transform: translateY(-2px);
    /*box-shadow: 0px 6px 8.6px 0px #ABABAB14;*/
}
.flag-item.selected {
    border-color: #F16014;
    background: #f160141a;
}

.flag-item .flag-icon {
    width: 32px;
    height: 24px;
    margin-bottom: 8px;
    object-fit: contain;
}
.flag-item .flag-name {
    font-size: 16px;
    font-weight: 600;

    font-size: 14px;
    font-weight: 500;
    color: #989898;
    text-align: center;
    line-height: 1.2;
}


/* Preview Section */

/*.preview-section {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0px 6px 8.6px 0px #ABABAB14;
    border: 1px solid #F2F2F2;
    padding: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
}*/
.flagpin-preview {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    width: 100%;
    background: #fafafa;
    border-radius: 16px;
}
.crossed-flags {
    position: relative;
    display: flex;
}
.crossed-flags > .speldje {
    position: relative;
    width: 100%;
    height: auto;
}
.flag-wrapper {
    position: absolute;
    width: 43.9%;
    /* height: 100px; */
    /*transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);*/
}
.flag-wrapper.left {
    left: 6%;
    top: 21.8%;
    z-index: 1;
    transform: rotateY(180deg);
}
.flag-wrapper.right {
    right: 6%;
    top: 21.8%;
    z-index: 2;
}
.flag-display {
    /*width: 100%; 
    height: 80%;*/
    position: relative;
}
.flag-display img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
/* Switch Button */
.switch-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: #F2F2F2;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-family: 'Outfit', sans-serif;
    font-size: 16px;
    font-weight: 600;
    color: #000;
    transition: all 0.25s ease;
    position: absolute;
    right: 0;
    bottom: 0;
}
.switch-btn:hover {
    background: #000;
    color: white;
    border-color: #000;
}
.switch-btn svg {
    width: 18px;
    height: 18px;
    transform: rotate(90deg);
}

/* Selection Summary */
.summary-section {
    width: 100%;
    margin-top: 12px;
    border: 1px solid #F2F2F2;
    border-radius: 16px;
    box-shadow: 0px 6px 8.6px 0px #ABABAB14;
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: center;
    justify-content: space-between;
    overflow: hidden;
}

.selection-summary {
    /*width: 100%;*/
    padding: 16px;
}
.summary-title {
    margin-bottom: 12px;
}
.summary-items {
    display: flex;
    column-gap: 30px;
    flex-wrap: wrap;
    row-gap: 8px;
}
.summary-item {
    display: flex;
    align-items: center;
    gap: 12px;
}
.summary-label {
    font-size: 16px;
    font-weight: 600;
    color: #989898;
    background: #F2F2F2;
    border-radius: 100px;
    padding: 0px 6px;
}
.summary-flag {
    display: flex;
    align-items: center;
    gap: 8px;
}
.summary-flag img {
    width: 22px;
    height: 20px;
    object-fit: contain;
}
.summary-flag span {
    font-size: 16px;
    font-weight: 600;
}
.summary-flag.empty span {
    color: #989898;
    font-style: italic;
}

/* Add to Cart Section */
.cart-section {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-direction: row;
    background: #1A00880A;
    padding: 14px;
}

.quantity-selector {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.quantity-label {
    font-size: 14px;
    color: #989898;
}
.quantity-select {
    padding: 10px 16px;
    border: none;
    border-radius: 8px;
    font-family: 'Outfit', sans-serif;
    font-size: 0.9rem;
    background: white;
    cursor: pointer;
    min-width: 80px;
}
.quantity-select:focus {
    outline: none;
    border-color: #F16014;
}

.add-to-cart-section {
    display: flex;
    gap: 8px;
    flex-direction: column;
}
.price-label {
    font-size: 14px;
    color: #F16014;
}
.add-to-cart-btn {
    padding: 10px 24px;
    background: #F16014;
    color: #000000;
    border: none;
    border-radius: 8px;
    font-family: 'Outfit', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: 0 4px 16px rgba(232, 93, 4, 0.3);
}
.add-to-cart-btn:hover {
    background: #d15004;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(232, 93, 4, 0.4);
}
.add-to-cart-btn:disabled {
    background: #ccc;
    box-shadow: none;
    cursor: not-allowed;
    transform: none;
}

@media (max-width: 1199px) {
    #configurator {
        display: flex;
        /*gap: 24px;*/
        flex-wrap: wrap;
        /*flex-direction: column;*/
    }
    .preview-section {
        order: -1;
        width: 100%;
    }
    .selection-panel {
        width: calc(50% - 10px);
    }
}
@media (max-width: 767px) {
    .summary-section {
        gap: 4px;
    }
    .cart-section {
        gap: 14px;
        padding: 16px;
        width: 100%;
    }
    .add-to-cart-section {
        width: 100%;
    }
}
@media (max-width: 510px) {
    .filter-btn {
        display: none !important;
    }
    .flag-grid {
        grid-template-columns: repeat(1, 1fr);
    }
}