/* css/style.css */

/* Reset & Base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --background: #08080A;
  --surface: #111113;
  --surface-hover: #161618;
  --border: #1E1E22;
  --gold-primary: #C9A96E;
  --gold-light: #E2C89A;
  --gold-dim: #8A6E42;
  --text-primary: #F5F2EE;
  --text-muted: #7A7570;
  --text-faint: #2A2A2E;
  --in-stock: #2E7D32;
  --low-stock: #FF8F00;
  --out-of-stock: #D32F2F;
}

body {
  background-color: var(--background);
  color: var(--text-primary);
  font-family: 'DM Sans', Arial, sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: Georgia, 'Cormorant Garamond', serif;
  font-weight: normal;
}

h1 {
  font-size: 48px;
  letter-spacing: -0.02em;
}

h2 {
  font-size: 32px;
  margin-bottom: 24px;
}

h3 {
  font-size: 24px;
  margin-bottom: 16px;
}

.gold-text {
  color: var(--gold-primary);
}

/* Layout */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 96px 0;
}

/* Navigation */
.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  transition: all 0.3s ease;
  padding: 24px 0;
}

.navbar.scrolled {
  background: rgba(8, 8, 10, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  padding: 16px 0;
}

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

.logo {
  font-family: Georgia, serif;
  font-size: 24px;
  letter-spacing: 2px;
  text-decoration: none;
  color: var(--text-primary);
}

.logo span {
  color: var(--gold-primary);
}

.nav-links {
  display: flex;
  gap: 48px;
  align-items: center;
}

.nav-links a {
  color: var(--text-primary);
  text-decoration: none;
  transition: color 0.3s ease;
}

.nav-links a:hover {
  color: var(--gold-primary);
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 24px;
  cursor: pointer;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 32px;
  text-decoration: none;
  transition: all 0.3s ease;
  cursor: pointer;
  border: none;
  font-size: 16px;
}

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

.btn-primary:hover {
  background: var(--gold-light);
  transform: translateY(-2px);
}

.btn-secondary {
  border: 1px solid var(--gold-primary);
  color: var(--gold-primary);
  background: transparent;
}

.btn-secondary:hover {
  background: var(--gold-primary);
  color: var(--background);
}

/* Hero Section */
.hero {
  height: 100vh;
  position: relative;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom, rgba(0,0,0,0.6), rgba(8,8,10,0.9));
  z-index: 1;
}

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

.hero h1 {
  font-size: 72px;
  margin: 24px 0;
  line-height: 1.1;
}

.hero p {
  font-size: 18px;
  color: var(--text-muted);
  margin-bottom: 48px;
}

.hero-badge {
  color: var(--gold-primary);
  text-transform: uppercase;
  letter-spacing: 4px;
  font-size: 14px;
}

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

.product-card {
  cursor: pointer;
  transition: all 0.3s ease;
}

.product-card:hover {
  transform: translateY(-4px);
}

.product-card:hover .product-image img {
  transform: scale(1.05);
}

.product-image {
  aspect-ratio: 4/5;
  overflow: hidden;
  margin-bottom: 20px;
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.product-brand {
  color: var(--gold-primary);
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 8px;
  display: block;
}

.product-name {
  font-size: 20px;
  margin-bottom: 8px;
}

.product-price {
  font-size: 24px;
  font-family: Georgia, serif;
  color: var(--gold-primary);
  margin-bottom: 8px;
}

.stock-badge {
  font-size: 12px;
  padding: 4px 12px;
  border-radius: 0;
  display: inline-block;
}

.stock-in {
  background: var(--in-stock);
  color: white;
}

.stock-low {
  background: var(--low-stock);
  color: white;
}

.stock-out {
  background: var(--out-of-stock);
  color: white;
}

/* Filter Bar */
.filter-bar {
  background: var(--surface);
  padding: 20px;
  margin-bottom: 40px;
  position: sticky;
  top: 80px;
  z-index: 100;
  border: 1px solid var(--border);
}

.filter-group {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
}

.filter-controls {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.filter-controls select,
.filter-controls input {
  padding: 10px 16px;
  background: var(--background);
  border: 1px solid var(--border);
  color: var(--text-primary);
  font-size: 14px;
  cursor: pointer;
}

.search-input {
  padding: 10px 16px;
  background: var(--background);
  border: 1px solid var(--border);
  color: var(--text-primary);
  width: 250px;
}

.active-filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 16px;
}

.filter-chip {
  background: var(--gold-dim);
  color: var(--text-primary);
  padding: 4px 12px;
  font-size: 12px;
  cursor: pointer;
  transition: opacity 0.3s;
}

.filter-chip:hover {
  opacity: 0.8;
}

/* Product Detail */
.product-detail {
  padding-top: 120px;
  min-height: 100vh;
}

.product-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
}

.gallery-main {
  aspect-ratio: 4/5;
  overflow: hidden;
  cursor: pointer;
}

.gallery-main img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-thumbnails {
  display: flex;
  gap: 12px;
  margin-top: 16px;
}

.gallery-thumb {
  width: 80px;
  height: 80px;
  object-fit: cover;
  cursor: pointer;
  opacity: 0.6;
  transition: opacity 0.3s;
}

.gallery-thumb.active {
  opacity: 1;
  border: 2px solid var(--gold-primary);
}

.product-info h1 {
  font-size: 48px;
  margin: 16px 0;
}

.product-ref {
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 24px;
}

.product-price-large {
  font-size: 48px;
  color: var(--gold-primary);
  font-family: Georgia, serif;
  margin: 24px 0;
}

.specs-table {
  width: 100%;
  margin: 32px 0;
  border-collapse: collapse;
}

.specs-table td {
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.specs-table td:first-child {
  color: var(--text-muted);
  width: 40%;
}

.whatsapp-btn {
  background: #25D366;
  color: white;
  width: 100%;
  justify-content: center;
  margin-top: 24px;
}

.whatsapp-btn:hover {
  background: #128C7E;
}

/* Testimonials */
.testimonials {
  background: var(--surface);
}

.testimonial-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 32px;
  margin-top: 48px;
}

.testimonial-card {
  background: var(--background);
  padding: 32px;
  border: 1px solid var(--border);
}

.testimonial-quote {
  font-size: 18px;
  line-height: 1.6;
  margin-bottom: 24px;
  font-style: italic;
}

.testimonial-author {
  font-weight: bold;
  margin-bottom: 4px;
}

.testimonial-city {
  color: var(--text-muted);
  font-size: 14px;
}

.stars {
  color: var(--gold-primary);
  margin-bottom: 16px;
}

/* Admin Dashboard */
.admin-container {
  padding-top: 100px;
  min-height: 100vh;
}

.admin-header {
  background: var(--surface);
  padding: 24px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 40px;
}

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

.stat-card {
  background: var(--surface);
  padding: 24px;
  text-align: center;
  border: 1px solid var(--border);
}

.stat-value {
  font-size: 48px;
  color: var(--gold-primary);
  font-family: Georgia, serif;
}

.admin-table {
  width: 100%;
  background: var(--surface);
  border-collapse: collapse;
}

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

.admin-table th {
  background: var(--surface-hover);
  color: var(--gold-primary);
}

.delete-btn {
  background: var(--out-of-stock);
  color: white;
  padding: 4px 12px;
  border: none;
  cursor: pointer;
}

.edit-btn {
  background: var(--gold-primary);
  color: var(--background);
  padding: 4px 12px;
  border: none;
  cursor: pointer;
  margin-right: 8px;
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.8);
  z-index: 2000;
  justify-content: center;
  align-items: center;
}

.modal-content {
  background: var(--surface);
  max-width: 600px;
  width: 90%;
  padding: 32px;
  position: relative;
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  font-size: 24px;
  cursor: pointer;
}

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

.form-group label {
  display: block;
  margin-bottom: 8px;
  color: var(--gold-primary);
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 10px;
  background: var(--background);
  border: 1px solid var(--border);
  color: var(--text-primary);
}

/* Footer */
.footer {
  background: var(--surface);
  padding: 48px 0;
  margin-top: 48px;
  border-top: 1px solid var(--border);
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 48px;
}

.footer h4 {
  margin-bottom: 20px;
}

.footer a {
  color: var(--text-muted);
  text-decoration: none;
  display: block;
  margin-bottom: 12px;
  transition: color 0.3s;
}

.footer a:hover {
  color: var(--gold-primary);
}

/* Mobile Responsive */
@media (max-width: 768px) {
  h1 {
    font-size: 36px;
  }
  
  h2 {
    font-size: 28px;
  }
  
  .section {
    padding: 48px 0;
  }
  
  .nav-links {
    display: none;
  }
  
  .mobile-menu-btn {
    display: block;
  }
  
  .nav-links.active {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 80px;
    left: 0;
    width: 100%;
    background: var(--background);
    padding: 24px;
    gap: 24px;
  }
  
  .hero h1 {
    font-size: 48px;
  }
  
  .product-detail-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  
  .filter-group {
    flex-direction: column;
    align-items: stretch;
  }
  
  .search-input {
    width: 100%;
  }
  
  .admin-table {
    font-size: 12px;
  }
  
  .admin-table th,
  .admin-table td {
    padding: 8px;
  }
}

/* Animations */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-up {
  animation: fadeUp 0.6s ease-out;
}

/* Loading Spinner */
.loader {
  border: 3px solid var(--border);
  border-top: 3px solid var(--gold-primary);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
  margin: 40px auto;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
  }
