
* {
  box-sizing: border-box;
}

:root {
  --black: #101010;
  --ink: #181818;
  --muted: #777;
  --paper: #f5f3ef;
  --line: #e4e0d9;
  --accent: #c9a875;
  --zaat-gold: #c9a875;
  --zaat-gold-deep: #a78650;
  --zaat-black: #101010;
  --zaat-cream: #f5f1e9;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: 'Cairo', sans-serif;
}

button,
input,
select,
textarea {
  font: inherit;
}

.announcement {
  text-align: center;
  background: var(--black);
  color: #eee;
  padding: 8px;
  font-size: 11px;
  letter-spacing: 1.5px;
}

.site-header {
  min-height: 78px;
  padding: 0 6vw;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--black);
  text-decoration: none;
  font-size: 17px;
  font-weight: 900;
  letter-spacing: 1px;
}

.brand-mark {
  width: 35px;
  height: 35px;
  border: 1px solid var(--black);
  display: grid;
  place-items: center;
  font-family: Georgia, serif;
  font-size: 22px;
}

.brand-light {
  font-weight: 400;
  color: #777;
}

.site-header nav {
  display: flex;
  align-items: center;
  gap: 30px;
}

.site-header nav a,
footer > a:last-child {
  color: #333;
  text-decoration: none;
  font-size: 13px;
}

.site-header nav a {
  position: relative;
  padding: 10px 2px;
  font-weight: 700;
  transition: color .25s ease;
}

.site-header nav a::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 2px;
  width: 0;
  height: 2px;
  background: var(--zaat-gold);
  transition: width .25s ease;
}

.site-header nav a:hover {
  color: var(--zaat-gold-deep);
}

.site-header nav a:hover::after {
  width: 100%;
}

/* زر السلة */

.cart-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 45px;
  padding: 8px 18px;
  border: 1px solid var(--zaat-black);
  border-radius: 5px;
  background: var(--zaat-black);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  transition: all .25s ease;
}

.cart-trigger:hover {
  background: var(--zaat-gold);
  color: var(--zaat-black);
  border-color: var(--zaat-gold);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(167,134,80,.2);
}

.cart-trigger b {
  display: inline-grid;
  place-items: center;
  min-width: 23px;
  min-height: 23px;
  margin: 0;
  padding: 2px 6px;
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 50%;
  background: var(--zaat-gold);
  color: var(--zaat-black);
  font-size: 11px;
}

/* البانر الرئيسي */

.hero {
  background: #171717;
  color: #fff;
  min-height: 590px;
  padding: 80px 9vw;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  overflow: hidden;
}

.eyebrow {
  font-size: 10px;
  letter-spacing: 3px;
  color: var(--accent);
  font-weight: 700;
}

.hero h1 {
  font-size: clamp(48px, 7vw, 88px);
  line-height: 1.2;
  margin: 18px 0;
  font-weight: 900;
}

.hero h1 em,
.about h2 em {
  font-style: normal;
  color: var(--accent);
}

.hero p {
  color: #b8b8b8;
  max-width: 390px;
  font-size: 14px;
  line-height: 2;
  margin-bottom: 30px;
}

/* الأزرار */

.button {
  position: relative;
  overflow: hidden;
  min-height: 48px;
  padding: 13px 25px;
  border: 1px solid var(--zaat-gold);
  border-radius: 5px;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 22px;
  font-weight: 800;
  font-size: 13px;
  transition: all .25s ease;
}

.button::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--zaat-gold);
  transform: translateX(102%);
  transition: transform .3s ease;
  z-index: 0;
}

.button:hover::before {
  transform: translateX(0);
}

.button-light {
  background: var(--zaat-cream);
  color: var(--zaat-black);
}

.button-dark {
  background: var(--zaat-black);
  color: #fff;
  border-color: var(--zaat-black);
}

.button:hover {
  color: var(--zaat-black);
  border-color: var(--zaat-gold);
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(0,0,0,.16);
}

.button:active,
.cart-trigger:active,
.add-btn:active {
  transform: scale(.97);
}

/* شعار البانر */

.hero-art {
  height: 390px;
  position: relative;
  display: grid;
  place-items: center;
}

.hero-circle {
  width: min(34vw, 360px);
  aspect-ratio: 1;
  border: 1px solid #78664c;
  border-radius: 50%;
  box-shadow: 0 0 0 32px #ffffff08, 0 0 0 70px #ffffff05;
  position: absolute;
}

.hero-label {
  font-family: Georgia, serif;
  font-size: clamp(36px, 5vw, 70px);
  font-weight: bold;
  letter-spacing: 5px;
  line-height: 1.1;
  text-align: center;
  color: #e8dfd2;
  transform: rotate(-9deg);
}

.hero-index {
  position: absolute;
  bottom: 12px;
  left: 20px;
  color: #777;
  font-size: 10px;
  letter-spacing: 2px;
}

/* قسم المنتجات */

.shop-section {
  padding: 90px 8vw;
}

.section-top {
  display: flex;
  justify-content: space-between;
  align-items: end;
  margin-bottom: 34px;
}

.eyebrow.dark {
  color: #9b8058;
}

.section-top h2 {
  font-size: 34px;
  margin: 8px 0 0;
}

.section-top p {
  font-size: 12px;
  color: var(--muted);
}

.toolbar {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  align-items: center;
  border-bottom: 1px solid var(--line);
  padding-bottom: 18px;
  margin-bottom: 28px;
}

.categories {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.cat {
  min-height: 39px;
  padding: 8px 17px;
  border: 1px solid #d8d1c5;
  border-radius: 4px;
  background: transparent;
  color: #4b463e;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: all .22s ease;
}

.cat:hover,
.cat.active {
  background: var(--zaat-black);
  color: var(--zaat-gold);
  border-color: var(--zaat-black);
  box-shadow: 0 5px 14px rgba(0,0,0,.1);
  transform: translateY(-1px);
}

/* البحث */

.search {
  display: flex;
  align-items: center;
  min-height: 42px;
  border: 1px solid #ded8ce;
  border-radius: 4px;
  background: rgba(255,255,255,.55);
  gap: 8px;
  padding: 5px 12px;
  transition: all .2s ease;
}

.search:focus-within {
  border-color: var(--zaat-gold);
  box-shadow: 0 0 0 3px rgba(201,168,117,.13);
}

.search span {
  font-size: 24px;
}

.search input {
  border: 0;
  background: transparent;
  outline: 0;
  width: 160px;
  min-height: 30px;
  font-size: 11px;
}

/* شبكة المنتجات */

.products {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
}

.product-card {
  min-width: 0;
  padding: 0 0 13px;
  border: 1px solid transparent;
  background: transparent;
  transition: all .25s ease;
}

.product-card:hover {
  border-color: #e8dfd1;
  background: #fff;
  box-shadow: 0 12px 30px rgba(25,20,12,.07);
  transform: translateY(-4px);
}

.product-image {
  background: #e8e4dd;
  aspect-ratio: 4/5;
  overflow: hidden;
  position: relative;
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .55s cubic-bezier(.2,.7,.2,1);
}

.product-card:hover .product-image img {
  transform: scale(1.055);
}

.product-placeholder {
  height: 100%;
  display: grid;
  place-items: center;
  font-family: Georgia, serif;
  font-size: 54px;
  color: #a99b86;
}

/* تفاصيل المنتج */

.product-info {
  padding: 15px 13px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
}

.product-info h3 {
  font-size: 14px;
  font-weight: 800;
  line-height: 1.8;
  margin: 0 0 3px;
}

.product-info p {
  font-size: 11px;
  color: #777;
  min-height: 20px;
  margin: 0 0 8px;
  line-height: 1.9;
}

/* المقاسات والألوان */

.product-option {
  display: flex;
  flex-direction: column;
  gap: 7px;
  width: 100%;
  margin: 3px 0;
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
}

.product-option span {
  color: #777;
  font-size: 11px;
  letter-spacing: .3px;
}

.product-option select {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  min-height: 46px;
  padding: 0 14px 0 38px;
  border: 1px solid #d9d2c7;
  border-radius: 4px;
  background-color: #fff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23777' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: 12px center;
  color: var(--ink);
  font-family: 'Cairo', sans-serif;
  font-size: 12px;
  cursor: pointer;
  outline: none;
  transition: all .25s;
}

.product-option select:hover,
.product-option select:focus {
  border-color: var(--zaat-gold);
  box-shadow: 0 0 0 3px rgba(201,168,117,.13);
}

/* السعر وزر الإضافة */

.product-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 7px;
}

.price {
  color: #927044;
  font-size: 15px;
  font-weight: 900;
  white-space: nowrap;
  letter-spacing: .2px;
}

.add-btn {
  position: relative;
  overflow: hidden;
  min-height: 44px;
  padding: 9px 18px;
  border: 1px solid var(--zaat-black);
  border-radius: 4px;
  background: var(--zaat-black);
  color: #fff;
  font-family: 'Cairo', sans-serif;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
  transition: all .25s ease;
}

.add-btn:hover {
  background: var(--zaat-gold);
  border-color: var(--zaat-gold);
  color: var(--zaat-black);
  box-shadow: 0 7px 17px rgba(167,134,80,.2);
  transform: translateY(-2px);
}

.add-btn:active {
  transform: scale(.97);
}

.button:focus-visible,
.cart-trigger:focus-visible,
.add-btn:focus-visible,
.cat:focus-visible {
  outline: 3px solid rgba(201,168,117,.45);
  outline-offset: 3px;
}

.loading,
.empty {
  grid-column: 1/-1;
  text-align: center;
  padding: 50px;
  color: #777;
}

/* عن المتجر */

.about {
  background: #e9e4db;
  padding: 95px 10vw;
}

.about h2 {
  font-size: clamp(40px, 6vw, 68px);
  line-height: 1.2;
  margin: 14px 0;
}

.about p {
  max-width: 500px;
  color: #666;
  font-size: 13px;
  line-height: 2.1;
}

/* الفوتر */

footer {
  padding: 28px 8vw;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--line);
  font-size: 10px;
  color: #777;
}

/* روابط التواصل والتتبع */

.track-order-link,
.contact-nav-link {
  border: 1px solid transparent;
  border-radius: 4px;
  padding: 9px 13px;
  transition: all .2s ease;
}

.track-order-link:hover,
.contact-nav-link:hover {
  border-color: #d8c5a5;
  background: #f2ede4;
}

/* السلة */

.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: #0008;
  z-index: 20;
  opacity: 0;
  visibility: hidden;
  transition: .25s;
}

.drawer-backdrop.show {
  opacity: 1;
  visibility: visible;
}

.cart-drawer {
  position: fixed;
  z-index: 21;
  top: 0;
  bottom: 0;
  right: 0;
  width: min(420px, 100%);
  background: #f9f7f3;
  padding: 25px;
  transform: translateX(105%);
  transition: .3s;
  display: flex;
  flex-direction: column;
}

.cart-drawer.show {
  transform: translateX(0);
}

.drawer-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--line);
  padding-bottom: 15px;
}

.drawer-head h3 {
  margin: 0;
}

.icon-btn {
  border: 0;
  background: none;
  font-size: 18px;
  cursor: pointer;
}

.cart-items {
  overflow: auto;
  flex: 1;
  padding: 15px 0;
}

.cart-line {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
}

.cart-line b {
  font-size: 13px;
}

.cart-line small {
  display: block;
  color: #888;
  margin-top: 4px;
  line-height: 1.8;
}

.qty {
  display: flex;
  align-items: center;
  gap: 7px;
}

.qty button {
  width: 29px;
  height: 29px;
  border: 1px solid #cfc5b5;
  border-radius: 3px;
  background: #fff;
  font-weight: 800;
  cursor: pointer;
  transition: .2s;
}

.qty button:hover {
  background: var(--zaat-gold);
  border-color: var(--zaat-gold);
  color: #111;
}

.drawer-bottom {
  border-top: 1px solid var(--line);
  padding-top: 16px;
  display: grid;
  gap: 10px;
}

.total {
  display: flex;
  justify-content: space-between;
  margin-bottom: 5px;
}

.drawer-bottom input,
.admin-card input,
.admin-card textarea,
.admin-card select {
  width: 100%;
  min-height: 45px;
  border: 1px solid #ddd5c9;
  border-radius: 4px;
  background: #fff;
  padding: 11px;
  font-size: 12px;
  outline: none;
  transition: all .2s ease;
}

.drawer-bottom input:focus {
  border-color: var(--zaat-gold);
  box-shadow: 0 0 0 3px rgba(201,168,117,.12);
}

.full {
  width: 100%;
}

.drawer-bottom .button {
  min-height: 49px;
}

.drawer-bottom small {
  font-size: 10px;
  color: #888;
  text-align: center;
}

.muted {
  color: #888;
  font-size: 12px;
}

/* التنبيهات */

.toast {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translate(-50%, 20px);
  background: #111;
  color: white;
  padding: 10px 20px;
  font-size: 12px;
  opacity: 0;
  transition: .2s;
  z-index: 50;
  pointer-events: none;
  border: 1px solid rgba(201,168,117,.45);
  border-radius: 4px;
  box-shadow: 0 10px 30px rgba(0,0,0,.2);
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* التابلت */

@media(max-width:850px) {
  .products {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero {
    min-height: 520px;
    padding: 60px 7vw;
  }

  .hero-art {
    height: 270px;
  }

  .site-header {
    padding: 0 4vw;
  }

  .shop-section {
    padding: 65px 5vw;
  }
}

/* الموبايل */

@media(max-width:600px) {
  .site-header {
    height: auto !important;
    min-height: 75px;
    padding: 12px 15px !important;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 12px;
  }

  .site-header .brand {
    font-size: 15px;
    gap: 7px;
  }

  .brand-mark {
    width: 32px;
    height: 32px;
    font-size: 20px;
  }

  .cart-trigger {
    min-height: 40px;
    padding: 7px 13px;
    font-size: 12px;
  }

  .site-header nav {
    display: flex !important;
    width: 100%;
    flex-basis: 100%;
    order: 3;
    justify-content: center;
    align-items: center;
    flex-wrap: nowrap !important;
    gap: 7px !important;
    padding-top: 8px;
    border-top: 1px solid #e5dfd4;
  }

  .site-header nav a {
    font-size: 11px !important;
    padding: 7px 10px !important;
    margin: 0 !important;
    white-space: nowrap;
    border: 1px solid #e5dfd4;
    border-radius: 4px;
  }

  .site-header nav a::after {
    display: none;
  }

  .hero {
    min-height: auto !important;
    padding: 55px 7vw 35px !important;
    grid-template-columns: 1fr;
    gap: 25px;
  }

  .hero-copy {
    width: 100%;
  }

  .hero h1 {
    font-size: clamp(43px, 11vw, 62px) !important;
    line-height: 1.35 !important;
    margin: 18px 0;
  }

  .hero p {
    font-size: 13px;
    line-height: 2;
    margin-bottom: 23px;
  }

  .hero-copy .button {
    min-height: 49px;
    padding: 11px 20px;
    font-size: 13px;
  }

  .hero-art {
    height: 230px !important;
    width: 100%;
    overflow: hidden;
  }

  .hero-circle {
    width: min(65vw, 230px) !important;
    box-shadow: 0 0 0 20px #ffffff08,
                0 0 0 42px #ffffff05;
  }

  .hero-label {
    font-size: clamp(30px, 8vw, 43px) !important;
    letter-spacing: 3px;
  }

  .hero-index {
    left: 8px;
    bottom: 2px;
  }

  .shop-section {
    padding: 55px 5vw;
  }

  .section-top {
    display: block;
  }

  .section-top h2 {
    font-size: 25px;
  }

  .section-top p {
    margin-top: 10px;
  }

  .toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .categories {
    width: 100%;
  }

  .search {
    width: 100%;
  }

  .search input {
    width: 100%;
  }

  .products {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px 12px;
  }

  .product-info {
    padding: 12px 8px;
    gap: 8px;
  }

  .product-info h3 {
    font-size: 12px;
  }

  .product-info p {
    font-size: 10px;
  }

  .product-option select {
    min-height: 43px;
    font-size: 12px;
  }

  .product-option span {
    font-size: 10px;
  }

  .product-row {
    gap: 9px;
    align-items: flex-start;
    flex-direction: column;
  }

  .add-btn {
    width: 100%;
    min-height: 43px;
    padding: 8px 12px;
    font-size: 10px;
  }

  .price {
    font-size: 13px;
  }

  .cat {
    min-height: 36px;
    padding: 7px 13px;
  }

  .button {
    min-height: 46px;
    padding: 12px 19px;
  }

  .product-card:hover {
    transform: none;
    box-shadow: none;
  }

  .about {
    padding: 65px 8vw;
  }

  footer {
    gap: 15px;
    flex-wrap: wrap;
    justify-content: center;
    text-align: center;
    padding: 25px 15px;
  }

  footer > span {
    order: 3;
    width: 100%;
  }
}

@media(max-width:360px) {
  .site-header nav {
    gap: 4px !important;
  }

  .site-header nav a {
    padding: 6px 7px !important;
    font-size: 10px !important;
  }

  .hero h1 {
    font-size: 41px !important;
  }
}

/* تقليل الحركة لمن يفضل ذلك */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

/* =========================================
   ZAAT STORE - MOBILE CART POPUP
   الموبايل فقط - الكمبيوتر بدون تغيير
========================================= */

@media screen and (max-width: 600px) {

  .drawer-backdrop {
    position: fixed !important;
    inset: 0 !important;
    z-index: 9998 !important;
    background: rgba(0, 0, 0, .65) !important;
    backdrop-filter: blur(5px);
  }

  .cart-drawer {
    position: fixed !important;
    top: 50% !important;
    right: 50% !important;
    bottom: auto !important;
    left: auto !important;

    width: calc(100% - 32px) !important;
    max-width: 460px !important;
    height: auto !important;
    max-height: 86dvh !important;

    padding: 18px !important;
    border-radius: 22px !important;

    display: flex !important;
    flex-direction: column !important;

    overflow: hidden !important;

    transform: translate(50%, -46%) scale(.96) !important;
    opacity: 0;
    visibility: hidden;

    z-index: 9999 !important;

    box-shadow: 0 25px 80px rgba(0,0,0,.3) !important;

    transition:
      transform .25s ease,
      opacity .25s ease,
      visibility .25s ease !important;
  }

  .cart-drawer.show {
    transform: translate(50%, -50%) scale(1) !important;
    opacity: 1 !important;
    visibility: visible !important;
  }

  .drawer-head {
    flex: 0 0 auto;
    padding-bottom: 12px !important;
  }

  .drawer-head h3 {
    font-size: 18px !important;
  }

  .cart-items {
    flex: 1 1 auto !important;
    min-height: 60px;
    max-height: 30vh;
    overflow-y: auto !important;
    padding: 10px 0 !important;
    overscroll-behavior: contain;
  }

  .cart-line {
    padding: 12px 0 !important;
  }

  .drawer-bottom {
    flex: 0 1 auto !important;
    max-height: 48vh;
    overflow-y: auto !important;
    overscroll-behavior: contain;
    padding-top: 12px !important;
    gap: 9px !important;
  }

  .total {
    font-size: 14px;
  }

  .drawer-bottom input {
    min-height: 43px !important;
    padding: 9px 12px !important;
    font-size: 13px !important;
  }

  .drawer-bottom .button {
    min-height: 46px !important;
    font-size: 14px !important;
  }

  .drawer-bottom small {
    font-size: 10px !important;
    line-height: 1.8;
  }

  .cart-drawer .icon-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #eee9df;
  }
}
