/* =========================================
   FORMS.CSS - Size Selects, Optional Features
   V22.1 - Restored from v5.1.2 + Bespoke Polish
   ========================================= */

/* Size Note */
.size-note {
    font-size: 0.66rem;
    color: var(--secondary);
    background: linear-gradient(135deg, #FCF9F4 0%, #F7EFE4 100%);
    border: 1px solid #E5D4BE;
    border-radius: 6px;
    padding: 0.42rem 0.65rem;
    margin-bottom: 0.6rem;
    font-weight: 500;
}

/* Size Rows */
.size-row {
    display: grid;
    grid-template-columns: 105px 1fr;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0;
}

.size-row .size-label {
    font-size: 0.76rem;
    font-weight: 600;
    color: var(--primary);
}

.size-row .size-select {
    width: 100%;
    padding: 0.45rem 0.5rem;
    font-size: 0.75rem;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: #FFFFFF;
}

/* Group Size Options */
#groupSizeOptions {
    padding-bottom: 1rem;
}

/* Optional Features Grid */
.optional-features-grid {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    margin-top: 0.5rem;
}

.optional-features-grid .optional-option {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 0.5rem;
    padding: 0.45rem 0;
    border-bottom: 1px dashed var(--border);
}

.optional-features-grid .optional-option:last-child {
    border-bottom: none;
}

.optional-features-grid .optional-option-label {
    font-size: 0.76rem;
    font-weight: 600;
    color: var(--primary);
}

.optional-features-grid .size-select {
    width: 100%;
    padding: 0.4rem 0.5rem;
    font-size: 0.7rem;
}

/* Optional Features (legacy) */
.optional-features {
    display: none !important;
}

/* Optional Option */
.optional-option {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0;
    border-bottom: 1px dashed var(--border);
}

.optional-option:last-child {
    border-bottom: none;
}

.optional-option-label {
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--text);
}

.optional-option .size-select {
    width: 100%;
    min-width: unset !important;
    padding: 0.35rem 0.4rem !important;
    font-size: 0.6rem !important;
    border-radius: 6px;
    border: 1.5px solid var(--border);
    background: #FFFFFF;
    cursor: pointer;
    transition: all 0.2s ease;
}

.optional-option .size-select:focus {
    border-color: var(--accent);
    outline: none;
    box-shadow: 0 0 0 2px rgba(122, 84, 64, 0.15);
}

.optional-option.disabled {
    opacity: 0.4;
    pointer-events: none;
}

/* Duvet Hints */
.duvet-hint {
    display: none;
    grid-column: 1 / -1;
    font-size: 0.55rem;
    padding: 0.3rem 0.4rem;
    border-radius: 5px;
    margin-top: 0.25rem;
    animation: hintFadeIn 0.25s ease-out;
}

.duvet-hint.active {
    display: block;
}

/* Duvet Warning Hint */
.duvet-warning-hint {
    display: none;
    font-size: 0.58rem;
    color: #9A3434;
    background: linear-gradient(135deg, #FFF5F5 0%, #FFE8E8 100%);
    padding: 0.35rem 0.5rem;
    border-radius: 6px;
    margin-top: 0.3rem;
    border: 1px solid #F5C6CB;
    animation: hintFadeIn 0.3s ease-out;
}

.duvet-warning-hint.active {
    display: block;
}

/* Disclaimer Section */
.disclaimer-section {
    padding: 0.6rem !important;
    margin-bottom: 0.6rem !important;
}

#groupDisclaimer {
    padding: 0.8rem;
}

#groupDisclaimer .info-box {
    margin: 0;
}

#groupDisclaimer .color-disclaimer {
    background: linear-gradient(135deg, #FCF9F4 0%, #F7EFE4 100%);
    border: 1px solid #E5D4BE;
    border-radius: 10px;
    padding: 0.8rem;
}

#groupDisclaimer .info-text {
    font-size: 0.72rem;
    line-height: 1.5;
    color: var(--secondary);
}

/* Mobile responsive for size rows */
@media (max-width: 480px) {
    .size-row {
        grid-template-columns: 85px 1fr;
    }

    .size-row .size-label {
        font-size: 0.72rem;
    }

    .size-row .size-select {
        font-size: 0.72rem;
        padding: 0.4rem;
    }

    .optional-features-grid .optional-option {
        grid-template-columns: 1fr 1.2fr;
    }

    .optional-features-grid .optional-option-label {
        font-size: 0.7rem;
    }

    .optional-features-grid .size-select {
        font-size: 0.65rem;
        padding: 0.35rem 0.4rem;
    }
}

/* Mobile responsive */
@media (max-width: 768px) {
    .optional-option {
        grid-template-columns: 1fr 1.2fr;
        gap: 0.35rem;
        padding: 0.3rem 0;
    }

    .optional-option-label {
        font-size: 0.6rem;
    }

    .optional-option .size-select {
        padding: 0.3rem 0.35rem !important;
        font-size: 0.56rem !important;
    }
}

/* =========================================
   STYLE CARDS & LIGHTBOX CSS - V8
   ========================================= */
.style-card-grid {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(125px, 1fr));
    gap: 10px;
    margin-top: 8px;
}

.style-card {
    position: relative;
    background: #FFFFFF;
    border: 1.5px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.35s cubic-bezier(0.22, 1, 0.36, 1);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

.style-card:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 6px 14px rgba(122, 84, 64, 0.2);
}

.style-card:active {
    transform: scale(0.985);
}

.style-card.active {
    border-color: var(--primary);
    background: #FFFBF6;
    box-shadow: 0 0 0 2px rgba(122, 84, 64, 0.28);
}

.style-card-img-wrap {
    position: relative;
    width: 100%;
    height: 95px;
    background: #F8F6F3;
    overflow: hidden;
}

.style-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.style-card:hover .style-card-img {
    transform: scale(1.05);
}

.zoom-btn {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(74, 59, 50, 0.14);
    cursor: pointer;
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    transition: background 0.2s ease, transform 0.2s ease;
}

.zoom-btn:hover {
    background: #FFFFFF;
    transform: scale(1.12);
}

.style-card-check {
    position: absolute;
    bottom: 6px;
    right: 6px;
    width: 21px;
    height: 21px;
    border-radius: 50%;
    background: var(--primary);
    color: #FFFFFF;
    font-size: 11px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: scale(0.5);
    transition: all 0.2s ease;
}

.style-card.active .style-card-check {
    opacity: 1;
    transform: scale(1);
}

.style-card-info {
    padding: 8px 6px;
    text-align: center;
}

.style-card-title {
    font-size: 0.74rem;
    font-weight: 600;
    color: var(--text);
    line-height: 1.25;
}

.style-card.active .style-card-title {
    color: var(--primary);
}

/* Lightbox Modal */
.lightbox-content {
    position: relative;
    max-width: 90vw !important;
    max-height: 90vh !important;
    width: auto !important;
    padding: 16px !important;
    background: #FFFFFF;
    border-radius: 16px;
    text-align: center;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.close-modal {
    position: absolute;
    top: 10px;
    right: 14px;
    font-size: 26px;
    line-height: 1;
    font-weight: 700;
    color: var(--primary);
    cursor: pointer;
    z-index: 2;
}

.lightbox-img {
    max-width: 82vw;
    max-height: 75vh;
    border-radius: 10px;
    object-fit: contain;
}

.lightbox-caption {
    margin-top: 10px;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--primary);
}

#imageLightboxModal {
    display: none;
    position: fixed;
    z-index: 99999;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    align-items: center;
    justify-content: center;
}

#imageLightboxModal.active {
    display: flex;
}

/* Product Grid overrides */
.product-grid {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    gap: 0.5rem !important;
    margin-bottom: 1rem !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

.product-grid .product-item {
    flex: 1 1 calc(25% - 0.5rem) !important;
    min-width: 90px !important;
    max-width: none !important;
    box-sizing: border-box !important;
}

@media (max-width: 600px) {
    .product-grid .product-item {
        flex: 1 1 calc(50% - 0.5rem) !important;
    }
}

/* =========================================
   v22 RESPONSIVE FLEXBOX COMBO LAYOUT
   ========================================= */
.combo-grid-v22 {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    gap: 0.5rem !important;
    margin-top: 0.6rem !important;
    margin-bottom: 1rem !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

.combo-grid-v22 .set-tab {
    flex: 1 1 calc(33.333% - 0.5rem) !important;
    min-width: 110px !important;
    max-width: none !important;
    background: #FFFFFF !important;
    border: 1.5px solid var(--border) !important;
    border-radius: 12px !important;
    padding: 12px 6px !important;
    text-align: center !important;
    cursor: pointer !important;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 65px !important;
    box-sizing: border-box !important;
}

.combo-grid-v22 .set-tab:hover {
    border-color: var(--accent) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 12px rgba(122, 84, 64, 0.15) !important;
}

.combo-grid-v22 .set-tab.active {
    border-color: var(--accent) !important;
    background: #FFFBF6 !important;
    box-shadow: 0 0 0 2.5px rgba(122, 84, 64, 0.22) !important;
}

.combo-grid-v22 .set-name {
    font-size: 0.85rem !important;
    font-weight: 700 !important;
    color: var(--primary) !important;
    line-height: 1.2 !important;
    margin-bottom: 4px !important;
}

.combo-grid-v22 .set-desc {
    font-size: 0.72rem !important;
    color: var(--text-light) !important;
    line-height: 1.3 !important;
    padding: 0 4px !important;
    white-space: normal !important;
}

/* Compact Dropdowns v22 */
select.size-select,
.form-group select,
.optional-option select {
    appearance: none !important;
    -webkit-appearance: none !important;
    background-color: #FCFAF7 !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%234A3B32' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 12px center !important;
    background-size: 14px 14px !important;
    border: 1.5px solid #E2D7CA !important;
    border-radius: 8px !important;
    padding: 7px 32px 7px 12px !important;
    font-size: 0.84rem !important;
    font-weight: 600 !important;
    height: 38px !important;
    color: var(--primary) !important;
    width: 100% !important;
    font-family: var(--font-body) !important;
}

.social-cta-btn.facebook {
    background: #EEF2FA !important;
    color: #1877F2 !important;
    border: 1px solid #C9D8F3 !important;
}

.social-cta-btn.facebook:hover {
    background: #1877F2 !important;
    color: #FFFFFF !important;
}

/* Soft Floating Progress Bar v22 (Fixed so hidden state stays opacity: 0) */
.floating-progress.visible {
    opacity: 0.92 !important;
    transition: opacity 0.25s ease, transform 0.25s ease !important;
}

.floating-progress.visible:hover,
.floating-progress.visible:focus-within {
    opacity: 1 !important;
}

/* Mobile adjustments v22 */
@media (max-width: 600px) {
    .combo-grid-v22 .set-tab {
        flex: 1 1 calc(50% - 0.5rem) !important;
        padding: 8px 4px !important;
    }
    .combo-grid-v22 .set-name {
        font-size: 0.76rem !important;
    }
    .combo-grid-v22 .set-desc {
        font-size: 0.65rem !important;
        white-space: normal !important;
    }
}

