/* ===== CART OVERLAY ===== */
.cart-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1998;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.cart-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* ===== CUSTOMER FORM MODAL ===== */
.customer-form-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition, all 0.4s ease);
}

.customer-form-modal.active {
    opacity: 1;
    visibility: visible;
}

.customer-form-content {
    background: #fff;
    max-width: 500px;
    width: 90%;
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    transform: translateY(20px);
    transition: var(--transition, all 0.4s ease);
    border: 3px solid var(--secondary, #FFD166);
}

.customer-form-modal.active .customer-form-content {
    transform: translateY(0);
}

.customer-form-header {
    position: relative;
    margin-bottom: 30px;
}

.customer-form-header h2 {
    font-size: clamp(1.5rem, 2.5vw, 2rem);
    color: var(--primary-dark, #E94E1B);
    font-family: 'Amiri', serif;
}

.close-customer-form {
    position: absolute;
    top: -20px;
    left: -20px;
    background: var(--accent, #EF476F);
    color: #fff;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    font-size: 20px;
    cursor: pointer;
    transition: var(--transition, all 0.4s ease);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: var(--touch-min);
    min-width: var(--touch-min);
}

.close-customer-form:hover {
    transform: rotate(90deg);
}

/* ===== CONFIRMATION MODAL ===== */
.confirmation-section {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition, all 0.4s ease);
}

.confirmation-section.active {
    opacity: 1;
    visibility: visible;
}

.confirmation-content {
    background: #fff;
    max-width: 500px;
    width: 90%;
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    transform: translateY(20px);
    transition: var(--transition, all 0.4s ease);
    border: 3px solid var(--secondary, #FFD166);
}

.confirmation-section.active .confirmation-content {
    transform: translateY(0);
}

.confirmation-icon {
    width: 80px;
    height: 80px;
    background: var(--primary, #FF6B35);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    animation: pulse 1.5s infinite;
}

.confirmation-icon i {
    font-size: 40px;
    color: #fff;
}

.confirmation-content h2 {
    font-size: clamp(1.5rem, 2.5vw, 2rem);
    color: var(--primary-dark, #E94E1B);
    margin-bottom: 20px;
}

.confirmation-content p {
    font-size: clamp(0.95rem, 1.1vw, 1.1rem);
    line-height: 1.7;
    margin-bottom: 30px;
    color: var(--dark, #2c3e50);
}

.continue-btn {
    background: linear-gradient(135deg, var(--primary, #FF6B35) 0%, var(--primary-dark, #E94E1B) 100%);
    color: #fff;
    border: none;
    padding: 15px 40px;
    font-size: clamp(1rem, 1.1vw, 1.1rem);
    font-weight: 700;
    border-radius: 50px;
    cursor: pointer;
    transition: var(--transition, all 0.4s ease);
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 auto;
    min-height: var(--touch-min);
}

.continue-btn:hover {
    box-shadow: 0 5px 15px rgba(46, 204, 113, 0.4);
}

/* ===== TRUCK ANIMATION ===== */
.truck-animation {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 3000;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.truck-animation.active {
    display: flex;
}

.truck-container {
    width: 200px;
    height: 100px;
    position: relative;
    margin-bottom: 30px;
}

.truck {
    position: absolute;
    bottom: 0;
    left: -100px;
    font-size: 60px;
    color: var(--secondary, #FFD166);
    animation: drive 3s linear forwards;
}

.road {
    position: absolute;
    bottom: 10px;
    left: 0;
    width: 100%;
    height: 4px;
    background: #666;
    border-radius: 2px;
    overflow: hidden;
}

.road::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, var(--gold, #FFD700), transparent);
    animation: roadLine 1s linear infinite;
}

@keyframes drive {
    0% { left: -100px; }
    100% { left: 300px; }
}

@keyframes roadLine {
    0% { left: -100%; }
    100% { left: 100%; }
}

.loading-text {
    color: #fff;
    font-size: clamp(1.2rem, 1.5vw, 1.5rem);
    font-weight: 700;
    text-align: center;
    margin-top: 20px;
}

/* ===== WEIGHT MODAL ===== */
.weight-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition, all 0.4s ease);
}

.weight-modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: #fff;
    max-width: 500px;
    width: 90%;
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    transform: scale(0.8);
    transition: var(--transition, all 0.4s ease);
    border: 3px solid var(--gold, #FFD700);
    position: relative;
    overflow: hidden;
}

.weight-modal.active .modal-content {
    transform: scale(1);
}

.modal-content::before {
    content: '';
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    background: url('https://www.transparenttextures.com/patterns/45-degree-fabric-light.png');
    opacity: 0.1;
    z-index: -1;
}

.modal-header {
    margin-bottom: 25px;
}

.modal-header h2 {
    font-family: 'Amiri', serif;
    font-size: clamp(1.5rem, 2.5vw, 2rem);
    color: var(--primary-dark, #E94E1B);
    margin-bottom: 10px;
}

.modal-header p {
    font-size: clamp(0.95rem, 1.1vw, 1.1rem);
    color: var(--dark, #2c3e50);
}

.weight-selection {
    margin: 30px 0;
}

.weight-label {
    font-size: clamp(1rem, 1.2vw, 1.2rem);
    margin-bottom: 15px;
    color: var(--dark, #2c3e50);
    font-weight: 600;
}

.weight-visualization {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    height: 100px;
    margin: 20px 0;
    gap: 5px;
}

.weight-bar {
    width: 8px;
    background: var(--primary, #FF6B35);
    border-radius: 4px 4px 0 0;
    transition: height 0.3s ease;
}

.weight-slider {
    width: 100%;
    height: 25px;
    -webkit-appearance: none;
    appearance: none;
    background: linear-gradient(90deg, #FF6B35, #FFD166);
    outline: 0;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2);
}

.weight-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background: var(--primary-dark, #E94E1B);
    cursor: pointer;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
    border: 3px solid #fff;
    transition: var(--transition, all 0.4s ease);
}

.weight-slider::-webkit-slider-thumb:hover {
    background: var(--primary, #FF6B35);
    transform: scale(1.1);
}

.weight-display {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
    font-size: clamp(0.9rem, 1vw, 1rem);
    color: var(--gray, #95a5a6);
}

.weight-options {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 20px 0;
    flex-wrap: wrap;
}

.weight-option {
    background: #f1f1f1;
    border: 2px solid #ddd;
    border-radius: 10px;
    padding: 10px 15px;
    font-size: clamp(0.9rem, 1vw, 1rem);
    cursor: pointer;
    transition: var(--transition, all 0.4s ease);
    min-height: var(--touch-min);
}

.weight-option:hover {
    background: var(--secondary, #FFD166);
    border-color: var(--gold, #FFD700);
}

.weight-option.active {
    background: var(--primary, #FF6B35);
    color: #fff;
    border-color: var(--primary-dark, #E94E1B);
}

.price-display {
    font-size: clamp(1.3rem, 2vw, 1.8rem);
    font-weight: 700;
    color: var(--primary-dark, #E94E1B);
    margin: 20px 0;
    padding: 15px;
    background: rgba(255, 209, 102, 0.1);
    border-radius: 10px;
    border: 2px dashed var(--secondary, #FFD166);
}

.modal-buttons {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.modal-button {
    flex: 1;
    padding: 15px;
    border: none;
    border-radius: 10px;
    font-size: clamp(0.95rem, 1.1vw, 1.1rem);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition, all 0.4s ease);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: var(--touch-min);
}

.add-to-cart-btn {
    background: linear-gradient(135deg, var(--primary, #FF6B35) 0%, var(--primary-dark, #E94E1B) 100%);
    color: #fff;
}

.cancel-btn {
    background: #f1f1f1;
    color: var(--dark, #2c3e50);
}

.modal-button:hover {
    transform: translateY(-3px);
}

/* ===== PULSE ANIMATION ===== */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .customer-form-content,
    .confirmation-content,
    .modal-content {
        max-width: 420px;
        width: 94%;
        padding: 24px 20px;
        border-radius: 14px;
        transform: translateY(0);
    }
    .customer-form-header h2,
    .confirmation-content h2,
    .modal-header h2 {
        font-size: 1.3rem;
    }
    .confirmation-icon {
        width: 60px;
        height: 60px;
    }
    .confirmation-icon i {
        font-size: 30px;
    }
    .confirmation-content p,
    .customer-form-content p,
    .modal-header p {
        font-size: 0.9rem;
    }
    .truck-container {
        width: 140px;
        height: 70px;
        margin-bottom: 16px;
        position: relative;
    }
    .truck {
        position: absolute;
        bottom: 0;
        left: -140px;
        font-size: 36px;
        color: var(--secondary, #FFD166);
    }
    .truck-animation.active .truck {
        animation: drive-mobile 2.2s linear forwards;
    }
    .road {
        height: 4px;
        bottom: 10px;
    }
    @keyframes drive-mobile {
        0% { transform: translateX(0); opacity: 1; }
        100% { transform: translateX(420px); opacity: 1; }
    }
    .weight-modal .modal-content {
        max-width: 85%;
        width: 85%;
        padding: 16px 12px;
        border-radius: 16px;
    }
    .weight-modal .modal-header {
        margin-bottom: 12px;
    }
    .weight-modal .modal-header h2 {
        font-size: 1.1rem;
        margin-bottom: 4px;
    }
    .weight-modal .modal-header p {
        font-size: 0.8rem;
    }
    .weight-modal .weight-selection {
        margin: 12px 0;
    }
    .weight-modal .weight-label {
        font-size: 0.9rem;
        margin-bottom: 8px;
    }
    .weight-modal .weight-visualization {
        height: 45px;
        margin: 8px 0;
        gap: 3px;
    }
    .weight-modal .weight-bar {
        width: 5px;
    }
    .weight-modal .weight-slider {
        height: 18px;
    }
    .weight-modal .weight-slider::-webkit-slider-thumb {
        width: 22px;
        height: 22px;
    }
    .weight-modal .weight-display {
        font-size: 0.75rem;
        margin-top: 5px;
    }
    .weight-modal .weight-options {
        gap: 6px;
        margin: 10px 0;
    }
    .weight-modal .weight-option {
        padding: 6px 10px;
        font-size: 0.8rem;
        border-radius: 20px;
        min-height: 32px;
    }
    .weight-modal .price-display {
        font-size: 1.1rem;
        margin: 10px 0;
        padding: 8px;
    }
    .weight-modal .modal-buttons {
        gap: 8px;
        margin-top: 8px;
    }
    .weight-modal .modal-button {
        padding: 10px 0px;
        font-size: 0.85rem;
        border-radius: 30px;
        min-height: 40px;
    }
    .continue-btn {
        padding: 12px 28px;
        font-size: 0.95rem;
    }
}

@media (max-width: 480px) {
    .customer-form-content,
    .confirmation-content,
    .modal-content {
        padding: 16px 12px;
    }
    .customer-form-header h2,
    .confirmation-content h2,
    .modal-header h2 {
        font-size: 1.1rem;
    }
    .close-customer-form {
        width: 32px;
        height: 32px;
        font-size: 16px;
        top: -12px;
        left: -12px;
    }
    .confirmation-content p {
        font-size: 0.85rem;
    }
    .weight-modal .modal-content {
        max-width: 92%;
        width: 92%;
        padding: 12px 10px;
    }
    .weight-modal .modal-header h2 {
        font-size: 1rem;
    }
    .weight-modal .weight-option {
        font-size: 0.7rem;
        padding: 4px 8px;
    }
    .weight-modal .modal-button {
        font-size: 0.75rem;
        padding: 8px 0;
        min-height: 36px;
    }
    .continue-btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
}

@media (max-width: 360px) {
    .customer-form-content,
    .confirmation-content,
    .modal-content {
        padding: 12px 8px;
    }
    .weight-modal .modal-content {
        padding: 8px 6px;
    }
    .weight-modal .weight-option {
        font-size: 0.65rem;
        padding: 3px 6px;
    }
}