.order-card {
    background: #fff;
    width: 100%;
    max-width: 500px;
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    margin: auto;
    text-align: center;
    box-sizing: border-box;
}

.order-card h2 {
    text-align: center;
    margin-bottom: 30px;
    color: var(--black);
}

.count-box {
    background: #f9f9f9;
    border: 2px solid #eee;
    padding: 15px 20px;
    border-radius: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
}

.count-box .number {
    font-size: 1.8rem;
    font-weight: 900;
    color: var(--black);
}

/* انتخابگر رنگ هولدر اسنک — دایره‌ای، هماهنگ با سایت */
.color-selector-wrap {
    margin-bottom: 28px;
    text-align: center;
}

.color-selector-wrap .label {
    display: block;
    font-size: 0.95rem;
    font-weight: 600;
    color: #4d4d4d;
    margin-bottom: 12px;
}

.color-selector {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.color-option {
    width: 44px;
    height: 44px;
    padding: 0;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.color-option:hover {
    transform: scale(1.08);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.color-option.active {
    transform: scale(1.12);
    box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--yellow, #ffdd00);
}

.color-swatch {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: block;
}

.color-clear {
    background: linear-gradient(135deg, rgba(255,255,255,0.9) 0%, rgba(220,220,220,0.6) 100%);
    border: 2px solid rgba(0,0,0,0.12);
}

.color-orange {
    background: #e67e22;
}

.color-black {
    background: #252525;
}

.color-yellow {
    background: var(--yellow, #ffdd00);
    border: 1px solid rgba(0,0,0,0.08);
}

/* =========================================
   استایل جدید و تضمینی اسلایدر
   ========================================= */
.slider-container {
    width: 100%;
    padding: 10px 0;
    margin-bottom: 30px;
}

/* Fallbacks so progress/thumb work even if :root vars are missing */
input[type=range] {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 12px;
    border-radius: 10px;
    cursor: pointer;
    outline: none;
    --slider-pct: 0%;
    --range-yellow: var(--yellow, #ffdd00);
    --range-gray: var(--gray-track, #e0e0e0);
    --range-thumb: var(--black, #19191a);
    background: linear-gradient(to left, var(--range-yellow) 0%, var(--range-gray) 0%);
}

/* ----- Track + progress: Chrome, Edge, Opera (WebKit/Blink) ----- */
input[type=range]::-webkit-slider-runnable-track {
    -webkit-appearance: none;
    height: 12px;
    border-radius: 10px;
    background: linear-gradient(to left, var(--range-yellow) 0%, var(--range-yellow) var(--slider-pct, 0%), var(--range-gray) var(--slider-pct, 0%), var(--range-gray) 100%);
}

/* ----- Progress bar + Track: Firefox ----- */
input[type=range]::-moz-range-track {
    height: 12px;
    border-radius: 10px;
    background: var(--range-gray);
}

input[type=range]::-moz-range-progress {
    height: 12px;
    border-radius: 10px;
    background: var(--range-yellow);
}

/* ----- Thumb (circle): Chrome, Edge, Opera ----- */
input[type=range]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--range-thumb);
    border: 4px solid #fff;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
    cursor: pointer;
    margin-top: -10px;
}

/* ----- Thumb (circle): Firefox ----- */
input[type=range]::-moz-range-thumb {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--range-thumb);
    border: 4px solid #fff;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
    cursor: pointer;
    box-sizing: border-box;
}

input[type=range]::-moz-focus-outer {
    border: 0;
}

/* ========================================= */

.price-info .row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    font-weight: 500;
    color: #555;
}

.strike-through {
    text-decoration: line-through;
    color: #999;
}

.profit-row {
    color: #2e7d32 !important;
    background: #e8f5e9;
    padding: 8px 10px;
    border-radius: 8px;
    font-weight: bold !important;
}

.final-section {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px dashed #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.final-label {
    font-size: 1.1rem;
    font-weight: bold;
}

.final-price-box {
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--black);
}

.final-price-box .currency {
    font-size: 0.9rem;
    font-weight: normal;
    color: #777;
}

.btn-buy {
    width: 100%;
    background: var(--yellow);
    border: none;
    padding: 16px;
    border-radius: 50px;
    font-size: 17px;
    font-weight: 700;
    margin-top: 35px;
    cursor: pointer;
    transition: 0.2s;
    color: var(--black);
    background-color: #ffdd00;
    font-family: 'fontiran';
}

.btn-buy:hover {
    opacity: 0.9;
    transform: scale(1.02);
}

.order-card img {
    height: 160px;
    display: inline-block;
    margin: 20px;
}

/* Order-card: responsive on tablet and mobile */
@media (max-width: 1024px) {
    .order-card {
        max-width: 100%;
        padding: 24px 20px;
    }

    .count-box {
        flex-wrap: wrap;
        gap: 8px;
    }

    .count-box .label,
    .count-box .value-group {
        flex: 1 1 auto;
    }

    .price-info .row {
        flex-wrap: wrap;
        gap: 4px;
    }

    .final-section {
        flex-wrap: wrap;
        gap: 8px;
    }
}

@media (max-width: 767px) {
    .order-card {
        padding: 20px 14px;
        margin-left: 0;
        margin-right: 0;
        border-radius: 16px;
    }

    .order-card h2 {
        font-size: 1.2rem;
        margin-bottom: 18px;
    }

    .color-selector-wrap {
        margin-bottom: 22px;
    }

    .color-option {
        width: 40px;
        height: 40px;
    }

    .color-swatch {
        width: 32px;
        height: 32px;
    }

    .order-card img {
        height: 120px;
        margin: 12px;
        max-width: 100%;
        object-fit: contain;
    }

    .count-box {
        padding: 12px 14px;
        margin-bottom: 24px;
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }

    .count-box .label {
        text-align: center;
    }

    .count-box .value-group {
        justify-content: center;
    }

    .count-box .number {
        font-size: 1.5rem;
    }

    .slider-container {
        padding: 8px 0;
        margin-bottom: 22px;
    }

    .price-info .row {
        align-items: flex-start;
        gap: 2px;
        margin-bottom: 10px;
    }

    .price-info .row span:first-child {
        font-size: 0.9rem;
    }

    .final-section {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
        margin-top: 16px;
        padding-top: 16px;
    }

    .final-label {
        font-size: 1rem;
    }

    .final-price-box {
        font-size: 1.25rem;
        justify-content: center;
    }

    .btn-buy {
        padding: 14px 12px;
        font-size: 15px;
        margin-top: 24px;
    }
}