
/* ===== Universal Navbar ===== */
.navbar {
  background: linear-gradient(rgba(33,21,66,.88), rgba(33,21,66,.88)), url("../../assets/1.webp");
  background-size: cover;
  background-position: center;
  padding: 0 5%;
  height: 80px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 999;
  
  box-shadow: 0 8px 25px rgba(0,0,0,.18);
  overflow: hidden;
  margin-bottom: 0;
}
.nav-hayakum-logo {
  height: 52px;
  width: auto;
  object-fit: contain;
  filter: brightness(0) invert(1);
  opacity: .95;
}
.nav-logo-wrap { display: flex; align-items: center; }
.nav-building-name {
  color: #f3e5c0;
  font-size: 15px;
  font-weight: 800;
  background: rgba(255,255,255,0.12);
  padding: 7px 18px;
  border-radius: 22px;
  border: 1px solid rgba(243,229,192,0.25);
  white-space: nowrap;
}
.nav-left { display: flex; align-items: center; gap: 10px; }
@media(max-width:700px) {
  .navbar { padding: 0 18px;  }
  .nav-hayakum-logo { height: 40px; }
  .nav-building-name { font-size: 13px; padding: 5px 12px; }
}
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Tajawal', sans-serif;
}

body {
    min-height: 100vh;
    padding: 0 0 80px;
    background: #f3f0f5;
    color: #342744;
    overflow-x: hidden;
}







.main-tabs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    margin-bottom: 25px;
    padding: 0 5%;
}

.main-tabs button,
.sub-tabs button {
    border: none;
    padding: 16px;
    border-radius: 18px;
    font-size: 19px;
    font-weight: 700;
    cursor: pointer;
    background: white;
    color: #4a2d7a;
    font-family: 'Tajawal', sans-serif;
}

.main-tabs button.active,
.sub-tabs button.active {
    background: #4a2d7a;
    color: white;
}

.sub-tabs {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 25px;
    padding: 0 5%;
}

.header {
    text-align: center;
    padding: 20px;
    margin-bottom: 30px;
}

.header h1 {
    color: #4a2d7a;
    font-size: 28px;
    font-weight: 800;
}

.menu-grid {
    display: grid;
    /* السر هنا: يخلي الكروت نحيفة (عرضها 220px) وتترتب جنب بعض */
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 35px;
    padding: 0 5%;
}

/* كرت المنيو (استخدام الفليكس لترتيب العناصر) */
.item {
    background: white;
    color: #2f2638;
    border-radius: 30px;
    overflow: hidden;
    box-shadow: 0 12px 28px rgba(0, 0, 0, .12);
    display: flex;
    flex-direction: column;
}

.item img {
    width: 100%;
    height: 240px; /* طول فخم ومناسب للكرت النحيف */
    flex-shrink: 0;
    object-fit: cover; /* يغطي المساحة بالكامل بدون فراغات بيضاء */
    object-position: center;
    display: block;
    filter: brightness(1.05) contrast(1.1) saturate(1.1);
}
.info {
    padding: 20px; /* كبرنا المسافة الداخلية عشان ما تلزق الأزرار بالحواف */
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    justify-content: space-between;
    background-color: white; 
}

.info h3 {
    font-size: 20px;
    margin-bottom: 4px;
}

.info p {
    color: #6d6172;
    font-size: 14px;
    margin-bottom: 7px;
    line-height: 1.7;
}

.options label {
    display: block;
    margin-bottom: 5px;
    font-size: clamp(13px, 3.8vw, 17px);
}

.options input {
    accent-color: #4a2d7a;
    margin-left: 6px;
}

.qty {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 8px 0;
}

.qty button {
    width: 34px;
    height: 34px;
    border: none;
    border-radius: 10px;
    background: #4a2d7a;
    color: white;
    font-size: 20px;
    cursor: pointer;
}

.qty input {
    width: 58px;
    height: 34px;
    text-align: center;
    border: 1px solid #ccc;
    border-radius: 10px;
    font-size: 16px;
}

.add-btn {
    border: none;
    background: #4a2d7a;
    color: white;
    padding: 9px 20px;
    border-radius: 14px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: .2s;
    font-family: 'Tajawal', sans-serif;
    width: 100%;
}

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

.section-title {
    grid-column: 1 / -1;
    color: #4a2d7a;
    font-size: 28px;
    font-weight: 700;
    margin: 14px 0 4px;
}

.order-box {
    background: rgba(255, 255, 255, .95);
    color: #2f2638;
    border-radius: 28px;
    padding: 24px;
    max-width: 900px;
    margin: 30px auto;
    box-shadow: 0 15px 35px rgba(0, 0, 0, .12);
}

.order-box h2 {
    font-size: 26px;
    margin-bottom: 14px;
    color: #4a2d7a;
}

#orderList {
    background: white;
    border-radius: 16px;
    border: 1px solid #d9d9d9;
    padding: 14px;
    min-height: 55px;
    line-height: 2;
    margin-bottom: 16px;
    color: #342744;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.field label {
    display: block;
    font-weight: 700;
    margin-bottom: 7px;
    color: #4a2d7a;
}

.field input,
.field select,
.field textarea {
    width: 100%;
    border: 1px solid rgba(108, 52, 183, .20);
    border-radius: 14px;
    padding: 12px;
    font-size: 16px;
    font-family: 'Tajawal', sans-serif;
    outline: none;
}

.field textarea {
    height: 90px;
    resize: none;
}

.full {
    grid-column: 1 / -1;
}

.send-btn {
    width: 100%;
    margin-top: 18px;
    border: none;
    padding: 15px;
    border-radius: 18px;
    font-size: clamp(15px, 4.5vw, 19px);
    font-weight: 700;
    color: white;
    background: #4a2d7a;
    cursor: pointer;
    font-family: 'Tajawal', sans-serif;
    transition: .25s;
}

.send-btn:hover {
    transform: translateY(-2px);
}

.hidden {
    display: none;
}

.toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(60px);
    background: #2d1f55;
    color: white;
    padding: 12px 28px;
    border-radius: 14px;
    font-size: 15px;
    opacity: 0;
    transition: .3s;
    pointer-events: none;
    z-index: 9999;
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.breakfast-note {
    color: #4a2d7a;
    font-size: 14px;
    line-height: 1.8;
    grid-column: 1 / -1;
    padding: 10px;
    background: rgba(108, 52, 183, .06);
    border-radius: 12px;
}

.success-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(20, 10, 40, 0.7);
    backdrop-filter: blur(6px);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.success-overlay.show {
    display: flex;
}

.success-box {
    background: white;
    border-radius: 28px;
    padding: 48px 36px;
    text-align: center;
    max-width: 400px;
    width: 100%;
    animation: popIn .4s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.25);
}

@keyframes popIn {
    from { transform: scale(0.7); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.success-icon {
    width: 90px;
    height: 90px;
    background: linear-gradient(135deg, #4a2d7a, #9b59d9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    animation: scaleIn .5s .2s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes scaleIn {
    from { transform: scale(0); }
    to { transform: scale(1); }
}

.success-icon svg {
    width: 46px;
    height: 46px;
    stroke: white;
    stroke-width: 3;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.success-box h2 {
    font-size: 26px;
    font-weight: 800;
    color: #2f2248;
    margin-bottom: 10px;
}

.success-box p {
    font-size: 16px;
    color: #7b7483;
    line-height: 1.7;
    margin-bottom: 28px;
}

.success-close {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #4a2d7a, #9b59d9);
    color: white;
    border: none;
    border-radius: 14px;
    font-size: 17px;
    font-weight: 700;
    cursor: pointer;
    font-family: 'Tajawal', sans-serif;
    transition: .25s;
}

.success-close:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(108, 52, 183, .35);
}

@media(max-width:950px) {
    .menu-grid { grid-template-columns: repeat(2, 1fr); }
}

@media(max-width:700px) {
    body { padding: 0 0 100px; }
    .menu-grid { grid-template-columns: 1fr; padding: 0 14px; }
    .main-tabs, .sub-tabs, .header { padding: 0 14px; }
    
    .order-box { margin: 20px 14px; }
}

@media(max-width:700px) {
    body { padding: 0 0 100px; }
    
    /* هنا خلينا الجوال يعرض عمودين بدل عمود واحد! */
    .menu-grid { 
        grid-template-columns: repeat(2, 1fr); 
        gap: 12px; /* صغرنا الفراغ شوي عشان الجوال */
        padding: 0 14px; 
    }
    
    /* نصغر طول الصورة شوي في الجوال عشان تكفي الشاشة */
    .item img {
        height: 160px; 
    }

    .main-tabs, .sub-tabs, .header { padding: 0 14px; }
    
    .order-box { margin: 20px 14px; }
}