/*
Theme Name: Twenty Twenty-Four Child - Impulse Design
Description: Child theme for Twenty Twenty-Four with Shopify Impulse theme design
Author: Your Name
Template: twentytwentyfour
Version: 1.0.0
*/

/* Import parent theme styles */
@import url("../twentytwentyfour/style.css");

/* Import Font Awesome */
@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css');

/* ===== CUSTOM HEADER ELEMENTS ===== */

/* Global CSS Variables */
:root {
  --impulse-primary: #000000;
  --impulse-secondary: #666666;
  --impulse-accent: #ff6b6b;
  --impulse-background: #ffffff;
  --impulse-text: #333333;
  --impulse-border: #e5e5e5;
  --impulse-transition: all 0.3s ease;
  --impulse-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* Top social bar */
.top-social-bar {
  background: white !important;
  border-bottom: 1px solid #f0f0f0 !important;
  padding: 4px 0 !important;
}

.top-social-bar .container {
  max-width: 1200px !important;
  margin: 0 auto !important;
  padding: 0 20px !important;
  display: flex !important;
  justify-content: flex-end !important;
  align-items: center !important;
}

.social-icons {
  display: flex !important;
  gap: 1.5rem !important;
}

.social-icons a {
  color: #333 !important;
  text-decoration: none !important;
  transition: var(--impulse-transition) !important;
  font-size: 1.1rem !important;
}

.social-icons a:hover {
  color: #000 !important;
}

/* Main header */
#site-header {
  background: white !important;
  z-index: 1000 !important;
  transition: var(--impulse-transition) !important;
}

.header-inner {
  max-width: 1200px !important;
  margin: 0 auto !important;
  padding: 0 20px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  height: 225px !important;
}

.header-left,
.header-center,
.header-right {
  display: flex !important;
  align-items: center !important;
}

.header-left {
  flex: 1 !important;
}

.header-center {
  flex: 2 !important;
  justify-content: center !important;
}

.header-right {
  flex: 1 !important;
  justify-content: flex-end !important;
  gap: 1.5rem !important;
}





.site-logo {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  text-decoration: none !important;
  text-align: center !important;
  flex: 1 !important;
  height: auto !important;
  line-height: 1 !important;
}

.site-logo img,
.site-logo .site-logo-img {
  height: 72px !important;
  width: auto !important;
  display: block !important;
  max-width: none !important;
}

/* Mobile logo sizing - higher specificity */
@media (max-width: 768px) {
  .site-logo img,
  .site-logo .site-logo-img,
  .header-center .site-logo img,
  .header-center .site-logo .site-logo-img {
    height: 48px !important;
    width: auto !important;
    max-width: none !important;
  }
}

/* Fallback text logo styling */
.site-logo:not(:has(img)) {
  font-size: 42px !important;
  font-weight: 800 !important;
  color: var(--impulse-primary) !important;
  letter-spacing: 1px !important;
}





/* Search toggle styling */
.search-toggle {
  background: none !important;
  border: none !important;
  color: #333 !important;
  cursor: pointer !important;
  padding: 0 !important;
  font-weight: 500 !important;
  transition: var(--impulse-transition) !important;
  width: 40px !important;
  height: 40px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  line-height: 0 !important;
}

.search-toggle:hover {
  color: #000 !important;
}

.icon-search { width: 32px !important; height: 32px !important; display: block !important; }

/* search-submit uses same .icon-search sizing */

/* Fix home page cart badge visibility (minimal override) */
.home .wc-block-mini-cart__badge {
  background: #000 !important;
  color: #fff !important;
}

/* Search overlay */
.search-overlay {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100vh !important; /* full-page overlay */
  background: rgba(0,0,0,0.3) !important;
  z-index: 9999 !important;
  display: none !important;
}

/* Prevent scrolling when search overlay is active */
/* keep page scrollable when overlay is open */

/* Hide theme's title bar and category bar when search overlay is active */
.search-overlay.active ~ .wp-block-group.alignwide.has-base-background-color.has-background.has-global-padding.is-layout-constrained,
.search-overlay.active + .wp-block-group.alignwide.has-base-background-color.has-background.has-global-padding.is-layout-constrained,
.search-overlay.active ~ .categories-nav,
.search-overlay.active + .categories-nav {
  display: none !important;
}

/* Hide header content when search is active (reliably using :has) */
body:has(.search-overlay.active) #site-header {
  background: transparent !important;
}
body:has(.search-overlay.active) .search-toggle,
body:has(.search-overlay.active) .account-toggle,
body:has(.search-overlay.active) .site-logo,
body:has(.search-overlay.active) .wc-block-mini-cart,
body:has(.search-overlay.active) .categories-menu {
  display: none !important;
}

.search-overlay.active {
  display: flex !important;
}

.search-content {
  background: transparent !important;
  padding: 0 !important;
  width: 90% !important;
  max-width: 600px !important;
  position: absolute !important;
  border-radius: 8px !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  /* Center vertically to logo: social bar (~36px) + half of title (225px/2) - half input height (~53px/2) + small offset */
  top: calc(36px + (225px / 2) - (var(--search-input-height, 53px) / 2) + 28px) !important;
}

/* Search input wrapper */
.search-input-wrapper {
  position: relative !important;
  width: 100% !important;
  background: white !important;
  border-radius: 8px !important;
  overflow: hidden !important;
}

.search-input {
  width: 100% !important;
  padding: 1rem 3rem 1rem 1rem !important;
  border: none !important;
  outline: none !important;
  font-size: 1.1rem !important;
  background: transparent !important;
}

.search-input::placeholder {
  color: #999 !important;
}

.search-submit {
  position: absolute !important;
  right: 1rem !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  background: none !important;
  border: none !important;
  cursor: pointer !important;
  color: #333 !important;
  padding: 0.5rem !important;
  transition: color 0.2s ease !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.search-submit:hover {
  color: #000 !important;
}

.search-submit svg {
  width: 20px !important;
  height: 20px !important;
  display: block !important;
}

/* Fix aria-hidden issue - removed invalid CSS property */





/* Normalize Woo customer-account block icon */
/* Revert to custom account icon */
.account-toggle {
  color: #333 !important;
  text-decoration: none !important;
  font-weight: 500 !important;
  transition: var(--impulse-transition) !important;
  margin-right: 1rem !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 40px !important;
  height: 40px !important;
  line-height: 0 !important;
}
.account-toggle:hover { color: #000 !important; }
.account-toggle .account-icon { width: 32px !important; height: 32px !important; display: block !important; }

/* Woo mini-cart icon size */
/* Use native Woo cart SVG; just size/color it. Badge remains intact. */
.wc-block-mini-cart .wc-block-mini-cart__icon {
  width: 32px !important;
  height: 32px !important;
  color: #333 !important;
}

/* Normalize Woo mini-cart button wrapper to match 40x40 and center the icon */
.header-right .wc-block-mini-cart {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 40px !important;
  height: 40px !important;
  padding: 0 !important;
  margin: 0 !important;
  line-height: 0 !important;
  overflow: visible !important; /* allow badge to render */
}

/* Reduce gap between account and cart on mobile */
@media (max-width: 768px) {
  .header-right {
    gap: 0.25rem !important;
  }
}

/* Categories navigation */
.categories-nav {
  background: white !important;
  border-bottom: 1px solid var(--impulse-border) !important;
  padding: 15px 0 !important;
}

.categories-nav .container {
  max-width: 1200px !important;
  margin: 0 auto !important;
  padding: 0 20px !important;
  display: flex !important;
  justify-content: center !important;
}

.categories-menu {
  display: flex !important;
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
  gap: 3rem !important;
}

.categories-menu a {
  color: var(--impulse-text) !important;
  text-decoration: none !important;
  font-weight: 500 !important;
  text-transform: uppercase !important;
  letter-spacing: 1px !important;
  font-size: 0.9rem !important;
  transition: var(--impulse-transition) !important;
}

.categories-menu a:hover {
  color: var(--impulse-primary) !important;
}

/* Promotional bar */
.promo-bar {
  background: var(--impulse-primary) !important;
  color: white !important;
  padding: 12px 0 !important;
  text-align: center !important;
}

.promo-bar .container {
  max-width: 1200px !important;
  margin: 0 auto !important;
  padding: 0 20px !important;
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  gap: 1rem !important;
}

/* Remove any gap before native WP content immediately after our header area */
body .wp-site-blocks > *:first-child { margin-top: 0 !important; }
body .wp-site-blocks > .wp-block-template-part + * { margin-top: 0 !important; }
main, .wp-block-group { padding-top: 0 !important; }

/* Ensure no extra spacing below our custom header area so page blocks follow directly */
.top-social-bar,
#site-header,
.categories-nav,
.promo-bar {
  margin-bottom: 0 !important;
  padding-bottom: 0 !important;
}

.promo-bar a {
  color: white !important;
  text-decoration: underline !important;
  font-weight: 500 !important;
}

.promo-bar a:hover {
  opacity: 0.8 !important;
}

/* Hero section */
.hero-section {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
  color: white !important;
  padding: 80px 0 !important;
  text-align: center !important;
  margin-bottom: 60px !important;
}

.hero-content {
  max-width: 800px !important;
  margin: 0 auto !important;
  padding: 0 20px !important;
}

.hero-title {
  font-size: 3.5rem !important;
  font-weight: 700 !important;
  margin-bottom: 1rem !important;
  font-family: Georgia, serif !important;
}

.hero-subtitle {
  font-size: 1.2rem !important;
  margin-bottom: 2rem !important;
  opacity: 0.9 !important;
}

.hero-cta {
  display: inline-block !important;
  background: white !important;
  color: var(--impulse-primary) !important;
  padding: 15px 30px !important;
  text-decoration: none !important;
  border-radius: 4px !important;
  font-weight: 600 !important;
  transition: var(--impulse-transition) !important;
}

.hero-cta:hover {
  background: var(--impulse-accent) !important;
  color: white !important;
}

/* Hide theme's title bar on WooCommerce pages */
.woocommerce .entry-header,
.woocommerce-page .entry-header,
.woocommerce .page-header,
.woocommerce-page .page-header {
  display: none !important;
}

/* Hide theme's title bar on all pages */
.wp-block-group.alignwide.has-base-background-color.has-background.has-global-padding.is-layout-constrained {
  display: none !important;
}

/* Hide custom elements when WooCommerce maintenance mode is active */
.woocommerce-store-notice,
.woocommerce-store-notice-dismiss {
  display: none !important;
}

/* Hide our custom elements when WooCommerce maintenance elements are present (only for non-logged-in users) */
body:has(.woocommerce-store-notice):not(.logged-in) .top-social-bar,
body:has(.woocommerce-store-notice):not(.logged-in) #site-header,
body:has(.woocommerce-store-notice):not(.logged-in) .categories-nav,
body:has(.woocommerce-store-notice):not(.logged-in) .promo-bar,
body:has(.woocommerce-store-notice):not(.logged-in) .hero-section {
  display: none !important;
}

/* Alternative: Hide when WooCommerce is not available (only for non-logged-in users) */
body:not(.woocommerce):not(.logged-in) .top-social-bar,
body:not(.woocommerce):not(.logged-in) #site-header,
body:not(.woocommerce):not(.logged-in) .categories-nav,
body:not(.woocommerce):not(.logged-in) .promo-bar,
body:not(.woocommerce):not(.logged-in) .hero-section {
  display: none !important;
}

/* Ensure maintenance page uses parent theme's default font */
body:has(.woocommerce-store-notice),
body:has(.woocommerce-store-notice) * {
  font-family: inherit !important;
  font-size: inherit !important;
  font-weight: inherit !important;
  line-height: inherit !important;
}



/* Responsive design */
@media (max-width: 768px) {
  .header-inner {
    height: 80px !important;
  }
  
  .categories-nav {
    display: none !important;
  }
  
  .hero-title {
    font-size: 2.5rem !important;
  }
  
  .hero-section {
    padding: 40px 0 !important;
  }
}

/* Ensure consistent header height across all pages */
.woocommerce #site-header,
.woocommerce-page #site-header,
.page #site-header,
.single #site-header {
  height: auto !important;
}

.woocommerce .header-inner,
.woocommerce-page .header-inner,
.page .header-inner,
.single .header-inner {
  height: 225px !important;
}

@media (max-width: 768px) {
  .woocommerce .header-inner,
  .woocommerce-page .header-inner,
  .page .header-inner,
  .single .header-inner {
    height: 80px !important;
  }
} 