/* ==========================================================================
   Nizwa Electricals & Sanitarywares — Design System & Styles
   ========================================================================== */

:root {
  --navy-950: #1b0c12;
  --navy-900: #2b111b;
  --navy-800: #4a1529;
  --navy-700: #7c1839;

  --amber-500: #b5a38d;
  --amber-600: #8b1538;
  --amber-100: #f5efe6;
  --amber-50: #fbf8f3;

  --teal-600: #8b1538;
  --teal-700: #6d102c;
  --teal-50: #fdf2f5;

  --whatsapp: #25d366;
  --whatsapp-dark: #1da851;

  --slate-900: #181416;
  --slate-700: #3d3538;
  --slate-600: #5c5256;
  --slate-500: #7a6f73;
  --slate-400: #a1969a;
  --slate-200: #e7e2df;
  --slate-100: #f3efec;
  --slate-50: #faf8f6;
  --white: #ffffff;

  --danger: #dc2626;
  --danger-bg: #fef2f2;
  --success: #16a34a;
  --success-bg: #f0fdf4;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;

  --shadow-sm: 0 1px 2px rgba(27, 12, 18, 0.06);
  --shadow-md: 0 6px 20px rgba(27, 12, 18, 0.08);
  --shadow-lg: 0 16px 40px rgba(27, 12, 18, 0.16);

  --container: 1240px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: clip;
}

body {
  margin: 0;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--slate-900);
  background: var(--slate-50);
  line-height: 1.55;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

h1, h2, h3, h4, .brand-title {
  font-family: "Plus Jakarta Sans", "Inter", sans-serif;
  letter-spacing: -0.02em;
}

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

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

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

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 20px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* ---------- Announcement Top Bar ---------- */
.top-bar {
  background: var(--navy-950);
  color: rgba(255, 255, 255, 0.88);
  font-size: 0.82rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.top-bar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  flex-wrap: wrap;
}

.top-bar-links {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

.top-bar-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: rgba(255, 255, 255, 0.85);
  transition: color 0.15s;
}

.top-bar-link:hover {
  color: var(--amber-500);
}

/* ---------- Navbar ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--slate-200);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 74px;
  padding: 8px 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-mark {
  width: 46px;
  height: 46px;
  border-radius: 11px;
  background: var(--white);
  padding: 4px;
  border: 1px solid var(--slate-200);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  box-shadow: 0 3px 10px rgba(27, 12, 18, 0.1);
  overflow: hidden;
}

.brand-logo-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.lang-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--slate-200);
  background: var(--slate-50);
  color: var(--navy-900);
  font-weight: 700;
  font-size: 0.84rem;
  cursor: pointer;
  transition: all 0.15s;
}

.lang-btn:hover {
  border-color: var(--navy-700);
  background: var(--white);
}

.ltr-num {
  direction: ltr;
  unicode-bidi: isolate;
  display: inline-block;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.18;
  min-width: 0;
}

.brand-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--navy-900);
}

.brand-sub {
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--teal-600);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--slate-700);
}

.nav-links a:hover {
  color: var(--navy-900);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.9rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.16s ease;
  white-space: nowrap;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--navy-900);
  color: var(--white);
}

.btn-primary:hover:not(:disabled) {
  background: var(--navy-800);
  transform: translateY(-1px);
}

.btn-amber {
  background: var(--amber-500);
  color: var(--navy-950);
}

.btn-amber:hover:not(:disabled) {
  background: var(--amber-600);
  color: var(--white);
  transform: translateY(-1px);
}

.btn-whatsapp {
  background: var(--whatsapp);
  color: var(--white);
}

.btn-whatsapp:hover:not(:disabled) {
  background: var(--whatsapp-dark);
  transform: translateY(-1px);
}

.btn-outline {
  background: var(--white);
  color: var(--slate-700);
  border-color: var(--slate-200);
}

.btn-outline:hover:not(:disabled) {
  border-color: var(--slate-400);
  color: var(--slate-900);
  background: var(--slate-50);
}

.btn-ghost-light {
  background: rgba(255, 255, 255, 0.1);
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.22);
}

.btn-ghost-light:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.18);
}

.btn-danger {
  background: var(--danger-bg);
  color: var(--danger);
  border-color: #fecaca;
}

.btn-danger:hover:not(:disabled) {
  background: var(--danger);
  color: var(--white);
}

.btn-sm {
  padding: 7px 12px;
  font-size: 0.82rem;
}

.btn-lg {
  padding: 13px 24px;
  font-size: 0.96rem;
  border-radius: 10px;
}

.btn-block {
  width: 100%;
}

/* ---------- Hero Section ---------- */
.hero {
  background:
    radial-gradient(circle at 88% 20%, rgba(181, 163, 141, 0.24), transparent 40%),
    radial-gradient(circle at 12% 85%, rgba(139, 21, 56, 0.36), transparent 44%),
    linear-gradient(135deg, var(--navy-950) 0%, var(--navy-900) 52%, var(--navy-800) 100%);
  color: var(--white);
  padding: 64px 0 58px;
  position: relative;
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: 40px;
  align-items: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(245, 158, 11, 0.14);
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: #fde68a;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 18px;
}

.hero h1 {
  margin: 0 0 14px;
  font-size: clamp(2rem, 3.8vw, 3.1rem);
  line-height: 1.12;
  font-weight: 800;
}

.hero h1 span {
  color: var(--amber-500);
}

.hero-desc {
  margin: 0 0 28px;
  font-size: 1.05rem;
  color: rgba(255, 255, 255, 0.78);
  max-width: 580px;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.hero-card {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius-lg);
  padding: 24px;
  backdrop-filter: blur(10px);
}

.hero-card-title {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--amber-500);
  font-weight: 700;
  margin: 0 0 16px;
}

.hero-feature-list {
  display: grid;
  gap: 14px;
}

.hero-feature {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.hero-feature-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.1);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  color: #5eead4;
}

.hero-feature strong {
  display: block;
  font-size: 0.94rem;
  color: var(--white);
}

.hero-feature span {
  font-size: 0.83rem;
  color: rgba(255, 255, 255, 0.7);
}

/* ---------- Catalog Controls ---------- */
.catalog-section {
  padding: 46px 0 72px;
}

.section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.section-header h2 {
  margin: 0;
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  color: var(--navy-900);
}

.section-header p {
  margin: 4px 0 0;
  color: var(--slate-600);
  font-size: 0.94rem;
}

.catalog-toolbar {
  background: var(--white);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 22px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.toolbar-top {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

.search-wrap {
  position: relative;
  flex: 1 1 280px;
}

.search-wrap svg {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--slate-400);
  pointer-events: none;
}

.search-input {
  width: 100%;
  padding: 11px 14px 11px 42px;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-sm);
  background: var(--slate-50);
  color: var(--slate-900);
  font-size: 0.93rem;
  transition: border-color 0.15s, background 0.15s;
}

.search-input:focus {
  outline: none;
  border-color: var(--navy-700);
  background: var(--white);
}

.select-input {
  padding: 11px 14px;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-sm);
  background: var(--white);
  color: var(--slate-700);
  font-size: 0.9rem;
  cursor: pointer;
}

.checkbox-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-sm);
  background: var(--white);
  font-size: 0.88rem;
  color: var(--slate-700);
  cursor: pointer;
  user-select: none;
}

.category-pills {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}

.cat-pill {
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid var(--slate-200);
  background: var(--slate-50);
  color: var(--slate-700);
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s;
}

.cat-pill:hover {
  border-color: var(--navy-700);
  color: var(--navy-900);
}

.cat-pill.active {
  background: var(--navy-900);
  color: var(--white);
  border-color: var(--navy-900);
}

/* ---------- Product Grid ---------- */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 22px;
}

.product-card {
  background: var(--white);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
  box-shadow: var(--shadow-sm);
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: #cbd5e1;
}

.product-media {
  position: relative;
  aspect-ratio: 4 / 3;
  background: var(--white);
  border-bottom: 1px solid var(--slate-100);
  padding: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  cursor: pointer;
}

.product-media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.25s ease;
}

.product-card:hover .product-media img {
  transform: scale(1.03);
}

.badge-row {
  position: absolute;
  top: 10px;
  left: 10px;
  right: 10px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 6px;
  pointer-events: none;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.73rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.badge-stock {
  background: rgba(240, 253, 244, 0.95);
  color: var(--success);
  border: 1px solid #bbf7d0;
}

.badge-out {
  background: rgba(254, 242, 242, 0.95);
  color: var(--danger);
  border: 1px solid #fecaca;
}

.badge-featured {
  background: rgba(254, 243, 199, 0.95);
  color: #92400e;
  border: 1px solid #fde68a;
}

.product-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.product-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--teal-600);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 6px;
}

.product-brand {
  color: var(--slate-500);
  text-transform: none;
  letter-spacing: 0;
}

.product-title {
  margin: 0 0 8px;
  font-size: 1.04rem;
  font-weight: 700;
  color: var(--navy-900);
  line-height: 1.3;
  cursor: pointer;
}

.product-title:hover {
  color: var(--amber-600);
}

.product-desc {
  margin: 0 0 16px;
  font-size: 0.86rem;
  color: var(--slate-600);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

.product-price-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--slate-100);
  margin-bottom: 14px;
}

.product-price {
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 1.24rem;
  font-weight: 800;
  color: var(--navy-900);
}

.product-price small {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--slate-500);
  margin-left: 3px;
}

.product-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

/* ---------- Empty & Loading States ---------- */
.empty-state {
  text-align: center;
  padding: 56px 24px;
  background: var(--white);
  border: 1px dashed var(--slate-300, #cbd5e1);
  border-radius: var(--radius-md);
  color: var(--slate-600);
}

.empty-state h3 {
  margin: 12px 0 6px;
  color: var(--navy-900);
}

/* ---------- Contact Section ---------- */
.contact-section {
  background: var(--white);
  border-top: 1px solid var(--slate-200);
  padding: 64px 0;
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin-top: 28px;
}

.contact-card {
  background: var(--slate-50);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-md);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.contact-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: var(--navy-900);
  color: var(--amber-500);
  display: grid;
  place-items: center;
  margin-bottom: 6px;
}

.contact-card h3 {
  margin: 0;
  font-size: 1rem;
  color: var(--navy-900);
}

.contact-card p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--slate-600);
}

.contact-card a.contact-link {
  color: var(--navy-900);
  font-weight: 700;
  font-size: 0.96rem;
}

.contact-card a.contact-link:hover {
  color: var(--amber-600);
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--navy-950);
  color: rgba(255, 255, 255, 0.72);
  padding: 34px 0;
  font-size: 0.88rem;
}

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

.footer-admin-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.82rem;
  padding: 6px 12px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  transition: all 0.15s;
}

.footer-admin-link:hover {
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.35);
}

/* ---------- Floating WhatsApp Button ---------- */
.floating-wa {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 35;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--whatsapp);
  color: var(--white);
  padding: 12px 18px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.9rem;
  box-shadow: 0 10px 26px rgba(37, 211, 102, 0.38);
  transition: transform 0.18s ease, background 0.18s ease;
}

.floating-wa:hover {
  transform: translateY(-2px);
  background: var(--whatsapp-dark);
}

/* ---------- Modal ---------- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(7, 17, 32, 0.65);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  overflow-y: auto;
}

.modal-backdrop.open {
  display: flex;
}

.modal-dialog {
  background: var(--white);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 820px;
  max-height: 90vh;
  overflow-y: auto;
  overflow-x: hidden;
  box-shadow: var(--shadow-lg);
  position: relative;
  animation: modalIn 0.18s ease-out;
}

.modal-dialog.modal-narrow {
  max-width: 620px;
}

@keyframes modalIn {
  from { opacity: 0; transform: translateY(10px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--slate-200);
  background: rgba(255, 255, 255, 0.92);
  color: var(--slate-700);
  display: grid;
  place-items: center;
  cursor: pointer;
}

.modal-close:hover {
  background: var(--slate-100);
  color: var(--slate-900);
}

.product-modal-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.product-modal-img {
  background: var(--white);
  padding: 22px;
  min-height: 320px;
  max-height: 460px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-inline-end: 1px solid var(--slate-100);
}

.product-modal-img img {
  width: 100%;
  height: 100%;
  max-height: 416px;
  object-fit: contain;
}

.product-modal-info {
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.product-modal-info h2 {
  margin: 0;
  font-size: 1.45rem;
  color: var(--navy-900);
}

.modal-price {
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--navy-900);
}

.modal-price small {
  font-size: 0.9rem;
  color: var(--slate-500);
  font-weight: 600;
}

.modal-specs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  padding: 12px;
  background: var(--slate-50);
  border-radius: var(--radius-sm);
  border: 1px solid var(--slate-200);
  font-size: 0.84rem;
}

.modal-specs span {
  display: block;
  color: var(--slate-500);
  font-size: 0.75rem;
}

.modal-specs strong {
  color: var(--slate-900);
}

.modal-desc {
  margin: 0;
  color: var(--slate-700);
  font-size: 0.94rem;
  white-space: pre-line;
}

.modal-inquiry-box {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--slate-200);
  display: grid;
  gap: 10px;
}

.modal-inquiry-note {
  font-size: 0.8rem;
  color: var(--slate-500);
  margin: 0;
}

/* ---------- Admin Panel Styles ---------- */
.admin-body {
  background: var(--slate-100);
  min-height: 100vh;
}

.admin-login-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: linear-gradient(135deg, var(--navy-950) 0%, var(--navy-800) 100%);
}

.admin-login-card {
  width: 100%;
  max-width: 440px;
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-lg);
}

.admin-login-card h1 {
  margin: 14px 0 6px;
  font-size: 1.5rem;
  color: var(--navy-900);
}

.admin-login-card p.sub {
  margin: 0 0 22px;
  color: var(--slate-600);
  font-size: 0.9rem;
}

.alert {
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  margin-bottom: 16px;
  border: 1px solid transparent;
}

.alert-warning {
  background: var(--amber-50);
  border-color: #fde68a;
  color: #92400e;
}

.alert-danger {
  background: var(--danger-bg);
  border-color: #fecaca;
  color: var(--danger);
}

.alert-success {
  background: var(--success-bg);
  border-color: #bbf7d0;
  color: var(--success);
}

.form-group {
  margin-bottom: 15px;
}

.form-group label {
  display: block;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--slate-700);
  margin-bottom: 6px;
}

.form-control {
  width: 100%;
  padding: 10px 13px;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-sm);
  background: var(--white);
  color: var(--slate-900);
  font-size: 0.92rem;
}

.form-control:focus {
  outline: none;
  border-color: var(--navy-700);
  box-shadow: 0 0 0 3px rgba(30, 58, 95, 0.1);
}

textarea.form-control {
  resize: vertical;
  min-height: 92px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.admin-header {
  background: var(--navy-900);
  color: var(--white);
  padding: 16px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

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

.mode-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 700;
}

.mode-live {
  background: rgba(22, 163, 74, 0.2);
  color: #86efac;
  border: 1px solid rgba(134, 239, 172, 0.35);
}

.mode-local {
  background: rgba(245, 158, 11, 0.2);
  color: #fde68a;
  border: 1px solid rgba(253, 230, 138, 0.35);
}

.admin-main {
  padding: 28px 0 64px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--white);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  box-shadow: var(--shadow-sm);
}

.stat-card span {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--slate-500);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.stat-card strong {
  display: block;
  margin-top: 6px;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 1.75rem;
  color: var(--navy-900);
}

.admin-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--slate-200);
  padding-bottom: 12px;
}

.tab-btn {
  padding: 9px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  background: transparent;
  color: var(--slate-600);
  font-weight: 600;
  cursor: pointer;
}

.tab-btn.active {
  background: var(--navy-900);
  color: var(--white);
}

.panel-card {
  background: var(--white);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.panel-header {
  padding: 18px 20px;
  border-bottom: 1px solid var(--slate-200);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.panel-header h2 {
  margin: 0;
  font-size: 1.15rem;
  color: var(--navy-900);
}

.table-wrap {
  overflow-x: auto;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.admin-table th,
.admin-table td {
  padding: 13px 16px;
  text-align: left;
  border-bottom: 1px solid var(--slate-100);
  vertical-align: middle;
}

.admin-table th {
  background: var(--slate-50);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--slate-500);
}

.admin-thumb {
  width: 56px;
  height: 56px;
  border-radius: 8px;
  object-fit: contain;
  background: var(--white);
  padding: 3px;
  border: 1px solid var(--slate-200);
}

.upload-zone {
  border: 2px dashed var(--slate-300, #cbd5e1);
  border-radius: var(--radius-md);
  padding: 16px;
  text-align: center;
  background: var(--slate-50);
  cursor: pointer;
  transition: border-color 0.15s;
}

.upload-zone:hover {
  border-color: var(--navy-700);
}

.upload-preview {
  max-height: 160px;
  margin: 10px auto 0;
  border-radius: 10px;
  object-fit: contain;
  border: 1px solid var(--slate-200);
}

.modal-header-bar {
  padding: 20px 24px;
  border-bottom: 1px solid var(--slate-200);
}

.modal-header-bar h2 {
  margin: 0;
  font-size: 1.25rem;
  color: var(--navy-900);
}

.modal-body-pad {
  padding: 22px 24px;
}

.modal-footer-bar {
  padding: 16px 24px;
  border-top: 1px solid var(--slate-200);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  background: var(--slate-50);
}

/* ---------- Toast ---------- */
.toast-container {
  position: fixed;
  bottom: 22px;
  right: 22px;
  z-index: 200;
  display: grid;
  gap: 10px;
}

.toast {
  background: var(--navy-900);
  color: var(--white);
  padding: 12px 18px;
  border-radius: 10px;
  font-size: 0.88rem;
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  animation: modalIn 0.18s ease-out;
}

.toast.toast-success {
  background: var(--success);
}

.toast.toast-error {
  background: var(--danger);
}

/* ---------- RTL / Arabic Support ---------- */
html[dir="rtl"] body,
html[dir="rtl"] h1,
html[dir="rtl"] h2,
html[dir="rtl"] h3,
html[dir="rtl"] h4,
html[dir="rtl"] .brand-title,
html[dir="rtl"] .product-price,
html[dir="rtl"] .modal-price {
  font-family: "Cairo", "Inter", sans-serif;
  letter-spacing: 0;
}

html[dir="rtl"] .brand-sub {
  letter-spacing: 0;
  text-transform: none;
}

html[dir="rtl"] .search-wrap svg {
  left: auto;
  right: 14px;
}

html[dir="rtl"] .search-input {
  padding: 11px 42px 11px 14px;
}

html[dir="rtl"] .modal-close {
  right: auto;
  left: 14px;
}

html[dir="rtl"] .floating-wa {
  right: auto;
  left: 22px;
}

html[dir="rtl"] .toast-container {
  right: auto;
  left: 22px;
}

html[dir="rtl"] .admin-table th,
html[dir="rtl"] .admin-table td {
  text-align: right;
}

/* ---------- Responsive (Desktop / Tablet / Mobile) ---------- */
.top-bar-inner > div {
  min-width: 0;
  overflow-wrap: break-word;
}

.table-wrap {
  -webkit-overflow-scrolling: touch;
}

/* Tablet (<= 1024px) */
@media (max-width: 1024px) {
  .container {
    padding: 0 18px;
  }
  .hero {
    padding: 52px 0 46px;
  }
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .nav-links {
    display: none;
  }
  .product-grid {
    grid-template-columns: repeat(auto-fill, minmax(235px, 1fr));
    gap: 18px;
  }
  .product-modal-grid {
    grid-template-columns: 1fr;
  }
  .product-modal-img {
    min-height: 240px;
    max-height: 320px;
  }
  .contact-section {
    padding: 48px 0;
  }
}

/* Small Tablet / Large Mobile (<= 768px) */
@media (max-width: 768px) {
  .top-bar-inner {
    justify-content: center;
    text-align: center;
    gap: 6px 14px;
  }
  .hero {
    padding: 40px 0 38px;
  }
  .hero-badge {
    border-radius: 14px;
    line-height: 1.35;
    font-size: 0.78rem;
  }
  .hero-desc {
    font-size: 0.96rem;
    margin-bottom: 22px;
  }
  .hero-card {
    padding: 18px;
  }
  .catalog-section {
    padding: 34px 0 56px;
  }
  .catalog-toolbar {
    padding: 14px;
  }
  .toolbar-top {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
  .search-wrap {
    grid-column: 1 / -1;
  }
  .select-input,
  .checkbox-pill {
    width: 100%;
    min-height: 44px;
    justify-content: center;
  }
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
  .stat-card {
    padding: 14px 16px;
  }
  .stat-card strong {
    font-size: 1.45rem;
  }
  .panel-header {
    padding: 14px 16px;
  }
  .panel-header > div {
    width: 100%;
  }
  #admin-search {
    width: 100% !important;
    flex: 1 1 180px;
  }
  .admin-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
  .tab-btn {
    text-align: center;
    padding: 10px 12px;
    font-size: 0.88rem;
  }
}

/* Mobile Phones (<= 600px) */
@media (max-width: 600px) {
  .container {
    padding: 0 14px;
  }
  #top-announcement {
    display: none;
  }
  .top-bar-inner {
    padding: 7px 0;
    font-size: 0.78rem;
  }
  .top-bar-links {
    width: 100%;
    justify-content: space-between;
    gap: 8px;
  }
  .header-inner {
    min-height: 62px;
    gap: 8px;
  }
  .brand {
    gap: 9px;
  }
  .brand-mark {
    width: 40px;
    height: 40px;
    border-radius: 9px;
  }
  .brand-title {
    font-size: 0.9rem;
  }
  .brand-sub {
    font-size: 0.68rem;
  }
  #header-call-btn {
    display: none;
  }
  .header-actions {
    gap: 6px;
    flex-shrink: 0;
  }
  .lang-btn {
    padding: 6px 9px;
    font-size: 0.8rem;
  }
  .header-actions .btn-sm {
    padding: 7px 10px;
    font-size: 0.8rem;
  }
  .hero h1 {
    font-size: 1.75rem;
  }
  .hero-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .hero-actions .btn-lg {
    width: 100%;
    min-height: 46px;
  }
  .toolbar-top {
    grid-template-columns: 1fr;
  }
  .search-input,
  .select-input,
  .form-control {
    font-size: 16px;
  }
  .product-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .product-actions .btn {
    min-height: 42px;
  }
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .contact-card {
    padding: 18px;
  }
  .site-footer {
    padding: 28px 0 82px;
  }
  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .floating-wa {
    right: 16px;
    bottom: 16px;
    padding: 13px;
  }
  html[dir="rtl"] .floating-wa {
    left: 16px;
    right: auto;
  }
  .floating-wa span {
    display: none;
  }
  .modal-backdrop {
    padding: 10px;
    align-items: flex-end;
  }
  .modal-dialog {
    max-height: 92vh;
    border-radius: 16px;
  }
  .product-modal-img {
    min-height: 220px;
    max-height: 280px;
    padding: 14px;
    border-inline-end: none;
    border-bottom: 1px solid var(--slate-100);
  }
  .product-modal-img img {
    max-height: 250px;
  }
  .product-modal-info {
    padding: 18px;
    gap: 12px;
  }
  .product-modal-info h2 {
    font-size: 1.22rem;
  }
  .modal-price {
    font-size: 1.38rem;
  }
  .modal-header-bar {
    padding: 16px 18px;
  }
  .modal-body-pad {
    padding: 16px 18px;
  }
  .modal-footer-bar {
    padding: 14px 18px;
  }
  .form-row {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .admin-login-card {
    padding: 24px 20px;
  }
  .admin-table th,
  .admin-table td {
    padding: 10px 12px;
    font-size: 0.84rem;
  }
}

@media (max-width: 390px) {
  .brand-sub {
    display: none;
  }
  .brand-title {
    font-size: 0.84rem;
  }
  .top-bar-links {
    flex-direction: column;
    align-items: center;
    gap: 4px;
  }
}
