*{
  box-sizing:border-box;
}

html{
  scroll-behavior:smooth;
}

body{
  margin:0;
  font-family:'Cairo',sans-serif;
  background:#eef6f7;
  color:#12343b;
  direction:rtl;
}

button,
input,
select,
textarea{
  font-family:'Cairo',sans-serif;
}

button{
  cursor:pointer;
  -webkit-tap-highlight-color:transparent;
}

.app{
  max-width:480px;
  margin:auto;
  min-height:100vh;
  padding:18px 14px 120px;
  background:#f7fbfc;
}

/* Header */
.header{
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin-bottom:16px;
}

.header h1{
  margin:0;
  font-size:26px;
  font-weight:900;
  color:#12343b;
  letter-spacing:-.5px;
}

.header p{
  margin:3px 0 0;
  color:#2a8492;
  font-size:14px;
  font-weight:700;
}

.cart-icon{
  width:56px;
  height:56px;
  border-radius:20px;
  background:linear-gradient(135deg,#2a8492,#075e68);
  color:white;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:24px;
  position:relative;
  box-shadow:0 10px 22px rgba(42,132,146,.26);
}

.cart-icon span{
  position:absolute;
  top:-7px;
  left:-6px;
  min-width:23px;
  height:23px;
  background:#ffbd3d;
  color:#111;
  border-radius:50%;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:12px;
  font-weight:900;
  border:2px solid #fff;
}

/* Search */
.search{
  width:100%;
  height:56px;
  border:1px solid #dce9eb;
  background:#fff;
  border-radius:20px;
  padding:0 18px;
  font-size:15px;
  outline:none;
  margin-bottom:16px;
  box-shadow:0 7px 18px rgba(0,0,0,.035);
}

.search:focus{
  border-color:#2a8492;
  box-shadow:0 0 0 4px rgba(42,132,146,.08);
}

/* Slider */
.slider-container{
  margin-bottom:18px;
}

.swiper{
  width:100%;
  height:165px;
  border-radius:26px;
  overflow:hidden;
  background:linear-gradient(135deg,#2a8492,#075e68);
  box-shadow:0 12px 24px rgba(42,132,146,.16);
}

.swiper-slide{
  position:relative;
}

.swiper-slide img{
  width:100%;
  height:165px;
  object-fit:cover;
  display:block;
}

.empty-slide{
  height:165px;
  display:flex;
  align-items:center;
  justify-content:center;
  color:#fff;
  font-size:22px;
  font-weight:900;
}

.slide-title{
  position:absolute;
  right:15px;
  bottom:15px;
  max-width:80%;
  background:rgba(0,0,0,.45);
  color:#fff;
  padding:8px 14px;
  border-radius:15px;
  font-size:14px;
  font-weight:900;
  backdrop-filter:blur(7px);
}

.swiper-pagination-bullet{
  background:#fff;
  opacity:.65;
}

.swiper-pagination-bullet-active{
  background:#ffbd3d;
  opacity:1;
}

/* Categories */
.cats{
  display:flex;
  gap:10px;
  overflow-x:auto;
  padding:2px 0 16px;
  margin-bottom:4px;
  scrollbar-width:none;
}

.cats::-webkit-scrollbar{
  display:none;
}

.cat{
  border:1px solid #dce9eb;
  background:#fff;
  color:#2a8492;
  min-width:74px;
  height:52px;
  padding:0 16px;
  border-radius:18px;
  font-size:14px;
  font-weight:900;
  white-space:nowrap;
  box-shadow:0 5px 14px rgba(0,0,0,.035);
}

.cat.active{
  background:linear-gradient(135deg,#2a8492,#075e68);
  color:#fff;
  border-color:#2a8492;
  box-shadow:0 8px 18px rgba(42,132,146,.22);
}

.section-title{
  margin:0 0 14px;
  font-size:22px;
  font-weight:900;
  color:#111;
}

/* Products */
.products{
  display:flex;
  flex-direction:column;
  gap:12px;
}

.product{
  background:#fff;
  border:1px solid #e1ecee;
  border-radius:24px;
  padding:12px;
  display:flex;
  align-items:center;
  gap:12px;
  min-height:104px;
  box-shadow:0 8px 20px rgba(0,0,0,.045);
}

.prod-img{
  width:78px;
  height:78px;
  border-radius:20px;
  background:#eef8f6;
  color:#2a8492;
  display:flex;
  align-items:center;
  justify-content:center;
  overflow:hidden;
  font-size:34px;
  flex-shrink:0;
}

.prod-img img{
  width:100%;
  height:100%;
  object-fit:cover;
}

.prod-info{
  flex:1;
  min-width:0;
}

.prod-info h3{
  margin:0 0 4px;
  font-size:17px;
  font-weight:900;
  color:#111;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.prod-info p{
  margin:0 0 6px;
  color:#6d7f86;
  font-size:13px;
  line-height:1.5;
  display:-webkit-box;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
  overflow:hidden;
}

.prod-info strong{
  color:#2a8492;
  font-size:18px;
  font-weight:900;
}

.add{
  width:44px;
  height:44px;
  border:0;
  border-radius:15px;
  background:linear-gradient(135deg,#2a8492,#075e68);
  color:#fff;
  font-size:28px;
  line-height:1;
  font-weight:900;
  flex-shrink:0;
  box-shadow:0 8px 16px rgba(42,132,146,.24);
}

.add:active{
  transform:scale(.96);
}

/* Bottom Cart Bar */
.cart-bar{
  position:fixed;
  left:14px;
  right:14px;
  bottom:14px;
  max-width:452px;
  margin:auto;
  min-height:78px;
  background:#fff;
  border:1px solid #dce9eb;
  border-radius:26px;
  padding:10px;
  box-shadow:0 14px 35px rgba(0,0,0,.18);
  z-index:999;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}

.cart-total{
  flex:1;
  height:58px;
  background:linear-gradient(135deg,#eef8f6,#fff);
  border-radius:20px;
  padding:10px 14px;
  display:flex;
  flex-direction:column;
  justify-content:center;
  border:1px solid #e6f0f1;
}

.cart-total span{
  font-size:12px;
  color:#6d7f86;
  font-weight:900;
}

.cart-total b{
  font-size:21px;
  font-weight:900;
  color:#075e68;
  line-height:1.15;
}

.cart-bar button{
  width:150px;
  height:58px;
  border:0;
  border-radius:20px;
  background:linear-gradient(135deg,#ffbd3d,#f59e0b);
  color:#111;
  font-size:17px;
  font-weight:900;
  box-shadow:0 8px 18px rgba(245,158,11,.28);
}

.cart-bar button:active{
  transform:scale(.98);
}

/* Checkout Modal */
.modal{
  display:none;
  position:fixed;
  inset:0;
  background:rgba(0,0,0,.45);
  align-items:flex-end;
  justify-content:center;
  z-index:2000;
}

.modal-box{
  width:100%;
  max-width:480px;
  max-height:92vh;
  overflow-y:auto;
  background:#fff;
  border-radius:32px 32px 0 0;
  padding:22px 18px 20px;
  box-shadow:0 -14px 34px rgba(0,0,0,.18);
}

.modal-box h2{
  margin:0 0 16px;
  font-size:23px;
  font-weight:900;
  color:#111;
}

.order-summary{
  display:flex;
  flex-direction:column;
  gap:10px;
  margin-bottom:14px;
}

.summary-item{
  background:#f5fafb;
  border:1px solid #e1ecee;
  border-radius:20px;
  padding:12px;
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:10px;
}

.summary-item b{
  display:block;
  font-size:15px;
  color:#111;
  font-weight:900;
}

.summary-item span{
  display:block;
  margin-top:3px;
  color:#2a8492;
  font-size:14px;
  font-weight:900;
}

.qty-box{
  display:flex;
  align-items:center;
  gap:8px;
  background:#fff;
  border-radius:16px;
  padding:6px;
  border:1px solid #e1ecee;
}

.qty-box button{
  width:30px;
  height:30px;
  border:0;
  border-radius:11px;
  background:#2a8492;
  color:#fff;
  font-size:18px;
  font-weight:900;
}

.qty-box strong{
  min-width:20px;
  text-align:center;
}

/* Coupon */
.coupon-area{
  margin-bottom:14px;
}

.coupon-area label{
  display:block;
  margin-bottom:7px;
  font-size:14px;
  font-weight:900;
  color:#12343b;
}

.coupon-row{
  display:flex;
  gap:8px;
}

.coupon-row input{
  flex:1;
  height:50px;
  border:1px solid #dce9eb;
  border-radius:17px;
  padding:0 14px;
  font-size:14px;
  outline:none;
}

.coupon-row input:focus{
  border-color:#2a8492;
}

.coupon-row button{
  width:92px;
  border:0;
  border-radius:17px;
  background:#2a8492;
  color:#fff;
  font-weight:900;
}

#couponMsg{
  display:block;
  margin-top:6px;
  font-size:13px;
  font-weight:900;
}

/* Price Summary */
.price-summary{
  background:#f5fafb;
  border:1px dashed #c7d9dc;
  border-radius:20px;
  padding:13px;
  margin-bottom:14px;
}

.price-summary div{
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin-bottom:7px;
  font-size:14px;
}

.price-summary b{
  color:#2a8492;
  font-weight:900;
}

.price-summary .final-price{
  border-top:1px solid #dce9eb;
  padding-top:10px;
  margin-top:8px;
  margin-bottom:0;
  font-size:18px;
  font-weight:900;
}

.price-summary .final-price b{
  font-size:22px;
  color:#075e68;
}

/* Form */
.modal-box input,
.modal-box select{
  width:100%;
  height:54px;
  border:1px solid #dce9eb;
  border-radius:19px;
  padding:0 15px;
  margin-bottom:10px;
  font-size:15px;
  outline:none;
  background:#fff;
}

.modal-box input:focus,
.modal-box select:focus{
  border-color:#2a8492;
  box-shadow:0 0 0 4px rgba(42,132,146,.08);
}

.send-btn{
  width:100%;
  height:58px;
  border:0;
  border-radius:22px;
  background:linear-gradient(135deg,#25d366,#128c7e);
  color:#fff;
  font-size:18px;
  font-weight:900;
  margin-top:6px;
  box-shadow:0 10px 22px rgba(37,211,102,.24);
}

.send-btn::before{
  content:'📲 ';
}

.close{
  width:100%;
  height:50px;
  border:0;
  border-radius:18px;
  background:#edf3f4;
  color:#333;
  font-size:15px;
  font-weight:900;
  margin-top:8px;
}

/* Desktop preview */
@media(min-width:481px){
  body{
    background:#e9f2f3;
  }

  .app{
    box-shadow:0 0 30px rgba(0,0,0,.05);
  }
}
