/* Base Styles */
:root {
  --primary-green: #344A23;
  --accent-gold: #C8B376;
  --text-light: #ffffff;
  --text-dark: #2E4A3F;
  --bg-light: #ffffff;
  --bg-dark: #1a1a1a;
  --card-bg-light: #f8f9fa;
  --card-bg-dark: #2d2d2d;
  --border-light: #e0e0e0;
  --border-dark: #404040;
  --shadow-light: 0 4px 6px rgba(0, 0, 0, 0.1);
  --shadow-dark: 0 4px 6px rgba(0, 0, 0, 0.3);
}

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

body {
  font-family: 'Open Sans', 'Source Han Serif', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  background: var(--bg-light);
  color: var(--text-dark);
  transition: background-color 0.3s, color 0.3s;
}

body.dark-mode {
  background: var(--bg-dark);
  color: var(--text-light);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Header */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 48px;
  background: #344A23;
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  position: sticky;
  top: 0;
  z-index: 1000;
}
.logo {
  display: flex;
  align-items: center;
  gap: 16px;
  white-space: nowrap;
  height: 56px;
}
.logo svg {
  height: 48px;
  width: 48px;
  display: block;
}
.logo span {
  font-family: 'Playfair Display', serif;
  font-size: 2rem;
  font-weight: 900;
  color: #C8B376;
  letter-spacing: 0.06em;
  margin-left: 0.2em;
  line-height: 1;
  display: inline-block;
}
.navbar nav a {
  color: #C8B376;
  text-decoration: none;
  margin-left: 32px;
  font-size: 1rem;
  transition: color 0.2s;
  background: none;
  -webkit-background-clip: initial;
  -webkit-text-fill-color: initial;
  background-clip: initial;
}
.navbar nav a:hover {
  background: linear-gradient(135deg, #C8B376 0%, #D4AF37 50%, #C8B376 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.theme-toggle button {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
  transition: background-color 0.3s;
}

.theme-toggle button:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* Hero Section */
.fabric-hero {
  background: linear-gradient(135deg, var(--primary-green) 0%, #2E4A3F 100%);
  color: var(--text-light);
  padding: 80px 0;
  text-align: center;
}

.fabric-hero h1 {
  font-family: 'Playfair Display', serif;
  font-size: 3rem;
  margin-bottom: 1rem;
}

.fabric-hero p {
  font-size: 1.2rem;
  opacity: 0.9;
}

/* Filter Tools */
.fabric-tools {
  background: var(--card-bg-light);
  padding: 40px 0;
  border-bottom: 1px solid var(--border-light);
}

body.dark-mode .fabric-tools {
  background: var(--card-bg-dark);
  border-bottom-color: var(--border-dark);
}

.filters {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.filter-btn {
  background: var(--bg-light);
  border: 2px solid var(--border-light);
  color: var(--text-dark);
  padding: 12px 24px;
  border-radius: 25px;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.3s;
}

body.dark-mode .filter-btn {
  background: var(--bg-dark);
  border-color: var(--border-dark);
  color: var(--text-light);
}

.filter-btn:hover,
.filter-btn.active {
  background: var(--accent-gold);
  border-color: var(--accent-gold);
  color: var(--text-dark);
}

.advanced-filters {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
}

.filter-group {
  display: flex;
  gap: 1rem;
}

.filter-group select {
  background: var(--bg-light);
  border: 1px solid var(--border-light);
  color: var(--text-dark);
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 0.9rem;
  min-width: 150px;
}

body.dark-mode .filter-group select {
  background: var(--bg-dark);
  border-color: var(--border-dark);
  color: var(--text-light);
}

.more-filters-btn {
  background: none;
  border: 1px solid var(--accent-gold);
  color: var(--accent-gold);
  padding: 10px 20px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.3s;
}

.more-filters-btn:hover {
  background: var(--accent-gold);
  color: var(--text-dark);
}

.comparison-tools {
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
}

.compare-btn,
.clear-selection-btn {
  background: var(--primary-green);
  color: var(--text-light);
  border: none;
  padding: 12px 24px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.3s;
}

.compare-btn:hover:not(:disabled),
.clear-selection-btn:hover {
  background: #2E4A3F;
}

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

/* Fabric Grid */
.fabric-grid-section {
  padding: 60px 0;
}

.fabric-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
}

/* Skeleton Loaders */
.skeleton-card {
  background: var(--card-bg-light);
  border-radius: 12px;
  padding: 1rem;
  box-shadow: var(--shadow-light);
  animation: pulse 1.5s infinite;
}

body.dark-mode .skeleton-card {
  background: var(--card-bg-dark);
  box-shadow: var(--shadow-dark);
}

.skeleton-img {
  width: 100%;
  height: 200px;
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  border-radius: 8px;
  margin-bottom: 1rem;
}

body.dark-mode .skeleton-img {
  background: linear-gradient(90deg, #404040 25%, #505050 50%, #404040 75%);
}

.skeleton-text {
  height: 16px;
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  border-radius: 4px;
  margin-bottom: 0.5rem;
}

body.dark-mode .skeleton-text {
  background: linear-gradient(90deg, #404040 25%, #505050 50%, #404040 75%);
}

@keyframes pulse {
  0% { opacity: 1; }
  50% { opacity: 0.7; }
  100% { opacity: 1; }
}

/* Fabric Cards */
.fabric-card {
  background: var(--card-bg-light);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-light);
  transition: all 0.3s;
  cursor: pointer;
}

body.dark-mode .fabric-card {
  background: var(--card-bg-dark);
  box-shadow: var(--shadow-dark);
}

.fabric-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.fabric-card.selected {
  border: 2px solid var(--accent-gold);
}

.fabric-card img {
  width: 100%;
  height: 250px;
  object-fit: cover;
}

.fabric-info {
  padding: 1.5rem;
}

.fabric-info h4 {
  font-family: 'Playfair Display', serif;
  font-size: 1.2rem;
  margin-bottom: 1rem;
  color: var(--text-dark);
}

body.dark-mode .fabric-info h4 {
  color: var(--text-light);
}

.fabric-info ul {
  list-style: none;
  margin-bottom: 1.5rem;
}

.fabric-info li {
  padding: 0.25rem 0;
  font-size: 0.9rem;
  color: var(--text-dark);
  opacity: 0.8;
}

body.dark-mode .fabric-info li {
  color: var(--text-light);
}

.view-in-room {
  background: var(--accent-gold);
  color: var(--text-dark);
  border: none;
  padding: 10px 20px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 500;
  width: 100%;
  transition: background-color 0.3s;
}

.view-in-room:hover {
  background: #b8a366;
}

/* Consultation CTA */
.consultation-cta {
  background: linear-gradient(135deg, var(--primary-green) 0%, #2E4A3F 100%);
  color: var(--text-light);
  padding: 80px 0;
  text-align: center;
}

.cta-content h2 {
  font-family: 'Playfair Display', serif;
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.cta-content p {
  font-size: 1.1rem;
  margin-bottom: 2rem;
  opacity: 0.9;
}

.btn {
  display: inline-block;
  background: var(--accent-gold);
  color: var(--text-dark);
  text-decoration: none;
  padding: 15px 30px;
  border-radius: 8px;
  font-weight: 600;
  transition: all 0.3s;
  border: none;
  cursor: pointer;
}

.btn:hover {
  background: #b8a366;
  transform: translateY(-2px);
}

.btn-large {
  padding: 18px 36px;
  font-size: 1.1rem;
}

/* Modals */
.room-preview-modal,
.comparison-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  z-index: 2000;
  backdrop-filter: blur(5px);
}

.modal-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: var(--bg-light);
  border-radius: 12px;
  max-width: 90vw;
  max-height: 90vh;
  overflow: auto;
  box-shadow: var(--shadow-light);
}

body.dark-mode .modal-content {
  background: var(--bg-dark);
  box-shadow: var(--shadow-dark);
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  font-size: 2rem;
  cursor: pointer;
  color: var(--text-dark);
  z-index: 10;
}

body.dark-mode .modal-close {
  color: var(--text-light);
}

.modal-body {
  display: flex;
  gap: 2rem;
  padding: 2rem;
}

.preview-image {
  flex: 1;
  max-width: 500px;
}

.preview-image img {
  width: 100%;
  height: auto;
  border-radius: 8px;
}

.preview-info {
  flex: 1;
  max-width: 400px;
}

.preview-info h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.fabric-specs {
  margin-bottom: 2rem;
}

.fabric-specs div {
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border-light);
}

body.dark-mode .fabric-specs div {
  border-bottom-color: var(--border-dark);
}

.preview-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.sample-btn {
  background: var(--accent-gold);
  color: var(--text-dark);
}

.consult-btn {
  background: var(--primary-green);
  color: var(--text-light);
}

/* Comparison Modal */
.comparison-modal .modal-content {
  width: 90vw;
  max-width: 1200px;
}

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

/* Footer */
footer {
  background: var(--primary-green);
  color: var(--text-light);
  padding: 40px 0 20px;
}

.footer-main {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: 'Playfair Display', serif;
  font-weight: 700;
}

.footer-nav {
  display: flex;
  gap: 2rem;
}

.footer-nav a {
  color: var(--text-light);
  text-decoration: none;
  transition: color 0.3s;
}

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

.footer-copy {
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  opacity: 0.8;
}

/* Responsive Design */
@media (max-width: 768px) {
  .navbar .container {
    flex-direction: column;
    gap: 1rem;
  }

  nav {
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
  }

  .fabric-hero h1 {
    font-size: 2rem;
  }

  .filters {
    justify-content: center;
  }

  .advanced-filters {
    flex-direction: column;
    gap: 1rem;
  }

  .filter-group {
    flex-direction: column;
    width: 100%;
  }

  .filter-group select {
    width: 100%;
  }

  .comparison-tools {
    justify-content: center;
  }

  .fabric-grid {
    grid-template-columns: 1fr;
  }

  .modal-body {
    flex-direction: column;
    padding: 1rem;
  }

  .preview-image,
  .preview-info {
    max-width: none;
  }

  .footer-main {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }

  .footer-nav {
    flex-wrap: wrap;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 15px;
  }

  .fabric-hero {
    padding: 60px 0;
  }

  .fabric-tools {
    padding: 30px 0;
  }

  .fabric-grid-section {
    padding: 40px 0;
  }
} 