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

body,
html,
button,
input,
textarea {
    font-family: 'Tajawal', sans-serif;
    touch-action: manipulation;
}

body,
html {
    scroll-behavior: smooth;
    width: 100%;
    max-width: 100%;
}

html {
    background-image: url('images/icons.png');
    background-repeat: repeat;
    background-size: 700px auto;
    background-color: #f9bd11;
}

.main-header {
    background: #000000;
    border-bottom: 3px solid #f9bd11;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    height: 75px;
    box-sizing: border-box;
    width: 100%;
    max-width: 425px;
    position: sticky;
    top: 0;
    z-index: 1001;
}

.header-right {
    display: flex;
    align-items: center;
}

.header-logo {
    height: 48px;
    width: auto;
    max-width: 150px;
    border-radius: 6px;
    object-fit: contain;
}

.header-center {
    flex-grow: 1;
    text-align: center;
}

.header-tagline {
    color: #f9bd11;
    font-size: clamp(14px, 4.2vw, 18px);
    font-weight: 900;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.header-left {
    display: flex;
    align-items: center;
}

.luck-badge {
    background: #111;
    border: 2px solid #f9bd11;
    border-radius: 8px;
    padding: 4px 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 85px;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
    box-sizing: border-box;
}

.luck-badge.locked {
    opacity: 0.65;
    background: #222;
    border-color: #555;
}

.luck-badge.locked .luck-title {
    color: #888;
}

.luck-badge.locked .luck-subtitle {
    color: #777;
}

.luck-badge.unlocked {
    opacity: 1;
    background: #f9bd11;
    border-color: #ffd000;
    animation: pulseGlow 1.5s infinite alternate;
}

.luck-badge.unlocked .luck-title {
    color: #000;
}

.luck-badge.unlocked .luck-subtitle {
    color: #d32f2f;
    font-weight: bold;
}

.luck-title {
    font-size: 11px;
    font-weight: bold;
    color: #f9bd11;
}

.luck-subtitle {
    font-size: 9px;
    color: #aaa;
    margin-top: 2px;
}

@keyframes pulseGlow {
    0% {
        box-shadow: 0 0 5px rgba(249, 189, 17, 0.4);
        transform: scale(1);
    }
    100% {
        box-shadow: 0 0 15px rgba(249, 189, 17, 0.8);
        transform: scale(1.05);
    }
}

.bg-black {
    background-color: black;
}

.container {
    max-width: 425px;
    width: 100%;
    background-color: #f9bd11;
    margin: 0 auto;
}

.icon {
    height: 22px;
    width: 22px;
}

.navbar {
    position: sticky;
    top: 75px;
    width: 100%;
    height: 50px;
    background: black;
    display: flex;
    align-items: center;
    gap: 5px;
    overflow-x: auto;
    white-space: nowrap;
    z-index: 1000;
}

.navbar::-webkit-scrollbar {
    display: none;
}

.nav-icon {
    font-size: 20px;
    font-weight: bold;
    color: #f9bd11;
    opacity: 90%;
    margin-right: 3px;
    padding: 0px 10px;
    cursor: pointer;
    white-space: nowrap;
    transition: 0.3s ease;
}

.nav-icon.active {
    opacity: 100%;
    color: #ffd000;
    transform: scale(1.1);
}

section {
    border-bottom: 5px solid #000000;
    background-color: #f9bd11;
    scroll-margin-top: 130px;
}

/* 2-Column Grid Layout for Food Sections */
section:has(.card) {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    padding: 8px;
    align-items: stretch;
}

/* Ensure title spans full width in grid */
section:has(.card) > *:not(.card) {
    grid-column: span 2;
}

.section-title {
    font-size: clamp(20px, 6vw, 28px);
    text-align: center;
    padding: 10px 0px;
    font-weight: bolder;
}

.card {
    background-color: #000000;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    padding: 0px 0px 10px 0px;
    margin: 0;
    overflow: hidden;
    position: relative;
    box-sizing: border-box;
}

.card img {
    width: 100%;
    aspect-ratio: 1080 / 1500;
    border-radius: 8px 8px 0 0;
    object-fit: cover;
}

hr {
    border: none;
    background-color: #ffd000;
    width: 85%;
    margin: 6px auto;
    opacity: 100%;
    height: 3px;
    border-radius: 50px;
}

.card .title {
    font-size: clamp(13px, 4vw, 16px);
    color: #ffd000;
    padding: 6px 8px;
    text-align: center;
    font-weight: bold;
    word-wrap: break-word;
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.add-btn {
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #f9bd11;
    color: black;
    border: none;
    border-radius: 6px;
    margin: 4px 6px;
    padding: 8px 4px;
    font-size: clamp(11px, 3.5vw, 13px);
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
}

.add-btn:hover {
    transform: scale(1.02);
}

.add-btn:active {
    transform: scale(0.98);
}

.add-btn img {
    width: 10px !important;
    margin-right: 4px !important;
}

.food-price {
    text-align: center;
    color: black;
    font-weight: bolder;
    font-size: clamp(11px, 3.5vw, 14px);
}

.remove-btn {
    background-color: #ff3b30;
    color: white !important;
    border: none;
    cursor: pointer;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    font-size: 16px;
    font-weight: bold;
    position: absolute;
    left: 6px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    transition: background-color 0.2s, transform 0.1s;
    line-height: 1;
}

.remove-btn:hover {
    background-color: #e0241b;
}

.remove-btn:active {
    transform: translateY(-50%) scale(0.9);
}

/* تنسيق صفحة الطلبات */
.orders-container {
    padding: 20px;
}

.order-card {
    background: #f9bd11;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 15px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.order-card h3 {
    color: black;
    margin-bottom: 10px;
}

.order-items {
    margin: 10px 0;
}

.order-item {
    display: flex;
    justify-content: space-between;
    padding: 5px 0;
    border-bottom: 1px solid #ddd;
}

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

.order-total {
    margin-top: 10px;
    font-size: 18px;
    color: black;
}

.back-btn {
    display: block;
    width: 100%;
    padding: 10px;
    background: #f9bd11;
    color: black;
    text-align: center;
    text-decoration: none;
    border-radius: 5px;
    margin-top: 20px;
    transition: background-color 0.3s;
}

.back-btn:hover {
    background: #ffd000;
}

#order-btn {
    position: fixed;
    bottom: 8%;
    display: none;
    left: 7%;
    background-color: #f9bd11;
    color: black;
    border: none;
    border-radius: 8px;
    padding: 5px 15px;
    font-size: 17px;
    font-weight: bold;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25);
    cursor: pointer;
    z-index: 9999;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

#order-btn:hover {
    transform: scale(1.05);
}

#order-btn:active {
    transform: scale(0.97);
}
