/**
 * SuperX Theme - Responsive CSS
 * Media queries and responsive adjustments
 */

/* ============================================
   Extra Large Screens (1400px+)
   ============================================ */
@media (min-width: 1400px) {
  /*:root {*/
  /*  --superx-container-width: 1200px;*/
  /*}*/
}

/* ============================================
   Large Screens (1200px - 1399px)
   ============================================ */
@media (max-width: 1399px) {
  :root {
    --superx-container-width: 1140px;
  }
}

/* ============================================
   Medium Screens (992px - 1199px)
   ============================================ */
@media (max-width: 1199px) {
  :root {
    --superx-container-width: 960px;
    --superx-sidebar-width: 220px;
  }

  h1 {
    font-size: 2.25rem;
  }

  h2 {
    font-size: 1.75rem;
  }

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

/* ============================================
   Tablets (768px - 991px)
   ============================================ */
@media (max-width: 991px) {
  :root {
    --superx-container-width: 720px;
    --superx-header-height: 60px;
    --superx-spacing-3xl: 48px;
    --superx-spacing-2xl: 40px;
  }

  body {
    /*padding-top: var(--superx-header-height);*/
  }

  h1 {
    font-size: 2rem;
  }

  h2 {
    font-size: 1.5rem;
  }

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

  .hero-subtitle {
    font-size: 1.1rem;
  }

  /* Header adjustments */
  .superx-logo img {
    height: 35px;
  }

  /* Section padding */
  .superx-section {
    padding: var(--superx-spacing-2xl) 0;
  }

  /* Grid cards */
  .superx-grid-cards {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--superx-spacing-lg);
  }
}

/* ============================================
   Mobile Large (576px - 767px)
   ============================================ */
@media (max-width: 767px) {
  :root {
    --superx-container-width: 540px;
    --superx-spacing-3xl: 40px;
    --superx-spacing-2xl: 32px;
    --superx-spacing-xl: 24px;
  }

  h1 {
    font-size: 1.75rem;
  }

  h2 {
    font-size: 1.375rem;
  }

  h3 {
    font-size: 1.25rem;
  }

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

  .hero-subtitle {
    font-size: 1rem;
  }

  .hero-buttons {
    flex-direction: column;
    gap: var(--superx-spacing-sm);
  }

  .hero-buttons .btn-superx-primary,
  .hero-buttons .btn-superx-secondary,
  .hero-buttons .btn-superx-outline {
    width: 100%;
    justify-content: center;
  }

  /* Section title */
  .superx-section-title {
    font-size: 1.5rem;
    margin-bottom: var(--superx-spacing-lg);
  }

  /* Grid cards */
  .superx-grid-cards {
    grid-template-columns: 1fr;
  }

  /* Cards */
  .superx-card {
    padding: var(--superx-spacing-md);
  }

  /* Product hero */
  .superx-product-title {
    font-size: 1.75rem;
  }

  .superx-product-subtitle {
    font-size: 1rem;
  }

  /* Tables */
  .superx-table,
  .superx-specs-table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .superx-specs-table th {
    width: 40%;
    min-width: 120px;
  }
}

/* ============================================
   Mobile Small (< 576px)
   ============================================ */
@media (max-width: 575px) {
  :root {
    --superx-spacing-lg: 16px;
    --superx-spacing-md: 12px;
  }

  html {
    font-size: 13px;
  }

  .transform-full-width {
    width: 100vw;
    left:0;
  }

  h1 {
    font-size: 1.5rem;
  }

  h2 {
    font-size: 1.25rem;
  }

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

  /* Buttons */
  .btn-superx-primary,
  .btn-superx-secondary,
  .btn-superx-outline {
    padding: 10px 20px;
    font-size: 13px;
  }

  /* News cards */
  .superx-news-card-image {
    height: 160px;
  }

  .superx-news-card-body {
    padding: var(--superx-spacing-md);
  }

  /* Product */
  .superx-product-main-image {
    height: 280px;
  }

  .superx-product-thumbnail {
    width: 60px;
    height: 60px;
  }

  .superx-product-actions {
    flex-direction: column;
  }

  .superx-product-actions button,
  .superx-product-actions a {
    width: 100%;
    justify-content: center;
  }

  /* Pagination */
  .superx-pagination-item {
    min-width: 36px;
    height: 36px;
    font-size: 13px;
  }

  /* Modal */
  .superx-modal {
    width: 95%;
    border-radius: var(--superx-radius-lg);
  }

  .superx-modal-header,
  .superx-modal-body {
    padding: var(--superx-spacing-md);
  }
}


/* ============================================
   Mobile Navigation Overrides (for touch devices)
   ============================================ */
@media (max-width: 991px) {
  .superx-nav-link,
  .superx-dropdown-link {
    padding: 12px 16px;
  }

  .superx-pagination-item {
    min-width: 44px;
    height: 44px;
  }

  /* Ensure dropdown items have proper touch targets */
  .superx-dropdown-item .superx-dropdown-link {
    min-height: 44px;
    display: flex;
    align-items: center;
  }

}

/* ============================================
   Print Styles
   ============================================ */
@media print {
  body {
    padding-top: 0;
  }

  .superx-header,
  .superx-footer,
  .superx-mobile-menu,
  .superx-mobile-overlay {
    display: none !important;
  }

  .main-content-grid {
    grid-template-columns: 1fr !important;
  }

  .region-sidebar-left,
  .region-sidebar-right {
    display: none;
  }

  a {
    text-decoration: underline;
  }

  .btn-superx-primary,
  .btn-superx-secondary,
  .btn-superx-outline {
    display: none;
  }
}

/* ============================================
   High DPI / Retina Displays
   ============================================ */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .superx-logo img {
    image-rendering: -webkit-optimize-contrast;
  }
}

/* ============================================
   Reduced Motion
   ============================================ */
/*@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}*/

/* ============================================
   Dark Mode Support (Optional)
   ============================================ */
@media (prefers-color-scheme: dark) {
  /* Uncomment to enable automatic dark mode
  :root {
    --superx-bg-white: #1a1a1a;
    --superx-bg-light: #2a2a2a;
    --superx-bg-gray: #333333;
    --superx-text-primary: #f3f4f6;
    --superx-text-secondary: #d1d5db;
    --superx-text-muted: #9ca3af;
    --superx-border: #374151;
  }
  */
}

/* ============================================
   Landscape Orientation on Mobile
   ============================================ */
@media (max-width: 991px) and (orientation: landscape) {
  .superx-hero-slide {
    min-height: 400px;
  }

  .hero-section {
    padding: var(--superx-spacing-xl) 0;
  }

  .superx-mobile-menu {
    max-width: 50%;
  }
}

/* ============================================
   Container Breakpoint Classes
   ============================================ */
.container-sm {
  max-width: 540px;
}

.container-md {
  max-width: 720px;
}

.container-lg {
  max-width: 960px;
}

.container-xl {
  max-width: 1140px;
}

.container-xxl {
  max-width: 1320px;
}

/* ============================================
   Responsive Display Utilities
   ============================================ */
.d-none {
  display: none !important;
}

.d-block {
  display: block !important;
}

.d-flex {
  display: flex !important;
}

.d-grid {
  display: grid !important;
}

@media (min-width: 576px) {
  .d-sm-none { display: none !important; }
  .d-sm-block { display: block !important; }
  .d-sm-flex { display: flex !important; }
  .d-sm-grid { display: grid !important; }
}

@media (min-width: 768px) {
  .d-md-none { display: none !important; }
  .d-md-block { display: block !important; }
  .d-md-flex { display: flex !important; }
  .d-md-grid { display: grid !important; }
}

@media (min-width: 992px) {
  .d-lg-none { display: none !important; }
  .d-lg-block { display: block !important; }
  .d-lg-flex { display: flex !important; }
  .d-lg-grid { display: grid !important; }
}

@media (min-width: 1200px) {
  .d-xl-none { display: none !important; }
  .d-xl-block { display: block !important; }
  .d-xl-flex { display: flex !important; }
  .d-xl-grid { display: grid !important; }
}

/* ============================================
   Responsive Text Utilities
   ============================================ */
@media (max-width: 767px) {
  .text-sm-center { text-align: center !important; }
  .text-sm-left { text-align: left !important; }
  .text-sm-right { text-align: right !important; }
}

@media (max-width: 991px) {
  .text-md-center { text-align: center !important; }
  .text-md-left { text-align: left !important; }
  .text-md-right { text-align: right !important; }
}
