:root{
    --navy:#123B5E;
    --navy-dark:#0C2942;
    --orange:#F5821F;
    --orange-dark:#DA6F10;
    --green:#1E8A5B;
    --star-gold:#E8A33D;
    --bg:#FFFFFF;
    --bg-soft:#F4F5F7;
    --text:#22262B;
    --text-muted:#6B7280;
    --border:#E4E7EB;
    --card-bg:#FFFFFF;
    --radius:8px;
    --shadow:0 1px 3px rgba(0,0,0,0.08);
    --shadow-card:0 2px 10px rgba(18,59,94,0.06);
  }
  *{margin:0;padding:0;box-sizing:border-box;}
  html{
    scroll-behavior:smooth;
    /* بيمنع متصفح كروم على بعض أجهزة الأندرويد من تكبير حجم الخط تلقائيًا بعد التحميل،
       وده اللي كان بيسبب اختلاف واضح في الأبعاد بين جهاز وجهاز أو حتى في نفس الجهاز */
    -webkit-text-size-adjust:100%;
    text-size-adjust:100%;
  }
  body{
    font-family:'Cairo',sans-serif;
    color:var(--text);
    background:var(--bg);
    line-height:1.6;
    font-size:15px;
  }
  a{text-decoration:none;color:inherit;}
  ul{list-style:none;}
  img{max-width:100%;display:block;}
  button{font-family:inherit;cursor:pointer;border:none;background:none;}
  .container{max-width:1240px;margin:0 auto;padding:0 16px;}

  /* ===== Top utility bar ===== */
  .topbar{background:var(--navy-dark);color:#fff;font-size:12.5px;}
  .topbar .container{display:flex;justify-content:space-between;align-items:center;height:34px;}
  .topbar-links{display:flex;gap:16px;}
  .topbar-links a{opacity:.9;}
  .topbar-links a:hover{opacity:1;text-decoration:underline;}
  .topbar-right{display:flex;gap:16px;opacity:.9;}

  /* ===== Header ===== */
  header.main-header{background:var(--navy);position:sticky;top:0;z-index:100;box-shadow:0 2px 6px rgba(0,0,0,0.12);}
  .header-inner{display:flex;align-items:center;gap:20px;height:72px;}
  .logo{display:flex;align-items:center;flex-shrink:0;background:var(--card-bg);padding:6px 14px;border-radius:8px;}
  .logo img{height:32px;width:auto;display:block;}

  .search-form{flex:1;display:flex;max-width:640px;border-radius:6px;overflow:hidden;box-shadow:0 0 0 1px rgba(255,255,255,.08);}
  .search-form input{
    flex:1;height:42px;border:none;border-radius:0 6px 6px 0;
    padding:0 14px;font-family:inherit;font-size:14px;outline:none;color:#22262B;
  }
  .search-form button{
    background:var(--orange);color:#fff;height:42px;width:48px;
    border-radius:6px 0 0 6px;display:flex;align-items:center;justify-content:center;
    transition:background .15s;flex-shrink:0;
  }
  .search-form button:hover{background:var(--orange-dark);}
  .search-form button svg{width:20px;height:20px;}

  .header-actions{display:flex;align-items:center;gap:24px;flex-shrink:0;}
  .header-action{display:flex;flex-direction:column;align-items:center;color:#fff;font-size:12px;gap:2px;position:relative;}
  .header-action svg{width:23px;height:23px;}
  .header-action .badge{
    position:absolute;top:-4px;left:-9px;background:var(--orange);color:#fff;
    font-size:10.5px;font-weight:700;border-radius:50%;width:17px;height:17px;
    display:flex;align-items:center;justify-content:center;box-shadow:0 0 0 2px var(--navy);
  }
  .menu-toggle{display:none;color:#fff;}
  .menu-toggle svg{width:26px;height:26px;}

  /* ===== Category nav ===== */
  nav.cat-nav{background:var(--card-bg);border-bottom:1px solid var(--border);}
  .cat-nav .container{display:flex;align-items:center;gap:26px;height:46px;overflow-x:auto;scrollbar-width:none;}
  .cat-nav .container::-webkit-scrollbar{display:none;}
  .cat-nav a{white-space:nowrap;font-size:13.5px;color:var(--text);font-weight:500;}
  .cat-nav a:hover{color:var(--orange);}
  .cat-nav a.all-cats{color:var(--navy);font-weight:700;display:flex;align-items:center;gap:6px;}
  .cat-nav a.all-cats svg{width:16px;height:16px;}

  /* ===== Mobile drawer ===== */
  .mobile-drawer{
    position:fixed;top:0;right:-280px;width:280px;height:100%;background:var(--card-bg);
    z-index:200;box-shadow:-2px 0 10px rgba(0,0,0,.15);transition:right .25s ease;
    display:flex;flex-direction:column;
  }
  .mobile-drawer.open{right:0;}
  .drawer-head{background:var(--navy);color:#fff;padding:16px;display:flex;justify-content:space-between;align-items:center;}
  .drawer-close svg{width:22px;height:22px;}
  .drawer-body{padding:8px 0;overflow-y:auto;overflow-x:hidden;}
  .drawer-body a{display:block;padding:12px 18px;border-bottom:1px solid var(--border);font-size:14px;}
  .overlay{position:fixed;inset:0;background:rgba(0,0,0,.4);z-index:150;display:none;}
  .overlay.show{display:block;}

  /* ===== Hero slider ===== */
  .hero{background:var(--bg-soft);padding:20px 0;}
  .hero-slider{
    position:relative;border-radius:var(--radius);overflow:hidden;
    max-width:1240px;margin:0 auto;height:280px;
  }
  .slide{
    position:absolute;inset:0;display:flex;align-items:center;
    opacity:0;transition:opacity .5s ease;background-size:cover;background-position:center;
  }
  .slide.active{opacity:1;}
  .slide-overlay{
    background:linear-gradient(90deg, rgba(12,41,66,.88) 0%, rgba(12,41,66,.55) 55%, rgba(12,41,66,0) 100%);
    position:absolute;inset:0;
  }
  .slide-content{position:relative;color:#fff;padding:0 64px;max-width:480px;}
  .slide-content .eyebrow{color:var(--orange);font-weight:700;font-size:13px;margin-bottom:8px;display:block;}
  .slide-content h2{font-size:28px;font-weight:800;margin-bottom:10px;}
  .slide-content p{font-size:14px;opacity:.9;margin-bottom:18px;}
  .slide-cta{
    background:var(--orange);color:#fff;padding:10px 22px;border-radius:6px;
    font-weight:700;font-size:14px;display:inline-block;transition:background .15s;
  }
  .slide-cta:hover{background:var(--orange-dark);}
  .slider-dots{position:absolute;bottom:14px;right:50%;transform:translateX(50%);display:flex;gap:7px;z-index:5;}
  .slider-dots button{width:8px;height:8px;border-radius:50%;background:rgba(255,255,255,.5);}
  .slider-dots button.active{background:var(--card-bg);width:20px;border-radius:4px;}
  .slider-arrow{
    position:absolute;top:50%;transform:translateY(-50%);width:36px;height:36px;border-radius:50%;
    background:rgba(255,255,255,.85);display:flex;align-items:center;justify-content:center;z-index:5;
  }
  .slider-arrow svg{width:18px;height:18px;color:var(--navy);}
  .slider-arrow.prev{right:14px;}
  .slider-arrow.next{left:14px;}

  /* ===== Trust bar ===== */
  .trust-bar{border-bottom:1px solid var(--border);}
  .trust-bar .container{
    display:grid;grid-template-columns:repeat(4,1fr);gap:16px;padding:18px 16px;
  }
  .trust-item{display:flex;align-items:center;gap:10px;}
  .trust-item svg{width:30px;height:30px;color:var(--orange);flex-shrink:0;}
  .trust-item h4{font-size:13.5px;font-weight:700;margin-bottom:2px;}
  .trust-item p{font-size:12px;color:var(--text-muted);}

  /* ===== Section heading ===== */
  .section{padding:34px 0;}
  .section-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:18px;}
  .section-head h3{font-size:19px;font-weight:800;color:var(--navy);}
  .section-head a{font-size:13px;color:var(--orange);font-weight:600;}

  /* ===== Categories grid ===== */
  .cats-grid{display:grid;grid-template-columns:repeat(5,1fr);gap:14px;}
  .cat-card{
    background:var(--bg-soft);border-radius:var(--radius);padding:18px 8px;
    text-align:center;transition:transform .15s, box-shadow .15s;
  }
  .cat-card:hover{transform:translateY(-3px);box-shadow:var(--shadow);}
  .cat-card svg{width:34px;height:34px;color:var(--navy);margin:0 auto 8px;}
  .cat-card img{width:52px;height:52px;object-fit:cover;border-radius:14px;margin:0 auto 8px;display:block;}
  .cat-card span{font-size:12.5px;font-weight:600;}

  /* ===== Products grid ===== */
  .products-grid{display:grid;grid-template-columns:repeat(5,1fr);gap:14px;}
  .product-card{
    border:1px solid var(--border);border-radius:var(--radius);overflow:hidden;
    background:var(--card-bg);transition:box-shadow .15s;display:flex;flex-direction:column;
  }
  .product-card:hover{box-shadow:var(--shadow);}
  .product-thumb{position:relative;aspect-ratio:1/1;background:var(--bg-soft);overflow:hidden;}
  .product-thumb img{width:100%;height:100%;object-fit:cover;}
  .discount-badge{
    position:absolute;top:8px;right:8px;background:var(--orange);color:#fff;
    font-size:11px;font-weight:700;padding:3px 7px;border-radius:4px;
  }
  .wishlist-btn{
    position:absolute;top:8px;left:8px;width:28px;height:28px;background:var(--card-bg);
    border-radius:50%;display:flex;align-items:center;justify-content:center;box-shadow:var(--shadow);
  }
  .wishlist-btn svg{width:15px;height:15px;color:var(--text-muted);}
  .wishlist-btn.active svg{color:var(--orange);}
  .product-info{padding:10px 12px 12px;flex:1;display:flex;flex-direction:column;}
  .product-info h4{font-size:13px;font-weight:600;margin-bottom:6px;min-height:36px;overflow:hidden;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;}
  .stars{display:flex;align-items:center;gap:3px;margin-bottom:6px;}
  .stars svg{width:12px;height:12px;color:var(--orange);}
  .stars span{font-size:11px;color:var(--text-muted);margin-right:3px;}
  .price-row{display:flex;align-items:baseline;gap:7px;margin-bottom:10px;margin-top:auto;}
  .price{font-size:15.5px;font-weight:800;color:var(--navy);}
  .old-price{font-size:12px;color:var(--text-muted);text-decoration:line-through;}
  .add-cart-btn{
    width:100%;background:var(--navy);color:#fff;padding:8px 0;border-radius:6px;
    font-size:13px;font-weight:700;display:flex;align-items:center;justify-content:center;gap:6px;
    transition:background .15s;
  }
  .add-cart-btn:hover{background:var(--navy-dark);}
  .add-cart-btn svg{width:15px;height:15px;}

  /* ===== Promo strip ===== */
  .promo-strip{
    background:var(--navy);border-radius:var(--radius);padding:26px 32px;
    display:flex;justify-content:space-between;align-items:center;color:#fff;flex-wrap:wrap;gap:14px;
  }
  .promo-strip h3{font-size:20px;font-weight:800;margin-bottom:4px;}
  .promo-strip p{font-size:13px;opacity:.85;}
  .promo-strip .slide-cta{background:var(--orange);}

  /* ===== Newsletter ===== */
  .newsletter{background:var(--bg-soft);padding:34px 0;}
  .newsletter .container{text-align:center;max-width:520px;}
  .newsletter h3{font-size:18px;font-weight:800;color:var(--navy);margin-bottom:6px;}
  .newsletter p{font-size:13px;color:var(--text-muted);margin-bottom:16px;}
  .newsletter-form{display:flex;gap:8px;}
  .newsletter-form input{
    flex:1;height:44px;border:1px solid var(--border);border-radius:6px;padding:0 14px;
    font-family:inherit;font-size:13.5px;outline:none;color:var(--text);background:var(--card-bg);
  }
  .newsletter-form button{
    background:var(--orange);color:#fff;padding:0 22px;border-radius:6px;font-weight:700;font-size:13.5px;
  }
  .newsletter-msg{font-size:12.5px;color:var(--green);margin-top:10px;font-weight:600;display:none;}

  /* ===== Footer ===== */
  footer{background:var(--navy-dark);color:#fff;padding-top:36px;}
  .footer-grid{display:grid;grid-template-columns:1.4fr 1fr 1fr 1fr;gap:28px;padding-bottom:28px;}
  .footer-col h4{font-size:14.5px;font-weight:700;margin-bottom:14px;}
  .footer-col p{font-size:13px;opacity:.8;margin-bottom:14px;}
  .footer-col ul li{margin-bottom:9px;}
  .footer-col ul li a{font-size:13px;opacity:.8;}
  .footer-col ul li a:hover{opacity:1;text-decoration:underline;}
  .social-icons{display:flex;gap:10px;}
  .social-icons a{
    width:32px;height:32px;background:rgba(255,255,255,.1);border-radius:50%;
    display:flex;align-items:center;justify-content:center;
  }
  .social-icons a svg{width:15px;height:15px;}
  .payment-icons{display:flex;gap:8px;flex-wrap:wrap;margin-top:6px;}
  .payment-icons span{
    background:var(--card-bg);color:var(--navy-dark);font-size:10.5px;font-weight:700;
    padding:5px 8px;border-radius:4px;
  }
  .footer-bottom{
    border-top:1px solid rgba(255,255,255,.12);padding:16px 0;
    display:flex;justify-content:space-between;align-items:center;font-size:12.5px;opacity:.75;flex-wrap:wrap;gap:8px;
  }

  /* ===== Page title bar (cart / checkout / etc) ===== */
  .page-title-bar{background:var(--bg-soft);border-bottom:1px solid var(--border);padding:16px 0;}
  .page-title-bar h1{font-size:20px;font-weight:800;color:var(--navy);}
  .breadcrumb{font-size:12.5px;color:var(--text-muted);margin-top:4px;}
  .breadcrumb a{color:var(--text-muted);}
  .breadcrumb a:hover{color:var(--orange);}

  /* ===== Cart page ===== */
  .cart-layout{display:grid;grid-template-columns:2fr 1fr;gap:22px;align-items:start;}
  .cart-items-box{background:var(--card-bg);border:1px solid var(--border);border-radius:var(--radius);overflow:hidden;}
  .cart-item{display:flex;align-items:center;gap:14px;padding:16px;border-bottom:1px solid var(--border);}
  .cart-item:last-child{border-bottom:none;}
  .cart-item-thumb{width:80px;height:80px;border-radius:6px;overflow:hidden;background:var(--bg-soft);flex-shrink:0;}
  .cart-item-thumb img{width:100%;height:100%;object-fit:cover;}
  .cart-item-info{flex:1;min-width:0;}
  .cart-item-info h4{font-size:14px;font-weight:600;margin-bottom:6px;}
  .cart-item-price{font-size:13.5px;color:var(--navy);font-weight:700;}
  .qty-stepper{display:flex;align-items:center;border:1px solid var(--border);border-radius:6px;overflow:hidden;width:fit-content;margin-top:8px;}
  .qty-stepper button{width:28px;height:28px;display:flex;align-items:center;justify-content:center;font-size:16px;color:var(--navy);background:var(--bg-soft);}
  .qty-stepper button:hover{background:var(--border);}
  .qty-stepper span{width:34px;text-align:center;font-size:13.5px;font-weight:600;}
  .cart-item-side{display:flex;flex-direction:column;align-items:flex-end;gap:10px;flex-shrink:0;}
  .cart-item-total{font-size:15px;font-weight:800;color:var(--navy);}
  .remove-btn{color:var(--text-muted);font-size:12.5px;display:flex;align-items:center;gap:4px;}
  .remove-btn svg{width:14px;height:14px;}
  .remove-btn:hover{color:#D64545;}

  .cart-summary{background:var(--card-bg);border:1px solid var(--border);border-radius:var(--radius);padding:18px;position:sticky;top:88px;}
  .cart-summary h3{font-size:15.5px;font-weight:800;margin-bottom:14px;color:var(--navy);}
  .summary-row{display:flex;justify-content:space-between;font-size:13.5px;color:var(--text-muted);margin-bottom:10px;}
  .summary-row.total{font-size:16px;font-weight:800;color:var(--text);border-top:1px solid var(--border);padding-top:12px;margin-top:6px;}
  .summary-row.total span:last-child{color:var(--navy);}
  .shipping-note{background:var(--bg-soft);border-radius:6px;padding:9px 10px;font-size:12px;color:var(--text-muted);margin-bottom:14px;display:flex;gap:6px;align-items:flex-start;}
  .shipping-note svg{width:15px;height:15px;flex-shrink:0;color:var(--green);margin-top:1px;}
  .checkout-btn{
    width:100%;background:var(--orange);color:#fff;padding:13px 0;border-radius:6px;
    font-size:14.5px;font-weight:700;text-align:center;display:block;transition:background .15s;
  }
  .checkout-btn:hover{background:var(--orange-dark);}
  .continue-shopping{display:block;text-align:center;font-size:13px;color:var(--navy);margin-top:12px;font-weight:600;}

  .empty-state{text-align:center;padding:70px 20px;background:var(--card-bg);border:1px solid var(--border);border-radius:var(--radius);}
  .empty-state svg{width:64px;height:64px;color:var(--border);margin:0 auto 16px;}
  .empty-state h3{font-size:16px;font-weight:700;margin-bottom:6px;}
  .empty-state p{font-size:13px;color:var(--text-muted);margin-bottom:20px;}
  .empty-state a{
    background:var(--navy);color:#fff;padding:10px 26px;border-radius:6px;font-size:13.5px;font-weight:700;
  }

  /* ===== Checkout page ===== */
  .checkout-layout{display:grid;grid-template-columns:1.6fr 1fr;gap:22px;align-items:start;}
  .checkout-box{background:var(--card-bg);border:1px solid var(--border);border-radius:var(--radius);padding:20px;margin-bottom:18px;}
  .checkout-box h3{font-size:15px;font-weight:800;color:var(--navy);margin-bottom:16px;display:flex;align-items:center;gap:8px;}
  .checkout-box h3 .step-num{
    width:24px;height:24px;background:var(--navy);color:#fff;border-radius:50%;
    display:flex;align-items:center;justify-content:center;font-size:12.5px;flex-shrink:0;
  }
  .form-row{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-bottom:12px;}
  .form-group{margin-bottom:12px;}
  .form-group label{display:block;font-size:13px;font-weight:600;margin-bottom:6px;}
  .form-group input, .form-group select, .form-group textarea{
    width:100%;border:1px solid var(--border);border-radius:6px;padding:10px 12px;
    font-family:inherit;font-size:13.5px;outline:none;background:var(--card-bg);color:var(--text);
  }
  .form-group select{
    appearance:none;-webkit-appearance:none;-moz-appearance:none;
    background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23767676' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat:no-repeat;background-position:left 12px center;background-size:16px;
    padding-left:36px;cursor:pointer;
  }
  .form-group input:focus, .form-group select:focus, .form-group textarea:focus{border-color:var(--navy);}
  .form-group textarea{resize:vertical;min-height:70px;}
  .field-error{color:#D64545;font-size:12px;margin-top:4px;display:none;}

  .payment-option{
    display:flex;align-items:center;gap:12px;border:1px solid var(--border);border-radius:8px;
    padding:14px;margin-bottom:10px;cursor:pointer;transition:border-color .15s;
  }
  .payment-option:hover{border-color:var(--navy);}
  .payment-option.selected{border-color:var(--orange);background:#FFF6EE;}
  .payment-option input{width:18px;height:18px;accent-color:var(--orange);}
  .payment-option svg{width:26px;height:26px;color:var(--navy);flex-shrink:0;}
  .payment-option-text h4{font-size:13.5px;font-weight:700;}
  .payment-option-text p{font-size:11.5px;color:var(--text-muted);}

  .mini-cart-item{display:flex;gap:10px;align-items:center;padding:10px 0;border-bottom:1px solid var(--border);}
  .mini-cart-item:last-child{border-bottom:none;}
  .mini-cart-item img{width:48px;height:48px;border-radius:5px;object-fit:cover;background:var(--bg-soft);}
  .mini-cart-item .mci-info{flex:1;min-width:0;}
  .mini-cart-item .mci-info h5{font-size:12.5px;font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
  .mini-cart-item .mci-info span{font-size:11.5px;color:var(--text-muted);}
  .mini-cart-item .mci-price{font-size:12.5px;font-weight:700;color:var(--navy);flex-shrink:0;}

  .place-order-btn{
    width:100%;background:var(--navy);color:#fff;padding:14px 0;border-radius:6px;
    font-size:15px;font-weight:700;transition:background .15s;
    display:flex;align-items:center;justify-content:center;gap:9px;
  }
  .place-order-btn:hover{background:var(--navy-dark);}
  .place-order-btn:disabled{opacity:.85;cursor:not-allowed;}
  .btn-spinner{
    display:inline-block;width:16px;height:16px;border-radius:50%;flex-shrink:0;
    border:2.5px solid rgba(255,255,255,.35);border-top-color:#fff;
    animation:btnSpin .6s linear infinite;
  }
  @keyframes btnSpin{to{transform:rotate(360deg);}}
  .checkout-alert{background:#FDECEC;color:#B23A3A;font-size:13px;padding:10px 12px;border-radius:6px;margin-bottom:14px;display:none;}

  /* ===== Order success page ===== */
  .success-box{max-width:560px;margin:50px auto;text-align:center;background:var(--card-bg);border:1px solid var(--border);border-radius:var(--radius);padding:44px 30px;}
  .success-icon{width:76px;height:76px;background:#E8F6EF;border-radius:50%;display:flex;align-items:center;justify-content:center;margin:0 auto 20px;}
  .success-icon svg{width:38px;height:38px;color:var(--green);}
  .success-box h2{font-size:21px;font-weight:800;color:var(--navy);margin-bottom:8px;}
  .success-box p{font-size:13.5px;color:var(--text-muted);margin-bottom:4px;}
  .order-number-chip{
    display:inline-block;background:var(--bg-soft);padding:8px 18px;border-radius:6px;
    font-weight:800;color:var(--navy);margin:16px 0;letter-spacing:.5px;
  }
  .success-actions{display:flex;gap:10px;justify-content:center;margin-top:22px;flex-wrap:wrap;}
  .success-actions a{padding:11px 24px;border-radius:6px;font-size:13.5px;font-weight:700;}
  .success-actions .primary{background:var(--orange);color:#fff;}
  .success-actions .secondary{background:var(--bg-soft);color:var(--text);}

  @media (max-width:860px){
    .cart-layout, .checkout-layout{grid-template-columns:1fr;}
    .form-row{grid-template-columns:1fr;}
    .cart-summary{position:static;}
  }
  @media (max-width:640px){
    .cart-item{flex-wrap:wrap;}
    .cart-item-side{flex-direction:row;width:100%;justify-content:space-between;align-items:center;}
  }

  /* ===== Product page ===== */
  .product-layout{display:grid;grid-template-columns:minmax(0,460px) 1fr;gap:48px;align-items:start;}

  .gallery-wrap{display:flex;flex-direction:row-reverse;gap:12px;position:sticky;top:88px;}
  .gallery-main{
    flex:1;aspect-ratio:1/1;background:#fff;border-radius:14px;overflow:hidden;
    border:1px solid var(--border);min-width:0;touch-action:pan-y;
  }
  .gallery-main img{width:100%;height:100%;object-fit:contain;}
  .gallery-thumbs{display:flex;flex-direction:column;gap:10px;width:66px;flex-shrink:0;max-height:460px;overflow-y:auto;}
  .gallery-thumb{
    width:66px;height:66px;border-radius:8px;overflow:hidden;cursor:pointer;flex-shrink:0;
    border:1.5px solid var(--border);opacity:.85;transition:opacity .15s,border-color .15s;background:#fff;
  }
  .gallery-thumb img{width:100%;height:100%;object-fit:contain;}
  .gallery-thumb:hover{opacity:1;}
  .gallery-thumb.active{opacity:1;border-color:var(--navy);border-width:2px;}

  .product-header{margin-bottom:16px;}
  .product-category-tag{font-size:12.5px;color:var(--text-muted);font-weight:600;margin-bottom:8px;display:block;}
  .product-category-tag:hover{color:var(--navy);}
  .product-title{font-size:24px;font-weight:700;color:var(--text);margin-bottom:12px;line-height:1.4;letter-spacing:-.2px;}
  .product-rating-row{display:flex;align-items:center;gap:10px;margin-bottom:4px;}
  .product-rating-row .stars{margin-bottom:0;}
  .product-rating-row .stars svg{color:var(--star-gold);}
  .product-rating-row .rating-num{font-size:13.5px;font-weight:700;color:var(--text);}
  .product-rating-row .reviews-link{font-size:13px;color:var(--text-muted);border-bottom:1px solid var(--border);}
  .product-rating-row .reviews-link:hover{color:var(--navy);border-color:var(--navy);}

  /* الصندوق الموحّد: السعر + التوافر + الكمية + أزرار الشراء + البائع كلهم في مكان واحد متماسك */
  .buy-box{
    border:1px solid var(--border);border-radius:14px;padding:22px;background:#fff;box-shadow:var(--shadow-card);
  }
  .product-price-box{display:flex;align-items:baseline;gap:12px;flex-wrap:wrap;}
  .product-price-box .price{font-size:32px;font-weight:800;color:var(--text);letter-spacing:-.5px;}
  .product-price-box .old-price{font-size:15px;color:var(--text-muted);text-decoration:line-through;}
  .product-price-box .discount-tag{
    background:#FDECEC;color:#C7433D;font-size:12px;font-weight:700;padding:3px 9px;border-radius:5px;
  }

  .stock-badge{display:flex;align-items:center;gap:6px;font-size:13px;font-weight:600;margin-top:10px;}
  .stock-badge.in-stock{color:var(--green);}
  .stock-badge.low-stock{color:var(--orange);}
  .stock-badge svg{width:16px;height:16px;}

  .product-actions{display:flex;gap:10px;align-items:center;margin-top:18px;}
  .product-actions .qty-stepper{height:48px;}
  .product-actions .qty-stepper button{width:40px;height:100%;font-size:18px;}
  .product-actions .qty-stepper span{width:44px;font-size:15px;}
  .product-add-cart-btn{
    flex:1;background:var(--orange);color:#fff;height:48px;border-radius:8px;
    font-size:15px;font-weight:700;display:flex;align-items:center;justify-content:center;gap:8px;
    transition:background .15s;
  }
  .product-add-cart-btn:hover{background:var(--orange-dark);}
  .product-add-cart-btn svg{width:19px;height:19px;}
  .product-add-cart-btn:disabled,
  .product-buy-now-btn:disabled,
  .msa-cart-btn:disabled,
  .msa-buy-btn:disabled{background:var(--bg-soft);color:var(--text-muted);cursor:not-allowed;}
  .qty-stepper button:disabled,
  .msa-qty-stepper button:disabled{color:var(--border);cursor:not-allowed;}
  .product-buy-now-btn{
    flex:1;background:var(--navy);color:#fff;height:48px;border-radius:8px;
    font-size:15px;font-weight:700;display:flex;align-items:center;justify-content:center;
    transition:background .15s;
  }
  .product-buy-now-btn:hover{background:var(--navy-dark);}
  .product-wishlist-btn{
    width:48px;height:48px;border:1px solid var(--border);border-radius:8px;
    display:flex;align-items:center;justify-content:center;flex-shrink:0;transition:border-color .15s;
  }
  .product-wishlist-btn:hover{border-color:var(--orange);}
  .product-wishlist-btn svg{width:20px;height:20px;color:var(--text-muted);}
  .product-wishlist-btn.active svg{color:var(--orange);}

  .seller-card{
    display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;
    margin-top:20px;padding-top:20px;border-top:1px solid var(--border);
  }
  .seller-info{display:flex;align-items:center;gap:12px;}
  .seller-avatar{
    width:38px;height:38px;color:var(--navy);flex-shrink:0;
    display:flex;align-items:center;justify-content:center;
  }
  .seller-avatar svg{width:30px;height:30px;}
  .seller-name-row{display:flex;align-items:center;gap:6px;}
  .seller-name-row h5{font-size:14px;font-weight:700;color:var(--text);}
  .seller-label{font-size:12.5px;color:var(--text-muted);font-weight:500;}
  .seller-verified{color:var(--green);display:flex;align-items:center;}
  .seller-verified svg{width:15px;height:15px;}
  .seller-rating-row{display:flex;align-items:center;gap:5px;margin-top:3px;}
  .seller-rating-row .stars{display:flex;gap:1px;}
  .seller-rating-row .stars svg{width:12px;height:12px;color:var(--star-gold);}
  .seller-rating-row .rating-num{font-size:12.5px;font-weight:700;color:var(--text);}
  .seller-info p{font-size:11.5px;color:var(--text-muted);margin-top:2px;}
  .seller-card a{font-size:12.5px;color:var(--navy);font-weight:700;white-space:nowrap;border-bottom:1px solid transparent;}
  .seller-card a:hover{border-color:var(--navy);}

  .mini-trust-row{display:flex;flex-direction:column;gap:12px;margin-top:20px;}
  .mini-trust-item{display:flex;align-items:center;gap:10px;font-size:13px;color:var(--text-muted);}
  .mini-trust-item svg{width:18px;height:18px;color:var(--navy);flex-shrink:0;}

  /* ===== Tabs ===== */
  .product-tabs{margin-top:56px;}
  .tabs-nav{display:flex;gap:28px;border-bottom:1px solid var(--border);margin-bottom:28px;overflow-x:auto;overflow-y:hidden;}
  .tab-btn{
    padding:0 0 14px;font-size:14.5px;font-weight:600;color:var(--text-muted);
    border-bottom:2px solid transparent;white-space:nowrap;margin-bottom:-1px;transition:color .15s;
  }
  .tab-btn.active{color:var(--text);border-bottom-color:var(--navy);font-weight:700;}
  .tab-panel{display:none;}
  .tab-panel.active{display:block;}
  .tab-panel p{font-size:14.5px;color:var(--text);line-height:1.9;max-width:70ch;}

  .specs-table{width:100%;max-width:600px;border-collapse:collapse;}
  .specs-table tr{border-bottom:1px solid var(--border);}
  .specs-table td{padding:13px 6px;font-size:13.5px;}
  .specs-table td:first-child{color:var(--text-muted);width:40%;}
  .specs-table td:last-child{font-weight:600;}

  .reviews-summary{display:flex;align-items:center;gap:24px;margin-bottom:28px;padding-bottom:28px;border-bottom:1px solid var(--border);}
  .reviews-summary .big-rating{font-size:44px;font-weight:800;color:var(--text);letter-spacing:-1px;}
  .reviews-summary .stars svg{width:16px;height:16px;color:var(--star-gold);}
  .reviews-summary .reviews-count-text{font-size:12.5px;color:var(--text-muted);margin-top:4px;}
  .review-item{padding:18px 0;border-bottom:1px solid var(--border);}
  .review-item:last-child{border-bottom:none;}
  .review-item-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:6px;}
  .review-author{display:flex;align-items:center;gap:10px;}
  .review-avatar{
    width:32px;height:32px;border-radius:50%;background:var(--bg-soft);color:var(--navy);
    display:flex;align-items:center;justify-content:center;font-weight:800;font-size:13px;
  }
  .review-author h6{font-size:13px;font-weight:700;}
  .review-item .stars svg{color:var(--star-gold);}
  .review-date{font-size:11.5px;color:var(--text-muted);}
  .review-item p{font-size:13.5px;color:var(--text);line-height:1.8;margin-top:8px;}

  /* ===== Related products ===== */
  .related-section{margin-top:60px;}

  .mobile-sticky-actions{display:none;}

  @media (max-width:860px){
    .product-layout{grid-template-columns:1fr;gap:24px;}
    .gallery-wrap{position:static;flex-direction:column;}
    .gallery-main{aspect-ratio:1/1;order:1;}
    .gallery-thumbs{flex-direction:row;width:100%;max-height:none;overflow-x:auto;overflow-y:hidden;order:2;}
    .gallery-thumb{width:60px;height:60px;}
    .buy-box{border:none;border-radius:0;padding:0;box-shadow:none;}
    .seller-card{border-top:1px solid var(--border);}
    .product-actions{margin-bottom:14px;}
    .product-actions .product-add-cart-btn,
    .product-actions .product-buy-now-btn,
    .product-actions .qty-stepper{display:none;} /* الكل انتقل للشريط الثابت تحت، وبيفضل زرار المفضلة بس هنا */
    .mobile-sticky-actions{
      display:flex;gap:8px;position:fixed;bottom:0;right:0;left:0;z-index:150;
      background:var(--card-bg);padding:10px 16px;padding-bottom:calc(10px + env(safe-area-inset-bottom));
      box-shadow:0 -4px 16px rgba(0,0,0,.08);align-items:center;
    }
    .msa-qty-stepper{
      display:flex;align-items:center;gap:0;height:46px;border:1px solid var(--border);border-radius:8px;flex-shrink:0;
    }
    .msa-qty-stepper button{width:32px;height:100%;font-size:16px;color:var(--navy);flex-shrink:0;}
    .msa-qty-stepper span{width:26px;text-align:center;font-size:13.5px;font-weight:700;flex-shrink:0;}
    .msa-cart-btn{
      flex:1.2;background:var(--orange);color:#fff;height:46px;border-radius:8px;
      font-size:13.5px;font-weight:700;display:flex;align-items:center;justify-content:center;gap:5px;padding:0 6px;
    }
    .msa-cart-btn svg{width:16px;height:16px;flex-shrink:0;}
    .msa-buy-btn{
      flex:1;background:var(--navy);color:#fff;height:46px;border-radius:8px;font-size:13.5px;font-weight:700;
    }
    body:has(.mobile-sticky-actions){padding-bottom:66px;} /* عشان الشريط الثابت مايغطّيش آخر محتوى في الصفحة، وده بس في الصفحات اللي فيها الشريط ده */
    body:has(.mobile-sticky-actions) .chat-fab{bottom:78px;} /* نرفع أيقونة الشات فوق الشريط الثابت عشان متتغطاش أو تتراكب معاه */
  }
  @media (max-width:640px){
    .product-title{font-size:19px;}
    .product-price-box .price{font-size:26px;}
  }

  /* ===== Cart toast notification ===== */
  .toast{
    position:fixed;bottom:24px;left:50%;transform:translateX(-50%) translateY(16px);
    background:var(--card-bg);border:1px solid var(--border);border-radius:10px;box-shadow:0 10px 30px rgba(0,0,0,.18);
    padding:14px 16px;display:flex;align-items:center;gap:12px;z-index:300;max-width:360px;width:calc(100% - 32px);
    opacity:0;pointer-events:none;transition:opacity .2s ease, transform .2s ease;
  }
  .toast.show{opacity:1;transform:translateX(-50%) translateY(0);pointer-events:auto;}
  .toast-icon{
    width:36px;height:36px;background:#E8F6EF;border-radius:50%;display:flex;
    align-items:center;justify-content:center;flex-shrink:0;
  }
  .toast-icon svg{width:18px;height:18px;color:var(--green);}
  .toast-body{flex:1;min-width:0;}
  .toast-body h5{font-size:13px;font-weight:700;margin-bottom:2px;}
  .toast-body p{font-size:12px;color:var(--text-muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
  .toast-action{
    font-size:12.5px;font-weight:700;color:#fff;background:var(--navy);padding:8px 14px;
    border-radius:6px;white-space:nowrap;flex-shrink:0;transition:background .15s;
  }
  .toast-action:hover{background:var(--navy-dark);}
  @media (max-width:480px){
    .toast{bottom:14px;padding:12px 14px;}
    .toast-body p{max-width:140px;}
  }

  /* ===== Category / Search page ===== */
  .listing-layout{display:grid;grid-template-columns:240px 1fr;gap:24px;align-items:start;}
  .filters-box{background:var(--card-bg);border:1px solid var(--border);border-radius:var(--radius);padding:18px;position:sticky;top:88px;}
  .filters-box h4{font-size:14.5px;font-weight:800;color:var(--navy);margin-bottom:16px;}
  .filter-group{margin-bottom:20px;padding-bottom:20px;border-bottom:1px solid var(--border);}
  .filter-group:last-child{border-bottom:none;margin-bottom:0;padding-bottom:0;}
  .filter-group h5{font-size:13px;font-weight:700;margin-bottom:12px;}
  .price-inputs{display:flex;align-items:center;gap:8px;}
  .price-inputs input{
    width:100%;border:1px solid var(--border);border-radius:6px;padding:8px 10px;
    font-family:inherit;font-size:13px;outline:none;color:var(--text);background:var(--card-bg);
  }
  .price-inputs input:focus{border-color:var(--navy);}
  .filter-apply-btn{
    width:100%;background:var(--navy);color:#fff;padding:9px 0;border-radius:6px;
    font-size:13px;font-weight:700;margin-top:10px;transition:background .15s;
  }
  .filter-apply-btn:hover{background:var(--navy-dark);}
  .filter-radio-list label{display:flex;align-items:center;gap:8px;font-size:13px;margin-bottom:10px;cursor:pointer;}
  .filter-radio-list label:last-child{margin-bottom:0;}
  .filter-radio-list input{width:15px;height:15px;accent-color:var(--orange);}
  .clear-filters-link{font-size:12px;color:var(--text-muted);text-decoration:underline;margin-top:12px;display:inline-block;}
  .clear-filters-link:hover{color:var(--orange);}

  .listing-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:18px;flex-wrap:wrap;gap:10px;}
  .listing-head h1{font-size:19px;font-weight:800;color:var(--navy);}
  .listing-count{font-size:12.5px;color:var(--text-muted);margin-top:2px;}
  .sort-select{
    border:1px solid var(--border);border-radius:6px;padding:9px 12px;font-family:inherit;
    font-size:13px;background:var(--card-bg);color:var(--text);outline:none;cursor:pointer;
  }
  .sort-select:focus{border-color:var(--navy);}

  .mobile-filter-toggle{display:none;}

  @media (max-width:860px){
    .listing-layout{grid-template-columns:1fr;}
    .filters-box{position:fixed;top:0;left:-300px;width:280px;height:100%;z-index:250;
      border-radius:0;overflow-y:auto;transition:left .25s ease;}
    .filters-box.open{left:0;}
    .mobile-filter-toggle{
      display:flex;align-items:center;gap:6px;border:1px solid var(--border);border-radius:6px;
      padding:9px 14px;font-size:13px;font-weight:700;background:var(--card-bg);
    }
    .mobile-filter-toggle svg{width:16px;height:16px;}
  }

  /* ===== Auth page (login/register) ===== */
  .auth-box{max-width:440px;margin:20px auto 60px;background:var(--card-bg);border:1px solid var(--border);border-radius:var(--radius);padding:28px;position:relative;overflow:hidden;}
  .auth-tabs{display:flex;border-bottom:1px solid var(--border);margin-bottom:24px;}
  .auth-tab{flex:1;padding:12px 0;font-size:14px;font-weight:700;color:var(--text-muted);border-bottom:2px solid transparent;}
  .auth-tab.active{color:var(--navy);border-bottom-color:var(--orange);}
  .auth-form .form-group{margin-bottom:16px;}
  .auth-form .place-order-btn{margin-top:6px;}

  /* ===== Account page ===== */
  .account-layout{display:grid;grid-template-columns:230px 1fr;gap:24px;align-items:start;}
  .account-sidebar{background:var(--card-bg);border:1px solid var(--border);border-radius:var(--radius);padding:20px;position:sticky;top:88px;}
  .account-user-card{text-align:center;padding-bottom:18px;margin-bottom:14px;border-bottom:1px solid var(--border);}
  .account-avatar{
    width:56px;height:56px;border-radius:50%;background:var(--navy);color:#fff;
    display:flex;align-items:center;justify-content:center;font-weight:800;font-size:22px;margin:0 auto 10px;
  }
  .account-user-card h4{font-size:14.5px;font-weight:700;margin-bottom:2px;}
  .account-user-card p{font-size:12px;color:var(--text-muted);}
  .account-nav a{
    display:flex;align-items:center;gap:10px;padding:11px 10px;border-radius:6px;
    font-size:13.5px;font-weight:600;color:var(--text);margin-bottom:4px;
  }
  .account-nav a svg{width:17px;height:17px;flex-shrink:0;}
  .account-nav a:hover, .account-nav a.active{background:var(--bg-soft);color:var(--navy);}
  .account-nav button.logout-btn{
    display:flex;align-items:center;gap:10px;padding:11px 10px;border-radius:6px;width:100%;
    font-size:13.5px;font-weight:600;color:#D64545;margin-top:8px;
  }
  .account-nav button.logout-btn:hover{background:#FDECEC;}
  .account-nav button.logout-btn svg{width:17px;height:17px;}

  .account-content-box{background:var(--card-bg);border:1px solid var(--border);border-radius:var(--radius);padding:24px;}
  .account-content-box h2{font-size:17px;font-weight:800;color:var(--navy);margin-bottom:18px;}

  .order-history-item{border:1px solid var(--border);border-radius:8px;padding:16px;margin-bottom:14px;}
  .order-history-head{display:flex;justify-content:space-between;align-items:flex-start;flex-wrap:wrap;gap:8px;margin-bottom:12px;padding-bottom:12px;border-bottom:1px dashed var(--border);}
  .order-history-head .order-num{font-size:13.5px;font-weight:800;color:var(--navy);}
  .order-history-head .order-date{font-size:12px;color:var(--text-muted);margin-top:2px;}
  .order-status-chip{font-size:11.5px;font-weight:700;padding:4px 10px;border-radius:20px;background:#FFF6EE;color:var(--orange);white-space:nowrap;}
  .order-history-items{font-size:12.5px;color:var(--text-muted);margin-bottom:10px;}
  .order-history-footer{display:flex;justify-content:space-between;align-items:center;}
  .order-history-footer .order-total{font-size:14.5px;font-weight:800;color:var(--navy);}
  .order-history-footer a{font-size:12.5px;font-weight:700;color:var(--navy);}
  .order-history-footer a:hover{color:var(--orange);}

  @media (max-width:860px){
    .account-layout{grid-template-columns:1fr;}
    .account-sidebar{
      position:static;width:auto;height:auto;box-shadow:none;border-radius:var(--radius);
      padding:16px 14px;
    }
    .account-user-card{
      display:flex;align-items:center;gap:12px;text-align:right;padding-bottom:14px;margin-bottom:14px;
    }
    .account-user-card .account-avatar{margin:0;width:44px;height:44px;font-size:17px;flex-shrink:0;}
    .account-user-card h4{font-size:14px;}
    .account-nav{display:flex;gap:8px;overflow-x:auto;padding-bottom:2px;}
    .account-nav a, .account-nav button.logout-btn{
      flex-shrink:0;flex-direction:column;gap:4px;justify-content:center;text-align:center;
      width:auto;min-width:76px;padding:10px 14px;margin-bottom:0;background:var(--bg-soft);white-space:nowrap;
    }
    .account-nav a.active{background:var(--navy);color:#fff;}
    .account-nav button.logout-btn{margin-top:0;background:#FDECEC;}
  }
  @media (min-width:861px){
    .account-mobile-toggle, .account-overlay{display:none;}
  }

  /* ===== Back to top ===== */
  .back-top{
    position:fixed;bottom:20px;left:20px;width:42px;height:42px;background:var(--navy);
    border-radius:50%;display:none;align-items:center;justify-content:center;box-shadow:var(--shadow);z-index:80;
  }
  .back-top svg{width:18px;height:18px;color:#fff;}
  .back-top.show{display:flex;}

  /* ===== Responsive ===== */
  @media (max-width:1024px){
    .cats-grid{grid-template-columns:repeat(4,1fr);}
    .products-grid{grid-template-columns:repeat(4,1fr);}
    .footer-grid{grid-template-columns:1fr 1fr;}
  }
  @media (max-width:860px){
    .cat-nav{display:none;}
    .menu-toggle{display:block;}
    .search-form{order:3;flex-basis:100%;max-width:none;margin-top:12px;}
    .header-inner{flex-wrap:wrap;height:auto;padding-top:16px !important;padding-bottom:14px !important;gap:14px;row-gap:0;}
    .header-actions{gap:20px;}
    .trust-bar .container{grid-template-columns:repeat(2,1fr);}
    .hero-slider{height:220px;}
    .slide-content h2{font-size:20px;}
    .slide-content p{display:none;}
  }
  @media (max-width:640px){
    .topbar{display:none;}
    .container{padding:0 18px;}
    .header-actions{gap:16px;}
    .cats-grid{grid-template-columns:repeat(3,1fr);}
    .products-grid{grid-template-columns:repeat(2,1fr);}
    .footer-grid{grid-template-columns:1fr 1fr;}
    .promo-strip{flex-direction:column;text-align:center;}
    .newsletter-form{flex-direction:column;}
  }

/* ===== Coupon box ===== */
.coupon-box{display:flex;gap:8px;margin-bottom:14px;}
.coupon-box input{
  flex:1;border:1px solid var(--border);border-radius:6px;padding:9px 12px;
  font-family:inherit;font-size:13px;outline:none;text-transform:uppercase;color:var(--text);background:var(--card-bg);
}
.coupon-box input:focus{border-color:var(--navy);}
.coupon-apply-btn{
  background:var(--navy);color:#fff;padding:0 16px;border-radius:6px;font-size:13px;font-weight:700;
  white-space:nowrap;transition:background .15s;
}
.coupon-apply-btn:hover{background:var(--navy-dark);}
.coupon-applied{
  display:flex;justify-content:space-between;align-items:center;background:#E8F6EF;
  border-radius:6px;padding:9px 12px;margin-bottom:14px;font-size:12.5px;color:var(--green);font-weight:700;
}
.coupon-applied button{color:#D64545;font-size:12px;font-weight:700;}
.coupon-error{font-size:12px;color:#D64545;margin-bottom:10px;}
.summary-row.discount span:last-child{color:var(--green);font-weight:700;}

/* ===== Order tracking page ===== */
.track-box{max-width:480px;margin:20px auto 60px;background:var(--card-bg);border:1px solid var(--border);border-radius:var(--radius);padding:28px;}
.track-result{max-width:600px;margin:24px auto 0;}
.track-timeline{display:flex;justify-content:space-between;margin:26px 0;position:relative;}
.track-timeline::before{
  content:'';position:absolute;top:16px;right:8%;left:8%;height:2px;background:var(--border);z-index:1;
}
.track-step{position:relative;z-index:2;display:flex;flex-direction:column;align-items:center;gap:8px;flex:1;}
.track-step .dot{
  width:32px;height:32px;border-radius:50%;background:var(--bg-soft);border:2px solid var(--border);
  display:flex;align-items:center;justify-content:center;
}
.track-step.done .dot{background:var(--green);border-color:var(--green);color:#fff;}
.track-step.current .dot{background:var(--orange);border-color:var(--orange);color:#fff;}
.track-step .dot svg{width:15px;height:15px;}
.track-step span{font-size:11px;color:var(--text-muted);text-align:center;}
.track-step.done span, .track-step.current span{color:var(--text);font-weight:700;}

/* ===== Address book ===== */
.address-card{border:1px solid var(--border);border-radius:8px;padding:16px;margin-bottom:12px;position:relative;}
.address-card.is-default{border-color:var(--orange);}
.address-default-badge{
  position:absolute;top:12px;left:12px;background:var(--orange);color:#fff;font-size:10.5px;
  font-weight:700;padding:2px 8px;border-radius:4px;
}
.address-card h5{font-size:13.5px;font-weight:700;margin-bottom:6px;}
.address-card p{font-size:12.5px;color:var(--text-muted);line-height:1.7;}
.address-card-actions{display:flex;gap:14px;margin-top:10px;}
.address-card-actions button{font-size:12px;font-weight:700;color:var(--navy);}
.address-card-actions button.danger{color:#D64545;}
.address-select-item{
  border:1px solid var(--border);border-radius:8px;padding:12px 14px;margin-bottom:8px;cursor:pointer;
  display:flex;align-items:flex-start;gap:10px;
}
.address-select-item.selected{border-color:var(--orange);background:#FFF6EE;}
.address-select-item input{margin-top:3px;accent-color:var(--orange);}

/* ===== Reviews (real) ===== */
.review-form-box{background:var(--bg-soft);border-radius:8px;padding:16px;margin-bottom:20px;}
.review-form-box h5{font-size:13.5px;font-weight:700;margin-bottom:10px;}
.star-input{display:flex;gap:4px;margin-bottom:12px;}
.star-input button{color:var(--border);}
.star-input button svg{width:24px;height:24px;}
.star-input button.active{color:var(--orange);}
.review-form-box textarea{
  width:100%;border:1px solid var(--border);border-radius:6px;padding:10px 12px;font-family:inherit;
  font-size:13px;min-height:80px;outline:none;margin-bottom:10px;resize:vertical;
}

/* ===== Sales chart ===== */
.sales-chart-wrap{padding:20px;}
.sales-chart-bars{display:flex;align-items:flex-end;gap:3px;height:160px;}
.sales-chart-bar{flex:1;background:var(--orange);border-radius:3px 3px 0 0;min-height:2px;position:relative;transition:opacity .15s;}
.sales-chart-bar:hover{opacity:.75;}
.sales-chart-labels{display:flex;justify-content:space-between;margin-top:8px;font-size:10.5px;color:var(--text-muted);}

/* ===== Banner admin form ===== */
.banner-edit-card{border:1px solid var(--border);border-radius:8px;padding:18px;margin-bottom:16px;}
.banner-edit-card h5{font-size:13px;font-weight:800;color:var(--navy);margin-bottom:14px;}

/* ===== Static content pages (about/terms/privacy/faq/contact...) ===== */
.static-page-content{max-width:820px;margin:0 auto;background:var(--card-bg);border:1px solid var(--border);border-radius:var(--radius);padding:32px;}
.static-page-content h1{font-size:20px;font-weight:800;color:var(--navy);margin-bottom:16px;}
.static-page-content h2{font-size:15.5px;font-weight:800;color:var(--navy);margin:24px 0 10px;}
.static-page-content h2:first-of-type{margin-top:0;}
.static-page-content p{font-size:13.5px;color:var(--text);line-height:1.9;margin-bottom:10px;}
.static-page-content ul{margin:10px 0 10px 0;padding-right:20px;}
.static-page-content li{font-size:13.5px;color:var(--text);line-height:1.9;margin-bottom:6px;list-style:disc;}
.static-page-content .updated-note{font-size:12px;color:var(--text-muted);margin-bottom:20px;}

.faq-item{border-bottom:1px solid var(--border);padding:16px 0;}
.faq-item:last-child{border-bottom:none;}
.faq-item summary{font-size:14px;font-weight:700;cursor:pointer;color:var(--navy);list-style:none;display:flex;justify-content:space-between;align-items:center;}
.faq-item summary::-webkit-details-marker{display:none;}
.faq-item summary::after{content:'+';font-size:20px;font-weight:400;color:var(--text-muted);}
.faq-item[open] summary::after{content:'−';}
.faq-item p{margin-top:10px;font-size:13.5px;color:var(--text-muted);line-height:1.8;}

.contact-grid{display:grid;grid-template-columns:1fr 1fr;gap:24px;}
.contact-info-item{display:flex;align-items:flex-start;gap:12px;margin-bottom:20px;}
.contact-info-item svg{width:20px;height:20px;color:var(--orange);flex-shrink:0;margin-top:2px;}
.contact-info-item h5{font-size:13.5px;font-weight:700;margin-bottom:3px;}
.contact-info-item p{font-size:12.5px;color:var(--text-muted);margin-bottom:0;}

.store-header{display:flex;align-items:center;gap:16px;background:var(--card-bg);border:1px solid var(--border);border-radius:var(--radius);padding:24px;margin-bottom:24px;}
.store-avatar{width:64px;height:64px;border-radius:50%;background:var(--navy);color:#fff;display:flex;align-items:center;justify-content:center;font-weight:800;font-size:26px;flex-shrink:0;}
.store-header h1{font-size:18px;font-weight:800;color:var(--navy);margin-bottom:4px;}
.store-header p{font-size:12.5px;color:var(--text-muted);}

@media (max-width:768px){
  .contact-grid{grid-template-columns:1fr;}
}

/* ===== Image fade-in (تحميل هادي بدل النطة المفاجئة) ===== */
.fade-img{opacity:0;transition:opacity .35s ease;background:var(--bg-soft);}
.fade-img.loaded{opacity:1;}

/* ===== Skeleton loading (شكل منظم أثناء تحميل البيانات) ===== */
@keyframes skeleton-pulse{
  0%{opacity:1;}
  50%{opacity:.5;}
  100%{opacity:1;}
}
.skeleton{background:var(--bg-soft);animation:skeleton-pulse 1.4s ease-in-out infinite;border-radius:6px;}
.skeleton-card{
  border:1px solid var(--border);border-radius:var(--radius);overflow:hidden;background:var(--card-bg);
}
.skeleton-card .skeleton-thumb{aspect-ratio:1/1;background:var(--bg-soft);animation:skeleton-pulse 1.4s ease-in-out infinite;}
.skeleton-card .skeleton-body{padding:10px 12px 12px;}
.skeleton-card .skeleton-line{height:11px;margin-bottom:8px;animation:skeleton-pulse 1.4s ease-in-out infinite;background:var(--bg-soft);border-radius:4px;}
.skeleton-card .skeleton-line.w-70{width:70%;}
.skeleton-card .skeleton-line.w-40{width:40%;}
.skeleton-card .skeleton-line.w-100{width:100%;height:16px;margin-top:4px;}

.skeleton-row{height:44px;margin-bottom:8px;}

/* ===== Live Chat Widget ===== */
.chat-fab{
  position:fixed;bottom:22px;right:22px;width:56px;height:56px;border-radius:50%;
  background:linear-gradient(135deg, var(--navy), var(--orange));color:#fff;display:flex;align-items:center;justify-content:center;
  box-shadow:0 6px 20px rgba(18,59,94,.35);z-index:400;transition:transform .15s ease;
}
.chat-fab:hover{transform:scale(1.06);}
.chat-fab svg{width:26px;height:26px;}
.chat-fab .chat-fab-badge{
  position:absolute;top:-2px;right:-2px;background:var(--orange);color:#fff;font-size:11px;font-weight:800;
  width:20px;height:20px;border-radius:50%;display:flex;align-items:center;justify-content:center;
  box-shadow:0 0 0 2px #fff;
}

.chat-panel{
  position:fixed;bottom:90px;right:22px;width:340px;max-width:calc(100vw - 32px);height:480px;max-height:70vh;
  background:var(--card-bg);border-radius:14px;box-shadow:0 16px 48px rgba(0,0,0,.22);z-index:401;
  display:flex;flex-direction:column;overflow:hidden;border:1px solid var(--border);
  opacity:0;transform:translateY(16px) scale(.96);pointer-events:none;
  transition:opacity .22s ease, transform .22s ease;
}
.chat-panel.open{opacity:1;transform:translateY(0) scale(1);pointer-events:auto;}
.chat-panel-header{
  background:var(--navy);color:#fff;padding:14px 16px;display:flex;align-items:center;justify-content:space-between;flex-shrink:0;
}
.chat-panel-header-info{display:flex;align-items:center;gap:10px;}
.chat-panel-header-avatar{
  width:34px;height:34px;border-radius:50%;background:var(--card-bg);display:flex;align-items:center;justify-content:center;flex-shrink:0;
}
.chat-panel-header-avatar img{width:22px;}
.chat-panel-header h5{font-size:13.5px;font-weight:800;}
.chat-panel-header p{font-size:11px;opacity:.85;display:flex;align-items:center;gap:4px;}
.chat-panel-header p::before{content:'';width:6px;height:6px;border-radius:50%;background:#3DD68C;display:inline-block;}
.chat-panel-close{color:#fff;opacity:.85;width:26px;height:26px;display:flex;align-items:center;justify-content:center;}
.chat-end-btn-text{
  font-size:11px;font-weight:700;color:#fff;background:rgba(255,255,255,.18);padding:6px 11px;border-radius:14px;white-space:nowrap;
}
.chat-end-btn-text:hover{background:rgba(255,255,255,.28);}
.chat-panel-close:hover{opacity:1;}
.chat-panel-close svg{width:18px;height:18px;}

.chat-panel-body{flex:1;overflow-y:auto;overflow-x:hidden;padding:14px;background:var(--bg-soft);display:flex;flex-direction:column;gap:10px;}
.chat-msg{max-width:80%;padding:9px 13px;border-radius:14px;font-size:13px;line-height:1.6;word-break:break-word;}
.chat-msg.customer{align-self:flex-start;background:var(--navy);color:#fff;border-bottom-left-radius:4px;}
.chat-msg.admin{align-self:flex-end;background:var(--card-bg);color:var(--text);border:1px solid var(--border);border-bottom-right-radius:4px;}
.chat-msg-time{font-size:9.5px;opacity:.65;margin-top:3px;display:block;}

.chat-welcome{text-align:center;padding:20px 10px;color:var(--text-muted);font-size:12.5px;}
.chat-welcome svg{width:34px;height:34px;color:var(--navy);margin:0 auto 10px;}

.chat-panel-input-row{
  display:flex;gap:8px;padding:10px;border-top:1px solid var(--border);background:var(--card-bg);flex-shrink:0;
}
.chat-panel-input-row input{
  flex:1;border:1px solid var(--border);border-radius:20px;padding:9px 15px;font-family:inherit;
  font-size:13px;outline:none;color:#22262B;
}
.chat-panel-input-row input:focus{border-color:var(--navy);}
.chat-panel-send-btn{
  width:38px;height:38px;border-radius:50%;background:var(--orange);color:#fff;flex-shrink:0;
  display:flex;align-items:center;justify-content:center;transition:background .15s;
}
.chat-panel-send-btn:hover{background:var(--orange-dark);}
.chat-panel-send-btn svg{width:16px;height:16px;transform:scaleX(-1);}

.chat-prestart{padding:20px;display:flex;flex-direction:column;gap:12px;flex:1;background:var(--bg-soft);}
.chat-prestart p{font-size:12.5px;color:var(--text-muted);text-align:center;}
.chat-prestart input{
  border:1px solid var(--border);border-radius:8px;padding:10px 14px;font-family:inherit;font-size:13px;outline:none;color:#22262B;
}
.chat-prestart input:focus{border-color:var(--navy);}
.chat-prestart input:disabled{background:var(--bg-soft);color:var(--text);font-weight:700;cursor:default;}
.chat-prestart button{
  background:var(--navy);color:#fff;padding:10px 0;border-radius:8px;font-size:13.5px;font-weight:700;
}

@media (max-width:480px){
  .chat-panel{right:12px;bottom:80px;width:calc(100vw - 24px);}
  .chat-fab{right:12px;bottom:16px;width:52px;height:52px;}
}

/* ===== Typing indicator dots ===== */
.typing-dots{display:inline-flex;gap:2px;margin-right:4px;vertical-align:middle;}
.typing-dots span{
  width:4px;height:4px;border-radius:50%;background:currentColor;display:inline-block;
  animation:typing-bounce 1.2s infinite ease-in-out;
}
.typing-dots span:nth-child(2){animation-delay:.15s;}
.typing-dots span:nth-child(3){animation-delay:.3s;}
@keyframes typing-bounce{
  0%, 60%, 100%{transform:translateY(0);opacity:.4;}
  30%{transform:translateY(-3px);opacity:1;}
}
.chat-typing-bubble{
  border-radius:14px;padding:10px 14px;display:inline-flex;align-items:center;width:fit-content;
}
.chat-typing-bubble.admin{align-self:flex-end;background:var(--card-bg);border:1px solid var(--border);border-bottom-right-radius:4px;color:var(--text-muted);}
.chat-typing-bubble.customer{align-self:flex-start;background:var(--navy);border-bottom-left-radius:4px;color:rgba(255,255,255,.8);}

/* ===== Chat rating stars ===== */
.chat-rating-stars{display:flex;gap:6px;justify-content:center;margin:4px 0 10px;}
.chat-star-btn{color:var(--border);transition:color .15s,transform .1s;}
.chat-star-btn:hover{transform:scale(1.1);}
.chat-star-btn svg{width:28px;height:28px;}
.chat-star-btn.active{color:var(--orange);}

/* ===== Quick replies (admin chat) - لوحة بحث وفئات زي المواقع الكبيرة ===== */
.quick-reply-toggle-btn{
  flex-shrink:0;width:38px;height:38px;border-radius:50%;background:var(--bg-soft);border:1px solid var(--border);
  color:var(--navy);display:flex;align-items:center;justify-content:center;transition:background .15s;
}
.quick-reply-toggle-btn:hover{background:#EAF2FB;}
.quick-reply-toggle-btn svg{width:18px;height:18px;}

.quick-reply-panel{
  position:absolute;bottom:100%;right:14px;left:14px;max-width:420px;margin-inline-start:auto;
  background:var(--card-bg);border:1px solid var(--border);border-radius:14px;box-shadow:0 -8px 28px rgba(0,0,0,.14);
  z-index:60;max-height:360px;display:flex;flex-direction:column;
  opacity:0;visibility:hidden;transform:translateY(8px);transition:opacity .15s ease,transform .15s ease,visibility .15s;
}
.quick-reply-panel.show{opacity:1;visibility:visible;transform:translateY(-6px);}
.quick-reply-search-wrap{padding:10px;border-bottom:1px solid var(--border);flex-shrink:0;}
.quick-reply-search-wrap input{
  width:100%;padding:8px 12px;border:1px solid var(--border);border-radius:8px;font-family:inherit;font-size:12.5px;background:var(--bg-soft);
}
.quick-reply-categories{display:flex;gap:6px;padding:8px 10px;overflow-x:auto;overflow-y:hidden;border-bottom:1px solid var(--border);flex-shrink:0;}
.quick-reply-category-chip{
  flex-shrink:0;background:var(--bg-soft);border:1px solid var(--border);border-radius:14px;padding:5px 12px;
  font-size:11px;font-weight:700;color:var(--text-muted);white-space:nowrap;
}
.quick-reply-category-chip.active{background:var(--navy);color:#fff;border-color:var(--navy);}
.quick-reply-list{overflow-y:auto;overflow-x:hidden;flex:1;padding:6px;}
.quick-reply-item{
  display:block;width:100%;text-align:right;padding:10px 12px;border-radius:8px;font-size:12.5px;line-height:1.6;color:var(--text);
}
.quick-reply-item:hover{background:var(--bg-soft);}
.quick-reply-item .qr-category-label{display:block;font-size:10px;font-weight:700;color:var(--orange);margin-bottom:3px;}
.quick-reply-empty{padding:24px;text-align:center;font-size:12px;color:var(--text-muted);}

@media (max-width:860px){
  .quick-reply-panel{right:8px;left:8px;max-width:none;max-height:50vh;}
}

/* ===== Chat professional polish ===== */
.chat-icon-btn{
  width:26px;height:26px;display:flex;align-items:center;justify-content:center;color:#fff;opacity:.85;
}
.chat-icon-btn:hover{opacity:1;}
.chat-icon-btn svg{width:17px;height:17px;}

.chat-msg-row{display:flex;gap:8px;align-items:flex-end;}
.chat-msg-row.admin{flex-direction:row-reverse;}
.chat-msg-avatar{
  width:24px;height:24px;border-radius:50%;background:var(--navy);color:#fff;font-size:11px;font-weight:800;
  display:flex;align-items:center;justify-content:center;flex-shrink:0;margin-bottom:2px;
}
.chat-msg-avatar.bot{background:var(--orange);}
.chat-msg-avatar.bot svg{width:14px;height:14px;}
.chat-msg-col{display:flex;flex-direction:column;max-width:80%;}
.chat-msg-row.admin .chat-msg-col{align-items:flex-end;}
.chat-msg-row.customer .chat-msg-col{align-items:flex-start;}
.chat-staff-name-label{font-size:10.5px;font-weight:700;color:var(--text-muted);margin-bottom:2px;padding:0 4px;}
.chat-msg-row .chat-msg{max-width:none;}

/* ===== بطاقة تأكيد منتج جوا الشات (من رد البوت) ===== */
.chat-product-card{
  background:var(--card-bg);border:1px solid var(--border);border-radius:10px;overflow:hidden;margin-top:6px;
  width:220px;max-width:70vw;
}
.chat-product-card img{width:100%;height:110px;object-fit:cover;background:var(--bg-soft);display:block;}
.chat-product-card-info{padding:8px 10px 4px;}
.chat-product-card-info strong{display:block;font-size:12px;color:var(--text);margin-bottom:2px;line-height:1.4;}
.chat-product-card-info span{font-size:12.5px;font-weight:800;color:var(--navy);}
.chat-product-card-actions{display:flex;gap:6px;padding:8px 10px 10px;}
.chat-product-yes{
  flex:1;text-align:center;background:var(--navy);color:#fff;font-size:11.5px;font-weight:700;
  padding:7px 0;border-radius:6px;
}
.chat-product-yes:hover{background:var(--navy-dark);}
.chat-product-no{
  flex:1;background:var(--bg-soft);color:var(--text);font-size:11.5px;font-weight:700;
  padding:7px 0;border-radius:6px;
}
.chat-product-no:hover{background:var(--border);}

.chat-msg.pending{opacity:.55;}

.chat-date-sep{display:flex;align-items:center;justify-content:center;margin:6px 0;}
.chat-date-sep span{
  background:rgba(18,59,94,.08);color:var(--text-muted);font-size:11px;font-weight:700;
  padding:3px 12px;border-radius:12px;
}

.chat-read-receipt{font-size:10px;color:var(--text-muted);margin-top:2px;padding:0 4px;}
.chat-read-receipt.seen{color:#2E6FCF;}

.chat-error-banner{
  background:#FDECEC;color:#D64545;font-size:11.5px;text-align:center;padding:6px;flex-shrink:0;
}

/* ===== Chat screen fade transition (بدل التبديل المفاجئ بين الشاشات) ===== */
.screen-fade-in{animation:chatScreenFadeIn .25s ease;}
@keyframes chatScreenFadeIn{
  from{opacity:0;transform:translateY(6px);}
  to{opacity:1;transform:translateY(0);}
}

/* ===== Chat notification toast (فقاعة إشعار عند وصول رسالة والشات مقفول) ===== */
.chat-toast{
  position:fixed;bottom:90px;right:22px;width:300px;max-width:calc(100vw - 44px);
  background:var(--card-bg);border-radius:14px;box-shadow:0 12px 36px rgba(0,0,0,.2);border:1px solid var(--border);
  padding:12px;display:flex;gap:10px;align-items:flex-start;z-index:398;cursor:pointer;
  opacity:0;transform:translateY(14px) scale(.96);pointer-events:none;transition:opacity .25s ease,transform .25s ease;
}
.chat-toast.show{opacity:1;transform:translateY(0) scale(1);pointer-events:auto;animation:chatToastPop .35s ease;}
@keyframes chatToastPop{
  0%{opacity:0;transform:translateY(20px) scale(.9);}
  60%{opacity:1;transform:translateY(-3px) scale(1.02);}
  100%{opacity:1;transform:translateY(0) scale(1);}
}
.chat-toast-avatar{
  width:34px;height:34px;border-radius:50%;background:var(--navy);color:#fff;font-weight:800;font-size:14px;
  display:flex;align-items:center;justify-content:center;flex-shrink:0;
}
.chat-toast-body{flex:1;min-width:0;}
.chat-toast-body strong{display:block;font-size:12px;color:var(--navy);margin-bottom:2px;}
.chat-toast-body span{display:block;font-size:12.5px;color:var(--text);line-height:1.5;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;}
.chat-toast-close{
  width:20px;height:20px;flex-shrink:0;color:var(--text-muted);display:flex;align-items:center;justify-content:center;
}
.chat-toast-close svg{width:13px;height:13px;}
.chat-toast-close:hover{color:var(--text);}

@media (max-width:480px){
  .chat-toast{right:12px;bottom:80px;width:calc(100vw - 24px);}
}

/* ===== Chat end-conversation confirm modal (بديل نافذة confirm الافتراضية) ===== */
.chat-confirm-overlay{
  position:absolute;inset:0;background:rgba(18,59,94,.45);border-radius:14px;z-index:410;
  display:flex;align-items:center;justify-content:center;padding:20px;
  opacity:0;pointer-events:none;transition:opacity .2s ease;
}
.chat-confirm-overlay.show{opacity:1;pointer-events:auto;}
.chat-confirm-box{
  background:var(--card-bg);border-radius:12px;padding:22px 20px;text-align:center;width:100%;max-width:260px;
  transform:scale(.92);transition:transform .2s ease;box-shadow:0 10px 30px rgba(0,0,0,.2);
}
.chat-confirm-overlay.show .chat-confirm-box{transform:scale(1);}
.chat-confirm-box svg{width:34px;height:34px;color:var(--orange);margin:0 auto 10px;}
.chat-confirm-box p{font-size:13.5px;font-weight:700;color:var(--text);margin-bottom:16px;line-height:1.6;}
.chat-confirm-actions{display:flex;flex-direction:column;gap:8px;}
.chat-confirm-end{
  background:#D64545;color:#fff;padding:10px 0;border-radius:8px;font-size:13px;font-weight:700;
}
.chat-confirm-end:hover{background:#C13A3A;}
.chat-confirm-stay{
  background:var(--bg-soft);color:var(--text);padding:10px 0;border-radius:8px;font-size:13px;font-weight:700;
}
.chat-confirm-stay:hover{background:var(--border);}

/* ===== Compact mobile header (بيظهر بس عند السكرول لتحت على الموبايل) ===== */
.compact-mobile-header{
  display:none; /* مخفي تمامًا على الديسكتوب */
}
@media (max-width:768px){
  /* الهيدر الأصلي كان متثبّت (Sticky) دايمًا، ده كان بيتعارض مع الشريط المضغوط الجديد
     فبنشيل التثبيت بتاعه على الموبايل بس، ونسيب مهمة "البقاء ظاهر أثناء السكرول" للشريط المضغوط بس */
  header.main-header{position:static;}

  .compact-mobile-header{
    display:flex;align-items:center;gap:8px;
    position:fixed;top:0;right:0;left:0;z-index:390;
    background:var(--navy);padding:8px 12px;box-shadow:0 4px 14px rgba(0,0,0,.18);
    transform:translateY(-100%);opacity:0;pointer-events:none;
    transition:transform .25s ease,opacity .25s ease;
  }
  .compact-mobile-header.show{transform:translateY(0);opacity:1;pointer-events:auto;}

  .compact-menu-btn{
    width:34px;height:34px;flex-shrink:0;color:#fff;display:flex;align-items:center;justify-content:center;
    background:rgba(255,255,255,.12);border-radius:8px;
  }
  .compact-menu-btn svg{width:18px;height:18px;}

  .compact-search-form{
    flex:1;min-width:0;display:flex;align-items:center;background:var(--card-bg);border-radius:8px;overflow:hidden;height:34px;
  }
  .compact-search-form input{
    flex:1;min-width:0;border:none;outline:none;padding:0 10px;font-family:inherit;font-size:12.5px;background:transparent;
  }
  .compact-search-form button{
    width:34px;height:34px;flex-shrink:0;display:flex;align-items:center;justify-content:center;color:var(--text-muted);
  }
  .compact-search-form button svg{width:16px;height:16px;}

  .compact-actions{display:flex;align-items:center;gap:4px;flex-shrink:0;}
  .compact-icon-btn{
    position:relative;width:34px;height:34px;flex-shrink:0;color:#fff;display:flex;align-items:center;justify-content:center;
    background:rgba(255,255,255,.12);border-radius:8px;
  }
  .compact-icon-btn svg{width:17px;height:17px;}
  .compact-badge{
    position:absolute;top:-4px;left:-4px;background:var(--orange);color:#fff;font-size:9px;font-weight:800;
    width:15px;height:15px;border-radius:50%;display:flex;align-items:center;justify-content:center;
    box-shadow:0 0 0 2px var(--navy);
  }
}

/* ===== بطاقة الرصيد الرئيسية في لوحة المسوّق ===== */
.balance-hero{
  background:linear-gradient(135deg, var(--navy), var(--navy-dark));
  border-radius:14px;padding:22px 24px;display:flex;align-items:center;justify-content:space-between;
  flex-wrap:wrap;gap:14px;color:#fff;
}
.balance-hero-content .label{display:block;font-size:13px;opacity:.85;margin-bottom:6px;}
.balance-hero-content .amount{font-size:34px;font-weight:800;}
.balance-hero-content .amount small{font-size:16px;font-weight:600;opacity:.85;}
.balance-hero-btn{
  background:var(--orange);color:#fff;font-size:13.5px;font-weight:700;padding:11px 22px;border-radius:8px;
  flex-shrink:0;
}
.balance-hero-btn:hover{background:#E07419;}

/* ===== زرار مشاركة واتساب سريع بجانب زرار النسخ ===== */
.whatsapp-share-btn{
  width:34px;height:34px;flex-shrink:0;border-radius:6px;background:#25D366;color:#fff;
  display:flex;align-items:center;justify-content:center;
}
.whatsapp-share-btn svg{width:17px;height:17px;}
.whatsapp-share-btn:hover{background:#1DA851;}

/* ===== نظام النوافذ المنبثقة الموحّد (Toast + Confirm) للوحات التحكم ===== */
.dash-toast-stack{
  position:fixed;top:20px;left:50%;transform:translateX(-50%);z-index:600;
  display:flex;flex-direction:column;gap:8px;align-items:center;pointer-events:none;
}
.dash-toast{
  display:flex;align-items:center;gap:8px;background:#1C2B3A;color:#fff;font-size:13px;font-weight:600;
  padding:11px 18px;border-radius:10px;box-shadow:0 8px 24px rgba(0,0,0,.22);
  opacity:0;transform:translateY(-14px) scale(.96);transition:opacity .25s ease,transform .25s ease;
  max-width:90vw;
}
.dash-toast.show{opacity:1;transform:translateY(0) scale(1);}
.dash-toast.error{background:#D64545;}
.dash-toast-icon{width:18px;height:18px;flex-shrink:0;display:flex;}
.dash-toast-icon svg{width:100%;height:100%;}

.dash-confirm-overlay{
  position:fixed;inset:0;background:rgba(18,59,94,.5);z-index:601;
  display:flex;align-items:center;justify-content:center;padding:20px;
  opacity:0;pointer-events:none;transition:opacity .2s ease;
}
.dash-confirm-overlay.show{opacity:1;pointer-events:auto;}
.dash-confirm-box{
  background:var(--card-bg);border-radius:14px;padding:26px 24px;text-align:center;width:100%;max-width:320px;
  transform:scale(.92);transition:transform .2s ease;box-shadow:0 16px 44px rgba(0,0,0,.24);
}
.dash-confirm-overlay.show .dash-confirm-box{transform:scale(1);}
.dash-confirm-icon{width:42px;height:42px;margin:0 auto 12px;color:var(--orange);}
.dash-confirm-icon svg{width:100%;height:100%;}
.dash-confirm-msg{font-size:14px;font-weight:700;color:var(--text);margin-bottom:20px;line-height:1.7;}
.dash-confirm-actions{display:flex;gap:10px;}
.dash-confirm-ok, .dash-confirm-cancel{flex:1;padding:11px 0;border-radius:8px;font-size:13.5px;font-weight:700;}
.dash-confirm-ok{background:var(--navy);color:#fff;}
.dash-confirm-ok:hover{background:var(--navy-dark);}
.dash-confirm-ok.danger{background:#D64545;}
.dash-confirm-ok.danger:hover{background:#C13A3A;}
.dash-confirm-cancel{background:var(--bg-soft);color:var(--text);}
.dash-confirm-cancel:hover{background:var(--border);}

/* ===== حركات دخول ناعمة للبطاقات في لوحات التحكم ===== */
.admin-card, .admin-form-card, .stat-card, .balance-hero{
  animation:dashCardIn .35s ease both;
}
.stat-card:nth-child(2){animation-delay:.05s;}
.stat-card:nth-child(3){animation-delay:.1s;}
.stat-card:nth-child(4){animation-delay:.15s;}
@keyframes dashCardIn{
  from{opacity:0;transform:translateY(10px);}
  to{opacity:1;transform:translateY(0);}
}
.stat-card, .my-product-row, .browse-card, .pick-product-row{
  transition:transform .15s ease, box-shadow .15s ease;
}
.stat-card:hover{transform:translateY(-2px);box-shadow:0 8px 20px rgba(18,59,94,.08);}
.browse-card:hover{transform:translateY(-3px);box-shadow:0 10px 24px rgba(18,59,94,.1);}

/* ===== دائرة تحميل في نص الشاشة بتظهر عند التنقل لو استغرق وقت محسوس (موجودة في كل صفحات الموقع) ===== */
.page-loader-overlay{
  position:fixed;top:0;right:0;bottom:0;left:0;background:var(--card-bg);z-index:230;
  display:flex;align-items:center;justify-content:center;
  opacity:0;pointer-events:none;transition:opacity .28s ease;
}
.page-loader-overlay.show{opacity:1;pointer-events:auto;}
.page-loader-spinner{
  width:46px;height:46px;border-radius:50%;
  border:4px solid var(--bg-soft);
  border-top-color:var(--navy);
  border-right-color:var(--orange);
  animation:pageLoaderSpin .7s linear infinite;
}
@keyframes pageLoaderSpin{to{transform:rotate(360deg);}}

/* ===== طبقة تظليل تظهر فوق فورم الدخول/التسجيل بس (مش الصفحة كلها) وقت الانتقال بينهم ===== */
.auth-card-loader{
  position:absolute;inset:0;background:rgba(255,255,255,.8);border-radius:inherit;
  display:flex;align-items:center;justify-content:center;z-index:10;
  opacity:0;pointer-events:none;transition:opacity .15s ease;
}
.auth-card-loader.show{opacity:1;pointer-events:auto;}
.auth-card-loader .page-loader-spinner{width:34px;height:34px;border-width:3px;}

/* ===== قائمة منسدلة مخصصة بتصميم الموقع بدل شكل المتصفح الافتراضي ===== */
.custom-select-wrapper{position:relative;width:100%;}
.custom-select-hidden-native{
  position:absolute!important;opacity:0!important;pointer-events:none!important;
  width:1px!important;height:1px!important;overflow:hidden;
}
.custom-select-trigger{
  width:100%;display:flex;align-items:center;justify-content:space-between;
  border:1px solid var(--border);border-radius:6px;padding:10px 12px;
  font-family:inherit;font-size:13.5px;font-weight:600;background:var(--card-bg);color:var(--text);
  cursor:pointer;text-align:right;
}
.custom-select-trigger:disabled{opacity:.6;cursor:not-allowed;}
.custom-select-trigger.open{border-color:var(--navy);}
.custom-select-value{flex:1;text-align:right;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.custom-select-chevron{width:16px;height:16px;color:var(--text-muted);flex-shrink:0;margin-right:8px;transition:transform .22s cubic-bezier(.16,1,.3,1);}
.custom-select-trigger.open .custom-select-chevron{transform:rotate(180deg);}
.custom-select-panel{
  position:fixed;background:var(--card-bg);
  border:1px solid var(--border);border-radius:10px;box-shadow:0 10px 28px rgba(0,0,0,.14);
  max-height:240px;overflow-y:auto;z-index:400;padding:6px;
  opacity:0;visibility:hidden;transform:translateY(-8px) scale(.97);transform-origin:top center;
  transition:opacity .22s cubic-bezier(.16,1,.3,1),transform .22s cubic-bezier(.16,1,.3,1),visibility .22s;
}
.custom-select-panel.show{opacity:1;visibility:visible;transform:translateY(0) scale(1);}
.custom-select-option{
  display:block;width:100%;text-align:right;padding:10px 12px;font-size:13.5px;font-weight:600;
  color:var(--text);border-radius:6px;background:none;border:none;font-family:inherit;
}
.custom-select-option:hover{background:var(--bg-soft);}
.custom-select-option.selected{background:#FFF3E6;color:var(--orange);}

/* لما تكون جوا حقل بأيقونة، بس نضيف مسافة يمين كافية عشان الأيقونة الرايدة متتلخبطش مع النص */
.input-with-icon .custom-select-wrapper{flex:1;}
.input-with-icon .custom-select-trigger{padding-right:36px;}

/* ===== شاشة تحميل الموقع (تظهر فورًا وقت فتح أي صفحة لحد ما المحتوى يجهز) ===== */
html.no-splash .site-splash-loader{display:none !important;} /* لو التاب شاف الشاشة قبل كده، مانرسمهاش خالص من الأساس */
.site-splash-loader{
  position:fixed;inset:0;z-index:99999;background:#fff;
  display:flex;flex-direction:column;align-items:center;justify-content:center;gap:18px;
  opacity:1;transition:opacity .3s ease;
}
.site-splash-loader.hide{opacity:0;pointer-events:none;}
.site-splash-loader img{width:110px;animation:splashPulse 1.4s ease-in-out infinite;}
.site-splash-dots{display:flex;gap:7px;}
.site-splash-dots span{
  width:9px;height:9px;border-radius:50%;background:var(--orange);
  animation:splashDotBounce 1s ease-in-out infinite;
}
.site-splash-dots span:nth-child(2){animation-delay:.15s;}
.site-splash-dots span:nth-child(3){animation-delay:.3s;}
@keyframes splashPulse{0%,100%{transform:scale(1);opacity:1;}50%{transform:scale(1.06);opacity:.85;}}
@keyframes splashDotBounce{0%,80%,100%{transform:translateY(0);opacity:.5;}40%{transform:translateY(-8px);opacity:1;}}

/* ===== تأثير ظهور ناعم لأي محتوى بيستبدل سكيليتون تحميل، بيتضاف تلقائي عن طريق skeleton-fade.js ===== */
.content-fade-in{animation:contentFadeIn .35s ease both;}
@keyframes contentFadeIn{from{opacity:0;transform:translateY(4px);}to{opacity:1;transform:translateY(0);}}

/* ===== منع سفاري في الآيفون من عمل زوم تلقائي لما تدوس على أي حقل إدخال ===== */
/* السبب إن أي حقل خطه أصغر من 16px بيخلي سفاري يكبّر الصفحة تلقائيًا وقت الكتابة فيه، فبنفرض 16px بالحد الأدنى على أي حقل في الموقع كله وقت الموبايل */
@media (max-width:768px){
  input, select, textarea{font-size:16px !important;}
}
