/* Extended Styling for IKEA-Style Kitchen Web Application & Enterprise Admin Dashboard (Egypt - EGP)
   Includes Full Ultra-Luxurious Persistent Dark Mode System, RTL Tajawal/Cairo Fonts, Hotspots, & Print Formatting */

:root {
  --primary-color: #0058a3;
  --primary-hover: #004f93;
  --gold-accent: #eab308;
  --gold-hover: #ca8a04;
  --bg-color: #f8fafc;
  --card-bg: #ffffff;
  --text-color: #0f172a;
  --text-muted: #64748b;
  --border-color: #e2e8f0;
  --header-bg: rgba(255, 255, 255, 0.95);
  --modal-bg: #ffffff;
  --table-stripe: #f8fafc;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 25px -5px rgba(0, 0, 0, 0.15);
}

/* ULTRA-LUXURIOUS DARK MODE THEME */
body.dark-theme {
  --primary-color: #38bdf8;
  --primary-hover: #0284c7;
  --gold-accent: #facc15;
  --gold-hover: #eab308;
  --bg-color: #090d16;
  --card-bg: #131b2e;
  --text-color: #f8fafc;
  --text-muted: #94a3b8;
  --border-color: #1e293b;
  --header-bg: rgba(15, 23, 42, 0.96);
  --modal-bg: #111827;
  --table-stripe: #1e293b;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.6);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.7);
  --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.8);
}

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

body {
  font-family: 'Cairo', 'Tajawal', sans-serif;
  background-color: var(--bg-color);
  color: var(--text-color);
  direction: rtl;
  line-height: 1.6;
  transition: background-color 0.3s ease, color 0.3s ease;
}

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

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  outline: none;
}

/* Announcement Top Bar */
.top-announcement {
  background: linear-gradient(90deg, #0058a3, #003b70);
  color: #ffffff;
  font-size: 0.85rem;
  padding: 8px 0;
  font-weight: 600;
}

body.dark-theme .top-announcement {
  background: linear-gradient(90deg, #1e293b, #0f172a);
  border-bottom: 1px solid #334155;
}

.announcement-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

/* Header & Nav */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--header-bg);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-color);
  padding: 12px 0;
  transition: all 0.3s ease;
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

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

.logo-box {
  background-color: #ffcc00;
  color: #0058a3;
  font-weight: 900;
  font-size: 1.4rem;
  padding: 4px 12px;
  border-radius: 4px;
  letter-spacing: 1px;
}

.brand-title {
  font-weight: 800;
  font-size: 1.1rem;
  display: block;
}

.brand-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
  display: block;
}

.main-nav ul {
  display: flex;
  list-style: none;
  gap: 20px;
}

.main-nav a {
  font-weight: 600;
  font-size: 0.9rem;
  padding: 6px 12px;
  border-radius: 8px;
  transition: all 0.2s ease;

}

.main-nav a:hover, .main-nav a.active {
  background-color: rgba(0, 88, 163, 0.1);
  color: var(--primary-color);
}

body.dark-theme .main-nav a:hover, body.dark-theme .main-nav a.active {
  background-color: rgba(56, 189, 248, 0.15);
  color: var(--primary-color);
}

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

.icon-btn {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  color: var(--text-color);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  font-size: 1rem;
  transition: all 0.2s ease;
}

.icon-btn:hover {
  background: var(--border-color);
  transform: translateY(-2px);
}

.icon-btn .badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: #ef4444;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 800;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.9rem;
  transition: all 0.2s ease;
}

.btn-primary {
  background-color: var(--primary-color);
  color: #ffffff;
}

.btn-primary:hover {
  background-color: var(--primary-hover);
  transform: translateY(-1px);
}

.btn-gold {
  background-color: var(--gold-accent);
  color: #0f172a;
}

.btn-gold:hover {
  background-color: var(--gold-hover);
  transform: translateY(-1px);
}

.btn-dark {
  background-color: #1e293b;
  color: #ffffff;
}

body.dark-theme .btn-dark {
  background-color: #334155;
  color: #ffffff;
}

.btn-dark:hover {
  background-color: #0f172a;
}

.btn-whatsapp {
  background-color: #22c55e;
  color: #ffffff;
}

.btn-whatsapp:hover {
  background-color: #16a34a;
}

.btn-ai {
  background: linear-gradient(135deg, #a855f7, #6366f1);
  color: #ffffff;
}

.btn-lg {
  padding: 14px 28px;
  font-size: 1rem;
}

.btn-block {
  width: 100%;
}

/* Container */
.container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Hero Section */
.hero-section {
  position: relative;
  background: url('https://images.unsplash.com/photo-1556911220-e15b29be8c8f?auto=format&fit=crop&w=2000&q=80') center/cover no-repeat;
  color: #ffffff;
  padding: 120px 0 90px 0;
  overflow: hidden;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(9, 13, 22, 0.85) 0%, rgba(9, 13, 22, 0.95) 100%);
}

.hero-content {
  position: relative;
  z-index: 10;
  max-width: 800px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(234, 179, 8, 0.2);
  color: #facc15;
  border: 1px solid rgba(234, 179, 8, 0.4);
  padding: 6px 16px;
  border-radius: 30px;
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 20px;
}

.hero-section h1 {
  font-size: 2.8rem;
  font-weight: 900;
  line-height: 1.25;
  margin-bottom: 16px;
}

.hero-section p {
  font-size: 1.15rem;
  color: #cbd5e1;
  margin-bottom: 32px;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 48px;
}

.hero-features {
  display: flex;
  gap: 32px;
  flex-wrap: wrap;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  padding-top: 24px;
}

.hero-feat-item {
  display: flex;
  align-items: center;
  gap: 12px;
}

.hero-feat-item i {
  font-size: 1.8rem;
  color: var(--gold-accent);
}

/* Sections Base */
.section-padding {
  padding: 80px 0;
}

.bg-light {
  background-color: var(--bg-color);
}

.bg-dark {
  background-color: #0f172a;
}

body.dark-theme .bg-dark {
  background-color: #04070d;
}

.section-header {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 50px auto;
}

.section-header .sub-title {
  color: var(--primary-color);
  font-weight: 800;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  display: block;
  margin-bottom: 8px;
}

.section-header h2 {
  font-size: 2.2rem;
  font-weight: 900;
  margin-bottom: 12px;
}

.section-header p {
  color: var(--text-muted);
  font-size: 1rem;
}

/* Room Showcase & Hotspots */
.room-tabs {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 30px;
  flex-wrap: wrap;
}

.room-tab-btn {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  color: var(--text-color);
  padding: 10px 24px;
  border-radius: 30px;
  font-weight: 700;
  font-size: 0.9rem;
  transition: all 0.2s ease;
}

.room-tab-btn.active, .room-tab-btn:hover {
  background: var(--primary-color);
  color: #ffffff;
  border-color: var(--primary-color);
}

.interactive-room-wrapper {
  position: relative;
  width: 100%;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.interactive-room-img {
  width: 100%;
  height: 540px;
  object-fit: cover;
  display: block;
}

.hotspot-pin {
  position: absolute;
  width: 32px;
  height: 32px;
  transform: translate(-50%, -50%);
  cursor: pointer;
  z-index: 50;
}

.hotspot-dot {
  width: 16px;
  height: 16px;
  background: #ffffff;
  border: 3px solid var(--primary-color);
  border-radius: 50%;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.hotspot-ring {
  width: 32px;
  height: 32px;
  border: 2px solid #ffffff;
  border-radius: 50%;
  animation: pulse-ring 1.8s infinite ease-out;
}

@keyframes pulse-ring {
  0% { transform: scale(0.5); opacity: 1; }
  100% { transform: scale(1.5); opacity: 0; }
}

.hotspot-popover {
  position: absolute;
  bottom: 42px;
  right: 50%;
  transform: translateX(50%);
  width: 280px;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 14px;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 100;
  pointer-events: none;
}

.hotspot-popover.visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.popover-flex {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 10px;
}

.popover-img {
  width: 60px;
  height: 60px;
  border-radius: 8px;
  object-fit: cover;
}

.popover-info strong {
  font-size: 0.9rem;
  display: block;
}

.popover-info small {
  color: var(--text-muted);
  font-size: 0.75rem;
  display: block;
}

.popover-price {
  color: var(--primary-color);
  font-weight: 800;
  font-size: 0.95rem;
  margin-top: 4px;
}

.popover-btn {
  width: 100%;
  background: var(--primary-color);
  color: #fff;
  padding: 8px;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 700;
}

.room-footer-bar {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-top: none;
  border-radius: 0 0 20px 20px;
  padding: 20px 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

/* Customizer Box */
.customizer-box {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 32px;
  box-shadow: var(--shadow-md);
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 32px;
}

.swatches-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.swatch-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-color);
  border: 1px solid var(--border-color);
  color: var(--text-color);
  padding: 8px 14px;
  border-radius: 10px;
  font-size: 0.85rem;
  font-weight: 600;
  transition: all 0.2s ease;
}

.swatch-btn.active, .swatch-btn:hover {
  border-color: var(--primary-color);
  background: rgba(0, 88, 163, 0.08);
}

.swatch-color-circle {
  width: 16px;
  height: 16px;
  border-radius: 50%;
}

.customizer-preview-frame {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  height: 360px;
}

.customizer-preview-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.customizer-overlay-tag {
  position: absolute;
  bottom: 16px;
  right: 16px;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(8px);
  color: #fff;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 700;
}

/* Calculator Grid */
.calculator-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 32px;
}

.calc-inputs-card, .result-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 32px;
  box-shadow: var(--shadow-md);
}

.calc-group {
  margin-bottom: 24px;
}

.calc-label {
  display: block;
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 8px;
}

.shape-options {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.shape-card {
  background: var(--bg-color);
  border: 1px solid var(--border-color);
  padding: 12px;
  border-radius: 12px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.shape-card.active, .shape-card:hover {
  border-color: var(--primary-color);
  background: rgba(0, 88, 163, 0.08);
}

.shape-icon {
  font-size: 1.2rem;
  font-weight: 900;
  color: var(--primary-color);
}

.range-slider {
  width: 100%;
  accent-color: var(--primary-color);
}

.custom-select, .form-control {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg-color);
  border: 1px solid var(--border-color);
  color: var(--text-color);
  border-radius: 10px;
  font-family: inherit;
  font-size: 0.9rem;
}

.price-big-display {
  text-align: center;
  padding: 24px 0;
}

.price-num {
  font-size: 2.8rem;
  font-weight: 900;
  color: var(--primary-color);
  display: block;
}

.price-curr {
  font-size: 1rem;
  color: var(--text-muted);
  font-weight: 700;
}

.vat-note {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 24px;
}

.installment-calc-box {
  background: var(--bg-color);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 24px;
}

.inst-title {
  font-weight: 700;
  font-size: 0.85rem;
  margin-bottom: 8px;
}

.inst-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
}

/* Modals & Drawers */
.modal-overlay, .drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  z-index: 2000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.modal-overlay.active, .drawer-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-dialog {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.95);
  background: var(--modal-bg);
  color: var(--text-color);
  width: 520px;
  max-width: 90vw;
  border-radius: 20px;
  box-shadow: var(--shadow-lg);
  z-index: 2001;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.modal-dialog.active {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, -50%) scale(1);
}

.modal-header, .drawer-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.close-modal-btn, .close-drawer-btn {
  background: none;
  font-size: 1.6rem;
  color: var(--text-muted);
}

.modal-body, .drawer-body {
  padding: 24px;
}

.side-drawer {
  position: fixed;
  top: 0;
  bottom: 0;
  right: -400px;
  width: 380px;
  max-width: 85vw;
  background: var(--modal-bg);
  color: var(--text-color);
  box-shadow: var(--shadow-lg);
  z-index: 2001;
  transition: right 0.3s ease;
  display: flex;
  flex-direction: column;
}

.side-drawer.active {
  right: 0;
}

/* AI Floating Widget */
.ai-widget-wrapper {
  position: fixed;
  bottom: 30px;
  left: 30px;
  z-index: 1500;
}

.ai-fab-btn {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, #a855f7, #6366f1);
  color: #fff;
  font-size: 1.6rem;
  box-shadow: 0 8px 20px rgba(168, 85, 247, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease;
}

.ai-fab-btn:hover {
  transform: scale(1.1);
}

.ai-chat-window {
  position: absolute;
  bottom: 80px;
  left: 0;
  width: 360px;
  height: 480px;
  background: var(--modal-bg);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all 0.3s ease;
}

.ai-chat-window.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.chat-header {
  background: #1e293b;
  color: #fff;
  padding: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.chat-messages {
  flex-grow: 1;
  padding: 16px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.msg {
  max-width: 85%;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 0.85rem;
}

.msg-bot {
  background: var(--bg-color);
  align-self: flex-start;
  border-bottom-right-radius: 2px;
}

.msg-user {
  background: var(--primary-color);
  color: #fff;
  align-self: flex-end;
  border-bottom-left-radius: 2px;
}

.chat-input-area {
  padding: 12px;
  border-top: 1px solid var(--border-color);
  display: flex;
  gap: 8px;
}

.chat-input-area input {
  flex-grow: 1;
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 8px 14px;
  font-size: 0.85rem;
  background: var(--bg-color);
  color: var(--text-color);
}

.send-msg-btn {
  background: var(--primary-color);
  color: #fff;
  width: 36px;
  height: 36px;
  border-radius: 50%;

}

/* Toast Notifications System */
.toast-notification {
  position: fixed;
  bottom: 24px;
  left: 24px;
  top: auto;
  right: auto;
  width: auto;
  max-width: 420px;
  background: #10b981;
  color: #ffffff;
  padding: 14px 24px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 0.95rem;
  box-shadow: 0 10px 25px rgba(16, 185, 129, 0.4);
  z-index: 10000;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.3s ease;
  pointer-events: none;
}

.toast-notification.active {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* Footer */
.site-footer {
  background: #0f172a;
  color: #94a3b8;
  padding: 60px 0 20px 0;
}

body.dark-theme .site-footer {
  background: #050811;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-col h4 {
  color: #fff;
  margin-bottom: 16px;
}

.footer-col ul {
  list-style: none;
}

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

.footer-bottom {
  border-top: 1px solid #1e293b;
  padding-top: 20px;
  font-size: 0.85rem;
}

.bottom-flex {
  display: flex;
  justify-content: space-between;
}

/* Responsive Media Queries */
@media (max-width: 992px) {
  .customizer-box, .calculator-grid {
    grid-template-columns: 1fr;
  }
  .main-nav { display: none; }
}

/* Print Formatting (A4 Documents) */
@media print {
  body { background: #fff !important; color: #000 !important; }
  .site-header, .site-footer, .top-announcement, .ai-widget-wrapper, .no-print { display: none !important; }
  .modal-dialog { position: relative !important; top: 0 !important; left: 0 !important; transform: none !important; width: 100% !important; max-width: 100% !important; box-shadow: none !important; }
}
