/* ==========================================================================
   AL-FAROUQ TRADING & SUPPLIES - RESPONSIVE STYLESHEET
   التنسيقات التجاوبية لشاشات الهواتف والأجهزة اللوحية
   ========================================================================== */

/* Large Tablets & Small Desktops (<= 1100px) */
@media (max-width: 1100px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 40px;
    text-align: center;
  }

  .hero-content {
    align-items: center;
  }

  .hero-slogan {
    border-right: none;
    padding-right: 0;
  }

  .hero-description {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-cta-group {
    justify-content: center;
  }

  .hero-features {
    justify-content: center;
  }

  .hero-visual {
    max-width: 550px;
    margin: 0 auto;
    width: 100%;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 30px;
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 50px;
  }

  .about-images-cluster {
    max-width: 550px;
    margin: 0 auto;
  }

  .why-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .careers-box {
    grid-template-columns: 1fr;
  }

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

/* Medium Tablets & Mobile Menus (<= 991px) */
@media (max-width: 991px) {
  .nav-menu {
    display: none;
  }

  .btn-rfq-header {
    display: none;
  }

  .mobile-menu-btn {
    display: flex;
  }

  .top-bar-items {
    font-size: 0.8rem;
    gap: 14px;
  }

  .gallery-grid, #gallery-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }

  .exec-reception-hero {
    padding: 30px 0 40px !important;
  }

  .exec-hero-grid {
    grid-template-columns: 1fr !important;
    gap: 32px !important;
  }

  .exec-visual-showcase {
    max-width: 540px;
    margin: 0 auto !important;
    width: 100%;
  }

  .modal-body {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 24px;
  }

  div[style*="grid-template-columns: 1.1fr 0.9fr"],
  div[style*="grid-template-columns: 1.2fr 0.8fr"] {
    grid-template-columns: 1fr !important;
  }
}

/* Laptops & Medium Desktops (992px to 1280px) */
@media (min-width: 992px) and (max-width: 1280px) {
  .exec-reception-hero {
    padding: 35px 0 45px !important;
  }
  .exec-hero-grid {
    gap: 28px !important;
  }
  .exec-hero-title {
    font-size: 2.25rem !important;
  }
  .exec-hero-desc {
    font-size: 1.05rem !important;
    line-height: 1.7 !important;
  }
}

/* Small Screens & Mobile Phones (<= 767px) */
@media (max-width: 767px) {
  :root {
    --header-height: 54px;
    --container-padding: 16px;
  }

  /* Global Container & Mobile Reset */
  .container {
    padding-left: 16px !important;
    padding-right: 16px !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  .top-bar {
    display: none !important; /* Streamline mobile experience */
  }

  .fab-phone {
    display: flex; /* Show quick direct call on mobile */
  }

  .section {
    padding: 36px 0 !important;
  }

  .section-title {
    font-size: 1.55rem !important;
    line-height: 1.35 !important;
  }

  .section-desc {
    font-size: 0.92rem !important;
    line-height: 1.65 !important;
  }

  .exec-reception-hero {
    padding: 20px 0 28px !important;
  }

  .exec-hero-lead {
    text-align: right;
  }

  .exec-badge-wrap {
    margin-bottom: 10px !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
  }

  .hero-title, .exec-hero-title {
    font-size: 1.7rem !important;
    line-height: 1.25 !important;
    margin-bottom: 6px !important;
  }

  .hero-slogan {
    font-size: 1.05rem !important;
    margin-top: 0 !important;
  }

  .hero-description, .exec-hero-desc {
    font-size: 0.88rem !important;
    line-height: 1.6 !important;
    margin: 10px 0 16px !important;
  }

  /* Exec Hero CTAs & Buttons: 2-column grid on phones */
  .exec-hero-ctas {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    width: 100% !important;
    gap: 8px !important;
  }

  .exec-hero-ctas .btn {
    width: 100% !important;
    padding: 10px 8px !important;
    font-size: 0.82rem !important;
    justify-content: center !important;
    text-align: center !important;
  }

  /* Search Wrapper on Mobile */
  .hero-search-wrapper {
    margin: 14px 0 !important;
  }

  .search-tags-quick {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    padding-bottom: 6px !important;
    scrollbar-width: none !important;
    gap: 6px !important;
  }

  .search-tags-quick::-webkit-scrollbar {
    display: none !important;
  }

  .search-tag {
    white-space: nowrap !important;
    flex-shrink: 0 !important;
    font-size: 0.78rem !important;
    padding: 4px 10px !important;
  }

  /* Trust Checks on Mobile */
  .exec-trust-checks {
    display: flex !important;
    flex-direction: column !important;
    gap: 6px !important;
    margin-top: 12px !important;
  }

  .exec-check-item {
    font-size: 0.78rem !important;
    padding: 6px 10px !important;
    background: rgba(255, 255, 255, 0.75) !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 8px !important;
  }

  /* Hero Showcase Card & Live Pills: 2-column side-by-side */
  .exec-visual-showcase {
    max-width: 100% !important;
    margin: 20px auto 0 !important;
    width: 100% !important;
  }

  .exec-card-frame {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
    padding: 8px !important;
    border-radius: 14px !important;
  }

  .exec-main-img-box {
    width: 100% !important;
    border-radius: 10px !important;
    aspect-ratio: 16 / 10 !important;
  }

  .floating-live-pill {
    position: static !important;
    flex: 1 1 calc(50% - 4px) !important;
    min-width: 0 !important;
    margin: 0 !important;
    width: auto !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    justify-content: flex-start !important;
    padding: 8px 10px !important;
    font-size: 0.8rem !important;
    border-radius: 10px !important;
    gap: 8px !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.12) !important;
  }

  .floating-live-pill .floating-pill-icon {
    width: 28px !important;
    height: 28px !important;
    min-width: 28px !important;
  }

  .floating-live-pill .floating-pill-text strong {
    font-size: 0.78rem !important;
    display: block !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  .floating-live-pill .floating-pill-text span {
    font-size: 0.68rem !important;
    display: block !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  .exec-card-subbar {
    width: 100% !important;
    display: flex !important;
    justify-content: space-between !important;
    padding: 8px 6px 2px !important;
    margin-top: 4px !important;
    gap: 4px !important;
  }

  .exec-subbar-item {
    font-size: 0.72rem !important;
    gap: 4px !important;
  }

  .exec-subbar-item svg {
    width: 13px !important;
    height: 13px !important;
  }

  /* Industrial Ticker on Mobile */
  .industrial-ticker-wrap {
    height: 42px !important;
    width: calc(100% - 16px) !important;
    margin: 10px auto !important;
    border-radius: 8px !important;
  }

  .ticker-heading {
    padding: 0 10px !important;
    font-size: 0.78rem !important;
    gap: 5px !important;
  }

  .ticker-heading svg {
    width: 14px !important;
    height: 14px !important;
  }

  .ticker-item {
    font-size: 0.82rem !important;
  }

  /* Stats Grid (2 columns on mobile, 1 col on small phones) */
  .stats-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 12px !important;
  }

  .stat-card {
    padding: 14px 10px !important;
    background-color: var(--color-bg-light);
    border-radius: var(--border-radius);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
  }

  .stat-icon {
    margin: 0 auto !important;
  }

  .stat-details h3 {
    font-size: 1.45rem !important;
  }

  .stat-details p {
    font-size: 0.8rem !important;
    line-height: 1.4 !important;
  }

  /* Robust Override for All Inline Two-Column / Multi-Column Grids */
  .about-grid,
  .contact-grid,
  .careers-box,
  .why-grid,
  .about-features-summary,
  .services-grid,
  .products-grid,
  .form-row,
  .excel-fields-row,
  div[style*="grid-template-columns: 1fr 1fr"],
  div[style*="grid-template-columns: 1.1fr 0.9fr"],
  div[style*="grid-template-columns: 1.2fr 0.8fr"],
  div[style*="grid-template-columns: repeat(4, 1fr)"],
  div[style*="grid-template-columns: repeat(auto-fit"],
  div[style*="grid-template-columns: repeat(auto-fill"] {
    grid-template-columns: 1fr !important;
    gap: 18px !important;
  }

  /* Gallery Grid on Mobile */
  .gallery-grid, #gallery-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 12px !important;
  }

  /* Gallery Items */
  .gallery-item {
    border-radius: 10px !important;
  }

  .gallery-overlay {
    padding: 10px !important;
  }

  .gallery-overlay h4 {
    font-size: 0.85rem !important;
    margin-bottom: 2px !important;
  }

  .gallery-overlay p {
    font-size: 0.72rem !important;
  }

  /* Forms & Buttons on Mobile */
  .rfq-form-card {
    padding: 22px 16px !important;
  }

  form div[style*="grid-template-columns"] {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }

  form button[type="submit"],
  form button[type="button"] {
    width: 100% !important;
  }

  /* Compact Card Padding on Phones */
  div[style*="padding: 40px"],
  div[style*="padding: 50px"],
  div[style*="padding: 36px"],
  div[style*="padding: 30px"],
  div[style*="padding: 28px"],
  .card {
    padding: 22px 16px !important;
  }

  /* About Images Cluster */
  .about-images-cluster {
    max-width: 100% !important;
    margin: 0 auto 20px !important;
  }

  .about-sub-image {
    position: static !important;
    width: 100% !important;
    max-width: 100% !important;
    margin-top: 14px !important;
    margin-left: 0 !important;
  }

  .about-since-badge,
  .about-renovated-badge {
    font-size: 0.85rem !important;
    padding: 8px 14px !important;
    height: auto !important;
    width: fit-content !important;
    max-width: calc(100% - 32px) !important;
  }

  /* Product Specs Tables */
  .product-specs-table-wrapper {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    margin-left: -4px;
    margin-right: -4px;
  }

  .specs-table, .specs-table-detailed {
    min-width: 100% !important;
    font-size: 0.82rem !important;
    width: 100% !important;
    table-layout: auto !important;
  }

  .specs-table th, .specs-table td,
  .specs-table-detailed th, .specs-table-detailed td {
    padding: 8px 10px !important;
    font-size: 0.82rem !important;
    word-break: break-word !important;
  }

  .product-order-box {
    padding: 22px 14px !important;
    border-radius: 14px !important;
    box-sizing: border-box !important;
    width: 100% !important;
  }

  .product-order-box .form-row {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }

  /* Excel RFQ Card & Dropzone */
  .excel-rfq-card {
    padding: 24px 16px !important;
    border-radius: 16px !important;
  }

  .excel-dropzone {
    padding: 24px 14px !important;
  }

  .excel-dropzone-icon {
    width: 44px !important;
    height: 44px !important;
    margin-bottom: 10px !important;
  }

  .excel-dropzone-title {
    font-size: 1rem !important;
  }

  .excel-dropzone-subtitle {
    font-size: 0.8rem !important;
  }

  .excel-actions-bar {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 12px !important;
  }

  .excel-buttons-group {
    flex-direction: column !important;
    width: 100% !important;
    gap: 10px !important;
  }

  .btn-excel-whatsapp, .btn-excel-email {
    width: 100% !important;
    justify-content: center !important;
  }

  /* Catalog Filters */
  .catalog-filters {
    overflow-x: auto;
    justify-content: flex-start;
    padding-bottom: 10px;
    -webkit-overflow-scrolling: touch;
  }

  .filter-btn {
    white-space: nowrap;
    padding: 8px 16px;
    font-size: 0.85rem;
  }

  /* Footer on Mobile */
  .footer-grid {
    grid-template-columns: 1fr !important;
    gap: 28px !important;
  }

  .footer-social-links {
    justify-content: flex-start;
  }

  .footer-social-icon {
    width: 38px !important;
    height: 38px !important;
  }

  .footer-social-icon svg {
    width: 18px !important;
    height: 18px !important;
  }

  .footer-bottom {
    flex-direction: column !important;
    text-align: center !important;
    gap: 12px !important;
  }

  /* Floating Action Buttons */
  .floating-actions {
    bottom: 16px !important;
    left: 16px !important;
    gap: 8px !important;
  }

  .fab {
    width: 48px !important;
    height: 48px !important;
  }

  .fab svg {
    width: 20px !important;
    height: 20px !important;
  }

  /* Modal on Mobile */
  .modal-overlay {
    padding: 12px !important;
  }

  .modal-container {
    width: 100% !important;
    max-width: 100% !important;
    max-height: 92vh !important;
    overflow-y: auto !important;
    border-radius: 16px !important;
  }
}

/* Extra Small Phones (<= 480px) */
@media (max-width: 480px) {
  .gallery-grid, #gallery-grid {
    grid-template-columns: 1fr !important;
    gap: 14px !important;
  }

  .stats-grid {
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }

  .hero-title, .exec-hero-title {
    font-size: 1.65rem !important;
  }

  .section-title {
    font-size: 1.45rem !important;
  }

  .hero-cta-group {
    flex-direction: column;
    width: 100%;
  }

  .hero-cta-group .btn {
    width: 100%;
  }

  .brand-logo img {
    height: 40px;
  }

  .brand-name {
    font-size: 1rem;
  }

  .brand-slogan {
    display: none;
  }

  /* Product Search Bar Responsive */
  .search-input-wrap {
    padding: 4px 6px 4px 10px;
  }

  .search-input {
    font-size: 0.9rem;
    padding: 8px 4px;
  }

  .search-submit-btn {
    padding: 8px 14px;
    font-size: 0.85rem;
  }

  .search-tags-quick {
    gap: 6px;
  }

  .search-tag {
    font-size: 0.75rem;
    padding: 3px 9px;
  }

  .product-page-hero-bar .hero-bar-inner {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .product-search-compact {
    max-width: 100%;
    width: 100%;
  }
}

/* Tiny Screens (<= 380px) */
@media (max-width: 380px) {
  .exec-hero-ctas {
    grid-template-columns: 1fr !important;
  }
  .floating-live-pill {
    flex: 1 1 100% !important;
  }
}


