/* Tayyabi Stores - Complete Stylesheet */

:root {
  --primary: #0d9488;
  --primary-dark: #0f766e;
  --primary-light: #14b8a6;
  --accent: #d4a845;
  --accent-dark: #b8922d;
  --background: #ffffff;
  --foreground: #1f2937;
  --muted: #f3f4f6;
  --muted-foreground: #6b7280;
  --border: #e5e7eb;
  --card: #ffffff;
  --card-foreground: #1f2937;
}

/* Dark Mode */
.dark {
  --background: #0f172a;
  --foreground: #f1f5f9;
  --muted: #1e293b;
  --muted-foreground: #94a3b8;
  --border: #334155;
  --card: #1e293b;
  --card-foreground: #f1f5f9;
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--background);
  color: var(--foreground);
  line-height: 1.6;
}

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

img {
  max-width: 100%;
  height: auto;
}

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* Navigation */
.navbar {
  background: var(--primary);
  color: white;
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

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

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  display: flex;
  flex-direction: column;
}

.logo span {
  font-size: 0.75rem;
  font-weight: 400;
  opacity: 0.9;
}

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  color: white;
  font-weight: 500;
  transition: opacity 0.2s;
  padding: 0.5rem 0;
}

.nav-links a:hover {
  opacity: 0.8;
}

.nav-links a.active {
  border-bottom: 2px solid var(--accent);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.call-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--accent);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  font-weight: 500;
  transition: background 0.2s;
}

.call-btn:hover {
  background: var(--accent-dark);
}

/* Hero Section */
.hero {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  padding: 4rem 0;
  text-align: center;
}

.hero h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  font-weight: 700;
}

.hero p {
  font-size: 1.25rem;
  opacity: 0.9;
  max-width: 600px;
  margin: 0 auto 2rem;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
  font-size: 1rem;
}

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

.btn-primary:hover {
  background: var(--accent-dark);
}

.btn-outline {
  background: transparent;
  color: white;
  border: 2px solid white;
}

.btn-outline:hover {
  background: white;
  color: var(--primary);
}

.btn-secondary {
  background: var(--muted);
  color: var(--foreground);
}

.btn-secondary:hover {
  background: var(--border);
}

/* Section Styles */
.section {
  padding: 4rem 0;
}

.section-title {
  font-size: 2rem;
  margin-bottom: 0.5rem;
  color: var(--foreground);
}

.section-subtitle {
  color: var(--muted-foreground);
  margin-bottom: 2rem;
}

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

.product-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  overflow: hidden;
  transition: all 0.2s;
}

.product-card:hover {
  box-shadow: 0 10px 40px rgba(0,0,0,0.1);
  transform: translateY(-2px);
}

.product-image {
  width: 100%;
  height: 220px;
  object-fit: contain;
  object-position: center;
  background: var(--muted);
  padding: 1rem;
}

.product-content {
  padding: 1rem;
}

.product-brand {
  font-size: 0.75rem;
  color: var(--primary);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.product-name {
  font-size: 1.125rem;
  font-weight: 600;
  margin: 0.25rem 0;
  color: var(--foreground);
}

.product-category {
  font-size: 0.875rem;
  color: var(--muted-foreground);
  margin-bottom: 0.75rem;
}

.product-features {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.feature-tag {
  font-size: 0.75rem;
  background: var(--muted);
  color: var(--muted-foreground);
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
}

.brand-link-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1rem;
  padding: 0.5rem 1rem;
  background: var(--primary);
  color: white;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: 0.5rem;
  text-decoration: none;
  transition: all 0.2s;
}

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

.brand-link-btn svg {
  flex-shrink: 0;
}

/* Brand Grid */
.brand-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

.brand-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  padding: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: all 0.2s;
}

.brand-card:hover {
  box-shadow: 0 10px 40px rgba(0,0,0,0.1);
  border-color: var(--primary);
}

.brand-logo {
  width: 80px;
  height: 80px;
  object-fit: contain;
  background: var(--muted);
  border-radius: 0.5rem;
  padding: 0.5rem;
}

.brand-info h3 {
  font-size: 1.25rem;
  margin-bottom: 0.25rem;
}

.brand-info p {
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

.brand-count {
  font-size: 0.75rem;
  color: var(--primary);
  font-weight: 600;
  margin-top: 0.5rem;
}

/* Filters */
.filters {
  background: var(--muted);
  padding: 1.5rem;
  border-radius: 0.75rem;
  margin-bottom: 2rem;
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
}

.search-input {
  flex: 1;
  min-width: 200px;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  font-size: 1rem;
  background: white;
}

.search-input:focus {
  outline: none;
  border-color: var(--primary);
}

.filter-select {
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  font-size: 1rem;
  background: white;
  min-width: 150px;
  cursor: pointer;
}

.filter-select:focus {
  outline: none;
  border-color: var(--primary);
}

.results-count {
  color: var(--muted-foreground);
  margin-bottom: 1rem;
}

/* Gallery Grid */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1rem;
}

.gallery-item {
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 0.75rem;
  cursor: pointer;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.gallery-item:hover img {
  transform: scale(1.05);
}

/* Contact Section */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
}

.contact-form {
  background: var(--card);
  padding: 2rem;
  border-radius: 0.75rem;
  border: 1px solid var(--border);
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  font-size: 1rem;
  font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
}

.form-group textarea {
  min-height: 120px;
  resize: vertical;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.info-card {
  background: var(--muted);
  padding: 1.5rem;
  border-radius: 0.75rem;
}

.info-card h3 {
  font-size: 1.125rem;
  margin-bottom: 0.5rem;
  color: var(--primary);
}

.info-card p {
  color: var(--muted-foreground);
}

/* Footer */
.footer {
  background: var(--foreground);
  color: white;
  padding: 3rem 0 1.5rem;
}

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

.footer-col h4 {
  font-size: 1rem;
  margin-bottom: 1rem;
  color: var(--accent);
}

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

.footer-col li {
  margin-bottom: 0.5rem;
}

.footer-col a {
  color: rgba(255,255,255,0.8);
  transition: color 0.2s;
}

.footer-col a:hover {
  color: white;
}

.footer-bottom {
  text-align: center;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.6);
  font-size: 0.875rem;
}

/* Brand Detail Page */
.brand-header {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  padding: 3rem 0;
}

.brand-header-content {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.brand-header-logo {
  width: 120px;
  height: 120px;
  background: white;
  border-radius: 0.75rem;
  padding: 1rem;
  object-fit: contain;
}

.brand-header h1 {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}

.brand-header p {
  opacity: 0.9;
  font-size: 1.125rem;
}

/* Utility Classes */
.text-center { text-align: center; }
.mt-2 { margin-top: 2rem; }
.mb-2 { margin-bottom: 2rem; }

/* Responsive */
@media (max-width: 768px) {
  .nav-links {
    display: none;
  }
  
  .hero h1 {
    font-size: 1.75rem;
  }
  
  .hero p {
    font-size: 1rem;
  }
  
  .contact-grid {
    grid-template-columns: 1fr;
  }
  
  .brand-header-content {
    flex-direction: column;
    text-align: center;
  }
  
  .filter-row {
    flex-direction: column;
  }
  
  .search-input,
  .filter-select {
    width: 100%;
  }
}

/* Image placeholder for missing images */
.img-placeholder {
  width: 100%;
  height: 200px;
  background: linear-gradient(135deg, var(--muted) 0%, var(--border) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted-foreground);
  font-size: 0.875rem;
}

/* Theme Toggle Button */
.theme-toggle {
  background: transparent;
  border: 2px solid rgba(255,255,255,0.3);
  color: white;
  width: 40px;
  height: 40px;
  border-radius: 0.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

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

.theme-toggle svg {
  width: 20px;
  height: 20px;
}

/* Chatbot Styles */
.chatbot-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 9999;
  font-family: inherit;
}

.chatbot-toggle {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
  transition: all 0.3s;
}

.chatbot-toggle:hover {
  transform: scale(1.05);
  background: var(--primary-dark);
}

.chatbot-toggle svg {
  width: 28px;
  height: 28px;
}

.chatbot-window {
  position: absolute;
  bottom: 70px;
  right: 0;
  width: 380px;
  max-width: calc(100vw - 2rem);
  height: 500px;
  max-height: calc(100vh - 150px);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 1rem;
  box-shadow: 0 10px 40px rgba(0,0,0,0.2);
  display: none;
  flex-direction: column;
  overflow: hidden;
}

.chatbot-window.open {
  display: flex;
}

.chatbot-header {
  background: var(--primary);
  color: white;
  padding: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.chatbot-header h3 {
  font-size: 1rem;
  font-weight: 600;
}

.chatbot-close {
  background: transparent;
  border: none;
  color: white;
  cursor: pointer;
  padding: 0.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.chatbot-close:hover {
  opacity: 0.8;
}

.chatbot-messages {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.chat-message {
  max-width: 85%;
  padding: 0.75rem 1rem;
  border-radius: 1rem;
  font-size: 0.9rem;
  line-height: 1.4;
}

.chat-message.bot {
  background: var(--muted);
  color: var(--foreground);
  align-self: flex-start;
  border-bottom-left-radius: 0.25rem;
}

.chat-message.user {
  background: var(--primary);
  color: white;
  align-self: flex-end;
  border-bottom-right-radius: 0.25rem;
}

.chat-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  border-top: 1px solid var(--border);
}

.chat-suggestion {
  background: var(--muted);
  color: var(--foreground);
  border: 1px solid var(--border);
  padding: 0.5rem 0.75rem;
  border-radius: 1rem;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s;
}

.chat-suggestion:hover {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.chatbot-input {
  display: flex;
  padding: 0.75rem;
  border-top: 1px solid var(--border);
  gap: 0.5rem;
}

.chatbot-input input {
  flex: 1;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: 1.5rem;
  font-size: 0.9rem;
  background: var(--background);
  color: var(--foreground);
}

.chatbot-input input:focus {
  outline: none;
  border-color: var(--primary);
}

.chatbot-input button {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.chatbot-input button:hover {
  background: var(--primary-dark);
}

.chatbot-input button svg {
  width: 20px;
  height: 20px;
}

@media (max-width: 480px) {
  .chatbot-window {
    width: calc(100vw - 1rem);
    right: -0.75rem;
    height: 60vh;
  }
}
