/* Luxury Shop Dark Theme Styles */

:root {
  --dark-bg: #1a1a1a;
  --dark-bg-secondary: #2a2a2a;
  --neon-green: #39ff14;
  --neon-green-hover: #2ee00a;
  --text-primary: #ffffff;
  --text-secondary: #b0b0b0;
  --card-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  --card-shadow-hover: 0 8px 30px rgba(57, 255, 20, 0.2);
  --border-subtle: rgba(255, 255, 255, 0.12);
  --input-bg: rgba(255, 255, 255, 0.06);
  --input-bg-hover: rgba(255, 255, 255, 0.09);
  --focus-ring: rgba(57, 255, 20, 0.35);
}

/* Global Styles */
body {
  background-color: var(--dark-bg);
  color: var(--text-primary);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  margin: 0;
  padding: 0;
}

/* Ensure common Tailwind text colors don't turn everything gray on dark */
.text-gray-600 { color: var(--text-secondary) !important; }
.text-gray-700, .text-gray-900 { color: var(--text-primary) !important; }

/* Listings top bar (title + found + sorting) */
.listings-topbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 1rem;
}

.listings-title {
  font-size: 1.75rem;
  font-weight: 700;
  margin: 0;
  letter-spacing: 0.01em;
}

.listings-found {
  margin-top: 0.35rem;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.listings-found-count {
  color: var(--text-primary);
  font-weight: 600;
}

.listings-sort-label {
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
}

/* Dark form controls */
.lux-label {
  display: block;
  margin-bottom: 0.35rem;
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
}

.lux-input,
.lux-select {
  width: 100%;
  box-sizing: border-box;
  background: var(--input-bg);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 0.6rem 0.75rem;
  outline: none;
  transition: background-color 0.15s, border-color 0.15s, box-shadow 0.15s;
}

.lux-input::placeholder {
  color: rgba(255, 255, 255, 0.55);
}

.lux-input:hover,
.lux-select:hover {
  background: var(--input-bg-hover);
}

.lux-input:focus,
.lux-select:focus {
  border-color: rgba(57, 255, 20, 0.6);
  box-shadow: 0 0 0 3px var(--focus-ring);
}

.lux-select {
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, rgba(255,255,255,0.75) 50%),
    linear-gradient(135deg, rgba(255,255,255,0.75) 50%, transparent 50%);
  background-position:
    calc(100% - 16px) calc(50% - 3px),
    calc(100% - 11px) calc(50% - 3px);
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 2rem;
}

/* Filters sidebar card */
.filters-card {
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.04);
  box-shadow: var(--card-shadow);
  backdrop-filter: blur(6px);
}

.filters-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.filters-card-title {
  font-weight: 700;
  letter-spacing: 0.01em;
}

.filters-reset {
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.9rem;
  text-decoration: none;
  transition: color 0.15s;
}

.filters-reset:hover {
  color: var(--text-primary);
  text-decoration: underline;
}

.filters-form {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

@media (max-width: 768px) {
  .listings-topbar {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* Navbar Styles */
.navbar {
  background-color: var(--dark-bg);
  padding: 1rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.navbar-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
}

.navbar-logo {
  flex-shrink: 0;
}

.logo-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  font-size: 1.5rem;
  font-weight: 600;
}

.logo-z {
  color: var(--neon-green);
  font-weight: 700;
  font-size: 1.8rem;
}

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

.navbar-links {
  display: flex;
  gap: 2rem;
  flex: 1;
  justify-content: center;
}

.nav-link {
  color: var(--text-primary);
  text-decoration: none;
  font-size: 0.95rem;
  transition: color 0.2s;
}

.nav-link:hover {
  color: var(--neon-green);
}

.navbar-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-shrink: 0;
  flex-wrap: wrap;
}

.user-label {
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  transition: background-color 0.2s, color 0.2s;
}

.user-label:hover {
  background-color: rgba(57, 255, 20, 0.1);
  color: var(--neon-green);
}

.btn-primary {
  background-color: var(--neon-green);
  color: var(--dark-bg);
  padding: 0.6rem 1.5rem;
  border-radius: 4px;
  text-decoration: none;
  font-weight: 600;
  transition: background-color 0.2s;
  border: none;
  cursor: pointer;
  font-size: 0.95rem;
}

.btn-primary:hover {
  background-color: var(--neon-green-hover);
}

.btn-secondary {
  background-color: transparent;
  color: var(--text-primary);
  padding: 0.6rem 1.5rem;
  border-radius: 4px;
  text-decoration: none;
  font-weight: 500;
  transition: background-color 0.2s;
  border: 1px solid rgba(255, 255, 255, 0.2);
  cursor: pointer;
  font-size: 0.95rem;
}

.btn-secondary:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.locale-switcher {
  display: flex;
  gap: 0.5rem;
}

.locale-link {
  color: var(--text-secondary);
  text-decoration: none;
  padding: 0.3rem 0.6rem;
  border-radius: 4px;
  font-size: 0.85rem;
  transition: background-color 0.2s, color 0.2s;
}

.locale-link:hover,
.locale-link.active {
  background-color: var(--dark-bg-secondary);
  color: var(--text-primary);
}

/* Hero Section */
.hero-section {
  position: relative;
  width: 100%;
  height: 500px;
  overflow: hidden;
  margin-bottom: 4rem;
  background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 50%, #1a1a1a 100%),
              url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 500"><rect fill="%231a1a1a" width="1200" height="500"/><path d="M0,250 Q300,200 600,250 T1200,250" stroke="%2339ff14" stroke-width="2" fill="none" opacity="0.3"/></svg>');
  background-size: cover;
  background-position: center;
}

.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(to right, rgba(26, 26, 26, 0.8), rgba(26, 26, 26, 0.4));
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 10%;
}

.hero-title {
  font-size: 6rem;
  font-weight: 700;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin: 0;
}

/* Latest in Stock Section */
.latest-section {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem 4rem;
}

.section-label {
  font-size: 0.85rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.5rem;
}

.section-title {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--text-primary);
  text-transform: uppercase;
  margin-bottom: 2rem;
}

.latest-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 1.5rem;
}

.latest-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* Featured Card */
.featured-card {
  background-color: var(--dark-bg-secondary);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--card-shadow);
  transition: transform 0.3s, box-shadow 0.3s;
  position: relative;
}

.featured-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--card-shadow-hover);
}

.featured-image-container {
  width: 100%;
  height: 400px;
  overflow: hidden;
  position: relative;
}

.featured-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.featured-info {
  background-color: rgba(57, 255, 20, 0.15);
  padding: 1.5rem;
}

.featured-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.featured-price {
  font-size: 1.2rem;
  color: var(--text-primary);
  margin-bottom: 1rem;
}

.featured-btn {
  background-color: var(--neon-green);
  color: var(--dark-bg);
  padding: 0.8rem 2rem;
  border: none;
  border-radius: 6px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: background-color 0.2s;
  width: 100%;
}

.featured-btn:hover {
  background-color: var(--neon-green-hover);
}

/* Product Card */
.product-card {
  background-color: var(--dark-bg-secondary);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--card-shadow);
  transition: transform 0.3s, box-shadow 0.3s;
  display: flex;
  flex-direction: column;
}

.product-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--card-shadow-hover);
}

.product-image-container {
  width: 100%;
  height: 250px;
  overflow: hidden;
  background-color: var(--dark-bg);
}

.product-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-info {
  padding: 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.product-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  text-decoration: none;
}

.product-title:hover {
  color: var(--neon-green);
}

.product-price {
  font-size: 1.1rem;
  color: var(--text-primary);
  margin-bottom: 1rem;
}

.product-btn {
  background-color: transparent;
  color: var(--text-primary);
  padding: 0.7rem 1.5rem;
  border: 1px solid var(--neon-green);
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s;
  width: 100%;
  margin-top: auto;
}

.product-btn:hover {
  background-color: var(--neon-green);
  color: var(--dark-bg);
}

/* Product Grid */
.products-section {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem 4rem;
}

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

.category-filter {
  color: var(--text-primary);
  text-decoration: none;
  text-transform: uppercase;
  font-size: 0.9rem;
  font-weight: 500;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}

.category-filter:hover,
.category-filter.active {
  color: var(--neon-green);
  border-bottom-color: var(--neon-green);
}

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

/* Profile Page */
.profile-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 2rem;
}

.profile-header {
  margin-bottom: 3rem;
}

.profile-title {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.profile-subtitle {
  color: var(--text-secondary);
  font-size: 1.1rem;
}

.favorites-section {
  margin-top: 3rem;
}

.favorites-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 2rem;
}

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

.empty-state {
  background-color: var(--dark-bg-secondary);
  border-radius: 12px;
  padding: 4rem 2rem;
  text-align: center;
  box-shadow: var(--card-shadow);
}

.empty-state-text {
  color: var(--text-secondary);
  font-size: 1.2rem;
  margin-bottom: 2rem;
}

.empty-state-btn {
  background-color: var(--neon-green);
  color: var(--dark-bg);
  padding: 0.8rem 2rem;
  border: none;
  border-radius: 6px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  transition: background-color 0.2s;
}

.empty-state-btn:hover {
  background-color: var(--neon-green-hover);
}

/* Responsive Design */
@media (max-width: 1024px) {
  .latest-grid {
    grid-template-columns: 1fr;
  }

  .hero-title {
    font-size: 4rem;
  }

  .navbar-container {
    flex-wrap: wrap;
  }

  .navbar-links {
    order: 3;
    width: 100%;
    justify-content: center;
    margin-top: 1rem;
  }
}

@media (max-width: 768px) {
  .hero-title {
    font-size: 3rem;
  }

  .section-title {
    font-size: 2rem;
  }

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

  .category-filters {
    gap: 1rem;
  }

  .navbar-container {
    padding: 0 1rem;
  }
}

/* Flash Messages */
.flash-messages {
  max-width: 1400px;
  margin: 0 auto;
  padding: 1rem 2rem;
}

.flash-notice {
  background-color: rgba(57, 255, 20, 0.2);
  border-left: 4px solid var(--neon-green);
  color: var(--text-primary);
  padding: 1rem;
  border-radius: 4px;
  margin-bottom: 1rem;
}

.flash-alert {
  background-color: rgba(255, 0, 0, 0.2);
  border-left: 4px solid #ff0000;
  color: var(--text-primary);
  padding: 1rem;
  border-radius: 4px;
  margin-bottom: 1rem;
}

/* Pagination Styles */
.pagy-nav {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
}

.pagy-nav .page {
  padding: 0.5rem 1rem;
  border-radius: 4px;
  text-decoration: none;
  color: var(--text-primary);
  background-color: var(--dark-bg-secondary);
  transition: background-color 0.2s, color 0.2s;
}

.pagy-nav .page:hover {
  background-color: rgba(57, 255, 20, 0.2);
  color: var(--neon-green);
}

.pagy-nav .page.active {
  background-color: var(--neon-green);
  color: var(--dark-bg);
  font-weight: 600;
}

.pagy-nav .page.disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

.pagy-nav .page.prev,
.pagy-nav .page.next {
  background-color: transparent;
  border: 1px solid var(--neon-green);
  color: var(--neon-green);
}

.pagy-nav .page.prev:hover,
.pagy-nav .page.next:hover {
  background-color: var(--neon-green);
  color: var(--dark-bg);
}
