@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@200;300;400;500;700;800;900&display=swap');
html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

body {
    font-family: "Tajawal", sans-serif;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
  text-align: start;
}
.product-card{
  background:#fff;
  border:1px solid rgba(0,0,0,.06);
  border-radius:18px;
  overflow:hidden;
  box-shadow:0 6px 18px rgba(0,0,0,.04);
  transition:transform .25s ease, box-shadow .25s ease;
  position:relative;
}
.product-card:hover{
  transform: translateY(-4px);
  box-shadow:0 16px 30px rgba(0,0,0,.08);
}

.product-media{
  display:block;
  position:relative;
  overflow:hidden;
}
.product-img{
  width:100%;
  height:220px;
  object-fit:cover;
  display:block;
  transform: scale(1.02);
  transition: transform .6s ease;
}
.product-card:hover .product-img{
  transform: scale(1.08);
}

.product-img-placeholder{
  background: linear-gradient(135deg, #f2f3f5, #e9ecef);
}

.badge-sale{
  position:absolute;
  top:12px;
  right:12px;
  background: rgba(17,24,39,.88);
  color:#fff;
  padding:6px 10px;
  border-radius:999px;
  font-size:12px;
  backdrop-filter: blur(6px);
}

.product-body{
  padding:12px 12px 14px;
}

.product-meta{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}
.product-cat{
  color:#6b7280;
  font-size:12px;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  max-width: 70%;
}

.btn-icon{
  width:40px;
  height:40px;
  border-radius:999px;
  border:1px solid rgba(0,0,0,.08);
  background:#fff;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}
.btn-icon:hover{
  transform: translateY(-2px) scale(1.03);
  box-shadow:0 10px 20px rgba(0,0,0,.10);
}
.btn-icon:active{
  transform: scale(.98);
}

.product-title{
  margin:10px 0 6px;
  font-size:14px;
  font-weight:700;
  line-height:1.35;
  height: 38px;              /* يثبت ارتفاع العنوان */
  overflow:hidden;
}
.product-title a{
  color:#111827;
  text-decoration:none;
}
.product-title a:hover{
  text-decoration:underline;
}

.product-price{
  display:flex;
  align-items:baseline;
  gap:8px;
}
.price-now{
  font-weight:800;
  font-size:15px;
  color:#111827;
}
.price-old{
  font-size:12px;
  color:#9ca3af;
  text-decoration: line-through;
}

#backToTop{
    position: fixed;
    bottom: 26px;
    left: 26px;               /* RTL أنسب */
    width: 52px;
    height: 52px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg,#111827,#1f2937);
    color: #fff;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;

    opacity: 0;
    visibility: hidden;
    transform: translateY(10px) scale(.9);
    transition: all .25s ease;
    box-shadow: 0 14px 30px rgba(0,0,0,.25);
    z-index: 999;
}

#backToTop.show{
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

#backToTop:hover{
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 20px 40px rgba(0,0,0,.35);
}

#backToTop:active{
    transform: scale(.95);
}
.site-header{ position: sticky; top:0; z-index: 1000; }

/* Top Header */
.top-header{
  background:#fff;
  border-bottom:1px solid rgba(0,0,0,.06);
}
.top-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  padding:14px 0;
}
.brand{ display:flex; align-items:center; gap:10px; text-decoration:none; }
.brand-logo{ height:42px; width:auto; border-radius:12px; }
.brand-text{ font-weight:900; font-size:18px; color:#111827; }

.search-box{
  flex:1;
  max-width: 520px;
  display:flex;
  align-items:center;
  background:#f9fafb;
  border:1px solid rgba(0,0,0,.08);
  border-radius:999px;
  overflow:hidden;
  padding:4px;
  transition: box-shadow .2s ease, transform .2s ease;
}
.search-box:focus-within{
  box-shadow:0 14px 26px rgba(0,0,0,.08);
  transform: translateY(-1px);
}
.search-input{
  border:none;
  outline:none;
  background:transparent;
  padding:10px 12px;
  width:100%;
  font-weight:700;
}
.search-btn{
  border:none;
  background:#111827;
  color:#fff;
  padding:10px 16px;
  border-radius:999px;
  font-weight:900;
  transition: transform .2s ease, box-shadow .2s ease;
}
.search-btn:hover{ transform: translateY(-1px); box-shadow:0 12px 22px rgba(0,0,0,.18); }

.top-actions{
  display:flex;
  align-items:center;
  gap:10px;
}

.btn-soft{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:10px 14px;
  border-radius:999px;
  border:1px solid rgba(0,0,0,.10);
  background:#fff;
  color:#111827;
  text-decoration:none;
  font-weight:900;
  transition: transform .2s ease, box-shadow .2s ease;
}
.btn-soft:hover{ transform: translateY(-2px); box-shadow:0 14px 24px rgba(0,0,0,.10); }
.btn-soft.danger{ border-color: rgba(220,38,38,.20); color:#b91c1c; }

.btn-icon{
  width:44px; height:44px;
  border-radius:999px;
  border:1px solid rgba(0,0,0,.10);
  background:#fff;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  color:#111827;
  text-decoration:none;
  transition: transform .2s ease, box-shadow .2s ease;
}
.btn-icon:hover{ transform: translateY(-2px); box-shadow:0 14px 24px rgba(0,0,0,.10); }

/* Categories Bar */
.cat-header{
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(10px);
  border-bottom:1px solid rgba(0,0,0,.06);
}
.cat-row{
  display:flex;
  gap:10px;
  padding:10px 0;
  overflow:auto;
  scrollbar-width: thin;
}
.cat-pill{
  flex: 0 0 auto;
  display:flex;
  align-items:center;
  gap:10px;
  padding:10px 12px;
  border-radius:16px;
  border:1px solid rgba(0,0,0,.06);
  background:#fff;
  text-decoration:none;
  color:#111827;
  box-shadow:0 10px 18px rgba(0,0,0,.04);
  transition: transform .2s ease, box-shadow .2s ease;
}
.cat-pill:hover{
  transform: translateY(-2px);
  box-shadow:0 16px 28px rgba(0,0,0,.08);
}
.cat-ico{
  width:38px; height:38px;
  border-radius:14px;
  background: linear-gradient(135deg,#111827,#1f2937);
  color:#fff;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:16px;
}
.cat-name{
  font-weight:900;
  font-size:13px;
  white-space:nowrap;
}

/* Responsive */
@media (max-width: 992px){
  .top-row{ flex-wrap:wrap; 

  }
  .search-box{   max-width: 100%; 
    font-size: .9rem;
  }
  .brand-logo{ height:38px; }
}
.recently{
  margin-top: 40px;
}
.footer-pro{
        background: linear-gradient(135deg,#0b1220,#111827);
        color: rgba(255,255,255,.9);
        border-radius: 28px 28px 0 0;
        overflow: hidden;
        box-shadow: 0 -18px 40px rgba(0,0,0,.18);
    }

    .footer-logo{
        height: 42px;
        border-radius: 12px;
    }
    .footer-title{
        font-weight: 900;
        font-size: 18px;
        letter-spacing: .2px;
    }
    .footer-desc{
        color: rgba(255,255,255,.72);
        line-height: 1.9;
        font-size: 14px;
        max-width: 360px;
    }

    .footer-head{
        font-weight: 900;
        font-size: 14px;
        color: rgba(255,255,255,.92);
        letter-spacing: .2px;
    }

    /* FooterPages links styling */
    .footer-links a{
        display:block;
        text-decoration:none;
        color: rgba(255,255,255,.78);
        padding: 8px 0;
        font-weight: 700;
        transition: transform .2s ease, color .2s ease;
    }
    .footer-links a:hover{
        color: #fff;
        transform: translateX(-3px);
    }

    .footer-social{
        display:flex;
        gap:12px;
        flex-wrap:wrap;
    }
    .social-btn{
        width:44px;height:44px;border-radius:999px;
        display:flex;align-items:center;justify-content:center;
        background: rgba(255,255,255,.08);
        border: 1px solid rgba(255,255,255,.12);
        color:#fff;
        text-decoration:none;
        transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
        box-shadow: 0 14px 26px rgba(0,0,0,.22);
    }
    .social-btn:hover{
        transform: translateY(-3px) scale(1.05);
        background: rgba(255,255,255,.16);
        box-shadow: 0 20px 40px rgba(0,0,0,.35);
    }

    .footer-contact{
        display:flex;
        flex-direction:column;
        gap:10px;
        color: rgba(255,255,255,.78);
        font-weight: 700;
        font-size: 14px;
    }
    .contact-item{
        display:flex;
        align-items:flex-start;
        gap:10px;
    }
    .ci-ico{
        width:34px;height:34px;border-radius:12px;
        background: rgba(255,255,255,.08);
        border: 1px solid rgba(255,255,255,.10);
        display:flex;align-items:center;justify-content:center;
        color:#fff;
        flex: 0 0 auto;
    }

    .whats-btn{
        display:inline-flex;
        align-items:center;
        gap:10px;
        padding: 12px 16px;
        border-radius: 999px;
        text-decoration:none;
        color:#111827;
        background: rgba(255,255,255,.92);
        font-weight: 900;
        transition: transform .2s ease, box-shadow .2s ease;
        box-shadow: 0 18px 34px rgba(0,0,0,.22);
    }
    .whats-btn:hover{
        transform: translateY(-2px);
        box-shadow: 0 24px 44px rgba(0,0,0,.28);
    }

    .footer-bottom{
        border-top: 1px solid rgba(255,255,255,.10);
        display:flex;
        justify-content:center;
        text-align:center;
    }

    @media (max-width: 768px){
        .footer-pro{ border-radius: 22px 22px 0 0; }
        .footer-links a:hover{ transform:none; }
    }
    .pager-pro{
    display:flex;
    justify-content:center;
    margin: 24px 0;
}

.pager-list{
    display:flex;
    align-items:center;
    gap:14px;
    padding:12px 18px;
    border-radius:999px;
    background:#fff;
    border:1px solid rgba(0,0,0,.06);
    box-shadow:0 14px 30px rgba(0,0,0,.06);
}

.pager-item{
    list-style:none;
}

.pager-link{
    width:42px;
    height:42px;
    border-radius:50%;
    display:flex;
    align-items:center;
    justify-content:center;
    text-decoration:none;
    font-size:22px;
    font-weight:900;
    color:#111827;
    background:#f9fafb;
    border:1px solid rgba(0,0,0,.08);
    transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}

.pager-link:hover{
    transform: translateY(-2px);
    box-shadow:0 14px 26px rgba(0,0,0,.12);
    background:#fff;
}

.pager-item.disabled .pager-link{
    opacity:.4;
    pointer-events:none;
    box-shadow:none;
}

.pager-info{
    font-weight:900;
    font-size:13px;
    color:#374151;
    padding:0 6px;
    white-space:nowrap;
}

/* RTL friendly arrows */
.pager-link.prev{ transform: rotate(180deg); }
.pager-link.next{}

/* Mobile */
@media (max-width:576px){
    .pager-list{
        gap:10px;
        padding:10px 14px;
    }
    .pager-link{
        width:38px;
        height:38px;
        font-size:20px;
    }
}
.toast-host{
  position: fixed;
  top: 18px;
  left: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 20000; /* مهم */
}

.toast{
  width: 320px;
  max-width: calc(100vw - 36px);
  background: rgba(17,24,39,.92);
  color:#fff;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 18px;
  box-shadow: 0 18px 40px rgba(0,0,0,.25);
  backdrop-filter: blur(10px);
  padding: 12px;
  display: flex;
  gap: 10px;
  opacity: 0;
  transform: translateY(-10px) scale(.98);
  animation: toastIn .28s ease forwards;
}

.toast .ico{
  width:36px;height:36px;border-radius:14px;
  display:flex;align-items:center;justify-content:center;
  background: rgba(255,255,255,.10);
  border: 1px solid rgba(255,255,255,.12);
}

.toast .title{font-weight:900;font-size:13px}
.toast .msg{opacity:.9;font-size:12.5px;line-height:1.6;margin-top:2px}
.toast .close{border:none;background:transparent;color:rgba(255,255,255,.85);font-size:18px;cursor:pointer}

.toast-progress{height:3px;background:rgba(255,255,255,.18);border-radius:999px;overflow:hidden;margin-top:10px}
.toast-progress>span{display:block;height:100%;width:100%;background:rgba(255,255,255,.6);transform-origin:left;animation:toastBar linear forwards}

.toast.success .ico{background:rgba(16,185,129,.15);border-color:rgba(16,185,129,.28)}
.toast.danger  .ico{background:rgba(239,68,68,.15);border-color:rgba(239,68,68,.28)}

@keyframes toastIn{to{opacity:1;transform:translateY(0) scale(1)}}
@keyframes toastOut{to{opacity:0;transform:translateY(-8px) scale(.98)}}
@keyframes toastBar{from{transform:scaleX(1)}to{transform:scaleX(0)}}

.cart-btn{ position:relative; }
.cart-badge{
  position:absolute;
  top:-6px; left:-6px;         /* RTL */
  min-width:20px;
  height:20px;
  padding:0 6px;
  border-radius:999px;
  background:#ef4444;
  color:#fff;
  font-size:12px;
  font-weight:900;
  display:flex;
  align-items:center;
  justify-content:center;
  border:2px solid #fff;
  box-shadow:0 10px 18px rgba(0,0,0,.10);
}
.cart-badge.hide{ display:none; }











/* phone  */
