.header {
    margin-top: 20px;
    margin-left: 30px;
    margin-bottom: 20px;
}

.cart {
    margin-left: 30px;
    margin-right: 60px;
    width: 70%;
    border-collapse: collapse;
    margin-bottom: 20px;
    background-color: #ffffff;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    overflow: hidden;
}

h1 {
    font-size: 24px;
    background: linear-gradient(135deg, #34495e 0%, #2c3e50 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 0.5px;
}

h3 {
    font-size: 24px;
    background: linear-gradient(135deg, #34495e 0%, #2c3e50 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 0.5px;
}

.order-form {
    display: flex;
    flex-direction: column;
    width: 70%;
    margin-left: 30px;
}

.total-price {
    font-size: 18px;
    font-weight: bold;
    margin-top: 20px;
}

.order-input {
    width: 80%;
    padding: 8px;
    margin-bottom: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    box-sizing: border-box;
}

.checkbox-container {
    margin-top: 20px;
}

.checkbox-container label {
    font-size: 14px;
}

.link {
    color: #5161ce;
    text-decoration: none;
}

.link:hover {
    text-decoration: underline;
}

.order-button {
    display: inline-block;
    padding: 10px 20px;
    font-size: 16px;
    font-weight: bold;
    color: #ffffff;
    background-color: #5161ce;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    width: 18%;
    white-space: nowrap;
    margin-top: 12px;
}

.order-button:hover {
    background-color: #5161ce;
}

.cart th, .cart td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.cart th {
    background-color: #5161ce;
    color: #ffffff;
}

.cart tr:hover {
    background-color: #f1f1f1;
}

.cart .num {
    text-align: center;
}

.cart .qt {
    text-align: center;
}

.cart .total {
    font-weight: bold;
    background-color: #f8f8f8;
    color: #333;
}

.cart a {
    color: #5161ce;
    text-decoration: none;
}

.no-titlebar .ui-dialog-titlebar {
    display: none;
}

/* ==========================================
   СООБЩЕНИЯ
   ========================================== */

#message {
    display: none;
    padding: 15px 20px;
    margin: 20px auto;
    border-radius: 8px;
    text-align: center;
    font-weight: bold;
    font-size: 16px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    width: fit-content;
    max-width: 90%;
    min-width: 250px;
}

#message.success {
    color: #155724;
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
}

#message.error {
    color: #721c24;
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
}

/* ==========================================
   АДАПТИВНЫЕ СТИЛИ
   ========================================== */

/* Планшеты (до 1024px) */
@media screen and (max-width: 1024px) {
    .cart {
        width: 85%;
    }
    
    .order-form {
        width: 85%;
    }
    
    .order-button {
        width: 25%;
    }
}

/* Планшеты и большие телефоны (до 768px) */
@media screen and (max-width: 768px) {
    .header {
        margin-left: 15px;
        font-size: 20px;
    }
    
    .cart {
        width: 95%;
        margin-left: 15px;
        margin-right: 15px;
        font-size: 14px;
    }
    
    .cart th, .cart td {
        padding: 10px 8px;
    }
    
    .order-form {
        width: 95%;
        margin-left: 15px;
    }
    
    .order-input {
        width: 100%;
    }
    
    .order-button {
        width: 100%;
    }
    
    h1 {
        font-size: 20px;
    }
    
    h3 {
        font-size: 18px;
    }
}

/* Мобильные устройства (до 576px) */
@media screen and (max-width: 576px) {
    .header {
        margin-left: 10px;
        margin-top: 15px;
        margin-bottom: 15px;
        font-size: 18px;
    }
    
    .cart {
        width: calc(100% - 20px);
        margin-left: 10px;
        margin-right: 10px;
        font-size: 12px;
        border-radius: 4px;
    }
    
    .cart th, .cart td {
        padding: 8px 5px;
        font-size: 12px;
    }
    
    /* Скрываем колонку "Цена" на маленьких экранах */
    .cart th:nth-child(3),
    .cart tbody tr:not(.total) td:nth-child(3) {
        display: none;
    }
    
    /* Скрываем строку "Итого" на мобильных устройствах */
    .cart .total {
        display: none;
    }
    
    .order-form {
        width: 100%;
        margin-left: 0;
        padding: 0 10px;
        box-sizing: border-box;
    }
    
    .order-input {
        width: 100%;
        font-size: 14px;
        padding: 10px;
    }
    
    .checkbox-container {
        margin-top: 15px;
    }
    
    .checkbox-container label {
        font-size: 12px;
    }
    
    .order-button {
        width: 100%;
        font-size: 14px;
        padding: 12px 20px;
    }
    
    h1 {
        font-size: 18px;
    }
    
    h3 {
        font-size: 16px;
        margin-left: 10px;
    }
    
    #message {
        font-size: 14px;
        padding: 12px 15px;
        margin: 15px 10px;
        min-width: auto;
        width: calc(100% - 20px);
    }
}

/* Очень маленькие экраны (до 400px) */
@media screen and (max-width: 400px) {
    .cart {
        font-size: 11px;
    }
    
    .cart th, .cart td {
        padding: 6px 3px;
        font-size: 11px;
    }
    
    .cart th:nth-child(1),
    .cart td:nth-child(1) {
        max-width: 120px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    
    h1 {
        font-size: 16px;
    }
    
    h3 {
        font-size: 14px;
    }
    
    .order-button {
        font-size: 13px;
        padding: 10px 15px;
    }
}


