
:root {
  --primary: #E6C27A;
  --primary-hover: #d4b066;
  --bg-dark: #0F0F10;
  --bg-card: #121214;
  --bg-card-hover: #1a1a1b;
  --bg-panel: #18181b;
  --text-main: #EDEDED;
  --text-muted: #A9A9B2;
  --border: rgba(230, 194, 122, 0.15);
  --border-color: rgba(255, 255, 255, 0.1);
  --shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
  --font-main: 'Inter', sans-serif;
  --nav-height: 70px;
}

/* Reset & Base */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family: var(--font-main);
  line-height: 1.6;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.preloader-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
}

.preloader-line {
  width: 160px;
  height: 2px;
  background: rgba(230, 194, 122, 0.2);
  overflow: hidden;
  border-radius: 999px;
}

.preloader-line span {
  display: block;
  width: 50%;
  height: 100%;
  background: linear-gradient(90deg, #F5E3A3, #C9A24D);
  animation: preloaderSweep 1.6s infinite;
}

@keyframes preloaderSweep {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(200%); }
}

@keyframes pulse {
  0% { transform: scale(1); opacity: 0.75; }
  50% { transform: scale(1.05); opacity: 1; }
  100% { transform: scale(1); opacity: 0.75; }
}

@media (prefers-reduced-motion: reduce) {
  .preloader-line span {
    animation: none;
  }
  html { scroll-behavior: auto; }
  .product-card {
    transition: none;
  }
  .product-card::after {
    display: none;
  }
}
a { text-decoration: none; color: inherit; transition: color 0.3s ease; }
ul { list-style: none; }
img { max-width: 100%; display: block; }
main { flex: 1; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

/* Typography */
h1, h2, h3, h4, h5, h6 { color: var(--text-main); font-weight: 700; line-height: 1.2; }
h1 { font-size: 2.5rem; margin-bottom: 1rem; }
h2 { font-size: 2rem; margin-bottom: 0.75rem; color: var(--primary); }
p { color: var(--text-muted); margin-bottom: 1rem; }

/* Utilities */
.container { max-width: 1280px; margin: 0 auto; padding: 0 1.5rem; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0.75rem 1.5rem; border-radius: 8px; font-weight: 600; cursor: pointer;
  transition: all 0.3s ease; border: none; font-size: 0.95rem; min-height: 44px; /* Task 8: Touch Target */
}
.btn-primary { background: var(--primary); color: #000; }
.btn-primary:hover { background: var(--primary-hover); transform: translateY(-2px); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.btn-outline { border: 1px solid var(--border); background: transparent; color: var(--text-main); }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }
.btn-danger { background: rgba(220, 38, 38, 0.2); color: #fca5a5; border: 1px solid rgba(220, 38, 38, 0.5); }
.btn-danger:hover { background: rgba(220, 38, 38, 0.3); }

/* Header */
header {
  position: fixed; top: 0; width: 100%; z-index: 100;
  background: rgba(15, 15, 16, 0.9); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border); height: var(--nav-height);
  display: flex; align-items: center;
}
header .container { display: flex; justify-content: space-between; align-items: center; width: 100%; }
.logo { font-size: 1.5rem; font-weight: 800; color: var(--primary); display: flex; align-items: center; gap: 0.5rem; }
.nav-menu { display: flex; gap: 2rem; }
.nav-menu a { font-size: 0.9rem; font-weight: 500; }
.nav-menu a:hover { color: var(--primary); }
.mobile-toggle { display: none; background: none; border: none; color: var(--text-main); font-size: 1.5rem; cursor: pointer; min-height: 44px; min-width: 44px; }
.header-social { display: flex; align-items: center; gap: 0.75rem; }
.header-social a { display: inline-flex; }
.icon { width: 18px; height: 18px; stroke: var(--primary); fill: none; }

/* Hero */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding-top: var(--nav-height);
  position: relative;
  background: radial-gradient(circle at center, rgba(230,194,122,0.05) 0%, transparent 70%);
}
.hero h1 { font-size: 3.5rem; margin-bottom: 1rem; background: linear-gradient(to right, #fff, #999); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }

.hero-showroom-full {
  min-height: 70vh;
  width: 100%;
  padding: 0;
  overflow: hidden;
  background: radial-gradient(circle at center, rgba(230,194,122,0.12) 0%, rgba(15,15,16,0.9) 55%, #0F0F10 100%);
  position: relative;
  isolation: isolate;
}

.hero-showroom-full::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at center, rgba(230,194,122,0.18) 0%, transparent 55%),
    radial-gradient(circle at center, rgba(230,194,122,0.08) 0%, transparent 70%);
  opacity: 0.7;
  z-index: 0;
  pointer-events: none;
}

.hero-showroom-full::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, rgba(0,0,0,0) 0%, rgba(0,0,0,0.6) 70%);
  z-index: 0;
  pointer-events: none;
}

.hero-overlay {
  position: absolute;
  top: calc(var(--nav-height) + 1.5rem);
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  z-index: 2;
  max-width: 760px;
  padding: 0 1.5rem;
}

.hero-overlay h1 {
  font-size: clamp(2rem, 3.5vw, 3.75rem);
  margin-bottom: 0.75rem;
}

.hero-overlay p {
  color: rgba(237, 237, 237, 0.7);
  font-size: clamp(0.95rem, 1.4vw, 1.1rem);
}

/* Sections */
section { padding: 5rem 0; border-bottom: 1px solid rgba(255,255,255,0.03); }
.section-header { text-align: center; margin-bottom: 3rem; }
.section-header h2 { color: var(--primary); font-size: 2.25rem; }

/* Footer */
footer { padding: 4rem 0 2rem; background: #000; border-top: 1px solid var(--border); }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 3rem; margin-bottom: 3rem; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); padding-top: 2rem; text-align: center; font-size: 0.8rem; color: #555; }
.footer-policies { display: flex; justify-content: center; align-items: center; gap: 1rem; margin-top: 1rem; flex-wrap: wrap; }

/* Task 1 & 4: Admin Button */
.admin-login-btn {
    background-color: #d4af37;
    color: #000 !important;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-weight: bold;
    cursor: pointer;
    font-size: 0.8rem;
    min-height: 44px; /* Mobile touch target */
}

/* Task 5: Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    align-items: center; /* Centering */
    justify-content: center; /* Centering */
}

.modal.active {
    display: flex !important;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    z-index: 1;
}

.modal-content {
    position: relative;
    z-index: 2;
    background: var(--bg-panel);
    width: 90%;
    max-width: 400px;
    padding: 2.5rem;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    border: 1px solid var(--border-color);
    animation: slideUp 0.3s ease forwards;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.modal-header h2 { font-size: 1.5rem; text-align: center; color: var(--text-main); margin-bottom: 1.5rem; }
.modal-body { margin-bottom: 1.5rem; text-align: center; }

.passcode-input {
    width: 100%;
    background: rgba(0,0,0,0.3);
    border: 1px solid var(--border-color);
    color: var(--primary);
    font-size: 2rem;
    text-align: center;
    letter-spacing: 0.5rem;
    padding: 1rem;
    border-radius: 8px;
    outline: none;
    transition: border-color 0.3s;
}

.passcode-input:focus { border-color: var(--primary); }

.error-msg {
    color: #ef4444;
    font-size: 0.9rem;
    margin-top: 1rem;
    min-height: 1.5rem;
    font-weight: 500;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
}

/* Admin Styles */
.admin-sidebar {
    background: var(--bg-panel);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    padding: 1rem;
}

.tab-btn {
    text-align: left;
    padding: 1rem;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-weight: 500;
    border-radius: 4px;
    transition: all 0.2s;
}

.tab-btn:hover { background: rgba(255,255,255,0.05); color: var(--text-main); }
.tab-btn.active { background: var(--primary); color: #000; }

.panel { display: none; }
.panel.active { display: block; animation: fadeIn 0.3s; }

.item-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: rgba(255,255,255,0.03);
    border-bottom: 1px solid var(--border-color);
}
.form-group { margin-bottom: 1rem; }
.form-group label { display: block; margin-bottom: 0.5rem; color: var(--text-muted); }
.form-input { width: 100%; padding: 0.5rem; background: #000; border: 1px solid var(--border-color); color: #fff; border-radius: 4px; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* QA Overlay */
#qa-overlay {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 90vw;
    max-width: 600px;
    background: #0F0F10;
    border: 1px solid #333;
    border-radius: 8px;
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    font-family: monospace;
    font-size: 12px;
}

.qa-header {
    background: #1a1a1a;
    padding: 8px 12px;
    border-bottom: 1px solid #333;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 8px 8px 0 0;
}

.qa-title { font-weight: bold; color: #E6C27A; }
.qa-controls button {
    background: #333;
    border: none;
    color: #fff;
    padding: 4px 8px;
    cursor: pointer;
    border-radius: 4px;
    font-size: 10px;
    margin-left: 4px;
}
.qa-controls button:hover { background: #444; }

.qa-filters {
    padding: 8px;
    border-bottom: 1px solid #333;
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}
.qa-filters button {
    background: transparent;
    border: 1px solid #444;
    color: #888;
    padding: 4px 8px;
    cursor: pointer;
    border-radius: 4px;
}
.qa-filters button.active {
    background: #333;
    color: #fff;
    border-color: #666;
}

.qa-console {
    height: 300px;
    overflow-y: auto;
    padding: 8px;
    background: #000;
}

.qa-log-line {
    padding: 2px 0;
    border-bottom: 1px solid #111;
    word-break: break-all;
}
.qa-time { color: #666; margin-right: 8px; }
.qa-type { font-weight: bold; margin-right: 8px; }

.qa-status-bar {
    padding: 8px;
    background: #1a1a1a;
    border-top: 1px solid #333;
    border-radius: 0 0 8px 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #888;
}
#qa-run-tests {
    background: #22c55e;
    color: #000;
    border: none;
    padding: 4px 12px;
    border-radius: 4px;
    font-weight: bold;
    cursor: pointer;
}

/* Responsive */
@media (max-width: 768px) {
  .hero h1 { font-size: 2.5rem; }
  .nav-menu { display: none; } /* Simplified for this view */
  .mobile-toggle { display: block; }
  .header-social { display: none; }
  .footer-policies { flex-direction: column; }
  .modal-content { width: 95%; padding: 1.5rem; }
  .container { flex-direction: column; }
  .admin-sidebar { width: 100%; border-right: none; border-bottom: 1px solid var(--border-color); }
  #qa-overlay { width: 95vw; left: 2.5vw; right: auto; bottom: 10px; }
  .masonry { column-count: 1; }
  .hero-showroom-full {
    min-height: 60vh;
  }
  .showroom-canvas {
    min-height: 60vh;
    height: 60vh;
  }
}

.grid-cols-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 2rem; }
.card { background: var(--bg-card); padding: 1.5rem; border-radius: 12px; border: 1px solid var(--border); }
.card-img { height: 200px; background-color: #222; margin-bottom: 1rem; border-radius: 8px; background-size: cover; }
.card-meta { font-size: 0.8rem; color: var(--text-muted); margin-bottom: 0.5rem; }
.carousel {
  display: flex;
  gap: 1.5rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
  scroll-snap-type: x mandatory;
}

.carousel .card {
  min-width: 260px;
  scroll-snap-align: start;
}

.masonry {
  column-count: 3;
  column-gap: 1.5rem;
}

.masonry .card {
  break-inside: avoid;
  margin-bottom: 1.5rem;
}

.hidden { display: none !important; }
.btn-link { color: var(--primary); font-weight: 600; }

.hero-grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  align-items: center;
}

.showroom-canvas {
  width: 100%;
  min-height: 70vh;
  height: 70vh;
  cursor: grab;
  display: block;
  position: relative;
  z-index: 1;
}

.highlight-card .icon-circle {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  margin-bottom: 0.75rem;
}

.card-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
}

.product-card {
  position: relative;
  overflow: hidden;
  transform-style: preserve-3d;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.product-card:hover {
  transform: translateY(-6px) rotateX(2deg);
  box-shadow: var(--shadow);
}

.product-card::after {
  content: '';
  position: absolute;
  inset: -50% auto auto -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(120deg, transparent, rgba(230, 194, 122, 0.2), transparent);
  transform: translateX(-100%);
  transition: transform 0.6s ease;
}

.product-card:hover::after {
  transform: translateX(0%);
}

.template-glass {
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(6px);
}

.template-gold-edge {
  border-color: rgba(230, 194, 122, 0.4);
  box-shadow: 0 0 0 1px rgba(230, 194, 122, 0.15);
}

.template-split {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 1rem;
  align-items: center;
}

.template-split .card-img {
  height: 120px;
  margin-bottom: 0;
}

.template-compact {
  padding: 1rem;
}

.template-cinematic {
  background: linear-gradient(145deg, rgba(18,18,20,0.95), rgba(12,12,13,0.95));
  border-color: rgba(230, 194, 122, 0.25);
}

.partners-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1.5rem;
}

.partner-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg-card);
}

.partner-card img {
  width: 64px;
  height: 64px;
  object-fit: contain;
}

.instagram-grid {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
  scroll-snap-type: x mandatory;
}

.instagram-item {
  min-width: 160px;
  height: 160px;
  border-radius: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  overflow: hidden;
  scroll-snap-align: start;
  display: flex;
  align-items: center;
  justify-content: center;
}

.instagram-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.blog-strip {
  display: flex;
  gap: 1.5rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
  scroll-snap-type: x mandatory;
}

.blog-strip .card {
  min-width: 280px;
  scroll-snap-align: start;
}

.block {
  margin-top: 1.5rem;
}

.block-text {
  color: var(--text-muted);
}

.block-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1rem;
}

.block-gallery img {
  width: 100%;
  border-radius: 10px;
  border: 1px solid var(--border);
}

.block-embed iframe {
  width: 100%;
  min-height: 320px;
  border: none;
  border-radius: 12px;
  background: #000;
}

.block-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin-top: 2rem;
}

.instagram-placeholder {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.contact-grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.contact-form .form-input {
  margin-bottom: 0.75rem;
}

.offer-card .offer-badge {
  display: inline-block;
  padding: 0.25rem 0.5rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.75rem;
  color: var(--primary);
  margin-bottom: 0.75rem;
}

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

.nav-menu.active {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  background: var(--bg-panel);
  position: absolute;
  top: var(--nav-height);
  right: 0;
  left: 0;
  padding: 1.5rem;
  border-bottom: 1px solid var(--border);
}
