:root {
    --primary: #25d366;
    --primary-dark: #128c7e;
    --bg: #121212;
    --text: #e0e0e0;
    --text-muted: #a0a0a0;
    --card-bg: #1e1e1e;
    --border: #333;
    --shadow: 0 8px 16px rgba(0, 0, 0, 0.4);
    --input-bg: #2a2a2a;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

img {
    max-width: 100%;
    height: auto;
}

a {
    text-decoration: none;
}

body {
    font-family: 'Outfit', system-ui, -apple-system, sans-serif;
    background-color: var(--bg);
    color: var(--text);
    margin: 0;
    padding: 0 0 80px 0;
    /* No horizontal padding on body to allow 100% edge-to-edge */
    display: flex;
    flex-direction: column;
    align-items: center;
    line-height: 1.6;
    width: 100%;
    min-height: 100vh;
    padding: 20px 10px;
}

.store-header {
    display: flex;
    justify-content: center;
    width: 100%;
    line-height: 1;
}

.store-header-link {
    display: flex;
    align-items: center;
    gap: 20px;
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s;
}

.store-header-link:hover {
    transform: scale(1.02);
}

.store-logo {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 50%;
    border: 3px solid var(--primary);
    box-shadow: var(--shadow);
}

h1 {
    color: var(--primary);
    margin: 0;
    font-size: 2rem;
    font-weight: 800;
}

.page-content {
    width: 100%;
    max-width: 100%;
    /* Default 100% */
    padding: 10px 15px;
    /* Side padding inside content */
    display: flex;
    flex-direction: column;
    align-items: center;
}

.menu-container {
    width: 100%;
    max-width: 100%;
}

.category-title {
    margin: 40px 0 15px 0;
    color: var(--text);
    font-size: 1.5rem;
    font-weight: 700;
    border-bottom: 3px solid var(--primary);
    display: inline-block;
    padding-bottom: 5px;
}

.product {
    background: var(--card-bg);
    padding: 15px;
    margin: 15px 0;
    border-radius: 20px;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 15px;
    width: 100%;
    max-width: 700px;
    transition: transform 0.2s, box-shadow 0.2s;
    border: 1px solid var(--border);
}

.product:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.6);
}

.product-col-img {
    flex-shrink: 0;
}

.product-thumb {
    width: 90px;
    height: 90px;
    object-fit: contain;
    border-radius: 12px;
    background-color: rgba(0, 0, 0, 0.3);
}

.product-thumb-placeholder {
    width: 90px;
    height: 90px;
    background: #333;
    border-radius: 12px;
}

.product-col-info {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    line-height: 1;
}

.product strong {
    font-size: 1.2rem;
    color: var(--text);
    margin-bottom: 4px;
}

.product-id {
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.product-description {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin: 4px 0 10px 0;
    line-height: 1.4;
}

.product-price {
    color: var(--primary);
    font-size: 1.1rem;
}

.qty-controls {
    display: flex;
    align-items: center;
    gap: 12px;
}

.menu-qty-display {
    min-width: 25px;
    text-align: center;
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--primary);
}

button {
    background-color: var(--primary);
    color: #000;
    border: none;
    padding: 10px 20px;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 700;
    transition: all 0.3s;
}

button:hover {
    background-color: #fff;
    transform: scale(1.05);
}

.secondary-btn {
    background-color: #2a2a2a;
    color: var(--text);
    border: 1px solid var(--border);
}

.secondary-btn:hover {
    background-color: #333;
}

.checkout-btn {
    margin-top: 30px;
    padding: 18px 30px;
    font-size: 1.2rem;
    background-color: var(--primary);
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
    color: #000;
}

hr {
    border: none;
    height: 1px;
    background: var(--border);
    width: 100%;
    max-width: 700px;
    margin: 30px 0;
}

/* Floating Cart Button */
.cart-floating-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: var(--primary);
    color: #000;
    width: 70px;
    height: 70px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
    cursor: pointer;
    z-index: 1000;
    font-size: 1.8rem;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.cart-floating-btn:hover {
    transform: scale(1.15) rotate(5deg);
}

.cart-count {
    position: absolute;
    top: 5px;
    right: 5px;
    background: #ff4444;
    color: white;
    font-size: 0.85rem;
    padding: 2px 8px;
    border-radius: 12px;
    font-weight: bold;
    border: 2px solid var(--primary);
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1001;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
}

.modal-content {
    background-color: var(--card-bg);
    margin: 5% auto;
    padding: 30px;
    border-radius: 24px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
    position: relative;
    max-height: 85vh;
    overflow-y: auto;
    border: 1px solid var(--border);
}

.close {
    position: absolute;
    right: 25px;
    top: 20px;
    font-size: 32px;
    cursor: pointer;
    color: var(--text-muted);
}

.close:hover {
    color: var(--text);
}

.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid var(--border);
}

.cart-item-info {
    flex: 1;
}

.cart-item-info strong {
    font-size: 1.1rem;
}

.cart-item-info small {
    color: var(--text-muted);
}

.cart-item-qty-controls {
    display: flex;
    align-items: center;
    gap: 12px;
}

.qty-btn {
    padding: 4px 10px;
    border-radius: 8px;
    background: #333;
    color: var(--text);
    font-size: 1rem;
    min-width: 32px;
    font-weight: bold;
}

.remove-btn {
    background: rgba(255, 68, 68, 0.15);
    color: #ff4444;
    padding: 8px;
    border-radius: 8px;
    margin-left: 10px;
    font-size: 1.1rem;
    transition: background 0.2s;
}

.remove-btn:hover {
    background: rgba(255, 68, 68, 0.3);
}

.cart-total {
    margin-top: 25px;
    font-size: 1.5rem;
    font-weight: 800;
    text-align: right;
    color: var(--primary);
}

.cart-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.clear-btn {
    padding: 6px 12px !important;
    font-size: 0.85rem !important;
}

.checkout-form {
    margin-top: 25px;
    border-top: 1px solid var(--border);
    padding-top: 25px;
}

.full-width {
    width: 100%;
    margin-top: 25px;
}

/* Checkout Form */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.form-input {
    width: 100%;
    padding: 14px;
    background-color: var(--input-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    font-size: 1rem;
    color: var(--text);
    box-sizing: border-box;
    font-family: inherit;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 211, 102, 0.2);
}

/* Product Detail */
.product-detail-container {
    width: 100%;
    max-width: 700px;
    margin: 20px auto;
}

.back-link {
    display: inline-block;
    margin-bottom: 25px;
    color: var(--primary);
    text-decoration: none;
    font-weight: 700;
    font-size: 1.1rem;
}

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

.product-detail-card {
    background: var(--card-bg);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

.product-detail-img {
    width: 100%;
    height: auto;
    max-height: 400px;
    object-fit: contain;
    background-color: rgba(0, 0, 0, 0.3);
    display: block;
}

.product-detail-info {
    padding: 35px;
}

.product-detail-info h1 {
    font-size: 2rem;
    margin-bottom: 10px;
}

.product-description-large {
    font-size: 1.15rem;
    color: var(--text-muted);
    margin: 20px 0;
    line-height: 1.6;
}

.product-price-large {
    font-size: 1.4rem;
    font-weight: 900;
    color: var(--primary);
    margin: 5px 0;
}

.product-detail-actions {
    margin-top: 35px;
    padding-top: 25px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: center;
}



/* Responsive Adjustments */
@media (max-width: 480px) {
    .product {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 10px;
    }

    .product-col-info {
        width: 100%;
    }

    .qty-controls {
        margin-top: 10px;
    }

    .modal-content {
        width: 95%;
        padding: 20px 15px;
    }

    h1 {
        font-size: 1.6rem;
    }


}

/* Tablet & Desktop Constraints */
@media (min-width: 700px) {

    .menu-container,
    .product-detail-container,
    .store-header,
    .page-content {
        max-width: 700px;
    }

    .modal-content {
        max-width: 600px;
        /* Slightly larger modal on desktop */
    }
}