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

/* ===== VARIABLES ===== */
:root {
    --red-main: #E53935;
    --red-hover: #D32F2F;
    --red-active: #C62828;

    --bg-light: #FAFAFA;
    --bg-white: #FFFFFF;

    --text-main: #1F1F1F;
    --text-muted: #6F6F6F;
    --text-white: #FFFFFF;

    --border-soft: #E6E6E6;
    --shadow-soft: 0 10px 30px rgba(0, 0, 0, 0.12);
}

/* ===== BODY ===== */
html, body {
    width: 100%;
    overflow-x: hidden;
}

body {
    font-family: 'Inter', system-ui, sans-serif;
    background-color: var(--bg-light);
    color: var(--text-main);
    padding: 16px;
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
}

/* ===== HEADER ===== */
.header {
    text-align: center;
    margin-bottom: 24px;
}

.header h1 {
    font-size: 26px;
    font-weight: 900;
}

.subtitle {
    margin-top: 6px;
    font-size: 14px;
    color: var(--text-muted);
}

/* ===== MAIN ===== */
main {
    max-width: 600px;
    margin: 0 auto;
}

/* ===== BUTTONS ===== */
button {
    width: 100%;
    background: linear-gradient(180deg, #E53935, #D32F2F);
    color: var(--text-white);
    border: none;
    padding: 14px;
    border-radius: 14px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
}

button.secondary {
    background: transparent;
    color: var(--red-main);
    border: 2px solid var(--red-main);
}

/* ===== CATALOG ===== */
.catalog {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* ===== CATEGORY ===== */
.category {
    background-color: var(--bg-white);
    border-radius: 20px;
    padding: 18px;
    box-shadow: var(--shadow-soft);
}

.category-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
}

.category-icon {
    font-size: 22px;
}

/* ===== PRODUCT ===== */
.product {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 0;
    border-bottom: 1px solid var(--border-soft);
}

.product:last-child {
    border-bottom: none;
}

.product-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.product-name {
    font-size: 16px;
    font-weight: 700;
}

.product-price {
    font-size: 15px;
    font-weight: 800;
    color: var(--red-main);
}

/* ===== CART BUTTON ===== */
.cart-button {
    position: fixed;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 32px);
    max-width: 520px;
    border-radius: 16px;
    padding: 16px;
    font-weight: 800;
    box-shadow: 0 12px 30px rgba(229, 57, 53, 0.45);
    z-index: 100;
}

/* ===== CART ===== */
.cart-modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    display: none;
    justify-content: center;
    align-items: flex-end;
    z-index: 200;
}

.cart-modal.active {
    display: flex;
}

.cart {
    background: #fff;
    width: 100%;
    max-width: 520px;
    border-radius: 26px 26px 0 0;
    padding: 22px;
}

/* ===== CART ITEMS ===== */
.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
}

/* ===== TOTAL ===== */
.cart-total {
    margin-top: 16px;
    font-size: 18px;
    font-weight: 900;
}

/* ===== ORDER ===== */
.order {
    margin-top: 26px;
    background: var(--bg-white);
    padding: 18px;
    border-radius: 20px;
    box-shadow: var(--shadow-soft);
}

.order h2 {
    font-size: 18px;
    margin-bottom: 14px;
}

input {
    width: 100%;
    padding: 14px;
    border-radius: 14px;
    border: 1px solid var(--border-soft);
    font-size: 16px;
    margin-bottom: 12px;
}

/* ===== ORDER FORM IN CART ===== */
.order-form {
    margin: 16px 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.order-form input {
    padding: 14px;
    border-radius: 14px;
    border: 1px solid var(--border-soft);
    font-size: 16px;
}

/* ===== CART SCROLL FIX ===== */
.cart {
    background: #fff;
    width: 100%;
    max-width: 520px;
    max-height: 85vh;          /* ВАЖНО */
    border-radius: 26px 26px 0 0;
    padding: 22px;
    overflow-y: auto;          /* ВКЛЮЧАЕМ СКРОЛЛ */
    -webkit-overflow-scrolling: touch;
}
