/* =========================================
   MEDYA EKSPER - UI FIXES
   ========================================= */

/* =============================================
   FIX 1: HEADER BACKGROUND + MENU TEXT COLOR
   Based on confirmed HTML: .ast-primary-header-bar uses
   var(--ast-global-color-primary) = var(--ast-global-color-4) = #FFFFFF (white)
   We must override with specificity > Astra inline styles.
   ============================================= */

/* ---- Header background: navy ---- */
#masthead,
#masthead .ast-primary-header-bar,
#masthead .ast-primary-header-bar.main-header-bar,
#masthead .site-primary-header-wrap,
.ast-primary-header-bar[data-section="section-primary-header-builder"] {
    background-color: #1a2e5e !important;
}

/* ---- Site title: white ---- */
#masthead .site-title a,
#masthead .ast-site-identity .site-title a {
    color: #ffffff !important;
    text-shadow: none !important;
}

/* ---- Desktop menu links: white ---- */
#masthead .ast-builder-menu-1 .menu-item > .menu-link,
#masthead .ast-builder-menu-1 .menu-item > .ast-menu-toggle,
#masthead .main-header-menu .menu-item > .menu-link,
#masthead .main-header-menu .menu-item > a {
    color: #ffffff !important;
}

/* ---- Hover / active menu items: sky blue ---- */
#masthead .ast-builder-menu-1 .menu-link:hover,
#masthead .ast-builder-menu-1 .main-header-menu > .menu-item:hover > .menu-link,
#masthead .ast-builder-menu-1 .menu-item.current-menu-item > .menu-link,
#masthead .ast-builder-menu-1 .current-menu-ancestor > .menu-link {
    color: #00a8ff !important;
    background: rgba(0, 168, 255, 0.12) !important;
}

/* ---- Header border-bottom: remove white/light line ---- */
#masthead .ast-primary-header-bar,
.ast-primary-header-bar {
    border-bottom-color: rgba(255,255,255,0.1) !important;
}

/* ---- Mobile hamburger: white icon & text ---- */
#masthead [data-section="section-header-mobile-trigger"] .ast-mobile-menu-trigger-minimal,
#masthead [data-section="section-header-mobile-trigger"] .ast-mobile-svg {
    color: #ffffff !important;
    fill: #ffffff !important;
}
#masthead [data-section="section-header-mobile-trigger"] .mobile-menu {
    color: #ffffff !important;
}

/* ---- Mobile nav dropdown background: navy ---- */
#masthead .ast-mobile-header-wrap .ast-primary-header-bar {
    background-color: #1a2e5e !important;
}
.ast-mobile-popup-drawer.active .ast-mobile-popup-inner {
    background-color: #1a2e5e !important;
}
.ast-mobile-header-wrap .ast-mobile-header-content,
.ast-mobile-header-content {
    background-color: #1a2e5e !important;
}
.ast-builder-menu-mobile .main-navigation .main-header-menu .menu-item > .menu-link,
.ast-builder-menu-mobile .main-navigation .main-header-menu .menu-item > .ast-menu-toggle {
    color: #ffffff !important;
}

/* ---- Header bottom border separation from info bar ---- */
.me-info-bar + #masthead {
    border-top: none !important;
}

/* =============================================
   FIX 2: FOOTER - Reduce size & fix layout
   ============================================= */

/* Main footer - compact */
#colophon,
.site-footer,
.ast-footer-area,
.footer-widget-area-outer-wrapper {
    background: #1a2e5e !important;
    padding: 30px 0 10px !important;
}

/* Footer 3-column grid */
.ast-footer-overlay .footer-widget-area,
.footer-adv-overlay .ast-container {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 30px !important;
}

.footer-widget-area {
    padding: 0 !important;
}

.footer-widget-area .widget,
.footer-adv-overlay .footer-widget-area .widget {
    font-size: 13px !important;
    line-height: 1.6 !important;
    margin-bottom: 0 !important;
    background: transparent !important;
    padding: 0 !important;
}

/* Widget titles + footer column headings */
.footer-widget-area .widget-title,
.me-footer-widget h3,
.me-footer-columns h4,
.me-footer-columns h3,
.me-footer-columns h2 {
    color: #ffffff !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
    border-left: 3px solid #0055d4 !important;
    padding-left: 10px !important;
    margin-bottom: 14px !important;
}

/* Footer links */
.footer-widget-area a,
.me-footer-widget a {
    color: rgba(255,255,255,0.75) !important;
    font-size: 13px !important;
    text-decoration: none !important;
    transition: color 0.2s !important;
}
.footer-widget-area a:hover,
.me-footer-widget a:hover {
    color: #00a8ff !important;
}

/* Footer lists */
.footer-widget-area ul,
.me-footer-widget ul {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}
.footer-widget-area li,
.me-footer-widget li {
    padding: 0 !important;
    font-size: 13px !important;
    color: rgba(255,255,255,0.7) !important;
    line-height: 2.2 !important;
}

/* Footer text */
.footer-widget-area p,
.me-footer-widget p {
    color: rgba(255,255,255,0.7) !important;
    font-size: 13px !important;
    line-height: 1.7 !important;
    margin-bottom: 10px !important;
}

/* Responsive footer */
@media (max-width: 768px) {
    .ast-footer-overlay .footer-widget-area,
    .footer-adv-overlay .ast-container {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}
@media (max-width: 480px) {
    .ast-footer-overlay .footer-widget-area,
    .footer-adv-overlay .ast-container {
        grid-template-columns: 1fr !important;
    }
}

/* Footer socket/bottom bar */
.site-below-footer-wrap,
#ast-site-footer,
.ast-site-footer-on {
    background: #0d1e3d !important;
    border-top: 1px solid rgba(255,255,255,0.08) !important;
    padding: 10px 20px !important;
    min-height: auto !important;
}

/* HIDE "Powered by Astra WordPress Theme" */
.ast-footer-copyright .ast-footer-copyright-text a[href*="wpastra"],
.ast-footer-copyright .ast-footer-copyright-text a[href*="wordpress"],
.site-below-footer-wrap a[href*="wpastra.com"],
.ast-footer-copyright span:last-child,
#ast-site-footer a[href*="wpastra"],
.site-footer-focus-item a[href*="wpastra.com"] {
    display: none !important;
}

/* Clean up copyright text */
.ast-footer-copyright,
.ast-footer-copyright-text {
    color: rgba(255,255,255,0.45) !important;
    font-size: 12px !important;
    text-align: center !important;
}

/* =============================================
   FIX 3: PRODUCT GRID - Multi-column mosaic + aligned buttons
   Use CSS Grid on the list so columns are preserved,
   and flexbox on each card so the button is pinned to bottom.
   ============================================= */

/* --- Grid layout: restore WooCommerce columns --- */
.woocommerce ul.products.columns-4,
.woocommerce-page ul.products.columns-4 {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 20px !important;
    float: none !important;
}
.woocommerce ul.products.columns-3,
.woocommerce-page ul.products.columns-3 {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 20px !important;
    float: none !important;
}
.woocommerce ul.products.columns-2,
.woocommerce-page ul.products.columns-2 {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 20px !important;
    float: none !important;
}
/* Fallback for any other column count */
.woocommerce ul.products,
.woocommerce-page ul.products {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)) !important;
    gap: 20px !important;
    float: none !important;
}

/* Tablet: 3 columns */
@media (max-width: 921px) {
    .woocommerce ul.products.columns-4,
    .woocommerce-page ul.products.columns-4 {
        grid-template-columns: repeat(3, 1fr) !important;
    }
}

/* Mobile: 2 columns */
@media (max-width: 600px) {
    .woocommerce ul.products,
    .woocommerce ul.products.columns-4,
    .woocommerce ul.products.columns-3,
    .woocommerce-page ul.products {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px !important;
    }
}

/* --- Each card: flex column so button pins to bottom --- */
.woocommerce ul.products li.product,
.woocommerce-page ul.products li.product {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    float: none !important;
    margin: 0 !important;
}

/* Astra thumbnail wrapper: image stays fixed at top */
.woocommerce ul.products li.product .astra-shop-thumbnail-wrap {
    flex-shrink: 0 !important;
}

/* Astra summary wrapper: grows to fill remaining card height */
.woocommerce ul.products li.product .astra-shop-summary-wrap {
    display: flex !important;
    flex-direction: column !important;
    flex: 1 1 auto !important;
    padding: 0 !important;
}

/* Category badge: fixed */
.woocommerce ul.products li.product .astra-shop-summary-wrap .ast-woo-product-category {
    flex-shrink: 0 !important;
    padding: 10px 16px 0 !important;
}

/* Product title link + h2: GROWS — pushes price & button to bottom */
.woocommerce ul.products li.product .astra-shop-summary-wrap .ast-loop-product__link,
.woocommerce ul.products li.product .astra-shop-summary-wrap .woocommerce-loop-product__link {
    flex: 1 1 auto !important;
    display: flex !important;
    align-items: flex-start !important;
}

.woocommerce ul.products li.product .astra-shop-summary-wrap h2,
.woocommerce ul.products li.product .astra-shop-summary-wrap .woocommerce-loop-product__title {
    padding: 8px 16px 4px !important;
    flex: 1 !important;
}

/* Price: fixed */
.woocommerce ul.products li.product .astra-shop-summary-wrap .price {
    flex-shrink: 0 !important;
    padding: 4px 16px 8px !important;
    display: block !important;
}

/* ★ BUTTON — always pinned to bottom of every card ★ */
.woocommerce ul.products li.product .astra-shop-summary-wrap .button,
.woocommerce ul.products li.product .astra-shop-summary-wrap a.button,
.woocommerce ul.products li.product .astra-shop-summary-wrap .added_to_cart {
    flex-shrink: 0 !important;
    margin: 0 16px 16px !important;
    width: calc(100% - 32px) !important;
    box-sizing: border-box !important;
    display: block !important;
    text-align: center !important;
}

/* Fallback for non-Astra structure */
.woocommerce ul.products li.product > .button,
.woocommerce ul.products li.product > a.button {
    margin-top: auto !important;
    margin-bottom: 16px !important;
    margin-left: 16px !important;
    margin-right: 16px !important;
    width: calc(100% - 32px) !important;
    box-sizing: border-box !important;
    display: block !important;
    text-align: center !important;
}

/* =============================================
   HIDE: Old Elementor contact info section on homepage
   (section c2ba5a1 - leftover from original design,
    replaced by our new content sections)
   ============================================= */
.elementor-element-c2ba5a1 {
    display: none !important;
}

/* =============================================
   FIX 4: HIDE / MINIMIZE "Powered by Astra"
   ============================================= */

/* Ultra-small, barely visible credit line */
.ast-footer-copyright-text,
.ast-footer-copyright {
    font-size: 11px !important;
    opacity: 0.4 !important;
    color: rgba(255,255,255,0.3) !important;
}

/* Hide the Astra branding link completely */
.ast-footer-copyright a[href*="wpastra"],
.ast-footer-copyright a[href*="wordpress.org"] {
    display: none !important;
}

/* Show only the copyright year/brand part */
.ast-footer-copyright-text > span:first-child {
    opacity: 0.4 !important;
    font-size: 11px !important;
}
