/* ==========================================
   Jeans Guide - Floating Bubble + Modal
   ========================================== */

/* Scroll lock */
body.jg-no-scroll {
    overflow: hidden;
}

/* ---- Floating bubble ---- */
#jg-bubble {
    position: fixed;
    bottom: 30px;
    right: 30px;
    left: auto;
    z-index: 9990;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    background: var(--maincolor, #FF9800);
    color: #fff;
    border: none;
    border-radius: 50px;
    padding: 14px 20px;
    cursor: pointer;
    box-shadow: 0 6px 24px rgba(255, 152, 0, 0.45);
    transition: transform 0.2s, box-shadow 0.2s;
    font-family: inherit;
}

#jg-bubble:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 32px rgba(255, 152, 0, 0.55);
}

.jg-bubble-icon {
    font-size: 26px;
    line-height: 1;
}

.jg-bubble-label {
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
}

/* ---- Overlay ---- */
#jg-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9991;
    backdrop-filter: blur(2px);
}

#jg-overlay.open {
    display: block;
    animation: jgFadeIn 0.2s ease;
}

/* ---- Modal ---- */
#jg-modal {
    display: none;
    position: fixed;
    bottom: 100px;
    right: 30px;
    left: auto;
    width: 520px;
    max-width: calc(100vw - 40px);
    max-height: 80vh;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    z-index: 9992;
    overflow: hidden;
    flex-direction: column;
}

#jg-modal.open {
    display: flex;
    animation: jgSlideUp 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes jgSlideUp {
    from { opacity: 0; transform: translateY(20px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes jgFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* Modal header */
.jg-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: var(--maincolor, #FF9800);
    color: #fff;
    flex-shrink: 0;
}

.jg-modal-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.jg-modal-icon {
    font-size: 28px;
}

.jg-modal-title strong {
    display: block;
    font-size: 16px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.jg-modal-title span {
    display: block;
    font-size: 12px;
    opacity: 0.85;
}

.jg-close {
    background: rgba(255,255,255,0.2);
    border: none;
    color: #fff;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    flex-shrink: 0;
}

.jg-close:hover {
    background: rgba(255,255,255,0.35);
}

/* Stappen */
.jg-steps {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px 20px;
    border-bottom: 1px solid #f0f0f0;
    background: #fafafa;
    flex-shrink: 0;
    gap: 0;
}

.jg-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    opacity: 0.35;
    transition: opacity 0.3s;
}

.jg-step.active,
.jg-step.completed {
    opacity: 1;
}

.jg-step-number {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #ddd;
    color: #fff;
    font-weight: 800;
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
}

.jg-step.active .jg-step-number {
    background: var(--maincolor, #FF9800);
}

.jg-step.completed .jg-step-number {
    background: #333;
}

.jg-step-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #555;
}

.jg-step-divider {
    width: 50px;
    height: 2px;
    background: #e0e0e0;
    margin: 0 8px 18px 8px;
}

/* Modal body (scrollable) */
.jg-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

/* Panels */
.jg-panel {
    display: none;
}

.jg-panel.active {
    display: block;
    animation: jgFadeIn 0.25s ease;
}

.jg-panel h3 {
    font-size: 17px;
    font-weight: 700;
    margin: 0 0 16px 0;
    text-align: center;
}

/* Terug */
.jg-back {
    background: none;
    border: none;
    font-size: 13px;
    font-weight: 600;
    color: #999;
    cursor: pointer;
    padding: 0;
    margin-bottom: 14px;
    display: block;
    transition: color 0.2s;
}

.jg-back:hover { color: #333; }

/* Opties */
.jg-options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

/* Pasvorm knoppen */
.jg-pasvorm-options .jg-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 14px 16px;
    border: 2px solid #e8e8e8;
    border-radius: 10px;
    background: #fff;
    cursor: pointer;
    transition: all 0.2s;
    min-width: 100px;
    font-family: inherit;
}

.jg-pasvorm-options .jg-option:hover {
    border-color: var(--maincolor, #FF9800);
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(0,0,0,0.08);
}

.jg-pasvorm-options .jg-option.selected {
    border-color: var(--maincolor, #FF9800);
    background: var(--maincolor, #FF9800);
    color: #fff;
}

.jg-option-icon { font-size: 22px; }

.jg-option-label {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

/* Maat knoppen */
.jg-maat-options .jg-option {
    padding: 10px 16px;
    border: 2px solid #e8e8e8;
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
    font-weight: 700;
    font-size: 13px;
    transition: all 0.2s;
    min-width: 70px;
    text-align: center;
    font-family: inherit;
}

.jg-maat-options .jg-option:hover {
    border-color: var(--maincolor, #FF9800);
    transform: translateY(-2px);
}

.jg-maat-options .jg-option.selected {
    border-color: var(--maincolor, #FF9800);
    background: var(--maincolor, #FF9800);
    color: #fff;
}

/* Producten grid */
.jg-products {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.jg-product {
    text-decoration: none;
    color: #333;
    display: block;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #f0f0f0;
    transition: all 0.2s;
    position: relative;
}

.jg-product:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
}

.jg-product-img {
    aspect-ratio: 3/4;
    overflow: hidden;
    background: #f7f7f7;
}

.jg-product-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.jg-product:hover .jg-product-img img {
    transform: scale(1.04);
}

.jg-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: var(--maincolor, #FF9800);
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    padding: 3px 7px;
    border-radius: 4px;
}

.jg-product-info {
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.jg-brand {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    color: #bbb;
    letter-spacing: 0.05em;
}

.jg-name {
    font-size: 13px;
    font-weight: 600;
    color: #222;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.jg-price {
    font-size: 14px;
    font-weight: 800;
    color: var(--maincolor, #FF9800);
}

/* Loading & states */
.jg-loading {
    text-align: center;
    padding: 30px;
    color: #bbb;
    font-style: italic;
    width: 100%;
}

.jg-error {
    text-align: center;
    color: #999;
    width: 100%;
    padding: 20px 0;
}

.jg-no-results {
    text-align: center;
    padding: 30px 20px;
}

.jg-no-results p {
    color: #777;
    margin-bottom: 16px;
    font-size: 14px;
}

.jg-reset {
    background: #333;
    color: #fff;
    border: none;
    padding: 10px 24px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    text-transform: uppercase;
    transition: background 0.2s;
    font-family: inherit;
}

.jg-reset:hover {
    background: var(--maincolor, #FF9800);
}

/* Mobiel */
@media screen and (max-width: 600px) {
    #jg-modal {
        bottom: 90px;
        right: 10px;
        left: 10px;
        width: auto;
        max-height: 75vh;
    }

    #jg-bubble {
        bottom: 20px;
        right: 20px;
        left: auto;
    }
}
