/*
Theme Name: Storefront Child
Template: storefront
Version: 1.0.0
*/

/* ===========================
   HIDE ALL WOOCOMMERCE/STOREFRONT SEARCH
   =========================== */

/* Hide any default Storefront product search */
.storefront-product-search,
.site-search,
.widget_product_search,
form.woocommerce-product-search {
  display: none !important;
}

/* Hide handheld footer bar search */
.storefront-handheld-footer-bar ul li.search,
.storefront-handheld-footer-bar .search {
  display: none !important;
}

/* Hide any search in header widget area */
.header-widget-region .widget_product_search,
.header-widget-region form[role="search"] {
  display: none !important;
}

/* Hide WooCommerce search widget everywhere */
.widget.woocommerce.widget_product_search {
  display: none !important;
}

/* Hide any other search forms that aren't our custom ones */
form[role="search"]:not(.custom-product-search-form):not(.mobile-product-search-form) {
  display: none !important;
}

/* ===========================
   FORCE STICKY HEADER - OVERRIDE STOREFRONT
   =========================== */

/* Ensure parent containers don't have overflow hidden */
body,
html,
#page,
.hfeed.site,
.storefront-full-width-content {
  overflow-x: visible !important;
}

/* Force the header to be sticky */
#masthead.site-header,
.site-header,
header.site-header {
  position: -webkit-sticky !important;
  position: sticky !important;
  top: 0 !important;
  z-index: 9999 !important;
  background: #f0fbfc !important;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05) !important;
  padding: 0 !important;
  margin: 0 !important;
  width: 100% !important;
}

/* Remove any default Storefront header styles */
.site-header .col-full {
  padding: 0 !important;
  margin: 0 !important;
  max-width: 100% !important;
}

.site-header::before,
.site-header::after {
  display: none !important;
}

/* ===========================
   DESKTOP HEADER STYLES
   =========================== */

.my-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  height: auto;
  padding: 10px !important;
  background: #f0fbfc;
  margin: 0 !important;
  width: 100% !important;
}

/* Logo - left side */
.my-header-logo {
  min-width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.my-header-logo .custom-logo {
  width: 70px;
  height: auto;
  max-height: 80px;
  display: block;
}

/* Navigation cluster (centered on desktop) */
.my-header-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}

/* Wrapper for menu items with padding */
.my-header-menu-wrapper {
  display: flex;
  align-items: center;
  padding-left: 50px;
  padding-right: 50px;
}

/* Menu and items - PREVENT WRAPPING */
.my-header-menu {
  display: flex;
  gap: 24px;
  margin: 0;
  padding: 0;
  list-style: none;
  flex-wrap: nowrap;
}

.my-header-menu > li {
  flex-shrink: 0;
  white-space: nowrap;
}

.my-header-menu > li > a {
  color: #00c4cc;
  font-weight: 800;
  font-size: 1.2rem;
  text-decoration: none;
  border-bottom: 2px solid transparent;
  padding: 6px 14px;
  transition: border 0.2s, color 0.2s;
  white-space: nowrap;
  display: inline-block;
}

.my-header-menu > li > a:hover,
.my-header-menu > li.current-menu-item > a,
.my-header-menu > li.current_page_item > a {
  border-bottom: 2px solid #00c4cc;
  color: #00c4cc;
}

/* Right side: Cart and Search */
.my-header-right {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-shrink: 0;
}

/* Cart styling */
.my-header-cart {
  display: flex;
  align-items: center;
  position: relative;
  z-index: 10;
}

.my-cart-contents {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-weight: 600;
  text-decoration: none;
  color: #333;
}

.cart-icon { 
  margin-right: 6px; 
}

.cart-total { 
  margin-left: 10px; 
  color: #00c4cc; 
}

/* Cart dropdown */
.cart-dropdown {
  display: none;
  position: absolute;
  right: 0;
  top: 100%;
  background: #fff;
  min-width: 220px;
  max-width: 380px;
  z-index: 60;
  box-shadow: 0 6px 18px rgba(0,0,0,0.15);
}

.my-header-cart:hover .cart-dropdown,
.my-header-cart:focus-within .cart-dropdown {
  display: block;
}

/* Hamburger button - hidden on desktop */
.my-mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  z-index: 100;
  width: 30px;
  height: auto;
}

/* Each hamburger line */
.hamburger-line {
  display: block;
  width: 30px;
  height: 3px;
  background: #00c4cc;
  border-radius: 2px;
  margin: 5px 0;
  transition: all 0.3s ease;
}

/* Hide mobile menu by default */
.my-mobile-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  width: 100%;
  background: #f0fbfc;
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
  z-index: 9999;
}

/* Left side controls container (hamburger + search on mobile) */
.my-header-left {
  display: none;
  align-items: center;
  gap: 14px;
}

/* ===========================
   CUSTOM PRODUCT SEARCH STYLING
   =========================== */

/* Desktop Search Form */
.custom-product-search-form {
  display: flex;
  align-items: center;
  margin-top: 23px;
}

.custom-product-search-form .search-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  width: 250px;
}

.custom-product-search-form .search-field {
  width: 100%;
  padding: 10px 40px 10px 15px !important;
  border: 2px solid #00c4cc !important;
  border-radius: 4px !important;
  font-size: 14px !important;
  outline: none;
  transition: border-color 0.3s ease;
  background: #fff !important;
  height: auto !important;
  line-height: normal !important;
}

.custom-product-search-form .search-field:focus {
  border-color: #009aa0 !important;
}

.custom-product-search-form .search-field::placeholder {
  color: #999;
  font-size: 14px;
}

/* Force button to be invisible - only icon shows */
.custom-product-search-form .search-submit {
  position: absolute !important;
  right: 5px !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  background: transparent !important;
  border: none !important;
  padding: 8px !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: opacity 0.3s ease !important;
  width: auto !important;
  height: auto !important;
  min-width: 0 !important;
  min-height: 0 !important;
  box-shadow: none !important;
  text-indent: 0 !important;
  font-size: 0 !important;
  line-height: 0 !important;
  margin: 0 !important;
}

.custom-product-search-form .search-submit:hover {
  opacity: 0.7 !important;
  background: transparent !important;
}

.custom-product-search-form .search-submit:focus {
  outline: none !important;
  box-shadow: none !important;
  background: transparent !important;
}

/* Make sure icon is visible */
.custom-product-search-form .search-icon {
  color: #00c4cc !important;
  width: 20px !important;
  height: 20px !important;
  display: block !important;
  stroke: #00c4cc !important;
  fill: none !important;
}

/* Override any theme button text */
.custom-product-search-form .search-submit::before,
.custom-product-search-form .search-submit::after {
  content: none !important;
  display: none !important;
}

/* ===========================
   MOBILE SEARCH TOGGLE & OVERLAY
   =========================== */

/* Mobile Search Toggle Button - Hidden on Desktop */
.mobile-search-toggle {
  display: none;
  background: none;
  border: none;
  padding: 8px;
  cursor: pointer;
  color: #00c4cc;
  transition: opacity 0.3s ease;
}

.mobile-search-toggle:hover {
  opacity: 0.7;
}

.mobile-search-toggle svg {
  display: block;
  width: 20px;
  height: 20px;
  stroke: #00c4cc;
}

/* Mobile Search Bar Overlay - Hidden by Default */
.mobile-search-bar {
  display: none;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  height: 80px;
  background: #f0fbfc;
  z-index: 30;
  align-items: center;
  padding: 0 16px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}

.mobile-search-bar.active {
  display: flex;
}

/* Mobile Product Search Form Styling */
.mobile-product-search-form {
  display: flex;
  align-items: center;
  width: 100%;
}

.mobile-product-search-form .search-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.mobile-product-search-form .search-field {
  width: 100%;
  padding: 10px 80px 10px 15px !important;
  border: 2px solid #00c4cc !important;
  border-radius: 4px !important;
  font-size: 14px !important;
  outline: none;
  background: #fff !important;
  height: auto !important;
}

.mobile-product-search-form .search-field:focus {
  border-color: #009aa0 !important;
}

.mobile-product-search-form .search-field::placeholder {
  color: #999;
  font-size: 14px;
}

/* Search Submit Button (inside field) */
.mobile-product-search-form .search-submit {
  position: absolute !important;
  right: 50px !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  background: transparent !important;
  border: none !important;
  padding: 8px !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: auto !important;
  height: auto !important;
  min-width: 0 !important;
  min-height: 0 !important;
  box-shadow: none !important;
  margin: 0 !important;
}

.mobile-product-search-form .search-icon {
  color: #00c4cc !important;
  width: 20px !important;
  height: 20px !important;
  display: block !important;
  stroke: #00c4cc !important;
  fill: none !important;
}

/* Close Button (X) */
.mobile-search-close {
  position: absolute !important;
  right: 10px !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  background: transparent !important;
  border: none !important;
  padding: 8px !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  color: #666 !important;
  transition: opacity 0.3s ease;
}

.mobile-search-close:hover {
  opacity: 0.7;
}

.mobile-search-close svg {
  width: 20px;
  height: 20px;
  stroke: #666;
}

/* ===========================
   LIVE SEARCH RESULTS DROPDOWN - COMPACT
   =========================== */

/* ONLY apply to dropdowns inside our custom search forms */
.custom-product-search-form .search-results,
.mobile-product-search-form .search-results {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  background: #fff;
  border: 1px solid #ddd;
  border-top: none;
  border-radius: 0 0 4px 4px;
  max-height: 300px;
  overflow-y: auto;
  z-index: 1000;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  margin-top: -2px;
}

.custom-product-search-form .search-results-title,
.mobile-product-search-form .search-results-title {
  padding: 6px 10px;
  font-weight: 700;
  font-size: 10px;
  color: #00c4cc;
  text-transform: uppercase;
  background: #fafafa;
  border-bottom: 1px solid #eee;
  letter-spacing: 0.5px;
}

.custom-product-search-form .search-result-item,
.mobile-product-search-form .search-result-item {
  display: flex;
  align-items: center;
  padding: 8px 10px;
  text-decoration: none;
  color: #333;
  border-bottom: 1px solid #f5f5f5;
  transition: background 0.15s;
}

.custom-product-search-form .search-result-item:hover,
.mobile-product-search-form .search-result-item:hover {
  background: #f9f9f9;
}

.custom-product-search-form .search-result-item:last-child,
.mobile-product-search-form .search-result-item:last-child {
  border-bottom: none;
}

.custom-product-search-form .search-result-item img,
.mobile-product-search-form .search-result-item img {
  width: 35px;
  height: 35px;
  object-fit: cover;
  border-radius: 3px;
  margin-right: 10px;
  flex-shrink: 0;
  border: 1px solid #eee;
}

.custom-product-search-form .search-result-details,
.mobile-product-search-form .search-result-details {
  flex: 1;
  min-width: 0;
}

.custom-product-search-form .search-result-title,
.mobile-product-search-form .search-result-title {
  font-weight: 500;
  font-size: 13px;
  color: #333;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.custom-product-search-form .search-result-price,
.mobile-product-search-form .search-result-price {
  font-size: 12px;
  color: #00c4cc;
  font-weight: 600;
}

.custom-product-search-form .search-no-results,
.mobile-product-search-form .search-no-results {
  padding: 15px;
  text-align: center;
  color: #999;
  font-size: 13px;
}

/* Mobile search results - additional specific styles */
.mobile-product-search-form .search-results {
  max-height: 400px;
  border: 1px solid #00c4cc;
}

.mobile-product-search-form .search-result-item img {
  width: 45px;
  height: 45px;
}

.mobile-product-search-form .search-result-title {
  font-size: 14px;
  white-space: normal;
}

/* ===========================
   MOBILE STYLES
   =========================== */

@media (max-width: 1220px) {
  
  /* THIN LINE AT BOTTOM OF HEADER - MOBILE ONLY */
  .site-header,
  header.site-header,
  #masthead {
    border-bottom: 1px solid #c7eef1 !important;
  }
  
  /* Hide desktop navigation */
  .my-header-nav {
    display: none !important;
  }
  
  /* Header row must have full width and relative positioning */
  .my-header-row {
    display: block !important;
    width: 100% !important;
    padding: 0 !important;
    height: 80px !important;
    position: relative !important;
    margin: 0 !important;
    background: #f0fbfc !important;
  }
  
  /* Show left side container with hamburger + search */
  .my-header-left {
    display: flex !important;
    position: absolute !important;
    left: 16px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    align-items: center !important;
    gap: 10px !important;
    z-index: 20 !important;
  }
  
  /* Hamburger in left container */
  .my-mobile-menu-toggle {
    display: block !important;
    position: relative !important;
    left: auto !important;
    top: auto !important;
    transform: none !important;
    padding: 4px !important;
    margin: 0 !important;
  }
  
  /* Mobile search toggle in left container */
  .mobile-search-toggle {
    display: block !important;
    position: relative !important;
    padding: 4px !important;
    margin: 0 !important;
  }
  
  /* Logo ABSOLUTELY CENTERED */
  .my-header-logo {
    position: absolute !important;
    left: 50% !important;
    top: 50% !important;
    transform: translate(-50%, -50%) !important;
    display: block !important;
    width: auto !important;
    min-width: 50px !important;
    height: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    text-align: center !important;
    z-index: 5 !important;
  }
  
  .my-header-logo .custom-logo-link {
    display: block !important;
    margin: 0 auto !important;
  }
  
  .my-header-logo .custom-logo {
    width: 50px !important;
    height: auto !important;
    max-height: 60px !important;
    display: block !important;
    margin: 0 auto !important;
  }
  
  /* Cart ABSOLUTELY RIGHT */
  .my-header-right {
    position: absolute !important;
    right: 16px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    display: flex !important;
    align-items: center !important;
    gap: 14px !important;
    margin: 0 !important;
    padding: 0 !important;
    z-index: 20 !important;
  }
  
  /* Hide desktop search on mobile */
  .custom-product-search-form {
    display: none !important;
  }
  
  /* Cart visible on mobile */
  .my-header-cart {
    display: flex !important;
    align-items: center !important;
    margin: 0 !important;
  }
  
  /* Mobile menu panel */
  .my-mobile-menu {
    display: none;
    width: 100%;
    position: absolute;
    left: 0;
    top: 100%;
    background: #f0fbfc;
    z-index: 9999;
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
  }
  
  /* Show menu when open class is toggled */
  .my-mobile-menu.open {
    display: block;
  }
  
  /* Mobile menu list styling */
  .my-header-menu-mobile {
    display: flex;
    flex-direction: column;
    list-style: none;
    margin: 0;
    padding: 0;
  }
  
  .my-header-menu-mobile > li {
    margin: 0;
  }
  
  /* CENTER ALIGNED MENU LINKS */
  .my-header-menu-mobile > li > a {
    display: block;
    color: #00c4cc;
    font-weight: 800;
    font-size: 1.1rem;
    padding: 16px 24px;
    text-decoration: none;
    border: none;
    border-bottom: 1px solid #e0f5f7;
    text-align: center;
    transition: background 0.2s;
  }
  
  .my-header-menu-mobile > li > a:hover {
    background: #e6f9fb;
  }
  
  /* Hide cart dropdown on mobile */
  .cart-dropdown {
    display: none !important;
  }
  
  .wp-block-video video {
    background-color: white;
  }
  
  /* Change handheld footer bar icon colors to teal */
  .storefront-handheld-footer-bar ul li > a,
  .storefront-handheld-footer-bar ul li.search .site-search,
  .storefront-handheld-footer-bar ul li > button {
    color: #00c4cc !important;
  }
  
  /* Change active/current icon color to teal */
  .storefront-handheld-footer-bar ul li.active > a {
    color: #00c4cc !important;
  }
  
  /* Change cart icon color to teal */
  .storefront-handheld-footer-bar .cart .count {
    background-color: #00c4cc !important;
  }
}

/* ===========================
   PRODUCT FEATURE TILES
   =========================== */

.product-feature-section {
  width: 100%;
  padding: 60px 20px;
  background: #fff;
}

.product-feature-tiles {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.feature-tile {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  text-decoration: none;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
}

.feature-tile:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 24px rgba(0, 196, 204, 0.2);
}

.feature-tile-image {
  width: 100%;
  height: 250px;
  background: #00c4cc;  /* Changed from #f8f8f8 to match your teal theme */
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 30px;
  overflow: hidden;
}

.feature-tile-image img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.feature-tile-content {
  padding: 25px;
  text-align: center;
  background: #fff;
}

.feature-tile-title {
  font-size: 1.5rem;
  font-weight: 800;
  color: #00c4cc;
  margin: 0 0 15px 0;
}

.feature-tile-badges {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
}

.feature-badge {
  display: inline-block;
  padding: 6px 14px;
  background: #e6f9fb;
  color: #00c4cc;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: 20px;
  white-space: nowrap;
}

/* Placeholder styling for tiles without images */
.feature-tile-placeholder {
  background: linear-gradient(135deg, #e6f9fb 0%, #f0fbfc 100%);
}

.placeholder-icon {
  font-size: 5rem;
  opacity: 0.3;
}

/* Mobile responsive - STAY IN ONE ROW */
@media (max-width: 768px) {
  .product-feature-section {
    padding: 40px 10px;
  }
  
  .product-feature-tiles {
    gap: 15px;
  }
  
  .feature-tile-image {
    height: 150px;
    padding: 15px;
  }
  
  .feature-tile-content {
    padding: 15px 10px;
  }
  
  .feature-tile-title {
    font-size: 1rem;
    margin: 0 0 10px 0;
  }
  
  .feature-badge {
    font-size: 0.7rem;
    padding: 4px 8px;
  }
  
  .placeholder-icon {
    font-size: 3rem;
  }
}

/* Extra small screens - still one row but even more compact */
@media (max-width: 480px) {
  .product-feature-tiles {
    gap: 10px;
  }
  
  .feature-tile-image {
    height: 120px;
    padding: 10px;
  }
  
  .feature-tile-content {
    padding: 10px 5px;
  }
  
  .feature-tile-title {
    font-size: 0.9rem;
  }
  
  .feature-badge {
    font-size: 0.65rem;
    padding: 3px 6px;
  }
}



