/* ===== Variables & Reset ===== */
:root {
  --red: #d10000;
  --red-dark: #a30000;
  --red-light: #ffe5e5;
  --white: #ffffff;
  --light: #f5f6f8;
  --gray: #6b7280;
  --dark: #1a1a1a;
  --border: #e5e7eb;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  background: var(--white);
}


body {
  font-family: 'Cairo', 'Poppins', sans-serif;
  color: var(--dark);
  background: var(--white);
  line-height: 1.6;
}

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}

img {
  max-width: 100%;
  display: block;
}

.container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 16px;
}

svg {
  flex-shrink: 0;
}

/* ===== Top Bar ===== */
.topbar {
  background: var(--light);
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 42px;
  flex-wrap: wrap;
  gap: 8px;
}

.topbar-welcome {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--red);
  font-weight: 700;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 20px;
  color: var(--gray);
}

.topbar-right a {
  display: flex;
  align-items: center;
  gap: 6px;
  transition: color .2s;
}

.topbar-right a:hover {
  color: var(--red);
}

/* ===== Header ===== */
.header {
  background: var(--white);
  padding: 18px 0;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-img {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
}

.logo-text {
  font-family: 'Poppins', sans-serif;
  font-weight: 900;
  font-size: 30px;
  font-style: italic;
  color: var(--red);
  letter-spacing: -.5px;
}

.logo-text span {
  color: var(--dark);
}

.logo-text.light span {
  color: var(--white);
}

.search-box {
  flex: 1;
  min-width: 280px;
  max-width: 640px;
  display: flex;
  align-items: center;
  border: 2px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  background: var(--white);
}

.search-cat {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--white);
  border: none;
  border-left: 1px solid var(--border);
  padding: 0 16px;
  height: 48px;
  font-family: inherit;
  font-size: 14px;
  color: var(--dark);
  cursor: pointer;
  white-space: nowrap;
}

.search-box input {
  flex: 1;
  border: none;
  outline: none;
  height: 48px;
  padding: 0 16px;
  font-family: inherit;
  font-size: 14px;
}

.search-btn {
  background: var(--red);
  border: none;
  color: var(--white);
  width: 54px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background .2s;
}

.search-btn:hover {
  background: var(--red-dark);
}

.header-contact {
  display: flex;
  align-items: center;
  gap: 12px;
}

.contact-icon {
  color: var(--red);
}

.contact-text {
  display: flex;
  flex-direction: column;
}

.contact-text strong {
  font-size: 20px;
  color: var(--dark);
}

.contact-text span {
  font-size: 13px;
  color: var(--gray);
}

/* Mobile-only elements hidden on desktop */
.mobile-search-btn {
  display: none;
}

.mobile-search-overlay {
  display: none;
}

/* ===== Navbar ===== */
.navbar {
  background: var(--red);
  color: var(--white);
}

.nav-inner {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 54px;
}

.nav-categories {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--red-dark);
  color: var(--white);
  border: none;
  height: 54px;
  padding: 0 22px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: background .2s;
}

.nav-categories:hover {
  background: #7a0000;
}

.cat-arrow {
  transition: transform .25s;
  flex-shrink: 0;
}

.cat-dropdown-wrap {
  position: relative;
}

.cat-dropdown-wrap.open .cat-arrow {
  transform: rotate(180deg);
}

.cat-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, .13);
  min-width: 220px;
  z-index: 999;
  padding: 6px 0;
  opacity: 0;
  transform: translateY(-8px);
  pointer-events: none;
  transition: opacity .2s, transform .2s;
}

.cat-dropdown-wrap.open .cat-dropdown {
  opacity: 1;
  transform: translateY(0);
  pointer-events: all;
}

.cat-dropdown li {
  list-style: none;
}

.cat-dropdown li button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  background: none;
  border: none;
  padding: 11px 18px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  color: var(--dark);
  cursor: pointer;
  text-align: right;
  transition: background .15s, color .15s;
}

.cat-dropdown li button:hover {
  background: var(--red-light);
  color: var(--red);
}

.cat-dropdown li button svg {
  color: var(--red);
  flex-shrink: 0;
}

.cat-dropdown li+li {
  border-top: 1px solid var(--border);
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-right: 20px;
}

.nav-menu a {
  display: block;
  padding: 0 18px;
  line-height: 54px;
  font-weight: 600;
  font-size: 15px;
  transition: background .2s;
}

.nav-menu a:hover,
.nav-menu a.active {
  background: var(--red-dark);
}

.nav-icons {
  margin-right: auto;
  display: flex;
  align-items: center;
  gap: 18px;
}

.nav-icons a {
  display: flex;
  align-items: center;
  transition: opacity .2s;
}

.nav-icons a:hover {
  opacity: .8;
}

.cart {
  display: flex;
  align-items: center;
  gap: 8px;
  background: none;
  border: none;
  color: var(--white);
  cursor: pointer;
}

.cart-icon {
  position: relative;
}

.cart-count {
  position: absolute;
  top: -8px;
  left: -10px;
  background: var(--dark);
  color: var(--white);
  font-size: 11px;
  font-weight: 700;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cart-total {
  font-weight: 700;
  font-size: 15px;
}

/* ===== Hero ===== */
.hero {
  background: var(--light);
  position: relative;
  overflow: hidden;
}

.hero .container {
  position: relative;
  overflow: hidden;
}

.hero-track {
  display: flex;
  transition: transform .5s ease;
}

.hero-slide {
  min-width: 100%;
  display: grid;
  grid-template-columns: 1fr 1.1fr 1fr;
  align-items: center;
  gap: 20px;
  padding: 50px 40px;
  min-height: 420px;
}

.hero-text h1 {
  font-size: 54px;
  font-weight: 900;
  line-height: 1.05;
  color: var(--dark);
}

.hero-text p {
  margin-top: 14px;
  color: var(--gray);
  font-size: 16px;
}

.hero-image {
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-image img {
  max-height: 340px;
  object-fit: contain;
  filter: drop-shadow(0 20px 30px rgba(0, 0, 0, .18));
}

.hero-info {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.countdown {
  display: flex;
  gap: 10px;
}

.cd-box {
  border: 1.5px solid var(--red);
  border-radius: 8px;
  padding: 8px 6px;
  min-width: 62px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 2px;
  background: var(--white);
}

.cd-label {
  font-size: 10px;
  color: var(--gray);
  text-transform: uppercase;
  letter-spacing: .5px;
}

.cd-num {
  font-size: 26px;
  font-weight: 800;
  color: var(--dark);
  font-family: 'Poppins', sans-serif;
}

.hero-product {
  font-size: 17px;
  font-weight: 700;
  color: var(--dark);
  max-width: 300px;
}

.hero-price .now {
  font-size: 30px;
  font-weight: 900;
  color: var(--red);
    margin-right: 8px;

}

.hero-price .old {
  font-size: 18px;
  color: var(--gray);
  text-decoration: line-through;
  margin-right: 8px;
}

.hero-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: var(--white);
  border: 1px solid var(--border);
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 5;
  color: var(--dark);
  box-shadow: 0 2px 10px rgba(0, 0, 0, .08);
  transition: all .2s;
}

.hero-arrow:hover {
  background: var(--red);
  color: var(--white);
  border-color: var(--red);
}

.hero-arrow.prev {
  right: 6px;
}

.hero-arrow.next {
  left: 6px;
}

.hero-dots {
  display: flex;
  justify-content: center;
  gap: 10px;
  padding-bottom: 26px;
}

.hero-dots button {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  border: none;
  background: #c9ccd1;
  cursor: pointer;
  transition: all .2s;
}

.hero-dots button.active {
  background: var(--red);
  width: 28px;
  border-radius: 6px;
}

/* ===== Categories ===== */
.categories {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 10px;
  padding: 25px 16px;
}

.cat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
  padding: 16px 8px;
  border-radius: 10px;
  cursor: pointer;
  transition: all .2s;
  background: var(--white);
  border: 1px solid var(--border);
  font-family: inherit;
}

.cat-item:hover {
  background: var(--red-light);
  border-color: var(--red);
  transform: translateY(-4px);
}

.cat-ico {
  color: var(--red);
}

.cat-item span:last-child {
  font-size: 13px;
  font-weight: 600;
  color: var(--dark);
}

/* ===== Price Filter ===== */
.price-filter {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 28px;
}

.pf-label {
  font-size: 14px;
  font-weight: 700;
  color: var(--gray);
  white-space: nowrap;
}

.pf-btn {
  background: var(--white);
  border: 1.5px solid var(--border);
  color: var(--dark);
  padding: 9px 18px;
  border-radius: 24px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all .2s;
  white-space: nowrap;
}

.pf-btn:hover {
  border-color: var(--red);
  color: var(--red);
}

.pf-btn.active {
  background: var(--red);
  border-color: var(--red);
  color: var(--white);
}

.no-products {
  grid-column: 1/-1;
  text-align: center;
  padding: 40px;
  color: var(--gray);
  font-size: 15px;
}

/* ===== Banners ===== */
.banners {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 50px;
}

.banner {
  border-radius: 12px;
  padding: 40px;
  min-height: 180px;
  display: flex;
  align-items: center;
  color: var(--white);
}

.banner-red {
  background: linear-gradient(120deg, var(--red), var(--red-dark));
}

.banner-dark {
  background: linear-gradient(120deg, #262626, #0d0d0d);
}

.banner-tag {
  display: inline-block;
  background: rgba(255, 255, 255, .2);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 12px;
}

.banner h3 {
  font-size: 24px;
  font-weight: 800;
  margin-bottom: 18px;
  max-width: 280px;
}

.banner-btn {
  display: inline-block;
  background: var(--white);
  color: var(--red);
  padding: 10px 26px;
  border-radius: 6px;
  font-weight: 700;
  font-size: 14px;
  transition: transform .2s;
}

.banner-dark .banner-btn {
  color: var(--dark);
}

.banner-btn:hover {
  transform: translateX(-4px);
}

/* ===== Products ===== */
.products-section {
  margin-bottom: 60px;
}

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

.product-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  background: var(--white);
  transition: all .25s;
  position: relative;
}

.product-card:hover {
  box-shadow: 0 12px 28px rgba(0, 0, 0, .1);
  transform: translateY(-4px);
}

.product-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: var(--red);
  color: var(--white);
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 6px;
  z-index: 2;
}

.product-img {
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: var(--light);
}

.product-img img {
  max-height: 100%;
  object-fit: contain;
}

.product-body {
  padding: 18px;
}

.product-cat {
  font-size: 12px;
  color: var(--gray);
  margin-bottom: 6px;
}

.product-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 10px;
  min-height: 44px;
}

/* Clamp product name to maximum 2 lines with ellipsis */
.product-name {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: normal;
}

.product-cat {
  /* single-line category with ellipsis */
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.product-rating {
  color: #f5a623;
  font-size: 14px;
  margin-bottom: 10px;
}

.product-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.product-price {
  font-size: 20px;
  font-weight: 900;
  color: var(--red);
}

.product-price .old {
  font-size: 14px;
  color: var(--gray);
  text-decoration: line-through;
  font-weight: 400;
  margin-right: 6px;
  margin-left: 7px;
}

.add-cart {
  background: var(--red);
  color: var(--white);
  border: none;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background .2s;
}

.add-cart:hover {
  background: var(--red-dark);
}

/* ===== Features ===== */
.features {
  background: var(--light);
  padding: 36px 0;
}

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

.feature {
  display: flex;
  align-items: center;
  gap: 14px;
}

.feature svg {
  color: var(--red);
}

.feature strong {
  display: block;
  font-size: 16px;
}

.feature span {
  font-size: 13px;
  color: var(--gray);
}

/* ===== Footer ===== */
.footer {
  background: var(--dark);
  color: #d1d5db;
  padding-top: 50px;
}

.footer-inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.4fr;
  gap: 36px;
  padding-bottom: 40px;
}

.footer-logo {
  margin-bottom: 16px;
}

.footer-col p {
  font-size: 14px;
  line-height: 1.8;
  margin-bottom: 6px;
}

.footer-col h4 {
  color: var(--white);
  font-size: 17px;
  margin-bottom: 18px;
}

.footer-col ul li {
  margin-bottom: 10px;
}

.footer-col ul li a {
  font-size: 14px;
  transition: color .2s;
}

.footer-col ul li a:hover {
  color: var(--red);
}

.footer-bottom {
  border-top: 1px solid #333;
  padding: 18px 0;
  text-align: center;
  font-size: 13px;
}

/* ===== Cart Drawer ===== */
.cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .45);
  opacity: 0;
  visibility: hidden;
  transition: opacity .3s;
  z-index: 998;
}

.cart-overlay.show {
  opacity: 1;
  visibility: visible;
}

.cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  height: 100%;
  width: 420px;
  max-width: 90vw;
  background: var(--white);
  z-index: 999;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform .35s ease;
  box-shadow: -4px 0 24px rgba(0, 0, 0, .18);
}

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

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

.cart-head h2 {
  font-size: 22px;
  font-weight: 800;
}

.cart-close {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--dark);
  display: flex;
}

.cart-close:hover {
  color: var(--red);
}

.cart-cols {
  display: flex;
  justify-content: space-between;
  padding: 14px 24px;
  font-size: 12px;
  letter-spacing: 1px;
  color: var(--gray);
  border-bottom: 1px solid var(--border);
}

.cart-items {
  flex: 1;
  overflow-y: auto;
  padding: 6px 24px;
}

.cart-item {
  display: flex;
  gap: 14px;
  padding: 18px 0;
  border-bottom: 1px solid var(--border);
  align-items: flex-start;
}

.ci-img {
  width: 64px;
  height: 64px;
  object-fit: contain;
  background: var(--light);
  border-radius: 8px;
  padding: 4px;
  flex-shrink: 0;
}

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

.ci-info h4 {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 4px;
  line-height: 1.4;
}

.ci-unit {
  font-size: 13px;
  color: var(--gray);
  margin-bottom: 10px;
}

.ci-qty {
  display: flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 4px 6px;
  width: fit-content;
}

.ci-qty button {
  width: 26px;
  height: 26px;
  border: none;
  background: none;
  font-size: 18px;
  cursor: pointer;
  color: var(--dark);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ci-qty button:hover {
  background: var(--light);
  color: var(--red);
}

.ci-qty span {
  min-width: 24px;
  text-align: center;
  font-weight: 700;
  font-size: 14px;
}

.ci-del {
  margin-right: 4px;
  color: var(--gray);
}

.ci-del:hover {
  color: var(--red);
}

.ci-total {
  font-weight: 800;
  color: var(--red);
  font-size: 14px;
  white-space: nowrap;
}

.cart-empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  color: var(--gray);
}

.cart-foot {
  border-top: 1px solid var(--border);
  padding: 18px 24px 24px;
}

.cart-notes {
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 12px;
}

.cart-notes summary {
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  color: var(--dark);
}

.cart-notes textarea {
  width: 100%;
  margin-top: 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px;
  font-family: inherit;
  font-size: 14px;
  resize: vertical;
}

.cart-total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.cart-total-row span {
  font-size: 18px;
  font-weight: 800;
}

.cart-total-row strong {
  font-size: 22px;
  font-weight: 900;
  color: var(--red);
}

.cart-tax {
  font-size: 12px;
  color: var(--gray);
  margin-bottom: 16px;
  line-height: 1.6;
}

.checkout-btn {
  display: block;
  width: 100%;
  background: var(--red);
  color: var(--white);
  text-align: center;
  padding: 15px;
  border-radius: 30px;
  font-weight: 800;
  font-size: 16px;
  border: none;
  cursor: pointer;
  transition: background .2s;
}

.checkout-btn:hover {
  background: var(--red-dark);
}

/* ===== WhatsApp Float ===== */
.wa-float {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 56px;
  height: 56px;
  background: #25d366;
  color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .25);
  z-index: 997;
  transition: transform .2s;
}

.wa-float:hover {
  transform: scale(1.08);
}

/* ===== Checkout Page ===== */
.co-header {
  justify-content: space-between;
}

.co-back {
  color: var(--red);
  font-weight: 700;
  font-size: 14px;
}

.checkout {
  padding: 40px 16px 60px;
}

.co-title {
  font-size: 30px;
  font-weight: 900;
  margin-bottom: 30px;
}

.co-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 36px;
  align-items: start;
}

.co-form {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 28px;
}

.co-section-title {
  font-size: 18px;
  font-weight: 800;
  margin: 0 0 18px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--border);
}

.co-form .co-section-title:not(:first-child) {
  margin-top: 30px;
}

.co-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.co-field {
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
}

.co-field label {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 7px;
}

.co-field input,
.co-field textarea {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 11px 14px;
  font-family: inherit;
  font-size: 14px;
  transition: border-color .2s;
  resize: vertical;
}

.co-field input:focus,
.co-field textarea:focus {
  outline: none;
  border-color: var(--red);
}

.co-pay {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 16px;
  cursor: pointer;
  transition: all .2s;
}

.co-pay.active {
  border-color: var(--red);
  background: var(--red-light);
}

.co-pay input {
  width: 18px;
  height: 18px;
  accent-color: var(--red);
}

.co-pay-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.co-pay-info strong {
  font-size: 15px;
}

.co-pay-info small {
  font-size: 13px;
  color: var(--gray);
}

.co-submit {
  margin-top: 24px;
}

.co-summary {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 28px;
  position: sticky;
  top: 20px;
}

.co-items {
  margin-bottom: 18px;
}

.co-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.co-item img {
  width: 50px;
  height: 50px;
  object-fit: contain;
  background: var(--light);
  border-radius: 8px;
  padding: 4px;
}

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

.co-item-info h4 {
  font-size: 13px;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 3px;
}

.co-item-info span {
  font-size: 12px;
  color: var(--gray);
}

.co-item-price {
  font-weight: 800;
  color: var(--red);
  font-size: 14px;
}

.co-line {
  display: flex;
  justify-content: space-between;
  font-size: 15px;
  padding: 9px 0;
  color: var(--dark-soft, #444);
}

.co-grand {
  border-top: 2px solid var(--border);
  margin-top: 8px;
  padding-top: 14px;
  font-size: 20px;
  font-weight: 900;
}

.co-grand span:last-child {
  color: var(--red);
}

.co-empty {
  color: var(--gray);
  font-size: 14px;
}

.co-empty a {
  color: var(--red);
  font-weight: 700;
}

.co-success {
  max-width: 520px;
  margin: 20px auto 60px;
  text-align: center;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 46px 30px;
}

.co-check {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: #16a34a;
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 22px;
}

.co-success h2 {
  font-size: 24px;
  font-weight: 900;
  margin-bottom: 14px;
}

.co-success p {
  font-size: 15px;
  margin-bottom: 8px;
}

.co-success-note {
  color: var(--gray);
  line-height: 1.7;
  margin-top: 10px;
}

.co-success-btn {
  max-width: 260px;
  margin: 26px auto 0;
}

.co-footer {
  margin-top: 0;
}

/* ===== Responsive ===== */
@media(max-width:1100px) {
  .categories {
    grid-template-columns: repeat(4, 1fr);
  }

  .products-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

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

  .features-inner {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-inner {
    grid-template-columns: repeat(2, 1fr);
  }

  .co-grid {
    grid-template-columns: 1fr;
  }

  .co-summary {
    position: static;
    order: -1;
  }

  .hero-slide {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 24px;
    padding: 36px 20px;
    min-height: auto;
  }

  .hero-text h1 {
    font-size: 40px;
  }

  .hero-info {
    align-items: center;
  }

  .countdown {
    justify-content: center;
  }

  .hero-product {
    max-width: none;
  }

  .nav-menu a {
    padding: 0 12px;
    font-size: 14px;
  }

  .header-contact {
    display: none;
  }
}

@media(max-width:760px) {

  /* Hide topbar completely on mobile */
  .topbar {
    display: none;
  }

  /* Header mobile layout */
  .header {
    padding: 12px 0;
  }

  .header-inner {
    flex-wrap: nowrap;
    justify-content: space-between;
    align-items: center;
    gap: 0;
  }


  .header {
    position: sticky;
    top: 52px;
    z-index: 1001;
    background: #fff;
  }

  .navbar {
    position: sticky;
    top: 0;
    /* ارتفاع الهيدر */
    z-index: 2000;
  }


  /* Logo on the RIGHT (RTL: left in DOM = right visually) */
  .logo-img {
    width: 42px;
    height: 42px;
  }

  .logo-text {
    font-size: 20px;
  }

  /* Search icon on the LEFT */
  .mobile-search-btn {
    order: 2;
    background: none;
    border: none;
    color: var(--dark);
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  /* Hide desktop search box & contact */
  .search-box {
    display: none;
  }

  .header-contact {
    display: none;
  }

  /* Mobile search overlay */
  .mobile-search-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 9999;
    align-items: flex-start;
    justify-content: center;
    padding-top: 0;
  }

  .mobile-search-overlay.open {
    display: flex;
  }

  .mobile-search-panel {
    width: 100%;
    background: var(--white);
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.18);
  }

  .mobile-search-panel input {
    flex: 1;
    border: 2px solid var(--red);
    border-radius: 10px;
    padding: 13px 16px;
    font-family: inherit;
    font-size: 16px;
    outline: none;
    background: var(--white);
  }

  .mobile-search-panel .search-btn {
    width: 52px;
    height: 50px;
    border-radius: 10px;
    flex-shrink: 0;
  }

  .mobile-search-close {
    background: none;
    border: none;
    font-size: 26px;
    color: var(--gray);
    cursor: pointer;
    padding: 4px 8px;
    line-height: 1;
    flex-shrink: 0;
  }

  /* Navbar */
  .nav-menu {
    display: none;
  }

  .nav-icons {
    margin-right: auto;
  }

  /* horizontally scroll the price filter */
  .price-filter {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 6px;
    -webkit-overflow-scrolling: touch;
  }

  .price-filter::-webkit-scrollbar {
    height: 4px;
  }

  .price-filter::-webkit-scrollbar-thumb {
    background: var(--red);
    border-radius: 4px;
  }
}

@media(max-width:640px) {
  .categories {
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    padding: 30px 16px;
  }

  .cat-item span:last-child {
    font-size: 12px;
  }

  .banners {
    grid-template-columns: 1fr;
  }

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

  .features-inner {
    grid-template-columns: 1fr;
  }

  .footer-inner {
    grid-template-columns: 1fr;
  }

  .logo-text {
    font-size: 24px;
  }

  .hero-text h1 {
    font-size: 32px;
  }

  .product-name {
    font-size: 14px;
    min-height: 38px;
  }

  .product-img {
    height: 160px;
  }

  .co-row {
    grid-template-columns: 1fr;
  }

  .co-form,
  .co-summary {
    padding: 20px;
  }

  .co-title {
    font-size: 24px;
  }
}

@media(max-width:400px) {
  .categories {
    grid-template-columns: repeat(2, 1fr);
  }

  .products-grid {
    grid-template-columns: 1fr;
  }
}















/* =========================================================
   شريط الترتيب (الخيار 1) — Desktop
   ========================================================= */
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 18px;
  margin-top: 25px;

}

.sort-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sort-label {
  font-size: 14px;
  font-weight: 700;
  color: var(--gray);
  white-space: nowrap;
}

.sort-select {
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 9px 36px 9px 14px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  color: var(--dark);
  background: var(--white) url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%23d10000' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat left 12px center;
  cursor: pointer;
  transition: border-color .2s;
  appearance: none;
}

.sort-select:focus {
  outline: none;
  border-color: var(--red);
}

.results-count {
  font-size: 14px;
  font-weight: 700;
  color: var(--red);
  background: var(--red-light);
  padding: 7px 14px;
  border-radius: 24px;
  white-space: nowrap;
}

/* =========================================================
   شريط الأدوات الذكي (الخيار 3) — Mobile only
   ========================================================= */
.mobile-toolbar {
  display: none;
}

.mt-search {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 0 14px;
  height: 48px;
}

.mt-search svg {
  color: var(--red);
}

.mt-search input {
  flex: 1;
  border: none;
  outline: none;
  background: none;
  height: 100%;
  font-family: inherit;
  font-size: 15px;
  color: var(--dark);
}

.mt-row {
  display: flex;
  gap: 10px;
}

.mt-field {
  flex: 1;
  min-width: 0;
}

.mt-select {
  width: 100%;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 11px 34px 11px 12px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  color: var(--dark);
  background: var(--white) url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%23d10000' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat left 10px center;
  appearance: none;
  cursor: pointer;
}

.mt-select:focus {
  outline: none;
  border-color: var(--red);
}

.mt-count {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  color: var(--red);
  background: var(--red-light);
  padding: 6px 14px;
  border-radius: 24px;
}

/* =========================================================
   تبديل العرض بين الديسكتوب والموبايل
   ========================================================= */
@media(max-width:760px) {

  /* إخفاء واجهة الديسكتوب */
  .section-head,
  .categories {
    display: none;
  }

  /* إظهار شريط الأدوات الذكي بشكل لاصق */
  .mobile-toolbar {
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 14px;
    margin: 14px 0 20px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, .06);
  }
}