@import url('variables.css');

/* =========================================================
   GLOBAL / RESET
   يستخدم في كل الموقع (Front)
========================================================= */
* { box-sizing: border-box; }

html, body { height: 100%; }

body{
  font-family: system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  background: var(--background-color);
  color: var(--text-color);
  margin: 0;
}

/* =========================================================
   LAYOUT
   container + main (كل الصفحات)
========================================================= */
.container{
  width: min(1100px, 92%);
  margin: 0 auto;
}

.main{
  padding: 20px 0 40px;
}

/* =========================================================
   TYPOGRAPHY HELPERS
   عناوين الصفحات والكروت
========================================================= */
.page-title{
  margin: 0 0 10px;
  font-size: 26px;
}

.page-subtitle{
  margin: 0 0 18px;
  opacity: .85;
}

/* =========================================================
   BUTTONS (Front)
   يستخدم في: الهيرو / المنيو / السلة / تفاصيل المنتج / الشاشات الثابتة
   (تم توحيد btn وإزالة التكرار)
========================================================= */
.btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;

  padding: 12px 18px;
  border-radius: 14px;
  border: 0;

  background: var(--primary-color);
  color: #fff;

  font-weight: 800;
  text-decoration: none;
  cursor: pointer;

  box-shadow: var(--shadow);
}

.btn:hover{ filter: brightness(0.95); }
.btn:active{ transform: translateY(1px); }

.btn--ghost{
  background: rgba(0,0,0,.06);
  color: var(--text-color);
  box-shadow: none;
  border: 1px solid rgba(0,0,0,.08);
}

/* =========================================================
   GRID + CARD (Front)
   يستخدم في: التصنيفات / المنتجات / نتائج البحث
========================================================= */
.grid{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
}

.card{
  display: block;
  border: 1px solid rgba(0,0,0,.08);
  background: #fff;
  border-radius: 16px;
  padding: 14px;
  text-decoration: none;
  color: inherit;
  transition: transform .08s ease, box-shadow .08s ease;
}

.card:hover{
  transform: translateY(-1px);
  box-shadow: 0 10px 26px rgba(0,0,0,.08);
}

.card__title{
  margin: 0 0 6px;
  font-weight: 800;
  font-size: 18px;
}

.card__desc{
  margin: 0 0 10px;
  opacity: .85;
  line-height: 1.5;
}

.card__price{
  font-weight: 800;
  color: var(--primary-color);
}

/* =========================================================
   HEADER (Front - Desktop + Mobile)
   يستخدم في: layouts.app
========================================================= */
.site-header{
  background: var(--primary-color);
  color:#fff;
  padding: 14px 0;
}

.site-header__inner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  flex-wrap:wrap;
}

/* brand */
.brand{
  color: #fff;
  text-decoration: none;
  display: grid;
  gap: 2px;
}

.brand__title{
  font-size: 20px;
  font-weight: 900;
  line-height: 1.2;
}

.brand__sub{
  font-size: 13px;
  opacity: .85;
  margin-top: 3px;
}

/* nav links */
.nav{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  align-items:center;
}

.nav__link{
  color:#fff;
  text-decoration:none;
  font-weight: 800;
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(255,255,255,.16);
}

.nav__link:hover{ background: rgba(255,255,255,.26); }

/* RTL small tweak */
body[dir="rtl"] .nav{ justify-content: flex-start; }

/* =========================================================
   MOBILE HEADER + DRAWER
   يستخدم في: layouts.app (زر القائمة الجانبية)
========================================================= */
.header-mobile{
  display:none;
  align-items:center;
  gap:10px;
}

.header-address{
  flex:1;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  background:#fff;
  color:#111;
  border-radius:12px;
  padding:12px 14px;
  font-weight:800;
  text-decoration:none;
}

.header-burger{
  width:54px;
  height:48px;
  border:none;
  border-radius:12px;
  background: rgba(0,0,0,.18);
  color:#fff;
  font-size:20px;
  cursor:pointer;
}

/* overlay + drawer */
.mobile-overlay{
  position:fixed;
  inset:0;
  background: rgba(0,0,0,.45);
  opacity:0;
  pointer-events:none;
  transition: .2s;
  z-index: 50;
}

.mobile-overlay.is-open{
  opacity:1;
  pointer-events:auto;
}

.mobile-drawer{
  position:fixed;
  top:0;
  right:-320px;
  width:320px;
  height:100vh;
  background:#fff;
  color: var(--text-color);
  z-index: 60;
  transition: .25s;
  padding:16px;
  box-shadow: -20px 0 40px rgba(0,0,0,.15);
}

.mobile-drawer.is-open{ right:0; }

.mobile-drawer__head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  margin-bottom:12px;
}

.mobile-drawer__close{
  border:none;
  background: rgba(0,0,0,.06);
  width:40px;
  height:40px;
  border-radius:12px;
  cursor:pointer;
  font-size:18px;
}

.mobile-drawer__links{
  display:grid;
  gap:10px;
}

.mobile-link{
  padding:12px 12px;
  border-radius:12px;
  background: rgba(0,0,0,.06);
  text-decoration:none;
  color: var(--text-color);
  font-weight:800;
}

.mobile-link:hover{ background: rgba(0,0,0,.10); }

.no-scroll{ overflow:hidden; }

/* responsive switch */
@media (max-width: 768px){
  .header-desktop{ display:none; }
  .header-mobile{ display:flex; }
}

/* =========================================================
   FLASH SUCCESS (رسالة تمت الإضافة للسلة)
========================================================= */
.flash-success{
  position: fixed;
  top: 90px;
  left: 50%;
  transform: translateX(-50%);
  background: #2ecc71;
  color: #fff;
  padding: 12px 18px;
  border-radius: 12px;
  font-weight: 600;
  box-shadow: 0 8px 20px rgba(0,0,0,.15);
  z-index: 9999;
  animation: fadeIn .3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translate(-50%, -10px); }
  to   { opacity: 1; transform: translate(-50%, 0); }
}

/* =========================================================
   HOME: HERO + SEARCH + SECTION TITLES
   يستخدم في: front/home.blade.php
========================================================= */
.hero{
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  min-height: 340px;
  padding: 24px;
  background: url("/images/restaurant-hero.jpeg") center/cover no-repeat;
}

.hero__overlay{
  position:absolute; inset:0;
  background: linear-gradient(135deg, rgba(0,0,0,.55), rgba(0,0,0,.25));
}

.hero__content{
  position: relative;
  max-width: 720px;
  color: #fff;
}

.hero__badge{
  display:inline-block;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,.16);
  font-weight: 700;
  margin: 0 0 10px 0;
}

.hero__title{
  font-size: 34px;
  margin: 0;
  line-height: 1.2;
}

.hero__subtitle{
  margin: 10px 0 0 0;
  opacity: .92;
  max-width: 560px;
}

.hero__actions{
  margin-top: 14px;
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}

/* search bar */
.searchbar{
  margin-top: 14px;
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}

.searchbar__input{
  flex:1;
  min-width: 240px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.22);
  background: rgba(255,255,255,.12);
  color: #fff;
  outline: none;
}

.searchbar__input::placeholder{ color: rgba(255,255,255,.85); }

.searchbar__btn{
  padding: 12px 16px;
  border-radius: 14px;
  border: none;
  cursor: pointer;
  font-weight: 800;
  background: var(--primary-color);
  color: #fff;
}

.section-head{ margin: 6px 0 10px; }
.section-title{ margin: 0; font-size: 20px; }
.section-subtitle{ margin: 6px 0 0; opacity: .75; }

/* =========================================================
   SLIDER (HOME BANNERS)
   نفس الشكل السابق لكن بارتفاع مرن ذكي
========================================================= */

.slider {
  position: relative;
  width: 100%;
  height: clamp(280px, 42vw, 480px); 
  /* 
     280px = أقل ارتفاع
     42vw  = ارتفاع نسبي للشاشة
     480px = أقصى ارتفاع
  */
  overflow: hidden;
  border-radius: 16px;
  margin-bottom: 24px;
}

/* السلايد */
.slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity .8s ease-in-out;
}

.slide.active {
  opacity: 1;
  z-index: 1;
}

/* الصورة */
.slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;   /* نبقيها كما كانت */
}

/* الكابشن */
.slide__caption {
  position: absolute;
  bottom: 20px;
  right: 20px;
  background: rgba(0,0,0,.55);
  color: #fff;
  padding: 14px 18px;
  border-radius: 12px;
  max-width: min(520px, 92%);
}

.slide__caption h2 {
  margin: 0 0 6px;
  font-size: 20px;
}

.slide__caption p {
  margin: 0;
  font-size: 14px;
  opacity: .9;
}

/* Responsive */
@media (max-width: 520px){
  .slider{
    height: clamp(220px, 55vw, 360px);
  }

  .slide__caption{
    right: 12px;
    bottom: 12px;
    padding: 12px;
  }

  .slide__caption h2{
    font-size: 16px;
  }

  .slide__caption p{
    font-size: 13px;
  }
}



/* =========================================================
   CATEGORY TABS / PILLS (Scroll)
   يستخدم في: home + menu page
   (تم حذف تكرارات cat-tabs/cats-scroll وترك catbar كمعيار)
========================================================= */
.catbar{ margin-top: 14px; }

.catbar__track{
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 10px 2px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

.catbar__track::-webkit-scrollbar{ height: 6px; }
.catbar__track::-webkit-scrollbar-thumb{
  background: rgba(0,0,0,.15);
  border-radius: 999px;
}

.catpill{
  flex: 0 0 auto;
  scroll-snap-align: start;
  text-decoration: none;
  font-weight: 800;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(0,0,0,.06);
  color: var(--text-color);
  border: 1px solid rgba(0,0,0,.08);
}

.catpill:hover{ background: rgba(0,0,0,.10); }

.catpill--active{
  background: var(--primary-color);
  color: #fff;
  border-color: transparent;
}

/* =========================================================
   ABOUT / CONTACT PAGES
   يستخدم في: front/about.blade.php + front/contact.blade.php
========================================================= */
.page-wrap{
  max-width: 980px;
  margin: 16px auto;
  padding: 0 14px;
}

.page-hero{
  position: relative;
  overflow:hidden;
  border-radius: 18px;
  border: 1px solid rgba(0,0,0,.08);
  background: linear-gradient(135deg, rgba(192,127,0,.14), rgba(97,48,0,.10));
  padding: 18px;
}

.page-hero__title{
  font-size: 22px;
  font-weight: 900;
  margin: 0;
}

.page-hero__sub{
  margin: 8px 0 0;
  opacity: .85;
  line-height: 1.8;
}

.page-grid{
  display:grid;
  grid-template-columns: 1.2fr .8fr;
  gap: 14px;
  margin-top: 14px;
}

.card-box{
  background:#fff;
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 10px 30px rgba(0,0,0,.04);
}

.info-row{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:10px;
  padding: 10px 0;
  border-bottom: 1px dashed rgba(0,0,0,.10);
}

.info-row:last-child{ border-bottom:0; }

.info-row__label{ font-weight:900; opacity:.85; }
.info-row__value{ opacity:.9; }

/* forms */
.form{ display:grid; gap: 12px; }

.label{
  display:block;
  font-weight:900;
  margin-bottom: 6px;
}

.input, .textarea{
  width:100%;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(0,0,0,.12);
  outline:none;
  background:#fff;
}

.textarea{ min-height: 120px; resize: vertical; }

.badge{
  display:inline-block;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(192,127,0,.14);
  color: var(--secondary-color);
  font-weight: 900;
  font-size: 12px;
}

@media (max-width: 860px){
  .page-grid{ grid-template-columns: 1fr; }
}
.site-footer {
    background: #0e0e0e;
    color: #ccc;
    padding: 60px 20px 30px;
    font-size: 14px;
}

.footer-container {
    max-width: 1200px;
    margin: auto;
    display: grid;
    grid-template-columns: repeat(auto-fit,minmax(250px,1fr));
    gap: 40px;
}

.footer-col h4 {
    color: #fff;
    margin-bottom: 15px;
    font-size: 18px;
    border-bottom: 2px solid #c9a227;
    display: inline-block;
    padding-bottom: 5px;
}

.footer-col h5 {
    color: #c9a227;
    margin-bottom: 8px;
    font-size: 15px;
}

.footer-col p {
    line-height: 1.8;
}

.footer-col ul {
    list-style: none;
    padding: 0;
}

.footer-col ul li {
    margin-bottom: 8px;
}

.footer-col a {
    color: #ccc;
    text-decoration: none;
    transition: .3s;
}

.footer-col a:hover {
    color: #c9a227;
}

.branch-box {
    margin-bottom: 20px;
}

.branch-phones {
    font-weight: 600;
    color: #fff;
}

.footer-bottom {
    text-align: center;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,.1);
    font-size: 13px;
    color: #888;
}

@media(max-width:768px){
    .site-footer{
        text-align:center;
    }
}

/* =========================
   About Page (Responsive)
   ========================= */
.about-page .about-hero__actions{
  margin-top: 14px;
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}

.about-page .about-grid{
  margin-top: 14px;
}

.about-page .about-card{
  overflow:hidden; /* يحمي الحواف */
}

.about-page .about-h2{
  margin:0 0 10px;
  font-weight:900;
  font-size:18px;
}

.about-page .about-p{
  margin:0;
  line-height:1.9;
  opacity:.9;
}

.about-page .about-hr{
  margin:14px 0;
  opacity:.15;
  border:0;
  border-top:1px solid rgba(0,0,0,.12);
}

.about-page .about-list{
  margin:0;
  padding:0 18px;
  line-height:2;
}

/* قسم الخريطة */
.about-page .about-split{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap:14px;
  align-items:start;
}

.about-page .map-frame{
  width:100%;
  border-radius:16px;
  overflow:hidden;
  border:1px solid rgba(0,0,0,.10);
  background:#fff;
}

/* أهم نقطة: iframe Responsive */
.about-page .map-frame iframe{
  width:100%;
  height:340px;
  display:block;
}

/* زر الخريطة */
.about-page .about-actions{
  margin-top:10px;
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}

/* أزرار معلومات سريعة */
.about-page .about-buttons{
  margin-top:12px;
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}

/* موبايل */
@media (max-width: 860px){
  .about-page .about-split{
    grid-template-columns: 1fr;
  }

  .about-page .map-frame iframe{
    height:280px;
  }
}

/* ===============================
   GLOBAL
================================ */
body {
  background: var(--bg);
  color: var(--text);
  transition: background .25s, color .25s;
}

.dark-text {
  color: var(--text);
}

/* ===============================
   CARDS
================================ */
.card,
.card-box,
.dark-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  transition: background .25s, border .25s;
}

/* ===============================
   HEADERS
================================ */
.page-title,
.card__title {
  color: var(--text);
}

.page-subtitle {
  color: var(--text-muted);
}

/* ===============================
   INPUTS
================================ */
.input,
.textarea,
.dark-input {
  background: var(--bg-soft);
  color: var(--text);
  border: 1px solid var(--border);
}

.input::placeholder,
.textarea::placeholder {
  color: var(--text-muted);
}

/* ===============================
   BUTTONS
================================ */
.btn,
.dark-btn {
  background: var(--btn-bg);
  color: var(--btn-text);
  border-radius: 14px;
  border: none;
}

.btn--ghost,
.dark-btn-ghost {
  background: transparent;
  color: var(--brand);
  border: 1px solid var(--brand);
}

/* Hover */
.btn:hover {
  background: var(--brand-dark);
}

/* ===============================
   BADGES / CHIPS
================================ */
.badge {
  background: var(--brand);
  color: #fff;
}
