/* ===============================================
   GCLA - Green Commerce Liquidation & Assets
   Responsive Styles - B2B Optimized
   =============================================== */

/* Mobile First Approach - B2B Focused */

/* Extra Small devices (portrait phones, less than 576px) */
@media (max-width: 575.98px) {
  /* Typography adjustments for B2B */
  .hero-title {
    font-size: var(--font-size-2xl);
    line-height: 1.2;
  }
  
  .section-title {
    font-size: var(--font-size-2xl);
  }
  
  .brand-text {
    font-size: var(--font-size-base);
  }
  
  .brand-tagline {
    display: none; /* Hide tagline on very small screens */
  }
  
  /* Header adjustments */
  .sustainability-bar {
    text-align: center;
    padding: var(--spacing-xs) 0;
  }
  
  .sustainability-bar .btn {
    margin-top: var(--spacing-xs);
    font-size: var(--font-size-xs);
  }
  
  .search-form {
    max-width: 100%;
    margin-bottom: var(--spacing-md);
  }
  
  /* B2B Navigation mobile */
  .navbar-nav .nav-link {
    padding: var(--spacing-md) var(--spacing-sm);
    font-size: var(--font-size-sm);
  }
  
  .user-actions {
    flex-direction: column;
    gap: var(--spacing-sm);
    padding-top: var(--spacing-md);
    border-top: 1px solid var(--accent-blue);
  }
  
  .user-actions .btn {
    width: 100%;
  }
  
  /* Hero section mobile - B2B focused */
  .hero-section {
    min-height: 80vh;
  }
  
  .hero-content {
    text-align: center;
    padding: var(--spacing-lg) 0;
  }
  
  .hero-badge {
    font-size: var(--font-size-xs);
    padding: var(--spacing-xs) var(--spacing-sm);
  }
  
  .hero-actions {
    flex-direction: column;
    gap: var(--spacing-md);
    align-items: center;
  }
  
  .hero-actions .btn {
    width: 100%;
    max-width: 280px;
  }
  
  .hero-stats {
    justify-content: space-around;
    gap: var(--spacing-md);
  }
  
  .stat-item {
    text-align: center;
  }
  
  .stat-item strong {
    font-size: var(--font-size-xl);
  }
  
  /* Certification cards mobile */
  .certification-cards {
    margin-top: var(--spacing-xl);
    gap: var(--spacing-md);
  }
  
  .cert-card {
    padding: var(--spacing-md);
    text-align: center;
  }
  
  .cert-icon {
    font-size: var(--font-size-2xl);
  }
  
  /* Categories mobile - B2B */
  .category-card {
    text-align: center;
    padding: var(--spacing-lg);
    margin-bottom: var(--spacing-md);
  }
  
  .category-stats {
    display: flex;
    justify-content: space-between;
    margin: var(--spacing-md) 0;
  }
  
  .category-stats .stat {
    text-align: center;
  }
  
  .category-sustainability {
    font-size: var(--font-size-xs);
    margin-top: var(--spacing-sm);
  }
  
  /* Lots/Products mobile */
  .lot-card {
    margin-bottom: var(--spacing-lg);
  }
  
  .lot-info {
    padding: var(--spacing-md);
  }
  
  .lot-details {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
    margin: var(--spacing-sm) 0;
  }
  
  .lot-pricing {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
    margin: var(--spacing-md) 0;
  }
  
  .auction-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: var(--spacing-sm);
  }
  
  /* Sustainability section mobile */
  .sustainability-stat {
    margin-bottom: var(--spacing-lg);
  }
  
  .sustainability-stat i {
    font-size: var(--font-size-2xl) !important;
  }
  
  .sustainability-stat h3 {
    font-size: var(--font-size-xl);
  }
  
  /* How to buy steps mobile */
  .step-card {
    margin-bottom: var(--spacing-lg);
    padding: var(--spacing-lg);
  }
  
  .step-number {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--primary-light);
    color: var(--primary-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: var(--font-weight-black);
    font-size: var(--font-size-lg);
    margin: 0 auto var(--spacing-md);
  }
  
  /* Newsletter mobile - B2B */
  .newsletter-form {
    margin-top: var(--spacing-md);
  }
  
  .newsletter-form .input-group {
    flex-direction: column;
    gap: var(--spacing-sm);
  }
  
  .newsletter-form .form-control,
  .newsletter-form .btn {
    border-radius: var(--border-radius-lg);
  }
  
  /* Footer mobile - B2B */
  .footer-title {
    margin-top: var(--spacing-xl);
  }
  
  .footer-title:first-child {
    margin-top: 0;
  }
  
  .social-links {
    justify-content: center;
    margin-top: var(--spacing-md);
  }
  
  .payment-methods {
    justify-content: center;
    margin-top: var(--spacing-md);
    font-size: var(--font-size-lg);
  }
}

/* Small devices (landscape phones, 576px and up) */
@media (min-width: 576px) and (max-width: 767.98px) {
  .hero-title {
    font-size: var(--font-size-3xl);
  }
  
  .brand-tagline {
    display: block;
  }
  
  .hero-actions {
    flex-direction: row;
    justify-content: center;
  }
  
  .hero-actions .btn {
    width: auto;
  }
  
  .certification-cards {
    flex-direction: row;
    flex-wrap: wrap;
    gap: var(--spacing-md);
  }
  
  .cert-card {
    flex: 1;
    min-width: 200px;
  }
  
  .newsletter-form .input-group {
    flex-direction: row;
    max-width: 400px;
  }
  
  .newsletter-form .form-control {
    border-radius: var(--border-radius-lg) 0 0 var(--border-radius-lg);
  }
  
  .newsletter-form .btn {
    border-radius: 0 var(--border-radius-lg) var(--border-radius-lg) 0;
  }
}

/* Medium devices (tablets, 768px and up) */
@media (min-width: 768px) and (max-width: 991.98px) {
  /* Header tablet */
  .search-form {
    max-width: 280px;
  }
  
  .user-actions {
    flex-direction: row;
    gap: var(--spacing-sm);
  }
  
  /* Hero tablet */
  .hero-stats {
    gap: var(--spacing-xl);
  }
  
  .certification-cards {
    max-width: 400px;
    margin: var(--spacing-xl) auto 0;
  }
  
  /* Categories tablet - 2 columns */
  .categories-section .row.g-4 > div {
    flex: 0 0 50%;
    max-width: 50%;
  }
  
  .category-card {
    padding: var(--spacing-xl);
    height: 100%;
  }
  
  .category-stats {
    display: flex;
    justify-content: space-around;
    margin: var(--spacing-lg) 0;
  }
  
  /* Lots tablet - 2 columns */
  .lot-card {
    height: 100%;
  }
  
  .lot-pricing {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
  
  /* Sustainability stats - 2x2 grid */
  .sustainability-section .row.g-4 > div {
    flex: 0 0 50%;
    max-width: 50%;
  }
  
  /* Steps - 2x2 grid */
  .how-to-buy-section .row.g-4 > div {
    flex: 0 0 50%;
    max-width: 50%;
  }
}

/* Large devices (desktops, 992px and up) */
@media (min-width: 992px) {
  /* Header desktop */
  .main-header .navbar-nav {
    margin-right: var(--spacing-lg);
  }
  
  .search-form {
    max-width: 350px;
  }
  
  .user-actions .btn {
    padding: var(--spacing-sm) var(--spacing-lg);
  }
  
  /* Hero desktop */
  .hero-title {
    font-size: var(--font-size-4xl);
  }
  
  .hero-actions {
    justify-content: flex-start;
  }
  
  .hero-stats {
    justify-content: flex-start;
    gap: var(--spacing-2xl);
  }
  
  .certification-cards {
    position: absolute;
    right: var(--spacing-2xl);
    top: 50%;
    transform: translateY(-50%);
    max-width: 300px;
  }
  
  /* Categories desktop - 3 columns */
  .categories-section .row.g-4 > div {
    flex: 0 0 33.333333%;
    max-width: 33.333333%;
  }
  
  /* Lots desktop - 4 columns for featured, 3 for auctions */
  #lotsGrid .col-lg-3 {
    flex: 0 0 25%;
    max-width: 25%;
  }
  
  #auctionsCarousel .col-lg-4 {
    flex: 0 0 33.333333%;
    max-width: 33.333333%;
  }
  
  /* Enhanced lot cards for desktop */
  .lot-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
  }
  
  .auction-timer {
    position: absolute;
    top: var(--spacing-sm);
    right: var(--spacing-sm);
    background: var(--auction-active);
    color: var(--white);
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: var(--border-radius-md);
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-bold);
  }
  
  .direct-sale-badge {
    position: absolute;
    top: var(--spacing-sm);
    right: var(--spacing-sm);
    background: var(--eco-green);
    color: var(--white);
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: var(--border-radius-md);
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-bold);
  }
  
  .wishlist-btn {
    position: absolute;
    top: var(--spacing-sm);
    left: var(--spacing-sm);
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-base);
  }
  
  .wishlist-btn:hover {
    background: var(--white);
    transform: scale(1.1);
  }
  
  .wishlist-btn.wishlisted i {
    color: var(--accent-red);
  }
  
  /* Sustainability desktop - 4 columns */
  .sustainability-section .row.g-4 > div {
    flex: 0 0 25%;
    max-width: 25%;
  }
  
  /* Steps desktop - 4 columns */
  .how-to-buy-section .row.g-4 > div {
    flex: 0 0 25%;
    max-width: 25%;
  }
  
  .step-card {
    padding: var(--spacing-xl);
    border: 2px solid var(--accent-blue);
    border-radius: var(--border-radius-xl);
    transition: all var(--transition-base);
    height: 100%;
  }
  
  .step-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-yellow);
  }
}

/* Extra large devices (large desktops, 1200px and up) */
@media (min-width: 1200px) {
  .hero-title {
    font-size: clamp(2.5rem, 4vw, 4.5rem);
  }
  
  .section-title {
    font-size: clamp(2rem, 3vw, 3.5rem);
  }
  
  /* Enhanced spacing for larger screens */
  .certification-cards {
    right: var(--spacing-3xl);
    max-width: 350px;
  }
  
  .category-card {
    padding: var(--spacing-2xl);
  }
  
  .lot-card {
    transition: all var(--transition-base);
  }
  
  .lot-card:hover .lot-image img {
    transform: scale(1.05);
  }
  
  .lot-image {
    overflow: hidden;
    border-radius: var(--border-radius-lg) var(--border-radius-lg) 0 0;
  }
  
  .lot-image img {
    transition: transform var(--transition-slow);
  }
}

/* Extra extra large devices (1400px and up) */
@media (min-width: 1400px) {
  .container {
    max-width: 1320px;
  }
  
  .certification-cards {
    max-width: 380px;
  }
  
  /* Enhanced lot grid for ultra-wide screens */
  #lotsGrid .col-lg-3 {
    flex: 0 0 20%;
    max-width: 20%;
  }
}

/* B2B Specific Components Responsive */

/* Manifesto Card */
.manifesto-card {
  margin-top: var(--spacing-sm);
  font-size: var(--font-size-sm);
}

@media (max-width: 767.98px) {
  .manifesto-card {
    padding: var(--spacing-sm);
  }
  
  .manifesto-title {
    font-size: var(--font-size-xs);
  }
}

/* ROI Badge responsive */
.roi-badge {
  font-size: var(--font-size-xs);
  white-space: nowrap;
}

@media (max-width: 575.98px) {
  .roi-badge {
    font-size: 10px;
    padding: 2px 6px;
  }
}

/* Auction elements responsive */
@media (max-width: 767.98px) {
  .auction-timer,
  .direct-sale-badge {
    font-size: 10px;
    padding: 4px 8px;
  }
  
  .wishlist-btn {
    width: 35px;
    height: 35px;
  }
}

/* Landscape orientation adjustments */
@media (orientation: landscape) and (max-height: 500px) {
  .hero-section {
    min-height: 100vh;
  }
  
  .hero-content {
    padding: var(--spacing-md) 0;
  }
  
  .hero-title {
    font-size: var(--font-size-2xl);
    margin-bottom: var(--spacing-md);
  }
  
  .hero-actions {
    margin-bottom: var(--spacing-md);
  }
  
  .hero-stats {
    margin-bottom: var(--spacing-md);
  }
  
  .certification-cards {
    position: relative;
    transform: none;
    right: auto;
    top: auto;
    max-width: 100%;
    flex-direction: row;
    margin-top: var(--spacing-md);
  }
}

/* High DPI / Retina displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .logo-img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
  }
  
  .lot-image img,
  .product-image {
    image-rendering: -webkit-optimize-contrast;
  }
}

/* Reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  .hero-slide,
  .lot-card:hover,
  .category-card:hover,
  .cert-card:hover {
    transition: none;
    transform: none;
  }
  
  .skeleton {
    animation: none;
    background: var(--gray-200);
  }
}

/* NO DARK MODE - Ensure all styles are light */

/* Print optimizations */
@media print {
  .sustainability-bar,
  .hero-section {
    min-height: auto;
    page-break-after: always;
  }
  
  .category-card,
  .lot-card,
  .cert-card {
    break-inside: avoid;
    margin-bottom: var(--spacing-md);
    box-shadow: none;
    border: 1px solid var(--gray-300);
  }
  
  .section-title {
    page-break-after: avoid;
  }
  
  .auction-timer,
  .wishlist-btn,
  .roi-badge {
    display: none;
  }
}

/* Focus management for keyboard navigation */
@media (hover: none) and (pointer: coarse) {
  /* Touch device optimizations */
  .cert-card:hover,
  .category-card:hover,
  .lot-card:hover,
  .step-card:hover {
    transform: none;
  }
  
  .btn:hover {
    transform: none;
  }
  
  /* Increase touch targets for B2B mobile users */
  .nav-link {
    padding: var(--spacing-md);
    min-height: 48px;
    display: flex;
    align-items: center;
  }
  
  .hero-dot {
    width: 16px;
    height: 16px;
  }
  
  .social-links a {
    width: 48px;
    height: 48px;
  }
  
  .wishlist-btn {
    width: 48px;
    height: 48px;
  }
  
  .auction-timer,
  .direct-sale-badge {
    padding: var(--spacing-sm);
    font-size: var(--font-size-sm);
  }
}

/* Container breakpoint adjustments */
@media (min-width: 576px) {
  .container {
    max-width: 540px;
  }
}

@media (min-width: 768px) {
  .container {
    max-width: 720px;
  }
}

@media (min-width: 992px) {
  .container {
    max-width: 960px;
  }
}

@media (min-width: 1200px) {
  .container {
    max-width: 1140px;
  }
}

@media (min-width: 1400px) {
  .container {
    max-width: 1320px;
  }
}

/* Accessibility improvements */
@media (prefers-contrast: high) {
  .cert-card,
  .category-card,
  .lot-card {
    border-width: 3px;
  }
  
  .auction-timer,
  .direct-sale-badge {
    border: 2px solid var(--white);
  }
  
  .roi-badge {
    border: 1px solid var(--white);
  }
}