/* 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 {
    font-family: Arial, sans-serif;
    background: #f9f9f9;
    margin: 0;
    font-size: 1.3em;
}

/* 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: repeat(3, 1fr);
    gap: 1.5em;
    margin: 2em auto;
    max-width: 1200px;
}

.product {
    background: #fff;
    border: 2px solid #e53935;
    border-radius: 12px;
    padding: 1.5em 1em;
    font-size: 1.4em;
    cursor: pointer;
    transition: box-shadow 0.2s, transform 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.product:hover {
    box-shadow: 0 4px 16px rgba(229,57,53,0.15);
    transform: translateY(-4px) scale(1.03);
}

.product-name {
    font-size: 1.3em;
    font-weight: bold;
    margin-bottom: 0.5em;
    text-align: center;
}

.product-price {
    font-size: 1.2em;
    color: #e53935;
    font-weight: bold;
}

/* Selected Products (Cart) */
.selected-products {
    background: #fff;
    border-radius: 12px;
    margin: 2em auto 0 auto;
    max-width: 700px;
    padding: 2em 2em 1.5em 2em;
    box-shadow: 0 2px 12px rgba(0,0,0,0.07);
}

.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-list .selected-item {
    font-size: 1.7em;
    padding: 0.7em 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.selected-list .selected-name,
.selected-list .selected-qty,
.selected-list .selected-subtotal {
    font-size: 1.7em;
}

.selected-total-row {
    font-size: 2.5em;
    font-weight: bold;
    margin-top: 1.2em;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #e53935;
    border-top: 2px solid #eee;
    padding-top: 0.5em;
}

/* Receipt Button */
.receipt-btn {
    font-size: 1.4em;
    padding: 0.8em 2.5em;
    margin-top: 1.5em;
    font-weight: bold;
    background: #e53935;
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s;
}

.receipt-btn:hover {
    background: #b71c1c;
}

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

.modal {
    background: #fff;
    border-radius: 12px;
    padding: 2em 2em 1.5em 2em;
    min-width: 350px;
    max-width: 95vw;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

.close-btn {
    position: absolute;
    top: 0.7em;
    right: 1em;
    background: none;
    border: none;
    font-size: 2em;
    color: #e53935;
    cursor: pointer;
}

.modal h3 {
    font-size: 2em;
    margin-bottom: 1em;
    color: #e53935;
    text-align: center;
}

.history-list {
    font-size: 1.5em;
    list-style: none;
    padding: 0;
    margin: 0;
}

.history-list li {
    margin-bottom: 2em;
    border-bottom: 1px solid #eee;
    padding-bottom: 1em;
}

.history-date {
    font-size: 1.2em;
    color: #888;
    margin-bottom: 0.5em;
}

.history-items {
    font-size: 1.5em;
    margin-bottom: 0.5em;
}

.history-item {
    font-weight: bold;
}

.history-total {
    font-size: 2.5em;
    font-weight: bold;
    color: #e53935;
    margin-top: 0.5em;
}

.empty-cart, .empty-history {
    color: #bbb;
    text-align: center;
    padding: 12px 0;
    font-size: 1.2em;
    color: #aaa;
    margin: 2em 0;
}

/* Responsive Design */
@media (max-width: 900px) {
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .product-grid {
        grid-template-columns: 1fr;
    }
    .selected-products {
        padding: 1em;
    }
    .modal {
        padding: 1em;
    }
}