/**
 * Nail Polish Selector - Styles v5.6 FIXED
 * FIXED: Vertical left thumbnails (no horizontal scroll)
 * FIXED: Full-width button below model hand
 * FIXED: Proper main image display
 * Primary Color: #842d8a
 */

/* === GLOBAL STYLES === */
.nps-selector-container {
    cursor: default;
    box-sizing: border-box;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
}

.nps-selector-container * {
    box-sizing: border-box;
}

/* === SELECTOR HEADER === */
.nps-selector-header {
    text-align: center;
    margin-bottom: 50px;
    margin-top: 50px !important;
}

.nps-selector-header h1 {
    font-size: 42px;
    font-weight: 600;
    color: #000000;
    margin: 0 0 15px 0;
    line-height: 1.15em;
}

/* === BRAND & COLOR SELECTOR === */
.nps-brand-color-selector {
    background: #ffffff;
    border-radius: 20px;
    padding: 40px;
    margin-bottom: 60px;
    border: 1px solid #D6D6D6;
}

/* Brand Tabs */
.nps-brand-tabs {
    display: flex;
    gap: 15px;
    margin-bottom: 40px;
    flex-wrap: wrap;
    justify-content: center;
    border-bottom: 2px solid #f4f4f4;
    padding-bottom: 50px;
}

.nps-brand-tab {
    padding: 12px 28px;
    font-size: 16px;
    font-weight: 500;
    background: transparent;
    border: 2px solid #f2f2f2;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s linear;
    color: #000000;
    line-height: 1.65em;
}

.nps-brand-tab:hover {
    border-color: #842d8a;
    color: #842d8a;
}

.nps-brand-tab.active {
    background: #842d8a;
    border-color: #842d8a;
    color: #ffffff;
}

/* === MODEL HAND PREVIEW + COLOR GRID WRAPPER === */
.nps-selector-content-wrapper {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 40px;
    margin-top: 30px;
}

/* === MODEL HAND SECTION (LEFT SIDE) === */
.nps-model-hand-section {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.nps-model-hand-preview {
    position: relative;
    background: #fae8f0;
    border-radius: 15px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 400px;
}

.nps-model-hand-image-wrapper {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nps-model-hand-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: all 0.3s linear;
}

.nps-model-hand-preview:hover .nps-model-hand-image-wrapper img {
    transform: scale(1.02);
}

.nps-model-hand-placeholder {
    text-align: center;
    padding: 40px 20px;
    color: #999;
}

.nps-model-hand-placeholder p {
    font-size: 18px;
    font-weight: 500;
    margin: 0;
    color: #842d8a;
    opacity: 0.6;
}

/* FULL-WIDTH BUTTON BELOW MODEL HAND - FIXED */
#npsModelHandButton {
    width: 100%;
}

.nps-add-to-quote-btn.nps-model-hand-btn {
    width: 100% !important;
    min-width: 100% !important;
    padding: 14px 30px !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    background-color: #842d8a !important;
    color: #ffffff !important;
    border: 2px solid #842d8a !important;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s linear;
    display: block !important;
    text-align: center;
    text-decoration: none;
    line-height: 1.5;
    text-transform: none;
    letter-spacing: 0;
    margin: 0;
}

.nps-add-to-quote-btn.nps-model-hand-btn:hover {
    background-color: #a33cac !important;
    border-color: #a33cac !important;
    color: #ffffff !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(132, 45, 138, 0.3);
}

/* === COLOR GRID (RIGHT SIDE) === */
.nps-colors-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 14px;
    align-content: start;
}

/* Horizontal scroll on desktop when swatches overflow */

    .nps-colors-grid {
        grid-auto-flow: column;
        grid-template-rows: repeat(5, 80px);
        overflow-x: auto;
        overflow-y: hidden;
        align-content: unset;
        padding-bottom: 8px;
    scrollbar-gutter: stable;

    }

    .nps-colors-grid::-webkit-scrollbar {
        height: 5px;
    }

    .nps-colors-grid::-webkit-scrollbar-track {
        background: #f4f4f4;
        border-radius: 3px;
    }

    .nps-colors-grid::-webkit-scrollbar-thumb {
        background: #ccc;
        border-radius: 3px;
    }

    .nps-colors-grid::-webkit-scrollbar-thumb:hover {
        background: #842d8a;
    }


/* @media (max-width: 768px) {
    .nps-colors-grid {
        grid-template-rows: unset;
        grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
        grid-auto-flow: row;
        grid-auto-columns: unset;
        overflow-x: unset;
        overflow-y: unset;
        padding-bottom: 0;
    }
}
 */
.nps-color-swatch {
    width: 80px;
    height: 80px;
    background: #ffffff;
    border-radius: 8px;
    border: 2px solid transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.25s ease;
    overflow: hidden;
}

.nps-color-swatch:hover {
    border-color: #842d8a;
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(132, 45, 138, 0.25);
}

.nps-color-swatch.selected {
    border-color: #842d8a;
    box-shadow: 0 4px 14px rgba(132, 45, 138, 0.35);
}

.nps-color-swatch-image {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nps-color-swatch-image img {
    width: auto !important;
    height: auto !important;
    max-width: 55%;
    max-height: 70%;
    object-fit: contain !important;
    display: block;
}

/* === SELECTED PRODUCT DISPLAY === */
.nps-selected-product-display {
    margin-top: 60px;
    animation: fadeInUp 0.5s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.nps-product-section {
    width: 100%;
    background: #ffffff;
    border-radius: 20px;
    padding: 50px;
    border: 1px solid #fff;
}

.nps-product-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: start;
}

/* === LEFT THUMBNAIL GALLERY - FIXED (VERTICAL ONLY) === */
.nps-product-images-wrapper {
    display: grid;
    grid-template-columns: 90px 1fr;
    gap: 20px;
    position: sticky;
    top: 100px;
}

/* VERTICAL THUMBNAILS - NO HORIZONTAL SCROLL */
.nps-product-thumbnails {
    display: flex;
    flex-direction: column !important;
    gap: 12px;
    max-height: 600px;
    overflow-y: auto;
    padding-right: 8px;
}

.nps-product-thumbnails::-webkit-scrollbar {
    width: 6px;
}

.nps-product-thumbnails::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.nps-product-thumbnails::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}

.nps-product-thumbnails::-webkit-scrollbar-thumb:hover {
    background: #999;
}

.nps-thumbnail-item {
    width: 90px;
    height: 90px;
    border: 2px solid #D6D6D6;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    background: #f9f9f9;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.nps-thumbnail-item:hover {
    border-color: #842d8a;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(132, 45, 138, 0.2);
}

.nps-thumbnail-item.active {
    border-color: #842d8a;
    border-width: 3px;
    box-shadow: 0 4px 12px rgba(132, 45, 138, 0.3);
}

.nps-thumbnail-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* MAIN IMAGE - FIXED */
.nps-main-image-container {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    min-height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nps-main-image {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nps-main-image img {
    max-width: 100%;
    max-height: 600px;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
}

/* Right Column: Details */
.nps-product-details-column {
    padding-top: 0;
}

.nps-product-title-section {
    margin-bottom: 25px;
    border-bottom: 1px solid #D6D6D6;
    padding-bottom: 20px;
}

.nps-product-title {
    font-size: 36px;
    font-weight: 600;
    line-height: 1.15em;
    color: #000000;
    margin: 0;
}

.nps-product-meta-info {
    margin-bottom: 25px;
    font-size: 16px;
    color: #000000;
    line-height: 1.65em;
}

.nps-product-meta-info p {
    margin: 0 0 8px 0;
}

.nps-product-meta-info strong {
    font-weight: 600;
    color: #000000;
}

/* === ACCORDION === */
.wdt-accordion-toggle-holder {
    margin-bottom: 30px;
}

.wdt-accordion-toggle-wrapper {
    margin-bottom: 0;
    border: 1px solid #D6D6D6;
    border-radius: 5px;
    overflow: hidden;
    background: #ffffff;
}

.wdt-accordion-toggle-wrapper:not(:last-child) {
    margin-bottom: 10px;
}

.wdt-accordion-toggle-title-holder {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px;
    background: #f9f9f9;
    cursor: pointer;
    transition: all 0.3s ease;
    user-select: none;
}

.wdt-accordion-toggle-title-holder:hover {
    background: #f0f0f0;
}

.wdt-accordion-toggle-title-holder.ui-state-active {
    background: #842d8a;
}

.wdt-accordion-toggle-title-holder.ui-state-active .wdt-accordion-toggle-title {
    color: #ffffff;
}

.wdt-accordion-toggle-title {
    font-size: 16px;
    font-weight: 600;
    color: #000000;
    flex-grow: 1;
    line-height: 1.4;
}

.wdt-accordion-toggle-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    margin-left: 15px;
    position: relative;
}

.wdt-accordion-toggle-icon-expand,
.wdt-accordion-toggle-icon-collapse {
    position: absolute;
    transition: opacity 0.3s ease;
}

.wdt-accordion-toggle-title-holder.ui-state-active .wdt-accordion-toggle-icon-expand {
    opacity: 0;
}

.wdt-accordion-toggle-title-holder.ui-state-active .wdt-accordion-toggle-icon-collapse {
    opacity: 1;
}

.wdt-accordion-toggle-title-holder:not(.ui-state-active) .wdt-accordion-toggle-icon-expand {
    opacity: 1;
}

.wdt-accordion-toggle-title-holder:not(.ui-state-active) .wdt-accordion-toggle-icon-collapse {
    opacity: 0;
}

.wdt-accordion-toggle-icon svg {
    width: 20px;
    height: 10px;
    fill: #000000;
}

.wdt-accordion-toggle-title-holder.ui-state-active .wdt-accordion-toggle-icon svg {
    fill: #ffffff;
}

.wdt-accordion-toggle-description {
    padding: 25px 20px;
    background: #ffffff;
    font-size: 15px;
    line-height: 1.65em;
    color: #000000;
    border-top: 1px solid #D6D6D6;
    display: none;
}

.wdt-accordion-toggle-description.ui-accordion-content-active {
    display: block;
}

.wdt-accordion-toggle-description p {
    margin: 0 0 15px 0;
}

.wdt-accordion-toggle-description p:last-child {
    margin-bottom: 0;
}

.wdt-accordion-toggle-description b,
.wdt-accordion-toggle-description strong {
    font-weight: 600;
}

/* === BUTTON SECTION === */
.nps-button-section {
    margin-top: 35px;
    padding-top: 25px;
    border-top: 1px solid #D6D6D6;
}

.nps-single-button-container {
    display: flex;
    justify-content: center;
}

.nps-add-to-quote-btn {
    padding: 16px 40px;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #842d8a;
    background-color: #842d8a !important;
    color: #ffffff !important;
    min-width: 220px;
}

.nps-add-to-quote-btn:hover {
    background-color: #a33cac !important;
    border-color: #a33cac !important;
    color: #ffffff !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(132, 45, 138, 0.3);
}

.nps-add-to-quote-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

.nps-quote-btn.view-quote-list {
    background-color: #842d8a !important;
    border-color: #842d8a !important;
    color: #ffffff !important;
    padding: 16px 40px;
    font-size: 16px;
    font-weight: 600;
    min-width: 220px;
    border-radius: 5px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.nps-quote-btn.view-quote-list:hover {
    background-color: #842d8a !important;
    border-color: #842d8a !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(132, 45, 138, 0.3);
}

/* Loading & Empty States */
.nps-loading {
    text-align: center;
    padding: 40px;
    font-size: 16px;
    color: #666;
}

.nps-empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.nps-error {
    text-align: center;
    padding: 40px;
    color: #d00;
}

/* === RESPONSIVE === */
@media (max-width: 992px) {
    .nps-selector-content-wrapper {
        grid-template-columns: 1fr;
    }
    
    .nps-product-container {
        grid-template-columns: 1fr;
    }
    
    .nps-product-images-wrapper {
        position: relative;
        top: 0;
    }
    
    .nps-product-title {
        font-size: 28px;
    }
}

@media (max-width: 768px) {
    .nps-selector-header h1 {
        font-size: 32px;
    }
    
    .nps-brand-color-selector,
    .nps-product-section {
        padding: 25px;
    }
    
    .nps-product-title {
        font-size: 24px;
    }
    
    .nps-product-images-wrapper {
        grid-template-columns: 70px 1fr;
        gap: 15px;
    }
    
    .nps-thumbnail-item {
        width: 70px;
        height: 70px;
    }
    
    .nps-main-image-container {
        min-height: 350px;
    }
    
    .nps-main-image img {
        max-height: 400px;
    }
}

@media (max-width: 480px) {
    .nps-selector-header h1 {
        font-size: 24px;
    }
    
    .nps-product-title {
        font-size: 20px;
    }
    
    .nps-brand-tabs {
        flex-direction: column;
    }
    
    .nps-brand-tab {
        width: 100%;
        text-align: center;
    }
    
    .nps-colors-grid {
        grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
        gap: 10px;
    }
    
    .nps-color-swatch {
        width: 70px;
        height: 70px;
    }
    
    .nps-product-images-wrapper {
        grid-template-columns: 60px 1fr;
        gap: 10px;
    }
    
    .nps-thumbnail-item {
        width: 60px;
        height: 60px;
    }
    
    .nps-add-to-quote-btn,
    .nps-quote-btn.view-quote-list {
        width: 100%;
        min-width: 100%;
    }
}


/* === UNIFIED BUTTON STYLES - ALL BUTTONS SAME & FULL WIDTH === */
.nps-quote-btn.button.view-quote-list,
.nps-add-to-quote-btn,
.nps-add-to-quote-btn.nps-model-hand-btn,
.nps-add-to-quote-btn.button {
    padding: 10px 40px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    background-color: #842d8a !important;
    color: #ffffff !important;
    border: 2px solid #842d8a !important;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s linear;
    display: flex !important;
    align-items: center;
    justify-content: center;
    text-align: center;
    text-decoration: none;
    line-height: 1.5;
    text-transform: uppercase;
    letter-spacing: 0;
    margin: 0;
    width: 100% !important;
    min-width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    box-shadow: none;
}

/* Make parent containers allow full width if needed */
.nps-single-button-container,
.nps-model-hand-section,
.nps-button-section {
    width: 100%;
}

.nps-quote-btn.button.view-quote-list:hover,
.nps-add-to-quote-btn:hover,
.nps-add-to-quote-btn.nps-model-hand-btn:hover,
.nps-add-to-quote-btn.button:hover {
    background-color: #a33cac !important;
    border-color: #a33cac !important;
    color: #ffffff !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(132, 45, 138, 0.3);
}