/* Light Pink Shop Theme for Isem Food Products */

:root {
    --pink-bg: #ffe6f0;
    --white: #fff;
    --accent: #ffb6d5;
    --shadow: 0 2px 8px rgba(0,0,0,0.07);
    --radius: 16px;
    --main: #d72660;
    --text: #333;
    --price: #888;
}

body {
    background: var(--pink-bg);
    font-family: 'Segoe UI', Arial, sans-serif;
    margin: 0;
    padding: 0;
    color: var(--text);
    min-height: 100vh;
}

/* Header */
.header {
    position: sticky;
    top: 0;
    z-index: 10;
    background: var(--white);
    box-shadow: 0 2px 8px rgba(215,38,96,0.06);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px 10px 16px;
}

.site-title {
    font-size: 1.2em;
    font-weight: bold;
    color: var(--main);
    letter-spacing: 1px;
    white-space: nowrap;
}

.search-area {
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
}

.search-input {
    padding: 8px 12px;
    border-radius: var(--radius);
    border: 1px solid #eee;
    font-size: 1em;
    background: var(--white);
    box-shadow: var(--shadow);
    outline: none;
    min-width: 120px;
    transition: border 0.2s;
}

.search-input:focus {
    border: 1.5px solid var(--accent);
}

.history-btn {
    background: var(--accent);
    color: var(--main);
    border: none;
    border-radius: var(--radius);
    padding: 8px 16px;
    font-size: 1em;
    font-weight: bold;
    cursor: pointer;
    box-shadow: var(--shadow);
    transition: background 0.2s, color 0.2s;
}

.history-btn:hover,
.history-btn:active {
    background: var(--main);
    color: var(--white);
}

/* Autocomplete Suggestions */
.autocomplete-list {
    position: absolute;
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-top: 2px;
    width: 220px;
    z-index: 20;
    max-height: 180px;
    overflow-y: auto;
    left: 0;
    right: 0;
}

.autocomplete-item {
    padding: 10px 16px;
    cursor: pointer;
    border-bottom: 1px solid #f3c6d3;
    font-size: 1em;
    transition: background 0.15s;
}

.autocomplete-item:last-child {
    border-bottom: none;
}

.autocomplete-item:hover,
.autocomplete-item:active {
    background: var(--accent);
    color: var(--main);
}

.autocomplete-price {
    color: #bbb;
    font-size: 0.95em;
    margin-left: 8px;
}

/* Product Grid */
.product-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    padding: 16px 10px 110px 10px;
    overflow-y: auto;
    max-width: 600px;
    margin: 0 auto;
}

.product {
    background: var(--white);
    border: none;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 22px 10px 16px 10px;
    font-size: 1.1em;
    color: var(--main);
    font-weight: 500;
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    transition: background 0.15s, transform 0.1s;
    min-height: 90px;
    user-select: none;
    outline: none;
}

.product:active,
.product:hover {
    background: var(--accent);
    color: var(--white);
    transform: scale(0.98);
}

.product-name {
    font-size: 1.1em;
    font-weight: bold;
    text-align: center;
}

.product-price {
    font-size: 0.98em;
    color: var(--price);
    margin-top: 8px;
    text-align: center;
}

/* Selected Products (Cart) */
.selected-products {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--white);
    box-shadow: 0 -2px 12px rgba(0,0,0,0.08);
    border-top-left-radius: var(--radius);
    border-top-right-radius: var(--radius);
    padding: 14px 16px 10px 16px;
    z-index: 100;
    max-width: 600px;
    margin: 0 auto;
    width: 100%;
}

.selected-list {
    max-height: 110px;
    overflow-y: auto;
    margin-bottom: 8px;
}

.selected-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    font-size: 1em;
    border-bottom: 1px solid #f3c6d3;
}

.selected-item:last-child {
    border-bottom: none;
}

.selected-name {
    font-weight: 500;
    color: var(--main);
}

.selected-qty {
    background: var(--accent);
    color: var(--main);
    border-radius: 10px;
    padding: 2px 10px;
    margin: 0 8px;
    font-weight: bold;
    font-size: 1em;
}

.selected-subtotal {
    color: var(--price);
    font-size: 1em;
}

.selected-total-row {
    display: flex;
    justify-content: space-between;
    font-size: 1.1em;
    font-weight: bold;
    margin-top: 10px;
    margin-bottom: 8px;
}

/* Receipt Button */
.receipt-btn {
    background: var(--accent);
    color: var(--white);
    border: none;
    border-radius: var(--radius);
    padding: 12px 0;
    font-size: 1.1em;
    font-weight: bold;
    cursor: pointer;
    box-shadow: var(--shadow);
    transition: background 0.2s, color 0.2s;
    width: 100%;
    margin-top: 6px;
}

.receipt-btn:hover,
.receipt-btn:active {
    background: var(--main);
    color: var(--white);
}

/* Modal for History */
.modal-bg {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.18);
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 24px 18px 18px 18px;
    max-width: 95vw;
    width: 370px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
}

.modal h3 {
    margin-top: 0;
    color: var(--main);
}

.modal .close-btn {
    position: absolute;
    top: 10px; right: 14px;
    background: none;
    border: none;
    font-size: 1.5em;
    color: #aaa;
    cursor: pointer;
}

.history-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.history-list li {
    border-bottom: 1px solid #f3c6d3;
    padding: 10px 0;
}

.history-list li:last-child {
    border-bottom: none;
}

.history-total {
    font-weight: bold;
    color: var(--main);
}

.empty-cart, .empty-history {
    color: #bbb;
    text-align: center;
    padding: 12px 0;
}

/* Responsive Design */
@media (max-width: 600px) {
    .product-grid {
        grid-template-columns: 1fr 1fr;
        max-width: 100vw;
        padding: 10px 2vw 110px 2vw;
    }
    .selected-products, .modal {
        max-width: 100vw;
    }
    .header {
        padding: 12px 6vw 8px 6vw;
    }
}