/* ============================================
   MAA EXPRESS - HOME PAGE STYLES
   ============================================ */

/* ============================================
   HERO SECTION
   ============================================ */
.hero-section {
  background: linear-gradient(135deg, #1a73e8 0%, #0b3f80 100%);
  color: white;
  padding: 80px 40px;
  text-align: center;
  margin-bottom: 40px;
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(26, 115, 232, 0.3);
}

.hero-overlay {
  max-width: 800px;
  margin: 0 auto;
}

.hero-title {
  font-size: 3rem;
  font-weight: 700;
  margin: 0 0 16px 0;
}

.hero-subtitle {
  font-size: 1.5rem;
  opacity: 0.95;
  font-weight: 300;
}

/* ============================================
   PAGE LAYOUT (SIDEBAR + CONTENT)
   ============================================ */
.page-container {
  display: flex;
  gap: 32px;
  max-width: 1600px;
  margin: 0 auto;
  padding: 20px;
}

/* ============================================
   LEFT SIDEBAR (FILTERS)
   ============================================ */
.filters-sidebar {
  width: 320px;
  flex-shrink: 0;
  position: sticky;
  top: 20px;
  height: fit-content;
  background: white;
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
  border: 2px solid #e5e7eb;
}

.sidebar-header {
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 2px solid #e5e7eb;
}

.sidebar-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #1f2937;
  margin: 0 0 8px 0;
}

.sidebar-subtitle {
  font-size: 0.9rem;
  color: #6b7280;
  margin: 0;
}

/* Filter Sections */
.filter-section {
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid #f3f4f6;
}

.filter-section:last-child {
  border-bottom: none;
}

.filter-section-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #374151;
  margin: 0 0 16px 0;
}

.filter-group {
  margin-bottom: 12px;
}

.filter-label {
  display: block;
  font-size: 0.9rem;
  color: #4b5563;
  margin-bottom: 8px;
  font-weight: 600;
}

.filter-input,
.filter-select {
  width: 100%;
  padding: 10px 12px;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  font-size: 0.95rem;
  transition: all 0.2s;
}

.filter-input:focus,
.filter-select:focus {
  outline: none;
  border-color: #0066cc;
  box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
}

/* Category Selector */
.category-selector {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.category-tab {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 8px;
  border: 2px solid #e5e7eb;
  background: white;
  cursor: pointer;
  transition: all 0.2s;
}

.category-tab input[type="radio"] {
  display: none;
}

.category-tab:hover {
  border-color: #0066cc;
  background: #f0f7ff;
}

.category-tab.active {
  border-color: #0066cc;
  background: linear-gradient(135deg, #f0f7ff 0%, #e0f2fe 100%);
  font-weight: 700;
}

.category-icon {
  font-size: 1.5rem;
}

.category-label {
  flex: 1;
  color: #4b5563;
}

.category-tab.active .category-label {
  color: #0066cc;
}

.category-count {
  font-size: 0.8rem;
  background: #e5e7eb;
  color: #6b7280;
  padding: 2px 8px;
  border-radius: 12px;
  font-weight: 600;
}

.category-tab.active .category-count {
  background: #0066cc;
  color: white;
}

/* Range Input */
.filter-input[type="range"] {
  padding: 0;
  height: 8px;
  background: #e5e7eb;
  border-radius: 4px;
  outline: none;
  border: none;
}

.filter-input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  width: 20px;
  height: 20px;
  background: #0066cc;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.filter-input[type="range"]::-moz-range-thumb {
  width: 20px;
  height: 20px;
  background: #0066cc;
  border-radius: 50%;
  cursor: pointer;
  border: none;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.range-value {
  display: block;
  text-align: center;
  margin-top: 6px;
  font-size: 0.85rem;
  color: #0066cc;
  font-weight: 700;
}

/* Filter Actions */
.filter-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 24px;
}

.btn-apply-filters {
  padding: 12px;
  background: linear-gradient(135deg, #0066cc 0%, #0052a3 100%);
  color: white;
  border: none;
  border-radius: 8px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-apply-filters:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 102, 204, 0.3);
}

.btn-reset-filters {
  padding: 12px;
  background: #f3f4f6;
  color: #4b5563;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  text-align: center;
}

.btn-reset-filters:hover {
  background: #e5e7eb;
}

/* RIGHT CONTENT AREA */
.listings-content {
  flex: 1;
  min-width: 0;
}

.content-header {
  margin-bottom: 24px;
}

.content-title {
  font-size: 2rem;
  font-weight: 700;
  color: #1f2937;
  margin: 0 0 8px 0;
}

.content-subtitle {
  font-size: 1rem;
  color: #6b7280;
  margin: 0;
}

.results-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding: 12px 16px;
  background: #f9fafb;
  border-radius: 8px;
}

.results-count {
  font-size: 0.9rem;
  color: #4b5563;
  font-weight: 600;
}

/* ============================================
   LISTINGS GRID
   ============================================ */
.listings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
  margin-bottom: 40px;
}

/* ============================================
   LISTING CARD
   ============================================ */
.listing-card {
  background: white;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 2px solid #e5e7eb;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  height: 100%;
}

.listing-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  border-color: #0066cc;
}

/* ============================================
   CARD HEADER (CATEGORY 1)
   ============================================ */
.card-header {
  background: linear-gradient(135deg, #003d82 0%, #0052a3 100%);
  padding: 20px;
  color: white;
  position: relative;
}

.header-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.header-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.listing-id-display {
  font-size: 0.9rem;
  font-weight: 700;
  opacity: 0.95;
  display: flex;
  align-items: center;
  gap: 6px;
  color: rgba(255, 255, 255, 0.9);
}

.listing-id-display::before {
  content: "#";
  opacity: 0.7;
}

.verified-badge-prominent {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 4px;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.4);
  animation: verifiedPulse 2s infinite;
}

.verified-badge-prominent::before {
  content: "✓";
}

@keyframes verifiedPulse {
  0%, 100% { 
    transform: scale(1); 
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.4);
  }
  50% { 
    transform: scale(1.05); 
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.6);
  }
}

.route-display {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 8px;
}

.route-city {
  font-size: 1.3rem;
  font-weight: 700;
}

.route-from {
  color: #a7f3d0;
}

.route-to {
  color: #fecaca;
}

.route-arrow {
  font-size: 1.5rem;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.1); opacity: 0.8; }
}

.travel-date {
  text-align: center;
  font-size: 0.9rem;
  opacity: 0.95;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

/* ============================================
   CARD BODY
   ============================================ */
.card-body {
  padding: 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.card-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #1f2937;
  margin: 0;
}

.airport-codes {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.95rem;
  font-weight: 600;
}

.airport-from {
  color: #10b981;
}

.airport-arrow {
  color: #0066cc;
  font-size: 1.2rem;
}

.airport-to {
  color: #dc2626;
  font-weight: 700;
}

.listing-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.meta-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 10px;
  background: #f3f4f6;
  border-radius: 12px;
  font-size: 0.8rem;
  color: #6b7280;
  font-weight: 600;
}

/* Weight Availability */
.weight-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
  border-radius: 8px;
  border-left: 4px solid #10b981;
}

.weight-info.low {
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  border-left-color: #f59e0b;
}

.weight-info.sold-out {
  background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
  border-left-color: #dc2626;
}

.weight-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: #065f46;
}

.weight-info.low .weight-label {
  color: #92400e;
}

.weight-info.sold-out .weight-label {
  color: #991b1b;
}

.weight-value {
  font-size: 1rem;
  font-weight: 700;
  color: #059669;
}

.weight-value.low {
  color: #f59e0b;
}

.weight-value.out {
  color: #dc2626;
}

.weight-value.available {
  color: #059669;
}

/* ============================================
   PRICING SECTION
   ============================================ */
.price-section {
  background: linear-gradient(135deg, #f0f7ff 0%, #e0f2fe 100%);
  padding: 16px;
  border-radius: 8px;
  border: 2px solid #bae6fd;
  margin-top: auto;
}

.price-label-row {
  font-size: 0.85rem;
  color: #6b7280;
  font-weight: 600;
  margin-bottom: 8px;
  text-align: center;
}

.price-display {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 6px;
  margin-bottom: 6px;
}

.price-currency {
  font-size: 0.95rem;
  font-weight: 700;
  color: #0066cc;
}

.price-amount {
  font-size: 2rem;
  font-weight: 700;
  color: #0066cc;
  letter-spacing: -0.5px;
  line-height: 1;
}

.price-unit {
  font-size: 0.95rem;
  color: #6b7280;
  font-weight: 600;
}

.price-original-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-top: 8px;
  border-top: 1px solid #bfdbfe;
  justify-content: center;
}

.price-original {
  color: #9ca3af;
  text-decoration: line-through;
  font-size: 0.9rem;
  font-weight: 600;
}

.savings-badge {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 700;
}

/* ============================================
   ACTION BUTTONS
   ============================================ */
.btn-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: linear-gradient(135deg, #0066cc 0%, #0052a3 100%);
  color: white;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 700;
  transition: all 0.2s;
  margin-top: 8px;
}

.btn-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 102, 204, 0.3);
}

.btn-sold-out {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 16px;
  background: #e5e7eb;
  color: #6b7280;
  border-radius: 8px;
  font-weight: 700;
  margin-top: 8px;
  cursor: not-allowed;
}

/* ============================================
   CATEGORY 2 & 3 SPECIFIC STYLES
   ============================================ */
.card-image {
  position: relative;
  width: 100%;
  padding-top: 75%;
  overflow: hidden;
  background: linear-gradient(135deg, #f0f4f8 0%, #d9e2ec 100%);
}

.card-image img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.listing-card:hover .card-image img {
  transform: scale(1.05);
}

.placeholder-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
  color: rgba(107, 114, 128, 0.3);
}

.gender-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 6px 12px;
  border-radius: 20px;
  font-weight: 700;
  font-size: 0.85rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  z-index: 10;
  text-transform: capitalize;
}

.badge-male {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  color: white;
}

.badge-female {
  background: linear-gradient(135deg, #ec4899 0%, #db2777 100%);
  color: white;
}

.badge-other {
  background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
  color: white;
}

.stock-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 6px 12px;
  border-radius: 20px;
  font-weight: 700;
  font-size: 0.85rem;
}

.low-stock {
  color: #f59e0b;
  background: #fef3c7;
  border: 2px solid #fde68a;
}

.out-of-stock {
  color: #dc2626;
  background: #fee2e2;
  border: 2px solid #fecaca;
}

.discount-badge-image {
  position: absolute;
  top: 12px;
  right: 12px;
  background: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%);
  color: white;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(255, 107, 53, 0.4);
  z-index: 10;
}

.product-origin {
  font-size: 0.85rem;
  color: #6b7280;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ============================================
   EMPTY STATE
   ============================================ */
.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 80px 20px;
  background: #f9fafb;
  border-radius: 16px;
  border: 2px dashed #d1d5db;
}

.empty-icon {
  font-size: 5rem;
  opacity: 0.3;
  margin-bottom: 16px;
}

.empty-state h3 {
  color: #374151;
  margin-bottom: 8px;
  font-size: 1.5rem;
}

.empty-state p {
  color: #9ca3af;
  font-size: 1rem;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

/* Large Screens (1600px+) */
@media (min-width: 1600px) {
  .listings-grid {
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  }
}

/* Desktop (1200px - 1600px) */
@media (max-width: 1400px) {
  .listings-grid {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  }
}

/* Tablet Large (992px - 1200px) */
@media (max-width: 1200px) {
  .listings-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
  }
  
  .price-amount {
    font-size: 1.8rem;
  }
}

/* Tablet (768px - 992px) */
@media (max-width: 992px) {
  .page-container {
    flex-direction: column;
  }

  .filters-sidebar {
    width: 100%;
    position: static;
  }

  .listings-grid {
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
  }
  
  .card-body {
    padding: 16px;
  }
  
  .route-city {
    font-size: 1.1rem;
  }
}

/* Mobile Large (640px - 768px) */
@media (max-width: 768px) {
  .page-container {
    padding: 12px;
  }

  .filters-sidebar {
    padding: 16px;
  }

  .listings-grid {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
  }

  .price-amount {
    font-size: 1.6rem;
  }

  .verified-badge-prominent {
    font-size: 0.7rem;
    padding: 3px 8px;
  }
  
  .savings-badge {
    font-size: 0.7rem;
    padding: 3px 8px;
  }
}

/* Mobile Medium (480px - 640px) */
@media (max-width: 640px) {
  .listings-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .hero-title {
    font-size: 2rem;
  }
  
  .hero-subtitle {
    font-size: 1.1rem;
  }
  
  .content-title {
    font-size: 1.5rem;
  }
  
  .card-header {
    padding: 16px;
  }
  
  .card-body {
    padding: 16px;
  }
  
  .price-display {
    flex-direction: row;
  }
  
  .price-amount {
    font-size: 1.8rem;
  }
}

/* Mobile Small (320px - 480px) */
@media (max-width: 480px) {
  .hero-section {
    padding: 60px 20px;
  }
  
  .hero-title {
    font-size: 1.75rem;
  }
  
  .hero-subtitle {
    font-size: 1rem;
  }
  
  .page-container {
    padding: 8px;
  }
  
  .listings-grid {
    gap: 16px;
  }
  
  .route-city {
    font-size: 1rem;
  }
  
  .route-arrow {
    font-size: 1.2rem;
  }
  
  .price-amount {
    font-size: 1.6rem;
  }
  
  .card-header {
    padding: 14px;
  }
  
  .card-body {
    padding: 14px;
  }
  
  .btn-card {
    padding: 10px 14px;
    font-size: 0.9rem;
  }
}

/* Mobile Extra Small (<320px) */
@media (max-width: 320px) {
  .listing-card {
    min-width: 100%;
  }
  
  .price-amount {
    font-size: 1.4rem;
  }
  
  .weight-info {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }
}