@import url('https://fonts.googleapis.com/css2?family=Kanit:wght@300;400;500;600;700;800&display=swap');

:root {
    /* Appetizing "Hungry" Color Palette - Red/Orange/Yellow Theme */
    --primary: #ef4444;
    /* Red 500 - Stimulates appetite */
    --primary-light: #f87171;
    /* Red 400 */
    --primary-dark: #dc2626;
    /* Red 600 */
    --secondary: #fbbf24;
    /* Amber 400 - Cheese/Burger bun color */
    --accent: #f59e0b;
    /* Amber 500 */

    --success: #10b981;
    --warning: #f59e0b;
    --danger: #b91c1c;
    /* Red 700 */

    /* Neutrals */
    --gray-50: #fffbeb;
    /* Warm off-white */
    --gray-100: #fef3c7;
    /* Very light amber - Warm background */
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;

    /* Semantic Colors */
    --bg-main: #fefce8;
    /* Yellow 50 - Very subtle warm yellow tint */
    --bg-secondary: #fff7ed;
    /* Orange 50 */
    --text-primary: #451a03;
    /* Dark Brown - Warm text color */
    --text-secondary: #78350f;
    /* Amber 900 */
    --text-muted: #92400e;
    /* Amber 700 */
    --border: #fcd34d;
    /* Amber 300 */

    /* Shadows - Warm tinted shadows */
    --shadow-xs: 0 1px 2px 0 rgba(120, 53, 15, 0.05);
    --shadow-sm: 0 1px 3px 0 rgba(120, 53, 15, 0.1), 0 1px 2px -1px rgba(120, 53, 15, 0.1);
    --shadow-md: 0 4px 6px -1px rgba(120, 53, 15, 0.1), 0 2px 4px -2px rgba(120, 53, 15, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(120, 53, 15, 0.1), 0 4px 6px -4px rgba(120, 53, 15, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(120, 53, 15, 0.1), 0 8px 10px -6px rgba(120, 53, 15, 0.1);

    /* Spacing */
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-full: 9999px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Kanit', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: linear-gradient(135deg, #fefadd 0%, #fff7ed 100%);
    background-attachment: fixed;
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.025em;
    color: var(--text-primary);
}

h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

h2 {
    font-size: 2rem;
    margin-bottom: 0.875rem;
}

h3 {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: all 0.2s ease;
}

a:hover {
    color: var(--primary-dark);
}

input,
select,
textarea,
button,
.form-control {
    font-family: 'Kanit', sans-serif;
}

/* Glass Panel Effect */
.glass-panel {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
}

/* Navbar - Square Corners */
.navbar {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: all 0.3s ease;
    border-radius: 0;
    height: 90px;
    /* Restrict height */
    overflow: visible;
    /* Allow logo to hang out */
    /* Square corners */
}

.navbar:hover {
    box-shadow: var(--shadow-md);
}

/* Brand Replaced by .brand-container and .nav-logo */

/* Global Logo Style (Desktop) */
.nav-logo {
    height: 90px;
    width: 90px;
    border-radius: 50%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.nav-logo:hover {
    transform: scale(1.05);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-links a {
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.95rem;
    position: relative;
    padding: 0.5rem 0;
    transition: color 0.2s ease;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    transition: width 0.3s ease;
}

.nav-links a:hover {
    color: var(--primary);
}

.nav-links a:hover::after {
    width: 100%;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-lg);
    border: none;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.5);
    color: white;
}

.btn-primary:active {
    transform: translateY(0);
}

/* Container */
.container {
    max-width: 1200px;
    margin: 2.5rem auto;
    padding: 0 1.5rem;
}

/* Product Grid */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

/* Product Card */
.product-card {
    background: white;
    border-radius: var(--radius-xl);
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    position: relative;
}

.product-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1) 0%, rgba(251, 191, 36, 0.1) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 1;
}

.product-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: var(--shadow-xl);
}

.product-card:hover::before {
    opacity: 1;
}

.product-img {
    width: 100%;
    height: 240px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.product-card:hover .product-img {
    transform: scale(1.1);
}

.product-info {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 2;
}

.product-info h3 {
    margin-bottom: 0.5rem;
    font-size: 1.125rem;
    font-weight: 500;
    color: var(--text-primary);
}

.product-info p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.9rem;
}

.form-control {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    background: white;
    color: var(--text-primary);
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.1);
    transform: translateY(-1px);
}

.form-control:hover {
    border-color: var(--gray-300);
}

select.form-control {
    padding-right: 2.5rem;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.5rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
}

/* QR Code */
.qr-code-img {
    max-width: 200px;
    border-radius: var(--radius-lg);
    border: 3px solid white;
    padding: 0.75rem;
    background: white;
    box-shadow: var(--shadow-lg);
    transition: transform 0.3s ease;
}

.qr-code-img:hover {
    transform: scale(1.05);
}

/* Cart Badge */
.cart-notification {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.cart-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: linear-gradient(135deg, var(--secondary) 0%, var(--primary) 100%);
    color: white;
    border-radius: var(--radius-full);
    min-width: 22px;
    height: 22px;
    font-size: 0.75rem;
    font-weight: 700;
    display: flex;
    justify-content: center;
    align-items: center;
    border: 2px solid white;
    padding: 0 6px;
    box-shadow: var(--shadow-md);
    animation: pulse 2s infinite;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.text-gradient {
    background: linear-gradient(to right, #6366f1, #ec4899);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

/* Hide Spinners */
.no-spin::-webkit-outer-spin-button,
.no-spin::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.no-spin {
    -moz-appearance: textfield;
    appearance: textfield;
}

.mt-1 {
    margin-top: 0.5rem;
}

.mt-2 {
    margin-top: 1rem;
}

.mt-3 {
    margin-top: 1.5rem;
}

.mb-1 {
    margin-bottom: 0.5rem;
}

.mb-2 {
    margin-bottom: 1rem;
}

.mb-3 {
    margin-bottom: 1.5rem;
}

/* Mobile specific elements */
.mobile-remove-btn {
    display: none !important;
}

/* Product Detail Panel */
.product-detail-panel {
    padding: 2rem;
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

/* Responsive */
/* Mobile Toggle */
.mobile-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-primary);
}

/* Brand Text */
.brand-text {
    /* Desktop styles: inherit gradient from container or set transparent */
    text-decoration: none;
    cursor: pointer;
    font-size: 1.75rem;
    /* Match container */
    font-weight: 800;
}

/* Ensure container handles the gradient text effect for the link inside */


/* Global Brand Logo Link (Desktop) - Position to the left of text */
.brand-logo-link {
    position: absolute;
    left: 1rem;
    /* Align left in navbar */
    top: 5px;
    /* Center vertically roughly */
    z-index: 1001;
}

/* Adjust Desktop Brand Text Padding & Gradient */
.brand-container {
    padding-left: 110px;
    /* Space for the 80px logo */
    height: 90px;
    display: flex;
    align-items: center;
    position: relative;
    /* Context for absolute logo */
}

.brand-text {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    /* Fallback */
    font-size: 1.75rem;
    font-weight: 800;
}

/* Responsive */
@media (max-width: 992px) {

    /* Navbar Adjustment */
    .navbar {
        padding: 0.5rem 1rem;
        height: 80px;
        /* Increased height to fit logo */
        display: flex;
        justify-content: space-between;
        align-items: center;
        position: sticky;
    }

    /* 1. Brand Text (Left) - Moble Override */
    .brand-text {
        display: block;
        font-size: 1.2rem;
        font-weight: bold;
        background: none;
        /* Remove gradient background */
        -webkit-background-clip: border-box;
        background-clip: border-box;
        -webkit-text-fill-color: var(--primary);
        /* Use solid color */
        color: var(--primary);

        position: relative;
        z-index: 1002;
    }

    /* 2. Logo (Center & Smaller) */
    .nav-logo {
        height: 100px !important;
        width: 100px !important;
        position: absolute;
        left: 50%;
        top: 60px;
        /* Push lower: Starts 10px from top, Hangs 30px below nav */
        transform: translate(-50%, -50%);
        /* Center vertically and horizontally */
        border-radius: 50%;
        filter: none;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
        z-index: 1002;
        pointer-events: auto;
        /* Ensure clickable even if container is not */
    }

    .brand-container {
        padding-left: 0;
        /* Remove desktop padding */
        background: none;
        width: 100%;
        display: flex;
        justify-content: space-between;
        /* Spread Text and Toggle */
        align-items: center;
    }

    .brand-logo-link {
        position: absolute;
        /* Keep it out of flow for centering */
        left: 0;
        right: 0;
        top: 0;
        height: 80px;
        pointer-events: none;
        /* Let text/hamburger be clickable */
    }

    /* 3. Hamburger (Right) */
    .mobile-toggle {
        display: block;
        position: absolute;
        right: 1rem;
        top: 50%;
        transform: translateY(-50%);
        /* Vertically center */
        z-index: 1003;
        margin: 0;
        padding: 0;
        line-height: 1;
    }

    /* Navigation Links (Hidden Dropdown) */
    .nav-links {
        display: none;
        flex-direction: column;
        width: 100%;
        background: white;
        position: absolute;
        top: 80px;
        left: 0;
        padding: 1rem;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
        border-bottom: 1px solid #eee;
        z-index: 1000;
        align-items: center;
        gap: 1.5rem;
    }

    .nav-links.active {
        display: flex;
    }

    /* 4. Products Vertical */
    .product-grid {
        grid-template-columns: 1fr;
        /* Single column */
        gap: 1.5rem;
    }

    .product-img {
        height: auto;
        aspect-ratio: 16/9;
    }

    /* Layouts */
    .form-row,
    .checkout-grid {
        grid-template-columns: 1fr !important;
    }

    .checkout-grid {
        grid-template-columns: 1fr !important;
        display: flex;
        flex-direction: column;
    }

    /* Container & Layouts */
    .container {
        padding: 0 1rem;
        margin: 1.5rem auto;
    }

    .glass-panel {
        padding: 1.5rem !important;
        /* Reduce padding on mobile */
    }



    /* Typography */
    h1 {
        font-size: 1.75rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    h3 {
        font-size: 1.25rem;
    }

    /* Cart Table Responsive (Vertical Stack) */
    .cart-table,
    .cart-table tbody,
    .cart-table tr,
    .cart-table td {
        display: block;
        width: 100%;
        white-space: normal;
        /* Allow text wrap */
    }

    .cart-table thead {
        display: none;
        /* Hide header */
    }

    .cart-table tr {
        margin-bottom: 1.5rem;
        background: #fff;
        border: 1px solid #eee;
        border-radius: 12px;
        padding: 1rem;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    }

    .mobile-remove-btn {
        display: inline-flex !important;
        background: white !important;
        color: #ef4444 !important;
        /* Red icon */
        border: 1px solid #ef4444 !important;
        padding: 0.4rem !important;
        width: 32px;
        height: 32px;
        border-radius: 50% !important;
        align-items: center;
        justify-content: center;
        margin-left: 0.5rem;
    }

    .cart-table td {
        padding: 0.5rem 0 !important;
        display: flex;
        justify-content: space-between;
        align-items: center;
        text-align: right;
        border-bottom: 1px solid #f9f9f9;
        font-size: 0.95rem;
        /* Reduce font size slightly */
    }

    /* Total Row Specifics */
    .cart-table td[data-label="Total"] {
        border-bottom: none;
        justify-content: flex-start;
        /* Align content to start */
        gap: 0.5rem;
        flex-wrap: wrap;
        /* Allow wrapping */
        align-items: baseline;
    }

    .cart-table td[data-label="Total"]::before {
        margin-right: auto;
        /* Push content to right */
    }

    .cart-table td[data-label="Total"] .item-total {
        font-weight: 500;
        /* Reduce weight */
        font-size: 0.9rem;
        /* Reduce size */
        color: var(--text-secondary);
        margin-right: 1rem;
    }

    .cart-table td:last-child,
    .cart-table td[data-label="Action"] {
        display: none !important;
        /* Hide original Action row */
    }

    .cart-table td::before {
        content: attr(data-label);
        font-weight: 600;
        color: var(--text-secondary);
        float: left;
    }

    /* Product Detail */
    .product-detail-panel {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }
}

@media (max-width: 480px) {
    .nav-links {
        justify-content: center;
        flex-wrap: wrap;
    }

    .brand {
        font-size: 1.2rem;
    }
}