:root{
  --b:#1976d2;
  --b2:#0d47a1;
  --t:#1e3a5f;
  --m:#4b6b88;
  --bd:#e3f2fd;
  --soft:#eef5fc;
  --shadow:0 4px 12px rgba(25,118,210,.1);
  --shadow2:0 8px 18px rgba(25,118,210,.16);
}

*{
  margin:0;
  padding:0;
  box-sizing:border-box;
  font-family:"Cairo",sans-serif;
}

html{scroll-behavior:smooth}
body{background:#fff;color:var(--t)}
a{text-decoration:none}
ul{list-style:none}
img{display:block;max-width:100%}
button,input{font:inherit}

.container{
  width:90%;
  max-width:1280px;
  margin:auto;
}

.full-products-section{padding-inline:0}
.full-products-container{
  width:100%;
  max-width:100%;
  padding-inline:12px;
}

/* scrollbar */
*{
  scrollbar-width:thin;
  scrollbar-color:#1976d2 #eaf3fc;
}
*::-webkit-scrollbar{width:10px;height:10px}
*::-webkit-scrollbar-track{background:#eaf3fc;border-radius:999px}
*::-webkit-scrollbar-thumb{
  background:linear-gradient(180deg,#1976d2,#0d47a1);
  border-radius:999px;
  border:2px solid #eaf3fc;
}
*::-webkit-scrollbar-thumb:hover{
  background:linear-gradient(180deg,#0d47a1,#083b87);
}

/* header */
.header{
  background:linear-gradient(135deg,var(--b),var(--b2));
  color:#fff;
  position:sticky;
  top:0;
  z-index:1000;
  box-shadow:0 2px 10px rgba(13,71,161,.15);
}

.topbar{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:24px;
}

.logo{
  display:flex;
  align-items:center;
  gap:14px;
}

.logo-image-box{
  width:110px;
  height:100px;
  display:flex;
  align-items:center;
  justify-content:center;
}

.logo-image-box img{
  width:100%;
  height:100%;
  object-fit:contain;
  transform:scale(1.12);
}

.logo-text-box h1{
  font-size:36px;
  font-weight:800;
  line-height:1.1;
  margin-bottom: 9px;
}

.logo-text-box p{
  font-size:14px;
  color:rgba(255,255,255,.9);
}

.nav ul{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  align-items:center;
}

.social-nav a{
  color:#fff;
  padding:10px 14px;
  border-radius:12px;
  transition:.25s;
  font-weight:600;
  display:inline-flex;
  align-items:center;
  gap:8px;
  background:rgba(255,255,255,.06);
  border:1px solid rgba(255,255,255,.1);
  font-size:15px;
}

.social-nav a:hover{
  background:rgba(255,255,255,.18);
}

/* hero */
.hero{
  background:linear-gradient(135deg,#f8fbff,#e3f2fd);
  padding:60px 0 45px;
  text-align:center;
}

.hero h2{
  font-size:42px;
  color:var(--b2);
  font-weight:800;
  margin-bottom:10px;
}

.hero p{
  color:#356a99;
  font-size:21px;
  margin-bottom:25px;
}

/* search */
.search-box{
  margin:20px auto 0;
  max-width:700px;
  display:flex;
  align-items:center;
  gap:10px;
  background:#fff;
  border-radius:14px;
  padding:10px;
  box-shadow:0 4px 15px rgba(25,118,210,.12);
  border:1px solid #dbeafe;
}

.search-box input{
  flex:1;
  border:0;
  outline:0;
  padding:14px;
  font-size:17px;
  color:var(--t);
  background:transparent;
}

.search-box input::placeholder{
  color:#7a93ad;
}

.search-box button{
  background:var(--b);
  color:#fff;
  border:0;
  padding:14px 22px;
  border-radius:10px;
  cursor:pointer;
  transition:.25s;
  font-weight:700;
}

.search-box button:hover{
  background:var(--b2);
}

/* categories */
.categories{
  padding:35px 0 20px;
}

.section-title{
  text-align:center;
  margin-bottom:20px;
  color:var(--b2);
  font-size:34px;
  font-weight:800;
}

.category-links{
  display:flex;
  justify-content:center;
  flex-wrap:wrap;
  gap:12px;
}

.category-links button{
  background:#fff;
  border:2px solid var(--b);
  color:var(--b);
  padding:10px 18px;
  border-radius:999px;
  transition:.25s;
  font-weight:600;
  cursor:pointer;
  font-size:16px;
}

.category-links button:hover,
.category-links button.active{
  background:var(--b);
  color:#fff;
}

/* products */
.products-section{
  padding:15px 0 40px;
}

.empty-state,
.loading-box,
.load-more-indicator{
  text-align:center;
  color:#5c7ea1;
}

.empty-state{
  padding:20px;
  font-size:18px;
}

.loading-box{
  padding:30px 20px;
  color:var(--b2);
}

.loading-spinner{
  width:38px;
  height:38px;
  border:3px solid #dbeafe;
  border-top-color:var(--b);
  border-radius:50%;
  margin:0 auto 12px;
  animation:spin .9s linear infinite;
}

@keyframes spin{
  to{transform:rotate(360deg)}
}

.cards{
  display:grid;
  grid-template-columns:repeat(5,minmax(0,1fr));
  gap:18px;
  padding:20px 0;
}

.card{
  background:#fff;
  border:1px solid var(--bd);
  border-radius:18px;
  overflow:hidden;
  box-shadow:var(--shadow);
  display:flex;
  flex-direction:column;
  transition:.25s;
}

.card:hover{
  transform:translateY(-4px);
  box-shadow:var(--shadow2);
}

.card-media{
  position:relative;
  padding:14px 14px 0;
}

.card-category-badge{
  position:absolute;
  top:24px;
  left:24px;
  z-index:1;
  background:var(--b);
  color:#fff;
  font-size:13px;
  font-weight:700;
  padding:6px 12px;
  border-radius:999px;
  box-shadow:0 4px 12px rgba(25,118,210,.16);
}

.card img{
  width:100%;
  aspect-ratio:1/1;
  object-fit:contain;
  background:#fff;
  border-radius:14px;
  border:1px solid #edf4fc;
  padding:10px;
}

.card-body{
  padding:14px 16px 16px;
  text-align:center;
  display:flex;
  flex-direction:column;
  gap:8px;
}

.card-body h4{
  color:var(--b2);
  font-size:22px;
  font-weight:700;
  line-height:1.35;
}

.card-body p{
  color:var(--m);
  font-size:14px;
  line-height:1.7;
  min-height:48px;
}

.price{
  color:var(--b);
  font-weight:800;
  font-size:22px;
}

.card-actions{
  margin-top:8px;
}

.add-cart-btn{
  width:100%;
  background:var(--b);
  color:#fff;
  border:0;
  padding:11px 14px;
  border-radius:12px;
  cursor:pointer;
  transition:.25s;
  font-weight:700;
  font-size:14px;
  white-space:nowrap;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:8px;
}

.add-cart-btn:hover{
  background:var(--b2);
}

/* cart */
.cart-fab{
  position:fixed;
  left:20px;
  bottom:20px;
  width:62px;
  height:62px;
  border:0;
  border-radius:50%;
  background:linear-gradient(135deg,#22c55e,#159947);
  color:#fff;
  font-size:24px;
  cursor:pointer;
  box-shadow:0 12px 28px rgba(21,153,71,.28);
  display:flex;
  align-items:center;
  justify-content:center;
  z-index:10002;
}

.cart-fab span{
  position:absolute;
  top:-4px;
  right:-2px;
  min-width:24px;
  height:24px;
  padding:0 6px;
  border-radius:999px;
  background:#fff;
  color:#159947;
  font-size:13px;
  font-weight:800;
  display:flex;
  align-items:center;
  justify-content:center;
}

.screen-overlay{
  position:fixed;
  inset:0;
  background:rgba(7,18,36,.45);
  z-index:10000;
}

.cart-drawer{
  position:fixed;
  top:0;
  left:0;
  width:400px;
  max-width:100%;
  height:100vh;
  background:#fff;
  box-shadow:12px 0 40px rgba(0,0,0,.15);
  z-index:10001;
  transform:translateX(-100%);
  transition:transform .3s ease;
  display:flex;
  flex-direction:column;
  border-top-right-radius:18px;
  border-bottom-right-radius:18px;
}

.cart-drawer.open{
  transform:translateX(0);
}

.cart-drawer-header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:18px 18px 16px;
  border-bottom:1px solid #edf4fc;
}

.cart-drawer-header h3{
  color:var(--b2);
  font-size:24px;
  font-weight:800;
}

.cart-close-btn{
  width:42px;
  height:42px;
  border:0;
  background:var(--soft);
  color:var(--b2);
  border-radius:12px;
  cursor:pointer;
  font-size:16px;
}

.cart-items{
  flex:1;
  overflow:auto;
  padding:16px;
}

.cart-empty{
  text-align:center;
  color:#5c7ea1;
  font-size:16px;
  padding:35px 10px;
}

.cart-item{
  display:grid;
  grid-template-columns:86px 1fr;
  gap:12px;
  padding:12px;
  border:1px solid #e8f1fb;
  border-radius:16px;
  margin-bottom:12px;
  background:#fcfeff;
}

.cart-item img{
  width:86px;
  height:86px;
  object-fit:contain;
  border-radius:14px;
  background:#fff;
  border:1px solid #edf4fc;
  padding:6px;
}

.cart-item-name{
  font-size:17px;
  font-weight:800;
  color:var(--b2);
  line-height:1.4;
  margin-bottom:4px;
}

.cart-item-meta{
  color:#5d7b98;
  font-size:14px;
  margin-bottom:10px;
}

.cart-item-bottom{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
}

.qty-controls{
  display:flex;
  align-items:center;
  gap:8px;
}

.qty-btn{
  width:34px;
  height:34px;
  border:0;
  border-radius:10px;
  background:var(--b);
  color:#fff;
  cursor:pointer;
  font-size:18px;
  line-height:1;
}

.qty-value{
  min-width:18px;
  text-align:center;
  font-weight:800;
  color:var(--b2);
}

.cart-footer{
  border-top:1px solid #edf4fc;
  padding:16px;
  background:#fff;
}

.cart-total-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  margin-bottom:10px;
  color:var(--t);
  font-size:16px;
}

.checkout-btn{
  width:100%;
  border:0;
  background:linear-gradient(135deg,#25d366,#159947);
  color:#fff;
  padding:14px;
  border-radius:14px;
  cursor:pointer;
  font-size:17px;
  font-weight:800;
  margin-top:8px;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:10px;
}

/* footer */
.footer{
  background:linear-gradient(135deg,#0b1220,#111827);
  color:#fff;
  padding:45px 0 22px;
  margin-top:30px;
}

.footer-social{
  text-align:center;
  padding-bottom:28px;
  border-bottom:1px solid rgba(255,255,255,.12);
}

.footer-title{
  font-size:32px;
  font-weight:800;
  margin-bottom:25px;
}

.social-links{
  display:flex;
  justify-content:center;
  align-items:center;
  gap:18px;
  flex-wrap:wrap;
}

.social-link{
  display:flex;
  align-items:center;
  gap:10px;
  background:rgba(255,255,255,.04);
  color:#e5eefc;
  border:1px solid rgba(255,255,255,.1);
  padding:14px 20px;
  border-radius:14px;
  transition:.25s;
  font-size:17px;
  font-weight:600;
  min-width:170px;
  justify-content:center;
}

.social-link:hover{
  background:var(--b);
  color:#fff;
  transform:translateY(-3px);
  border-color:var(--b);
}

.footer-bottom{
  text-align:center;
  padding-top:20px;
}

.footer-bottom p{
  font-size:18px;
  margin-bottom:8px;
  color:rgba(255,255,255,.9);
}

.developer-credit{
  white-space:nowrap;
}

.developer-credit a{
  color:#67b3ff;
  font-weight:800;
}

.developer-credit a:hover{
  color:#fff;
}

/* scroll top */
.scroll-top-btn{
  position:fixed;
  right:20px;
  bottom:20px;
  width:52px;
  height:52px;
  border:0;
  border-radius:50%;
  background:linear-gradient(135deg,var(--b),var(--b2));
  color:#fff;
  font-size:20px;
  cursor:pointer;
  box-shadow:0 8px 18px rgba(13,71,161,.25);
  display:flex;
  align-items:center;
  justify-content:center;
  opacity:0;
  visibility:hidden;
  transform:translateY(12px);
  transition:.25s;
  z-index:9999;
}

.scroll-top-btn.show{
  opacity:1;
  visibility:visible;
  transform:translateY(0);
}

/* responsive */
@media (max-width:1400px){
  .cards{grid-template-columns:repeat(4,minmax(0,1fr))}
}

@media (max-width:1100px){
  .topbar{gap:16px}
  .logo-image-box{width:130px;height:105px}
  .logo-text-box h1{font-size:36px}
  .logo-text-box p{font-size:16px}
  .social-nav a{font-size:14px;padding:9px 12px}
  .cards{grid-template-columns:repeat(3,minmax(0,1fr))}
}

@media (max-width:768px){
  .header{display:none}
  .hero h2{font-size:30px}
  .hero p{font-size:17px}

  .search-box{flex-direction:column}
  .search-box input,
  .search-box button{width:100%}

  .footer-title{font-size:22px;margin-bottom:18px}
  .social-links{flex-direction:column;align-items:stretch;gap:10px}
  .social-link{
    width:100%;
    min-width:unset;
    padding:10px 14px;
    border-radius:12px;
    font-size:15px;
  }

  .footer-bottom p{font-size:15px}
  .developer-credit,
  .developer-credit a{font-size:13px}

  .cards{
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:14px;
  }

  .card-body h4{font-size:18px}
  .card-body p{font-size:13px;min-height:42px}
  .price{font-size:20px}
  .add-cart-btn{font-size:13px;padding:10px 12px}

  .cart-drawer{
    width:100%;
    max-width:100%;
    border-radius:0;
  }

  .cart-fab{
    left:14px;
    bottom:14px;
    width:58px;
    height:58px;
    font-size:22px;
  }

  .scroll-top-btn{
    right:14px;
    bottom:14px;
    width:46px;
    height:46px;
    font-size:18px;
  }
}

@media (max-width:520px){
  .cards{grid-template-columns:1fr}
}

@media (max-width:480px){
  .social-link{padding:9px 12px;font-size:14px}
  .developer-credit,
  .developer-credit a{font-size:12px}

  .cart-item{grid-template-columns:76px 1fr}
  .cart-item img{
    width:76px;
    height:76px;
  }
}
/* حل مشكلة السكرول في سلة الشراء للموبايل */
.cart-drawer {
  height: 100vh;
  display: flex;
  flex-direction: column;
}

/* الجزء اللي فيه المنتجات */
.cart-items {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* الجزء السفلي (زر الشراء) */
.cart-footer {
  position: sticky;
  bottom: 0;
  background: #fff;
  z-index: 10;
  box-shadow: 0 -4px 10px rgba(0,0,0,0.08);
}
.cart-drawer {
  height: 100vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  display: block;
}

.cart-items {
  overflow: visible;
  max-height: none;
  flex: unset;
}

.cart-footer {
  position: static;
  box-shadow: none;
}