/* =============================================
   ENHANCED VARIANT SWITCHER UI
   Beautiful, organized 3-tier style system
   ============================================= */

.style-switcher-container {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 28px;
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.2);
    margin-bottom: 32px;
}

.variant-label {
    font-size: 15px;
    font-weight: 700;
    color: #FFFFFF;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 0 0 16px 0;
}

/* Style Tabs (Major Categories) */
.style-tabs {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.gallery-layout-tabs.style-tabs {
    flex-wrap: wrap;
}

.gallery-layout-tabs .style-tab {
    flex: 1 1 auto;
    min-width: 100px;
}

/* Hidden on most layouts (price is in the meta <ul>). Collection layout overrides. */
.collection-card-top {
    display: none !important;
}

/* Card Info "Name, size & price": price lives in .collection-card-top — must beat rule above */
body.gallery-info-essentials #pinBoot .collection-card-top {
    display: flex !important;
    align-items: center;
    justify-content: center;
    min-width: 0;
}

.style-tab {
    flex: 1;
    min-width: 140px;
    padding: 14px 20px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    color: #FFFFFF;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.style-tab i {
    font-size: 16px;
}

.style-tab:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

.style-tab.active {
    background: #FFFFFF;
    color: #667eea;
    border-color: #FFFFFF;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(255, 255, 255, 0.3);
}

.style-tab:focus {
    outline: none;
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.3);
}

/* Theme Section */
.variant-themes {
    padding-top: 20px;
    border-top: 2px solid rgba(255, 255, 255, 0.2);
}

.theme-label {
    font-size: 13px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0 0 12px 0;
}

.theme-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.variant-btn {
    padding: 12px 20px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    color: #FFFFFF;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
}

.variant-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
}

.variant-btn.active {
    background: #FFFFFF;
    color: #667eea;
    border-color: #FFFFFF;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.4);
}

.variant-btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.3);
}

/* Responsive Design */
@media (max-width: 991px) {
    .style-switcher-container {
        padding: 24px 20px;
    }

    .style-tabs {
        flex-direction: column;
    }

    .style-tab {
        width: 100%;
        min-width: unset;
    }
}

@media (max-width: 767px) {
    .style-switcher-container {
        padding: 20px 16px;
        border-radius: 12px;
    }

    .variant-label {
        font-size: 14px;
        margin-bottom: 12px;
    }

    .style-tab {
        padding: 12px 16px;
        font-size: 13px;
    }

    .theme-buttons {
        gap: 8px;
    }

    .variant-btn {
        flex: 1 1 calc(50% - 4px);
        min-width: calc(50% - 4px);
        padding: 10px 16px;
        font-size: 12px;
        text-align: center;
    }
}

/* Animation on Load */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.style-switcher-container {
    animation: fadeInUp 0.6s ease-out;
}

/* Loading State */
.style-switcher-container.loading {
    opacity: 0.6;
    pointer-events: none;
}

.style-switcher-container.loading::after {
    content: 'Loading...';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
}

/* Hover Effects for Touch Devices */
@media (hover: none) {
    .style-tab:hover,
    .variant-btn:hover {
        transform: none;
    }

    .style-tab:active {
        transform: scale(0.98);
    }

    .variant-btn:active {
        transform: scale(0.96);
    }
}
