* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f4f4f4;
    padding: 20px;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

h1 {
    text-align: center;
    margin-bottom: 30px;
    color: #2c3e50;
}

h2 {
    margin-bottom: 20px;
    color: #2c3e50;
}

.progress-bar {
    display: flex;
    justify-content: space-between;
    margin-bottom: 40px;
    position: relative;
}

.progress-bar::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    height: 2px;
    width: 100%;
    background-color: #ddd;
    z-index: 1;
}

.step {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #ddd;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    position: relative;
    z-index: 2;
}

.step.active {
    background-color: #069d3a;
    color: white;
}

.step-content {
    display: none;
}

.step-content.active {
    display: block;
}

.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
}

input, select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}
.hint {
    margin-top: 6px;
    margin-bottom: 8px;
    font-size: 13px;
    color: #666;
}

/* Package details modal */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    z-index: 1000;
}

.modal.hidden {
    display: none;
}

.modal-content {
    background: #fff;
    border-radius: 10px;
    max-width: 520px;
    width: 100%;
    padding: 22px 24px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    position: relative;
}

.modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    background: none;
    border: none;
    font-size: 24px;
    line-height: 1;
    color: #666;
    cursor: pointer;
}

#modalTitle {
    margin-bottom: 10px;
    color: #2c3e50;
}

#modalBody ul {
    padding-left: 18px;
    margin: 8px 0 0 0;
}

#modalBody li {
    margin-bottom: 6px;
}

button {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 12px 20px;
    cursor: pointer;
    border-radius: 4px;
    font-size: 16px;
    transition: background-color 0.3s;
}

button:hover {
    background-color: #2980b9;
}

button:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
}

#map {
    height: 400px;
    margin: 20px 0;
    border-radius: 8px;
}

.hidden {
    display: none;
}

#distanceInfo {
    margin: 20px 0;
    padding: 15px;
    background-color: #e8f4fd;
    border-radius: 4px;
    font-size: 18px;
    font-weight: bold;
}

.package-options {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 30px;
}

.package {
    flex: 1;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s;
}

.package:hover {
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.1);
}

.package h3 {
    margin-bottom: 10px;
    color: #2c3e50;
}

.package .price {
    font-size: 24px;
    font-weight: bold;
    margin: 15px 0;
    color: #3498db;
}

.company-item {
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s;
}

.company-item:hover {
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.company-item.selected {
    border-color: #3498db;
    background-color: #e8f4fd;
}

.company-price {
    font-weight: bold;
    font-size: 20px;
    color: #3498db;
}

#bookNow {
    margin-top: 20px;
    width: 100%;
    padding: 15px;
    font-size: 18px;
    background-color: #27ae60;
}

#bookNow:hover {
    background-color: #219653;
}

/* Add these styles to the end of your existing CSS file */

/* Step 6 Styles */
.quote-summary {
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 25px;
    border-left: 4px solid #3498db;
}

.contact-form {
    margin-top: 20px;
}

#sendQuote {
    margin-top: 20px;
    width: 100%;
    padding: 15px;
    font-size: 18px;
    background-color: #27ae60;
}

#sendQuote:hover {
    background-color: #219653;
}

.success-message {
    text-align: center;
    padding: 30px 20px;
}

.success-message h2 {
    color: #27ae60;
    margin-bottom: 20px;
}

.restart-btn {
    margin-top: 25px;
    background-color: #3498db;
}

.restart-btn:hover {
    background-color: #2980b9;
}

/* Existing styles */
.package-options {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 30px;
}

/* --- Inventory item list styles (global, перенесено з Inventory/styles.css) --- */
.item-list {
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid #eee;
    border-radius: 6px;
    background: #fafbfc;
    margin-bottom: 18px;
}
.item-header-row {
    display: flex;
    align-items: center;
    background: #e0e0e0;
    font-weight: bold;
    padding: 8px 10px;
    border-bottom: 2px solid #bbb;
}
.item-name-header {
    flex: 2;
}
.item-volume-header {
    flex: 1;
    text-align: right;
}
.item-qty-header {
    width: 60px;
    text-align: center;
}
.item-row {
    display: flex;
    align-items: center;
    padding: 8px 10px 8px 10px;
    border-bottom: 1px solid #f0f0f0;
}
.item-row:last-child {
    border-bottom: none;
}
.item-name {
    flex: 2;
}
.item-volume {
    flex: 1;
    text-align: right;
    color: #888;
    padding-right: 10px;
}
.item-qty {
    width: 60px;
    font-size: 1em;
    padding: 6px;
    border-radius: 4px;
    border: 1px solid #ccc;
}

/* --- Inventory item list mobile styles --- */
@media (max-width: 600px) {
    .item-header-row {
        flex-direction: row;
        align-items: center;
        padding: 8px 4px 8px 10px;
        font-size: 0.98em;
    }
    .item-name-header {
        flex-basis: 40%;
        flex-shrink: 1;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .item-volume-header {
        flex-basis: 30%;
        text-align: right;
        flex-shrink: 0;
    }
    .item-qty-header {
        flex-basis: 25%;
        min-width: 40px;
        max-width: 70px;
        width: 50px;
        text-align: center;
    }
    .item-row {
        flex-direction: row;
        align-items: center;
        gap: 8px;
        margin-bottom: 0;
        padding: 8px 4px 8px 10px;
        border-bottom: 1px solid #f0f0f0;
    }
    .item-row:last-child {
        border-bottom: none;
    }
    .item-name, .item-volume, .item-qty {
        width: auto;
        flex: unset;
        min-width: 0;
        font-size: 1em;
    }
    .item-name {
        flex-basis: 40%;
        flex-shrink: 1;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .item-volume {
        flex-basis: 30%;
        text-align: right;
        flex-shrink: 0;
    }
    .item-qty {
        flex-basis: 25%;
        width: 50px;
        min-width: 40px;
        max-width: 70px;
    }
    #itemList {
        overflow-x: auto;
        width: 100%;
    }
}

/* Mobile optimization - add these styles */
@media screen and (max-width: 768px) {
    .package-options {
        flex-direction: column;
        gap: 15px;
    }
    
    .package {
        margin-bottom: 15px;
    }
    
    .container {
        padding: 15px;
    }
    
    h1 {
        font-size: 24px;
    }
    
    h2 {
        font-size: 20px;
    }
    
    .progress-bar {
        margin-bottom: 25px;
    }
    
    .step {
        width: 30px;
        height: 30px;
        font-size: 14px;
    }
    
    #map {
        height: 300px;
    }
    
    .quote-summary {
        padding: 15px;
    }
    
    button {
        padding: 10px 15px;
        font-size: 14px;
    }
    
    #sendQuote, #bookNow {
        padding: 12px 15px;
        font-size: 16px;
    }
}

/* Additional optimization for very small screens */
@media screen and (max-width: 480px) {
    .container {
        padding: 10px;
    }
    
    .step {
        width: 25px;
        height: 25px;
        font-size: 12px;
    }
    
    .form-group {
        margin-bottom: 15px;
    }
    
    input, select {
        padding: 8px;
        font-size: 14px;
    }
    
    #distanceInfo {
        font-size: 16px;
        padding: 10px;
    }
    
    .company-item {
        padding: 10px;
        flex-direction: column;
        text-align: center;
    }
    
    .company-name {
        margin-bottom: 5px;
    }
    
    .company-price {
        font-size: 18px;
    }
    
    /* Fix for flexbox container on small screens */
    .progress-bar {
        overflow-x: auto;
        padding-bottom: 5px;
    }
}

/* --- Inventory styles (scoped to Step 3) --- */
.step-content#step3 {
    font-family: 'Segoe UI', Arial, sans-serif;
    /* background: #f5f6fa; */
    color: #222;
}

.step-content#step3 .container {
    max-width: 800px;
    width: 95%;
    margin: 24px auto;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 16px rgba(0,0,0,0.09);
    padding: 24px 8px;
}

.step-content#step3 h1 {
    text-align: center;
    color: #0052cc;
}

.step-content#step3 .desc {
    text-align: center;
    margin-bottom: 24px;
    color: #555;
}

.step-content#step3 .total-bar {
    margin-bottom: 8px;
    padding-bottom: 4px;
    border-bottom: 2px solid #222;
}

.step-content#step3 #totalVolume {
    font-size: 1.4em;
    font-weight: 600;
    color: #222;
}

.step-content#step3 .estimate-note {
    font-size: 0.98em;
    color: #666;
    margin-top: 2px;
}

.step-content#step3 .category-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 18px 0 18px 0;
    justify-content: center;
}

.step-content#step3 .cat-btn {
    background: #767676;
    color: #fff;
    border: none;
    border-radius: 5px;
    padding: 10px 18px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    min-width: 100px;
    margin-bottom: 6px;
    transition: background 0.2s;
}

.step-content#step3 .cat-btn.selected {
    background: #0097a7;
    color: #fff;
}

.step-content#step3 .cat-btn:active, .step-content#step3 .cat-btn:focus {
    background: #0052cc;
    outline: none;
}

.step-content#step3 .search {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.step-content#step3 .search input {
    width: 300px;
    padding: 8px 12px;
    border: 1px solid #bbb;
    border-radius: 4px;
    font-size: 1em;
}