/* ==========================================================================
   HAViK Knife Wizard — Frontend Styles
   ========================================================================== */

/* === STEP ANIMATIONS === */

.wizard-step {
    display: none;
}

.wizard-step.active {
    display: block;
    animation: fadeIn 0.3s ease-in-out;
}

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

.slide-in-right  { animation-name: slideInRight; }
.slide-in-left   { animation-name: slideInLeft; }
.slide-out-left  { animation-name: slideOutLeft; }
.slide-out-right { animation-name: slideOutRight; }

@keyframes slideInRight {
    from { transform: translateX(100%); opacity: 0; }
    to   { transform: translateX(0);    opacity: 1; }
}

@keyframes slideInLeft {
    from { transform: translateX(-100%); opacity: 0; }
    to   { transform: translateX(0);     opacity: 1; }
}

@keyframes slideOutLeft {
    from { transform: translateX(0);     opacity: 1; }
    to   { transform: translateX(-100%); opacity: 0; }
}

@keyframes slideOutRight {
    from { transform: translateX(0);    opacity: 1; }
    to   { transform: translateX(100%); opacity: 0; }
}

/* === OPTION CARDS === */

.step-options {
    display: flex;
    gap: 30px;
    justify-content: center;
    padding-top: 5px !important;
}

.option-card {
    position: relative;
    cursor: pointer;
    border: 1px solid #333;
    padding: 20px;
    width: 350px;
    justify-content: center;
    transition: all 0.2s ease-in-out;
    transform: translateZ(0); /* stable containing block for absolute children */
}

.option-card:hover {
    transform: translateY(-2px);
}

.option-card.selected {
    border: 2px solid #9f1c0e;
}

.option-name {
    font-weight: 900;
    text-transform: uppercase;
    color: white;
    font-size: 24px;
    font-family: Oswald, sans-serif;
    text-align: center;
}

.option-description {
    text-align: center;
    color: #777;
}

/* === PRICING === */

.option-price-range {
    color: #000;
    text-align: center;
    background: #555;
    font-family: Oswald, sans-serif;
    font-weight: 700;
    margin-top: -20px;
    margin-right: -20px;
    margin-left: -20px;
}
.option-card.selected .option-price-range{
    background: #9f1c0e;
}

.option-surcharge {
    position: absolute;
    right: -5px;
    top: -5px;
    color: #000;
    text-align: center;
    background: #ccc;
    font-family: Oswald, sans-serif;
    font-weight: 700;
    border-radius: 20px;
    padding: 2px 10px;
    font-size: 13px;
}

.wizard-running-price {
    text-align: right;
    font-family: Oswald, sans-serif;
    font-weight: bold;
    padding-bottom:6px;
    color: #fff;
}

@keyframes pricePulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.15); }
    100% { transform: scale(1); }
}

.wizard-running-price.pulse .wizard-running-price__amount {
    display: inline-block;
    animation: pricePulse 0.3s ease-in-out;
}

/* === PROGRESS BAR === */

.progress-container {
    display: flex;
    align-items: flex-end;
    padding: 0 20px;
    gap: 10px;
}

.progress-bar {
    width: 100%;
    height: 14px;
    background: #bbb;
    border-radius: 0;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #4a5568 0%, #2d3748 100%);
    transition: width 0.3s ease;
}

/* === NAVIGATION === */

.wizard-navigation {
    background: #000;
    box-shadow: 0 -3px 7px rgba(0, 0, 0, 0.5);
}

#wizard-next[disabled],
#wizard-next:disabled {
    opacity: 0.5 !important;
    cursor: not-allowed !important;
    background-color: #999 !important;
    pointer-events: none !important;
}

/* === OUT OF STOCK / COMING SOON === */

.option-card.out-of-stock > *:not(.option-learn-more),
.option-card.coming-soon > *:not(.option-learn-more) {
    pointer-events: none;
        opacity: 0.5;
    cursor: not-allowed !important;
}

.option-card.coming-soon .option-learn-more,
.option-card.out-of-stock .option-learn-more {
    pointer-events: auto;
    cursor: pointer;
    position: relative;
    z-index: 11;
}
.option-card.coming-soon .option-learn-more,
.option-card.out-of-stock .option-learn-more,
.option-card.coming-soon .coming-soon-badge,
.option-card.out-of-stock .out-of-stock-badge {
    pointer-events: auto;
    cursor: pointer;
    opacity: 1;
}

.out-of-stock-badge {
    position: relative;
    background: #9f1c0e;
    color: white;
    padding: 4px 10px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 11;
    text-align: center;
    width: 95%;
    margin-top: 10px;
}

.coming-soon-badge {
    position: relative;
    background: #9f1c0e;
    color: #000;
    padding: 4px 10px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 11;
    text-align: center;
}

/* === REVIEW PAGE === */

.review-container {
    display: flex;
    gap: 60px;
    padding: 30px 0;
}

.review-image-container {
    max-width: 400px;
}

img.review-sheath-overlay {
    width: 130px !important;
    height: 130px;
    position: absolute;
    bottom: 0;
    left: 290px;
    border: 1px solid #333;
    box-shadow: 0 0 8px 12px rgba(0, 0, 0, 0.3);
}

.review-details h3 {
    text-transform: uppercase;
}

.review-price {
    color: #fff;
    font-weight: bold;
    font-size: 20px;
}

/* === LEARN MORE ACCORDION === */

/* === LEARN MORE ACCORDION (continued) === */

.option-learn-more {
    margin-top: 10px;
    text-align: center;
}

button.learn-more-toggle {
    background: none;
    border: none;
    color: #ccc;
    cursor: pointer;
    font-size: 13px;
    padding: 4px 0;
    text-align: center;
    width: 100%;
    transition: color 0.2s;
    font-family: OSWALD;
}

button.learn-more-toggle:hover,
button.learn-more-toggle:active,
button.learn-more-toggle:focus {
    color: #fff;
    background: none;
}

.learn-more-arrow {
    font-size: 10px;
    display: inline-block;
    transition: transform 0.2s;
    margin-right: 4px;
}

.learn-more-content {
    display: none;
    padding: 12px 0 4px;
    color: #999;
    font-size: 13px;
    line-height: 1.6;
    text-align: left;
    margin-top: 8px;
}

.learn-more-content ul {
    margin: 6px 0 6px 18px;
    padding: 0;
    list-style: disc;
}

.learn-more-content li {
    margin-bottom: 3px;
}

.learn-more-content strong,
.learn-more-content b {
    color: #bbb;
}

/* ==========================================================================
   MOBILE RESPONSIVE
   ========================================================================== */

@media (max-width: 768px) {

    /* Horizontal scroll tiles — left aligned */
    .step-options {
        display: flex !important;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        gap: 15px;
        padding: 0 20px;
        margin: 0;
        -webkit-overflow-scrolling: touch;
        justify-content: flex-start;
    }

    .step-options::-webkit-scrollbar {
        display: none;
    }

    .wizard-step h2 {
        font-size: 20px !important;
    }

    .option-card {
        flex: 0 0 85%;
        scroll-snap-align: start;
        max-width: 350px;
        min-height: 200px;
        padding: 20px !important;
    }

    .option-name {
        font-size: 20px !important;
        margin: 0 10px !important;
    }

    .option-description {
        font-size: 14px !important;
    }

    /* Knife thumbnail in mobile tiles */
    .option-knife-thumb {
        width: 100%;
        margin-bottom: 15px;
        position: relative;
        overflow: hidden;
        border-radius: 8px;
    }

    .option-knife-thumb img {
        width: 100%;
        height: auto;
        display: block;
    }

    .option-knife-thumb-link {
        display: block;
        text-decoration: none;
    }

    /* Hide desktop knife preview on mobile */
    #knife-preview-container {
        display: none !important;
    }

    /* Sticky progress bar */
    .wizard-progress {
        position: sticky;
        top: 0;
        background: transparent;
        z-index: 100;
        padding: 15px 0;
        box-shadow: none;
    }

    .wizard-progress > div,
    .wizard-progress > * {
        background: transparent !important;
    }

    /* Larger buttons on mobile */
    .wizard-navigation button {
        padding: 18px 30px !important;
        font-size: 18px !important;
        min-height: 56px;
    }

    /* Review details mobile */
    .review-container {
        display: flex;
        flex-direction: column;
        gap: 30px;
        padding: 30px 0;
    }

    .review-config-list li {
        font-size: 14px;
    }

    img.review-sheath-overlay {
        width: 80px !important;
        height: 80px;
        position: absolute;
        right: 20px;
        top: 20px;
    }
}
