:root {
    --primary-color: #ff6b35;
    --primary-hover: #e55a2b;
    --primary-light: #fff0eb;
    --text-dark: #333333;
    --text-light: #666666;
    --text-white: #ffffff;
    --background-white: #ffffff;
    --background-light: #f9f9f9;
    --border-color: #e0e0e0;
    --shadow-light: rgba(0, 0, 0, 0.1);
    --shadow-medium: rgba(0, 0, 0, 0.2);
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    width: 100%;
    min-height: 100vh;
    overflow-x: hidden;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-image: url('../assets/images/back.png');
    background-attachment: fixed;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text-white);
    direction: rtl;
}

/* ===== Navbar - مثل index.php (شفاف) ===== */
/* ===== Navbar (مثل index.php) ===== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 15px 5%;
    background: transparent;
    z-index: 1000;
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 24px;
    font-weight: bold;
    color: white;
}

.logo img {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255,255,255,.3);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 25px;
    align-items: center;
}

.nav-link {
    color: white;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 25px;
    transition: .3s;
    font-size: 16px;
    font-weight: 500;
}

.nav-link:hover,
.nav-link.active {
    background: rgba(255,107,53,.8);
}

.nav-user{
    display:flex;
    align-items:center;
    gap:12px;
}

.admin-nav-btn,
.logout-btn,
.login-btn{
    color:white;
    text-decoration:none;
    background:transparent;
    border:none;
    padding:8px 18px;
    font-size:14px;
    transition:.3s;
}

.admin-nav-btn:hover,
.login-btn:hover{
    color:#ff6b35;
    transform:scale(1.05);
}

.logout-btn:hover{
    color:#ff6b6b;
    transform:scale(1.05);
}

 

.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 5px;
    background: none;
    border: none;
}

.hamburger span {
    display: block;
    width: 28px;
    height: 3px;
    background: var(--text-white);
    border-radius: 3px;
    transition: all 0.3s ease;
}

/* ===== Main Content ===== */
main {
    margin-top: 90px;
    padding: 0 5%;
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
}

/* ===== Category Boxes ===== */
.category-boxes {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 40px;
}

.category-box {
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 25px 15px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 3px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    font-family: inherit;
    width: 100%;
    color: var(--text-white);
}

.category-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(255, 107, 53, 0.3);
    border-color: rgba(255, 107, 53, 0.5);
}

.category-box.active {
    border: 3px solid var(--primary-color);
    background: rgba(255, 107, 53, 0.2);
    box-shadow: 0 0 30px rgba(255, 107, 53, 0.3);
}

.category-box .icon {
    font-size: 40px;
    display: block;
    margin-bottom: 10px;
}

.category-box .name {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-white);
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.category-box .count {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
    margin-top: 5px;
}

/* ===== Menu Section - مثل footer في index (شفاف مع blur) ===== */
.menu {
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 40px 30px;
    margin-bottom: 40px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.menu-heading {
    font-size: 32px;
    color:#ff6b35;
    text-align: center;
    margin-bottom: 10px;
    font-weight: bold;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.menu-subheading {
    text-align: center;
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    margin-bottom: 30px;
}

.menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
}

.no-items {
    text-align: center;
    color: rgba(255, 255, 255, 0.8);
    font-size: 18px;
    padding: 40px;
    grid-column: 1 / -1;
}

/* ===== Menu Item - مثل footer في index ===== */
.menu-item {
    background: rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 15px;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
    overflow: hidden;
    height: 100%;
    min-height: 340px;
    position: relative;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.menu-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
    border-color: var(--primary-color);
}

.item-image {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 12px;
    background: rgba(0, 0, 0, 0.3);
}

.item-image-placeholder {
    width: 100%;
    height: 180px;
    border-radius: 8px;
    margin-bottom: 12px;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 50px;
    color: rgba(255, 255, 255, 0.3);
}

.item-name {
    font-size: 19px;
    color: var(--text-white);
    margin-bottom: 6px;
    font-weight: bold;
    text-align: center;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    word-break: break-word;
    line-height: 1.3;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.item-description {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 15px;
    line-height: 1.6;
    flex-grow: 1;
    text-align: center;
}

/* ===== Type Buttons ===== */
.type-buttons {
    display: flex;
    gap: 10px;
    margin-top: 10px;
    flex-wrap: wrap;
}

.type-btn {
    flex: 1;
    min-width: 70px;
    padding: 10px 12px;
    border: 2px solid var(--primary-color);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-white);
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    font-family: inherit;
}

.type-btn:hover:not(.disabled):not(.selected) {
    background: rgba(255, 107, 53, 0.3);
    transform: scale(1.02);
}

.type-btn.selected {
    background: var(--primary-color);
    color: var(--text-white);
    border-color: var(--primary-color);
}

.type-btn .price {
    display: inline-block;
    font-size: 14px;
    margin-top: 3px;
    font-weight: bold;
    color: #ff6b35 !important;
    background: rgba(255, 255, 255, 0.95) !important;
    padding: 2px 8px;
    border-radius: 6px;
    border: 2px solid #ff6b35 !important;
    box-shadow: 0 2px 6px rgba(255, 107, 53, 0.2);
    text-shadow: none;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.type-btn.selected .price {
    background: #ffffff !important;
    color: #ff6b35 !important;
    border-color: #ff6b35 !important;
}

.type-btn.disabled .price {
    opacity: 0.5;
    border-color: #ff6b35 !important;
    color: #ff6b35 !important;
    background: rgba(255, 255, 255, 0.5) !important;
}

.type-btn.disabled {
    opacity: 0.6;
    cursor: default;
    border-color: #ff6b35;
    color: rgba(255, 255, 255, 0.5);
}

.type-btn .no-price {
    display: block;
    font-size: 11px;
    color: rgba(19, 19, 19, 0.941);
    margin-top: 3px;
}

/* ===== Order Section ===== */
.order-section {
    margin-top: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.item-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    flex-wrap: wrap;
    gap: 10px;
}

/* ===== تحسين عرض الأسعار - برتقالي مع كادر برتقالي ===== */
.item-price-container {
    background: #ffffff !important;
    border-radius: 8px;
    padding: 4px 10px;
    border: none; /* أو اترك border:2px solid #ff6b35 إذا أردته */
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.item-price {
    color: #ff6b35 !important;
    font-weight: bold;
}

.item-price .currency {
    font-size: 13px;
    color: #ff6b35;
    margin-right: 2px;
}

.item-footer .item-price-container {
    background: rgba(255, 255, 255, 0.95) !important;
    padding: 4px 12px;
    border-radius: 10px;
    border: 2px solid #ff6b35 !important;
}

.type-btn .price {
    background: #ffffff !important;
    color: #ff6b35 !important;
    border-radius: 6px;
    padding: 2px 6px;
    border: none;
}

.order-button {
    background: var(--primary-color);
    color: var(--text-white);
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
    width: 100%;
}

.order-button:hover:not(:disabled) {
    background: var(--primary-hover);
    transform: scale(1.05);
}

.order-button:disabled {
    background: #ff6b35;
    cursor: not-allowed;
    transform: none;
    color: var(--text-white);
}

.order-button.added-to-cart {
    background: var(--success-color);
}

/* ===== Login Required Message ===== */
.login-required-message {
    text-align: center;
    padding: 15px 20px;
    background: rgba(255, 193, 7, 0.2);
    backdrop-filter: blur(5px);
    border: 2px solid var(--warning-color);
    border-radius: 10px;
    margin: 20px 0;
}

.login-required-message p {
    color: var(--text-white);
    font-size: 16px;
    margin: 0;
}

.login-required-message a {
    color: var(--primary-color);
    font-weight: bold;
    text-decoration: none;
}

.login-required-message a:hover {
    text-decoration: underline;
}

/* ===== Cart ===== */
#views-total-orders {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1001;
}

#orders-button {
    background: var(--primary-color);
    color: var(--text-white);
    border: none;
    padding: 15px 30px;
    border-radius: 30px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 4px 12px var(--shadow-medium);
    font-family: inherit;
    transition: all 0.3s ease;
}

#orders-button:hover {
    background: var(--primary-hover);
    transform: scale(1.05);
}

#cart-count {
    background: var(--text-white);
    color: var(--primary-color);
    padding: 2px 10px;
    border-radius: 10px;
    font-weight: bold;
    margin-left: 5px;
}

.cart-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1002;
    justify-content: center;
    align-items: center;
}

.cart-overlay.active {
    display: flex;
}

.order-list-container {
    width: 90%;
    max-width: 550px;
    max-height: 80vh;
    background: var(--background-white);
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    border: 4px solid var(--primary-color);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.cart-header .menu-heading {
    font-size: 24px;
    margin: 0;
}

.close-cart-btn {
    background: none;
    border: none;
    font-size: 28px;
    color: var(--text-dark);
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    transition: all 0.3s ease;
}

.close-cart-btn:hover {
    color: var(--primary-color);
    transform: rotate(90deg);
}

#orders-list {
    overflow-y: auto;
    max-height: 400px;
    margin-bottom: 20px;
}

.empty-cart-message {
    text-align: center;
    color: var(--text-light);
    padding: 40px 20px;
    font-size: 16px;
}

.empty-cart-message .empty-icon {
    font-size: 50px;
    display: block;
    margin-bottom: 10px;
}

.order-card {
    background: var(--background-light);
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 12px;
    border: 2px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
}

.order-card:hover {
    border-color: var(--primary-color);
}

.order-card-content {
    flex-grow: 1;
}

.item-name-cart {
    font-weight: bold;
    font-size: 16px;
    color: var(--text-dark);
}

.item-price-cart {
    color: var(--primary-color);
    font-weight: bold;
    font-size: 14px;
}

.quantity-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 5px;
}

.quantity-btn {
    background: var(--primary-color);
    color: var(--text-white);
    border: none;
    width: 25px;
    height: 25px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    font-family: inherit;
    transition: all 0.3s ease;
}

.quantity-btn:hover {
    background: var(--primary-hover);
    transform: scale(1.1);
}

.quantity-display {
    font-weight: bold;
    min-width: 30px;
    text-align: center;
    color: var(--text-dark);
    font-size: 16px;
}

.remove-item-btn {
    background: var(--danger-color);
    color: var(--text-white);
    border: none;
    padding: 8px 12px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 12px;
    font-weight: bold;
    font-family: inherit;
    transition: all 0.3s ease;
}

.remove-item-btn:hover {
    background: #c82333;
    transform: scale(1.05);
}

.total-price-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-top: 3px solid var(--primary-color);
    margin-bottom: 15px;
}

.total-price-label {
    font-size: 20px;
    font-weight: bold;
    color: var(--text-dark);
}

.total-price-value {
    font-size: 24px;
    font-weight: bold;
    color: var(--primary-color);
}

.checkout-button {
    width: 100%;
    background: var(--primary-color);
    color: var(--text-white);
    border: none;
    padding: 15px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.3s ease;
}

.checkout-button:hover:not(:disabled) {
    background: var(--primary-hover);
    transform: scale(1.02);
}

.checkout-button:disabled {
    background: var(--text-light);
    cursor: not-allowed;
    transform: none;
}

.btn-reserve {
    background: var(--info-color) !important;
}

.btn-reserve:hover:not(:disabled) {
    background: #138496 !important;
}

/* ===== Reservation Form ===== */
#reservation-overlay .form-group {
    margin-bottom: 15px;
}

#reservation-overlay .form-group label {
    display: block;
    font-weight: bold;
    color: var(--text-dark);
    margin-bottom: 5px;
    font-size: 14px;
}

#reservation-overlay .form-group label .required {
    color: red;
}

#reservation-overlay .form-group input,
#reservation-overlay .form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 16px;
    font-family: inherit;
    background: #f9f9f9;
    transition: all 0.3s ease;
}

#reservation-overlay .form-group input:focus,
#reservation-overlay .form-group textarea:focus {
    outline: none;
    border-color: var(--info-color);
    box-shadow: 0 0 0 3px rgba(23, 162, 184, 0.1);
}

#reservation-overlay .reservation-total {
    margin-top: 15px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 8px;
    text-align: center;
    font-size: 16px;
    color: var(--text-dark);
}

#reservation-overlay .reservation-total span {
    font-weight: bold;
    color: var(--primary-color);
}

/* ===== Notification ===== */
.notification {
    position: fixed;
    top: 100px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    padding: 15px 30px;
    border-radius: 10px;
    font-weight: bold;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    animation: slideDown 0.5s ease;
    display: none;
    color: var(--text-white);
}

.notification.success {
    background: var(--success-color);
}

.notification.error {
    background: var(--danger-color);
}

.notification.info {
    background: var(--info-color);
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* ===== تحسين الأسعار على الهواتف ===== */
@media (max-width:480px){

    .type-btn{
        min-width:55px;
        padding:5px;
    }

    .type-btn .price{
        font-size:10px !important;
    }

    .item-price{
        font-size:13px !important;
    }

    .item-price-container{
        padding:2px 6px;
    }


    
    .item-price {
        font-size: 14px !important;
        white-space: nowrap !important;
        display: inline-block !important;
    }
    .type-btn .no-price {
    display: block;
    font-size: 11px;
    color: rgba(19, 19, 19, 0.941);
    margin-top: 3px;
}
    
    .item-price .currency {
        font-size: 11px !important;
    }
    
    /* تحسين تخطيط الـ item */
    .menu-item {
        padding: 10px !important;
        min-height: 250px !important;
    }
    
    .item-name {
        font-size: 13px !important;
        min-height: 32px !important;
    }
    
    .item-image {
        height: 100px !important;
    }
    
    .item-image-placeholder {
        height: 100px !important;
        font-size: 35px !important;
    }
    
    /* تحسين الـ order section */
    .order-section {
        margin-top: 8px !important;
        gap: 6px !important;
    }
    
    .item-footer {
        flex-direction: row !important;
        align-items: center !important;
        justify-content: space-between !important;
        gap: 5px !important;
        flex-wrap: nowrap !important;
    }
    
    .order-button {
        font-size: 10px !important;
        padding: 6px 10px !important;
        width: auto !important;
        flex: 1 !important;
    }
    
    /* جعل الصفوف أكثر ترتيباً */
    .menu-grid {
        grid-template-columns: 1fr 1fr !important;
        gap: 8px !important;
    }
}

@media (max-width: 380px) {
    /* للشاشات الصغيرة جداً */
    .type-btn {
        font-size: 10px !important;
        padding: 4px 6px !important;
        min-width: 40px !important;
    }
    
    .type-btn .price {
        font-size: 9px !important;
        padding: 1px 4px !important;
    }
    
    .item-price {
        font-size: 12px !important;
    }
    
    .item-price-container {
        padding: 2px 6px !important;
    }
    .type-btn .no-price {
    display: block;
    font-size: 11px;
    color: rgba(19, 19, 19, 0.941);
    margin-top: 3px;
}
    
    .item-name {
        font-size: 12px !important;
    }
    
    .menu-item {
        padding: 8px !important;
        min-height: 220px !important;
    }
    
    .item-image {
        height: 80px !important;
    }
    
    .order-button {
        font-size: 9px !important;
        padding: 4px 8px !important;
    }
}

/* ===== إجبار الأسعار على عدم التفاف ===== */
.type-btn .price,
.item-price,
.item-price-container,
.currency,
.price {
    white-space: nowrap !important;
    display: inline-block !important;
    max-width: 100% !important;
}

/* ===== Responsive ===== */
@media (max-width: 992px) {
    .category-boxes {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    .menu-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

@media (max-width:768px){

    .hamburger{
        display:flex;
    }

    .nav-menu{
        display:none;
        position:absolute;
        top:100%;
        left:0;
        width:100%;
        background:rgba(0,0,0,.9);
        flex-direction:column;
        padding:20px;
        gap:10px;
        text-align:center;
    }

    .nav-menu.active{
        display:flex;
    }

    .nav-user{
        flex-direction:column;
        width:100%;
        gap:8px;
    }

    .nav-user a{
        width:100%;
        text-align:center;
    }

    .navbar{
        padding:12px 5%;
    }

    .logo{
        font-size:20px;
    }

    .logo img{
        width:38px;
        height:38px;
    }
    .type-btn .no-price {
    display: block;
    font-size: 11px;
    color: rgba(19, 19, 19, 0.941);
    margin-top: 3px;
}
}
/* ===== إصلاح ظهور عناصر السلة على شاشات اللابتوب/الديسكتوب ===== */
.order-list-container {
    min-height: 0;
}

#orders-list {
    flex-shrink: 0;
    min-height: 60px;
    width: 100%;
}

.order-card {
    flex-shrink: 0;
    width: 100%;
    box-sizing: border-box;
}

.order-card-content {
    min-width: 0;
    width: 100%;
}

.item-name-cart,
.item-price-cart {
    overflow-wrap: break-word;
    word-break: break-word;
}