﻿:root {
  --bg: #f2f4f8;
  --surface: #ffffff;
  --surface-2: #f8f9fc;
  --text: #111827;
  --muted: #6b7280;
  --primary: #1f3ca6;
  --primary-deep: #142f8b;
  --accent: #f5c518;
  --danger: #c62828;
  --line: #dde3ef;
  --shadow: 0 16px 28px rgba(22, 32, 62, 0.12);
  --radius: 16px;
}

* {
  box-sizing: border-box;
}
.page-loading{
    position: fixed;
    top:0;
    left:0;
    width:100%;
    height:100%;
    background:#ffffff;
    display:flex;
    flex-direction:column;
    justify-content:center;
    align-items:center;
    font-size:20px;
    z-index:9999;
}

.loading-logo{
    width: 500px;
    margin-bottom:15px;
}
html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Cairo', 'Segoe UI', Tahoma, sans-serif;
  background: linear-gradient(180deg, #eef2ff 0%, var(--bg) 24%);
  color: var(--text);
}

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

.container {
  width: min(1200px, calc(100% - 28px));
  margin: 0 auto;
}

.page-loading {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background: #fff;
  z-index: 200;
}

.topbar-shell {
  background: linear-gradient(180deg, var(--primary-deep) 0%, var(--primary) 70%);
  color: #fff;
  box-shadow: var(--shadow);
}

.utility-bar {
  min-height: 38px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.86rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
}

.utility-left {
  display: flex;
  gap: 8px;
  align-items: center;
}

.brand-bar {
  padding: 14px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

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

.brand-mark {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: linear-gradient(130deg, var(--accent), #ffdb4d);
  color: #232323;
  font-weight: 800;
  text-transform: uppercase;
}

.brand h1 {
  margin: 0;
  font-size: clamp(1.1rem, 2.6vw, 1.6rem);
}

.brand p {
  margin: 0;
  opacity: 0.92;
  font-size: 0.88rem;
}

.header-actions {
  display: flex;
  gap: 8px;
}

.main-nav {
  padding: 10px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
}

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

.nav-links a {
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 0.9rem;
  transition: 0.2s ease;
}

.nav-links a:hover {
  background: rgba(255, 255, 255, 0.18);
}

.main-content {
  padding: 18px 0 60px;
  display: grid;
  gap: 18px;
}

.hero-layout {
  display: grid;
  grid-template-columns: 2.3fr 1fr;
  gap: 14px;
}

.hero-slider {
  min-height: 380px;
  border-radius: 18px;
  overflow: hidden;
  position: relative;
  box-shadow: var(--shadow);
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.45s ease;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: flex-end;
}

.hero-slide.active {
  opacity: 1;
}

.hero-content {
  margin: 24px;
  background: rgba(15, 25, 57, 0.46);
  color: #fff;
  border-radius: 16px;
  max-width: 78%;
  padding: 18px;
  backdrop-filter: blur(5px);
}

.hero-content h2 {
  margin: 0 0 8px;
  font-size: clamp(1.2rem, 2.8vw, 2rem);
}

.hero-content p {
  margin: 0 0 12px;
  font-size: 0.95rem;
}

.hero-side-cards {
  display: grid;
  gap: 10px;
}

.side-card {
  border-radius: 14px;
  overflow: hidden;
  position: relative;
  min-height: 120px;
  color: #fff;
  box-shadow: var(--shadow);
  background-size: cover;
  background-position: center;
}

.side-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.5));
}

.side-card-content {
  position: absolute;
  inset-inline: 12px;
  bottom: 12px;
  z-index: 1;
}

.side-card-content h4,
.side-card-content p {
  margin: 0;
}

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

.service-item {
  display: flex;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 12px;
  padding: 12px;
}

.service-icon {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: #fff7d6;
}

.service-item h4,
.service-item p {
  margin: 0;
}

.service-item p {
  color: var(--muted);
  font-size: 0.85rem;
}

.promo-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.promo-card {
  min-height: 150px;
  border-radius: 14px;
  overflow: hidden;
  position: relative;
  box-shadow: var(--shadow);
  background-size: cover;
  background-position: center;
}

.promo-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, rgba(7, 19, 50, 0.66), rgba(7, 19, 50, 0.18));
}

.promo-badge {
  position: absolute;
  top: 10px;
  inset-inline-start: 10px;
  background: var(--accent);
  color: #231c00;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 0.78rem;
  z-index: 1;
}

.promo-body {
  position: absolute;
  inset-inline: 14px;
  bottom: 14px;
  color: #fff;
  z-index: 1;
}

.promo-body h3,
.promo-body p {
  margin: 0;
}

.section-box {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 16px;
}

.section-head {
  margin-bottom: 12px;
}

.section-head h2 {
  margin: 0;
}

.section-head p {
  margin: 4px 0 0;
  color: var(--muted);
}

.section-head.split {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.deal-timer {
  background: #fff5f5;
  border: 1px solid #ffd8d8;
  color: #a51616;
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 0.85rem;
  white-space: nowrap;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 12px;
}

.products-grid.compact {
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.product-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: var(--surface-2);
  display: flex;
  flex-direction: column;
}

.product-image {
  width: 100%;
  height: 165px;
  object-fit: cover;
}

.product-body {
  padding: 10px;
  display: grid;
  gap: 6px;
}

.product-body h3 {
  margin: 0;
  font-size: 0.95rem;
}

.product-body p {
  margin: 0;
  color: var(--muted);
  min-height: 34px;
  font-size: 0.86rem;
}

.product-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.86rem;
}

.product-meta strong {
  color: var(--primary-deep);
}

.featured-layout {
  display: grid;
  grid-template-columns: minmax(270px, 0.9fr) 1.6fr;
  gap: 12px;
}

.featured-highlight {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
  display: grid;
  gap: 10px;
  background: linear-gradient(180deg, #eff3ff 0%, #fff 100%);
}

.featured-highlight img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-radius: 10px;
}

.contact-card p {
  margin: 8px 0;
}

.footer-ticker {
  background: var(--primary-deep);
  color: #fff;
  padding: 10px 0;
  font-size: 0.9rem;
}

.btn {
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 8px 12px;
  cursor: pointer;
  font-weight: 700;
}

.btn-primary {
  background: linear-gradient(130deg, var(--accent), #ffd83d);
  color: #1a1a1a;
}

.btn-secondary {
  background: #fff;
  color: #1f2a44;
  border-color: #c6d1e8;
}

.cart-btn {
  background: #ffce2d;
}

.btn-danger {
  background: #b42318;
  color: #fff;
}

.topbar-shell .btn-secondary {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.34);
}

.badge {
  background: #0f172a;
  color: #fff;
  border-radius: 999px;
  padding: 3px 8px;
  margin-inline-start: 5px;
}

.cart-drawer {
  position: fixed;
  top: 0;
  inset-inline-end: -420px;
  width: min(420px, 94vw);
  height: 100vh;
  background: #fff;
  border-inline-start: 1px solid var(--line);
  display: grid;
  grid-template-rows: auto 1fr auto auto;
  transition: inset-inline-end 0.28s ease;
  z-index: 90;
}

.cart-drawer.open {
  inset-inline-end: 0;
}

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

.cart-items {
  padding: 10px;
  overflow: auto;
  display: grid;
  gap: 8px;
}

.cart-item {
  display: grid;
  grid-template-columns: 50px 1fr auto auto;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px;
}

.cart-item img {
  width: 50px;
  height: 50px;
  object-fit: cover;
  border-radius: 8px;
}

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

.qty-wrap input {
  width: 44px;
  text-align: center;
}

.checkout-form {
  padding: 10px;
  display: grid;
  gap: 8px;
  border-top: 1px solid var(--line);
}

.address-mode-wrap {
  display: grid;
  gap: 6px;
  padding: 8px;
  border: 1px solid #ccd6ea;
  border-radius: 10px;
  background: color-mix(in srgb, var(--surface), #eef3ff 18%);
  font-size: 0.9rem;
}

.checkout-form input,
.checkout-form textarea,
.stack-form input,
.stack-form textarea,
.stack-form select,
.inline-form input,
#login-form input,
.panel textarea,
.panel select {
  width: 100%;
  border: 1px solid #ccd6ea;
  border-radius: 10px;
  padding: 10px;
  font-family: inherit;
}

.empty-state {
  border: 1px dashed #cfd8ea;
  border-radius: 12px;
  padding: 18px;
  text-align: center;
  color: var(--muted);
}

.delete-btn {
  border: 1px solid #f0b5b5;
  background: #fff2f2;
  color: #a02020;
  border-radius: 8px;
}

.toast {
  position: fixed;
  bottom: 18px;
  inset-inline-start: 18px;
  background: #101828;
  color: #fff;
  border-radius: 10px;
  padding: 8px 12px;
  opacity: 0;
  transform: translateY(12px);
  transition: 0.22s;
  z-index: 120;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 980px) {
  .hero-layout,
  .featured-layout {
    grid-template-columns: 1fr;
  }

  .service-row,
  .promo-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .brand-bar,
  .utility-bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding: 10px 0;
  }

  .header-actions {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .service-row,
  .promo-grid {
    grid-template-columns: 1fr;
  }

  .hero-slider {
    min-height: 300px;
  }
}

.loading-logo {
  width: 180px;
  height: 180px;
  object-fit: contain;
  margin-bottom: 8px;
}

.auth-modal {
  position: fixed;
  inset: 0;
  background: rgba(9, 14, 30, 0.58);
  z-index: 130;
  display: grid;
  place-items: center;
  padding: 12px;
}

.auth-panel {
  width: min(520px, 100%);
  max-height: 90vh;
  overflow: auto;
  border-radius: 14px;
  background: #fff;
  border: 1px solid #d6deec;
  padding: 14px;
  display: grid;
  gap: 10px;
}

.auth-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.customer-session {
  border: 1px solid #d6deec;
  border-radius: 10px;
  padding: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: #f8fbff;
}

.customer-session p {
  margin: 0;
}


[hidden] {
  display: none !important;
}

body[data-theme='dark'] {
  --bg: #0b1220;
  --surface: #101a2f;
  --surface-2: #18253d;
  --text: #e6edf9;
  --muted: #9fb0cd;
  --primary: #3d67f4;
  --primary-deep: #223aa0;
  --accent: #ffd452;
  --line: #2f3f5f;
  --shadow: 0 16px 28px rgba(0, 0, 0, 0.35);
}

.floating-cart {
  position: fixed;
  inset-inline-end: 18px;
  bottom: 18px;
  z-index: 95;
  border: 0;
  border-radius: 999px;
  padding: 10px 14px;
  background: #0f172a;
  color: #fff;
  box-shadow: 0 12px 25px rgba(2, 6, 23, 0.4);
  display: flex;
  gap: 8px;
  align-items: center;
  cursor: pointer;
}

body[data-theme='dark'] .floating-cart {
  background: #ffd452;
  color: #111827;
}

.scroll-top-btn {
  position: fixed;
  inset-inline-end: 18px;
  bottom: 78px;
  z-index: 95;
  border: 0;
  border-radius: 999px;
  width: 42px;
  height: 42px;
  background: #1f3ca6;
  color: #fff;
  font-size: 20px;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.28);
}

body[data-theme='dark'] .scroll-top-btn {
  background: #ffd452;
  color: #111827;
}
