:root{
  --grad-bar: linear-gradient(135deg,#272525,#6c00af,#c54200,#c40000,#0705b5,#c42708,#740496,#373535);
  --text: #ffffff;
  --bg-anim-1:#9a0303; 
  --bg-anim-2:#4f01a2d6; 
  --bg-anim-3:#c80000;
  --bg-anim-4:#ae009d; 
  --bg-anim-5:#2a02bc; 
  --bg-anim-6:#d13201e8;
}

*{box-sizing:border-box;}
html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    width: 100%;
    overflow-x: hidden; /* يمنع أي تمرير أفقي */
}

body{
  direction: rtl;
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
  background: linear-gradient(135deg,var(--bg-anim-1),var(--bg-anim-2),var(--bg-anim-3),var(--bg-anim-4),var(--bg-anim-5),var(--bg-anim-6));
  background-size: 400% 400%;
  animation: bgMove 18s ease-in-out infinite;
}
@keyframes bgMove{
  0%{background-position:0% 50%}
  50%{background-position:100% 50%}
  100%{background-position:0% 50%}
}

/* ======= الشريط العلوي ======= */
.top-bar{
  width: 100%;
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:6px 16px;
  background: var(--grad-bar);
  color:#fff;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow:0 6px 18px rgba(0,0,0,.25);
}
@media (max-width:600px){
  .top-bar{
    padding:6px 10px;
    height:auto;
  }
}

/* قسم اليسار (حساب + شعار) */
.left-section{
  display:flex;
  align-items:center;
  gap:8px;
}

/* شعار السوق */
.brand{
  font-size:18px;
  font-weight:bold;
  letter-spacing:.5px;
  user-select:none;
  text-shadow:0 1px 3px rgba(0,0,0,.35);
}

/* زر الحساب الدائري */
.circle-button{
  width:36px;
  height:36px;
  border-radius:50%;
  background: linear-gradient(135deg,#b8051a,#001cbb);
  color:#fff;
  display:flex;
  align-items:center;
  justify-content:center;
  text-decoration:none;
  font-size:16px;
  box-shadow:0 0 8px rgba(255,255,255,.7);
  transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
}
.circle-button:hover{
  transform: scale(1.1);
  box-shadow:0 0 12px rgba(255,255,255,.9);
}

/* شعار متحرك في الوسط */
.welcome-banner{
  position:absolute;
  left:50%;
  transform: translateX(-50%);
  font-size:29px;
  max-width: 100vw;
  overflow-x: hidden;
  color:#c2c1c7ff;
  font-weight:normal;
  font-family:"Kings", cursive;
}

/* زر 3 شرطات (الهاتف فقط) */
.mobile-menu-btn{
  display:none;
  font-size:26px;
  cursor:pointer;
  color:#fff;
  position:fixed;
  left:15px;
  top:12px;
  z-index:3000;
}

.mobile-menu{
  display:block;
  position:fixed;
  top:55px;
  left:0;
  right: auto;
  width:220px;
  padding:12px;
  border-radius:12px;
  background: var(--grad-bar);
  box-shadow:0 6px 20px rgba(0,0,0,0.35);
  z-index:2000;
  transform: translateX(-100%);
  opacity:0;
  pointer-events:none;
  transition:0.25s ease;
}

.mobile-menu.show{
  transform: translateX(0);
  opacity:1;
  pointer-events:auto;
}
.mobile-menu .menu-item{
  display:block;
  padding:12px;
  color:#fff;
  text-decoration:none;
  font-size:16px;
  border-bottom:1px solid rgba(255,255,255,0.2);
  transition:0.2s;
}
.mobile-menu .menu-item:last-child{border-bottom:none;}
.mobile-menu .menu-item:hover{
  padding-left:16px;
  background: rgba(255,255,255,0.15);
}

/* إخفاء أزرار الديسكتوب على الهاتف */
@media (max-width:600px){
  .store-button,
  .add-button,
  .fav-button,
  .right-buttons{
    display:none !important;
  }
  .mobile-menu-btn{
    display:block;
  }
}

/* زر المتجر وإضافة منتج ومفضلة */
.store-button{
  padding:8px 14px;
  background: linear-gradient(135deg,#b8051a,#001cbb);
  color:#fff; border:none; border-radius:10px;
  font-size:14px; font-weight:bold; text-decoration:none;
  display:inline-flex; align-items:center; gap:8px;
  transition: transform .18s ease, box-shadow .18s ease, filter .18s ease, background .18s ease;
  box-shadow:0 0 12px rgba(255,255,255,.85),0 0 26px rgba(255,255,255,.55), inset 0 0 0 rgba(255,255,255,0);
}
.store-button .ico{font-size:15px}
.store-button:hover{
  transform: translateY(-3px) scale(1.04);
  background: linear-gradient(135deg,#e9e9e9,#931111);
  box-shadow:0 0 16px rgba(255,255,255,.9),0 0 32px rgba(255,255,255,.7);
  cursor:pointer;
  filter:saturate(1.05);
}
.store-button:active{transform: translateY(-1px) scale(1.01);}

/* محرك البحث */
.search-container{
  position:static;
  margin:12px 10px;
  display:flex;
  align-items:center;
  gap:5px;
  z-index:1;
}
#searchInput{
  width:100%;
  max-width:195px;
  height:28px;
  padding:8px 12px;
  border-radius:12px;
  border:1px solid #ccc;
  outline:none;
  font-size:14px;
  background:#fff;
  color:#333;
}
#searchInput:focus{border:1px solid #888;}
#searchBtn{
  width:40px; height:27px;
  border:none;
  border-radius:12px;
  background: linear-gradient(135deg,#ff8a00,#e52e71);
  display:flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
  transition:all 0.2s ease;
  box-shadow:0 0 8px rgba(229,46,113,0.6),0 0 12px rgba(255,138,0,0.6);
}
#searchBtn i{font-size:16px; color:white;}
#searchBtn:hover{transform:scale(1.05); box-shadow:0 0 15px rgba(229,46,113,0.8),0 0 20px rgba(255,138,0,0.8);}
#searchBtn:active{transform:scale(0.95);}

/* ======= المنتجات ======= */
.products-container{
  width:100%;
  display:flex;
  flex-wrap:wrap;
  gap:25px;
  justify-content:flex-start;
  margin:20px 0 10px 0;
  padding:0 10px;
  margin-left:0;
  margin-right:0;
  box-sizing:border-box;
}

.product-card{
  width:200px;
  background:#fff;
  border-radius:10px;
  padding:10px;
  box-shadow:0 4px 12px rgba(0,0,0,.2);
  text-align:center;
  transition: transform .2s, box-shadow .2s;
}
.product-card:hover{
  transform: translateY(-5px);
  box-shadow:0 8px 20px rgba(0,0,0,.3);
}
.product-image{
  width:100%;
  height:150px;
  overflow:hidden;
  border-radius:10px;
  margin-bottom:8px;
}
.product-image img{
  width:100%;
  height:100%;
  object-fit:cover;
}
.product-name{font-size:16px; margin:4px 0; color:#333; font-weight:bold;}
.product-user{font-size:14px; margin:2px 0; color:#555;}
.product-user a{text-decoration:none; color:#1a73e8;}
.product-price{font-size:15px; font-weight:bold; margin:5px 0; color:#000;}
.view-button{
  display:inline-block;
  margin-top:6px;
  padding:6px 12px;
  background: linear-gradient(135deg,#6c5ce7,#0984e3);
  color:#fff;
  border-radius:8px;
  text-decoration:none;
  font-size:14px;
  transition:transform .2s;
}
.view-button:hover{transform:scale(1.05);}

/* ======= الفئات / الكارد ======= */
.categories-grid{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:30px;
  padding:15px;
  margin-left:0;
  margin-right:0;
}
.category-card{
  background:#fff;
  border-radius:12px;
  box-shadow:0 4px 12px rgba(0,0,0,0.12);
  text-align:center;
  cursor:pointer;
  transition:transform .18s ease, box-shadow .18s ease;
  display:flex;
  flex-direction:column;
  justify-content:flex-start;
  overflow:hidden;
  position:relative;
}
.category-card:hover{
  transform:translateY(-4px);
  box-shadow:0 10px 20px rgba(0,0,0,0.2);
}
.category-card img{
  width:100%;
  height:auto;
  object-fit:cover;
  object-position:center;
  display:block;
}
.category-name{
  position:absolute;
  bottom:10px;
  left:50%;
  transform:translateX(-50%);
  font-weight:bold;
  font-size:16px;
  color:#fff;
  text-shadow:0 0 6px rgba(0,0,0,0.7);
  background:rgba(0,0,0,0.25);
  padding:6px 12px;
  border-radius:8px;
  line-height:1.2;
  z-index:2;
}
@media (max-width:900px){.categories-grid{grid-template-columns:repeat(2,1fr);}}
@media (max-width:600px){.categories-grid{grid-template-columns:repeat(1,1fr);}}



/* ======= الشريط الجانبي (سطح المكتب فقط) ======= */
@media (min-width: 601px) {
  .side-bar-gradient {
      position: fixed;
      top: 0;
      left: 0; /* ← بدل right:0 */
      width: 6px;
      height: 100vh;
      background: linear-gradient(
          180deg,
          #272525,
          #6c00af,
          #c54200,
          #c40000,
          #0705b5,
          #c42708,
          #740496,
          #373535
      );
      background-size: 100% 400%;
      z-index: 9999;
      border-radius: 0 3px 3px 0; /* ← عكس border-radius */
      box-shadow: 0 0 6px rgba(0,0,0,0.25);
      animation: gradientMove 8s linear infinite;
  }
}

/* إخفاء الشريط الجانبي على الهاتف */
@media (max-width:600px){
  .side-bar-gradient{
      display:none;
  }
}
