* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --green: #0d7a33;
  --green-dark: #075b26;
  --green-light: #eaf7ef;
  --yellow: #f4c430;
  --red: #e53935;
  --text: #1f2a24;
  --muted: #6f7a73;
  --border: #e6ebe8;
  --bg: #f7f9f8;
  --white: #ffffff;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
}

body {
  font-family: Arial, Tahoma, sans-serif;
  background: var(--bg);
  color: var(--text);
  direction: rtl;
}

.container {
  width: min(1200px, 92%);
  margin: auto;
}

.main-header {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header-top {
  min-height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-ar {
  font-size: 28px;
  font-weight: 800;
}

.brand-en {
  color: var(--green);
  font-size: 25px;
  font-weight: 900;
  letter-spacing: 1px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.icon-btn,
.account-btn {
  border: 1px solid var(--border);
  background: var(--white);
  border-radius: 12px;
  min-height: 42px;
  padding: 0 14px;
  cursor: pointer;
  font-weight: 700;
}

.icon-btn {
  position: relative;
  font-size: 20px;
}

.cart-count {
  position: absolute;
  top: -7px;
  left: -7px;
  width: 20px;
  height: 20px;
  background: var(--red);
  color: var(--white);
  border-radius: 50%;
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.header-tools {
  padding: 0 0 18px;
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 14px;
}

.delivery-zone,
.search-box {
  background: #f7f9f8;
  border: 1px solid var(--border);
  border-radius: 13px;
  min-height: 48px;
}

.delivery-zone {
  padding: 0 16px;
  display: flex;
  align-items: center;
  gap: 7px;
}

.delivery-zone span {
  color: var(--muted);
  font-size: 14px;
}

.search-box {
  display: flex;
  overflow: hidden;
}

.search-box input {
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  padding: 0 17px;
  font-size: 15px;
}

.search-box button {
  border: 0;
  background: var(--green);
  color: var(--white);
  min-width: 85px;
  font-weight: 700;
  cursor: pointer;
}

.promo-slider {
  margin-top: 28px;
  min-height: 330px;
  padding: 45px;
  border-radius: 28px;
  background:
    linear-gradient(115deg, rgba(4, 93, 37, 0.97), rgba(13, 122, 51, 0.90));
  color: var(--white);
  display: grid;
  grid-template-columns: 1.4fr 0.6fr;
  align-items: center;
  overflow: hidden;
  position: relative;
  box-shadow: var(--shadow);
}

.promo-slider::before {
  content: "";
  position: absolute;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  left: -70px;
  top: -110px;
}

.promo-content {
  position: relative;
  z-index: 2;
}

.promo-tag {
  display: inline-block;
  background: var(--yellow);
  color: #1c2b1f;
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 800;
  margin-bottom: 18px;
}

.promo-content h1 {
  font-size: 42px;
  line-height: 1.35;
  max-width: 700px;
  margin-bottom: 14px;
}

.promo-content p {
  opacity: 0.9;
  font-size: 17px;
  margin-bottom: 24px;
  max-width: 620px;
  line-height: 1.8;
}

.primary-btn {
  border: 0;
  background: var(--white);
  color: var(--green-dark);
  border-radius: 13px;
  padding: 13px 24px;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
}

.promo-visual {
  display: flex;
  justify-content: center;
  position: relative;
  z-index: 2;
}

.promo-circle {
  width: 170px;
  height: 170px;
  border-radius: 50%;
  background: rgba(255,255,255,0.13);
  border: 2px solid rgba(255,255,255,0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 33px;
  font-weight: 900;
  letter-spacing: 2px;
}

.section-block {
  margin-top: 42px;
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.section-title h2 {
  font-size: 25px;
}

.section-title a {
  color: var(--green);
  text-decoration: none;
  font-weight: 700;
  font-size: 14px;
}

.featured-products,
.discount-grid,
.category-grid,
.product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.mini-product,
.discount-card,
.category-card,
.product-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: var(--shadow);
}

.mini-product {
  padding: 20px;
  text-align: center;
  transition: 0.2s;
}

.mini-product:hover,
.category-card:hover,
.product-card:hover {
  transform: translateY(-3px);
}

.mini-image {
  height: 100px;
  background: var(--green-light);
  border-radius: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  margin-bottom: 14px;
}

.mini-product h3 {
  margin-bottom: 8px;
  font-size: 16px;
}

.mini-price {
  color: var(--green);
  font-weight: 800;
}

.discount-card {
  padding: 18px;
  position: relative;
  text-align: center;
}

.discount-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: var(--red);
  color: var(--white);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 800;
}

.discount-image {
  height: 120px;
  background: #fff4f3;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 52px;
  margin-bottom: 14px;
}

.discount-card h3 {
  margin-bottom: 8px;
}

.old-price {
  color: #999;
  text-decoration: line-through;
  font-size: 13px;
}

.new-price {
  color: var(--red);
  font-size: 20px;
  font-weight: 900;
  margin-top: 5px;
}

.category-card {
  padding: 25px;
  text-align: center;
  cursor: pointer;
  transition: 0.2s;
}

.category-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 12px;
  background: var(--green-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 38px;
}

.category-card span {
  font-weight: 800;
}

.products {
  margin-bottom: 60px;
}

.product-card {
  position: relative;
  overflow: hidden;
  transition: 0.2s;
}

.favorite-btn {
  position: absolute;
  top: 13px;
  left: 13px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.95);
  font-size: 22px;
  cursor: pointer;
  z-index: 2;
}

.product-image {
  height: 220px;
  background: linear-gradient(180deg, #f3f6f4, #eaf3ed);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 70px;
}

.product-info {
  padding: 17px;
}

.product-info h3 {
  font-size: 18px;
  margin-bottom: 5px;
}

.product-size {
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 12px;
}

.price {
  color: var(--green-dark);
  font-size: 21px;
  font-weight: 900;
  margin-bottom: 15px;
}

.product-actions {
  display: flex;
  gap: 9px;
}

.qty-control {
  display: flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 11px;
  overflow: hidden;
}

.qty-control button {
  width: 34px;
  height: 40px;
  border: 0;
  background: #f5f7f6;
  cursor: pointer;
  font-size: 18px;
}

.qty-control span {
  min-width: 30px;
  text-align: center;
  font-weight: 700;
}

.add-btn {
  flex: 1;
  border: 0;
  border-radius: 11px;
  background: var(--green);
  color: var(--white);
  font-weight: 800;
  cursor: pointer;
  padding: 0 12px;
}

@media (max-width: 900px) {
  .header-tools {
    grid-template-columns: 1fr;
  }

  .promo-slider {
    grid-template-columns: 1fr;
  }

  .promo-visual {
    display: none;
  }

  .featured-products,
  .discount-grid,
  .category-grid,
  .product-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .container {
    width: 94%;
  }

  .header-top {
    min-height: 66px;
  }

  .brand-ar {
    font-size: 21px;
  }

  .brand-en {
    font-size: 19px;
  }

  .account-btn {
    display: none;
  }

  .promo-slider {
    margin-top: 18px;
    padding: 30px 22px;
    min-height: 260px;
    border-radius: 20px;
  }

  .promo-content h1 {
    font-size: 29px;
  }

  .promo-content p {
    font-size: 14px;
  }

  .section-block {
    margin-top: 30px;
  }

  .section-title h2 {
    font-size: 20px;
  }

  .featured-products,
  .discount-grid,
  .category-grid,
  .product-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .mini-product,
  .discount-card,
  .category-card {
    border-radius: 15px;
  }

  .product-image {
    height: 160px;
    font-size: 55px;
  }

  .product-info {
    padding: 12px;
  }

  .product-actions {
    flex-direction: column;
  }

  .add-btn {
    min-height: 40px;
  }

  .qty-control {
    justify-content: space-between;
  }
    
}
  .favorite-btn.active {
  background: #fff0f0;
  color: #e53935;
  border-color: #ffcaca;
}
/* Cart Drawer */

.cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  opacity: 0;
  visibility: hidden;
  transition: 0.25s ease;
  z-index: 1998;
}

.cart-overlay.active {
  opacity: 1;
  visibility: visible;
}

.cart-drawer {
  position: fixed;
  top: 0;
  right: -420px;
  width: min(420px, 92vw);
  height: 100vh;
  background: #fff;
  z-index: 1999;
  box-shadow: -10px 0 35px rgba(0, 0, 0, 0.15);
  display: flex;
  flex-direction: column;
  transition: right 0.3s ease;
}

.cart-drawer.active {
  right: 0;
}

.cart-header {
  padding: 22px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.cart-header h2 {
  margin-bottom: 4px;
}

.cart-header small {
  color: var(--muted);
}

.close-cart {
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: #f3f5f4;
  font-size: 26px;
  cursor: pointer;
}

.cart-items {
  flex: 1;
  overflow-y: auto;
  padding: 18px;
}

.empty-cart {
  height: 100%;
  min-height: 320px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--muted);
}

.empty-cart-icon {
  font-size: 58px;
  margin-bottom: 14px;
}

.empty-cart h3 {
  color: var(--text);
  margin-bottom: 8px;
}

.cart-footer {
  border-top: 1px solid var(--border);
  padding: 18px;
  background: #fff;
}

.cart-total-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 15px;
  font-size: 18px;
}

.cart-total-row strong {
  color: var(--green);
}

.checkout-btn {
  width: 100%;
  min-height: 50px;
  border: 0;
  border-radius: 13px;
  background: var(--green);
  color: #fff;
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
}
/* Products inside cart */

.cart-item {
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}

.cart-item-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.cart-item-icon {
  width: 60px;
  height: 60px;
  border-radius: 13px;
  background: var(--green-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  flex-shrink: 0;
}

.cart-item-details {
  flex: 1;
}

.cart-item-details h4 {
  font-size: 16px;
  margin-bottom: 6px;
}

.cart-item-details span {
  color: var(--green);
  font-weight: 700;
}

.cart-item-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 13px;
}

.cart-item-actions strong {
  margin-right: auto;
  color: var(--green-dark);
}

.cart-item-qty {
  display: flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 9px;
  overflow: hidden;
}

.cart-item-qty button {
  width: 31px;
  height: 31px;
  border: 0;
  background: #f4f6f5;
  cursor: pointer;
  font-size: 17px;
}

.cart-item-qty span {
  width: 32px;
  text-align: center;
  font-weight: 700;
}

.remove-item {
  border: 0;
  background: #fff0f0;
  color: #d93636;
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
}

/* =========================
   CHECKOUT PAGE
========================= */

.checkout-layout {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  gap: 24px;
  align-items: start;
}

.checkout-form-card,
.checkout-summary-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: var(--shadow);
  padding: 24px;
}

.checkout-form-card h3,
.checkout-summary-card h3 {
  margin-bottom: 22px;
  font-size: 21px;
}

.checkout-field {
  margin-bottom: 18px;
}

.checkout-field label {
  display: block;
  margin-bottom: 8px;
  font-weight: 700;
}

.checkout-field input,
.checkout-field select,
.checkout-field textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 13px 14px;
  font-size: 15px;
  outline: none;
  background: #fff;
}

.checkout-field input:focus,
.checkout-field select:focus,
.checkout-field textarea:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(13, 122, 51, 0.08);
}

.checkout-field textarea {
  resize: vertical;
}

.payment-options {
  display: grid;
  gap: 10px;
}

.payment-option {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.payment-option input {
  width: auto;
}

.checkout-product-row {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.checkout-product-row span {
  color: var(--muted);
}

.checkout-summary-row {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}

.checkout-grand-total {
  font-size: 20px;
  font-weight: 800;
  border-bottom: 0;
  margin-top: 5px;
}

.checkout-grand-total strong {
  color: var(--green);
}

.checkout-summary-card .checkout-btn {
  margin-top: 12px;
}

@media (max-width: 850px) {
  .checkout-layout {
    grid-template-columns: 1fr;
  }

  .checkout-summary-card {
    order: -1;
  }
}


}