/* Target the desktop header specifically */
@media (min-width: 922px) {
  /* 1. Force the grid to allow centering even if Astra says 'no-center' */
  .ast-builder-grid-row.ast-builder-grid-row-no-center {
    display: grid !important;
    grid-template-columns: 1fr auto 1fr !important; /* Creates Left, Center, Right columns */
    width: 100% !important;
    align-items: center;
  }

  /* 2. Place the Logo in the first column */
  .site-header-primary-section-left {
    grid-column: 1;
    justify-content: flex-start !important;
    display: flex !important;
  }

  /* 3. Force the Menu into the middle column */
  .ast-builder-menu-1 {
    grid-column: 2;
    justify-content: center !important;
    display: flex !important;
    margin: 0 auto !important;
  }

  /* 4. Place the Cart/Account in the third column */
  .site-header-primary-section-right {
    grid-column: 3;
    justify-content: flex-end !important;
    display: flex !important;
  }

  /* 5. Clear any specific Astra widths that might be blocking the menu */
  .ast-builder-menu-1 .ast-main-header-bar-alignment,
  .ast-builder-menu-1 .main-header-bar-navigation {
    display: block !important;
    width: auto !important;
  }

}

/* --- MOBILE & TABLET RESPONSIVE --- */
@media (max-width: 921px) {
  /* Keeps logo left and icons/toggle right on mobile */
  .ast-mobile-header-wrap .ast-builder-grid-row {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center;
    padding: 0 15px;
  }

  /* Ensure logo doesn't take too much space on small screens */
  .site-branding img {
    max-width: 120px;
    height: auto;
  }

  /* Fix for cart and toggle alignment */
  .site-header-primary-section-right {
    display: flex;
    align-items: center;
    gap: 10px;
  }
}
/* ==========================================
   MEDIA RESPONSIVE QUERIES
   ========================================== */

/* Desktop Breakpoints */
/* ==========================================
   CONSOLIDATED DESKTOP NAVIGATION & DROPDOWN
   ========================================== */
@media (min-width: 993px) {
  .main-menu-container {
    display: block !important;
    opacity: 1 !important;
    transform: none !important;
    visibility: visible !important;
    position: static !important;
    overflow: visible !important; /* Crucial: allows the dropdown to overflow out of the navbar container */
  }

  .main-menu-list {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 20px !important;
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .mobile-menu-toggle {
    display: none !important;
  }

  ul#menu-primary-menu li,
  .main-menu-list li {
    border-bottom: 0 !important;
    width: auto !important;
    position: relative !important; /* Acts as the layout anchor for the absolute positioned dropdown */
  }

  /* ------------------------------------------
       DROPDOWN MENU OVERRIDES (CLEANUP)
       ------------------------------------------ */
  /* Hide the nested sub-menus by default and format the dropdown container */
  .main-menu-list li ul.sub-menu,
  .main-menu-list li ul {
    position: absolute !important;
    top: 100% !important;
    left: 0 !important;
    background: #ffffff !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08) !important;
    border: 1px solid #eaeaea !important;
    border-radius: 6px !important;
    width: 220px !important;
    padding: 10px 0 !important;
    margin: 0 !important;
    list-style: none !important;
    display: none !important; /* Kept hidden until hovered */
    flex-direction: column !important;
    z-index: 99999 !important;
  }

  /* Trigger layout to show the dropdown on hover */
  .main-menu-list li:hover > ul {
    display: flex !important;
  }

  /* Strips default Astra bullet lines, dots, or dashes from submenu links entirely */
  .main-menu-list li ul li {
    width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
  }
  .main-menu-list li ul li::before,
  .main-menu-list li ul li::after {
    display: none !important;
    content: "" !important;
  }

  /* Dropdown text link formatting */
  .main-menu-list li ul li a {
    display: block !important;
    padding: 10px 20px !important;
    font-size: 14px !important;
    color: #444444 !important;
    font-weight: 500 !important;
    text-transform: none !important;
    text-align: left !important;
    transition: all 0.2s ease-in-out !important;
    border-bottom: 0 !important; /* Erases any lingering bottom accent borders */
  }

  /* Premium interactive hover effect */
  .main-menu-list li ul li a:hover {
    background-color: #f8f9fa !important;
    color: #021b33 !important;
    padding-left: 24px !important; /* Subtle premium layout nudge */
  }
 .sbc-custom-layout-wrapper {
            grid-template-columns: 280px 1fr;
        }
	.sbc-na-products-grid ul.products { grid-template-columns: repeat(4, 1fr) !important; } /* Pure clean 4 columns row layout */
}
/* ==========================================
   SHOPBYCARTZ PREMIUM MENU & DROPDOWN STYLE
   ========================================== */

@media (min-width: 1024px) {
  .category-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}
@media (max-width: 920px) {
  .woocommerce ul.products li.product {
    width: calc(50% - 15px) !important; /* 2 Columns on Tablets */
  }
  .premium-blog-card {
    width: calc(50% - 15px) !important; /* 2 Columns on tablets */
  }
}

@media (min-width: 768px) {
  .about-wrapper {
    flex-direction: row;
    gap: 80px;
    text-align: left;
  }
  .sbc-slider-container {
            grid-template-columns: 300px 1fr; /* Image banner left, products loop right */
        }
}

@media (min-width: 600px) {
  .category-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (min-width: 576px) {
        .sbc-na-products-grid ul.products { grid-template-columns: repeat(4, 1fr) !important; }
    }

/* Mobile Breakpoints */
@media (max-width: 992px) {
  .mobile-menu-toggle {
    display: block;
  }

  .main-menu-container {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: var(--sb-bg-main);
    z-index: 999;
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
  }
  .main-menu-container.active {
    display: block !important;
    animation: fadeIn 0.3s ease-in-out forwards;
  }
  .main-menu-list {
    flex-direction: column;
    align-items: center;
    gap: 0px;
  }
  ul#menu-primary-menu li {
    border-bottom: 1px solid var(--sb-borders);
    width: 100%;
    padding: 10px 10px;
  }
  ul#menu-primary-menu li:last-child {
    border-bottom: 0;
  }
  .main-menu-list a {
    display: block;
  }
  .premium-categories-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
  .tax-product_cat ul.products {
    grid-template-columns: repeat(2, 1fr) !important;
  }
  .category-grid {
        grid-template-columns: repeat(2, 1fr) !important; /* Changes grid cleanly to 2 columns */
        gap: 20px !important;
    }
    .section-title {
        font-size: 28px !important;
    }
    .category-card {
        height: 240px !important;
    }
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 768px) {
  .hero-slider {
    height: 450px !important;
  }
  .hero-content h1 {
    font-size: 2.2rem !important;
  }
  .hero-content p {
    font-size: 1rem !important;
  }
  .newsletter-form {
    flex-direction: column;
    width: 100%;
  }
  .newsletter-form input {
    width: 100%;
    max-width: 100%;
  }
  .btn-subscribe {
    width: 100%;
  }
  .category-section .section-title {
    font-size: 1.8rem;
  }
  .category-card {
    height: 280px;
  }
  .category-overlay span {
    opacity: 1;
    transform: translateY(0);
  }
  .categories-collapsible-wrapper.hide-extra-categories {
    max-height: 560px !important; /* Cutoff for 2 stacked rows on mobile tablets */
  }
  .category-card-item {
    flex: 1 1 calc(50% - 10px) !important;
  }
  .category-product-grid-wrapper ul.products {
    grid-template-columns: repeat(
      2,
      1fr
    ) !important; /* Drops cleanly down to 2 columns on tablets */
  }
  .woocommerce span.onsale,
    .featured-products .sale-badge {
        height: 38px !important;
        width: 38px !important;
        min-height: 38px !important;
        min-width: 38px !important;
        line-height: 38px !important;
        font-size: 10px !important;
        top: 8px !important;
        left: 8px !important;
    }
}
@media (max-width: 600px) {
  .premium-blog-card {
    width: 100% !important; /* 1 Column on mobile viewports */
  }
}
@media (max-width: 767px) {
  .about-image {
    width: 100%;
  }
  .about-content {
    width: 100%;
  }
  .about-content span,
  .about-content h2 {
    text-align: center;
    margin: 0 auto;
  }
  .about-content span {
    margin-bottom: 10px;
  }
  .about-content h2 {
    margin-bottom: 30px;
  }
  .about-content p,
  .about-content .btn {
    text-align: center;
    margin: 0 auto;
  }
  .about-content .btn {
    margin-top: 30px;
  }
  .about-section {
    padding: 40px 20px;
  }
  .why-choose-us {
    padding: 40px 20px;
  }
  .featured-products {
    padding: 40px 20px;
  }
}
@media (max-width: 580px) {
  .woocommerce ul.products li.product {
    width: 100% !important; /* 1 Column on Mobile screens */
  }
}
@media (max-width: 576px) {
  .premium-categories-grid {
    grid-template-columns: 1fr !important;
  }
  .tax-product_cat ul.products {
    grid-template-columns: 1fr !important;
  }
  .tax-product_cat .woocommerce-result-count,
  .tax-product_cat .woocommerce-ordering {
    float: none !important;
    display: block !important;
    width: 100% !important;
    margin-bottom: 15px !important;
  }
  .category-grid {
        grid-template-columns: 1fr !important; /* Stack columns completely to full-width format */
        gap: 16px !important;
    }
    .section-title {
        font-size: 24px !important;
    }
    .category-card {
        height: 210px !important;
    }
    .category-overlay {
        padding: 16px !important;
    }
}
