/* Galpon Restore Layout Fixes v4 (v14) */

/* Hide Smash Balloon Instagram feed */
.sbi { display: none !important; }
.elementor-widget-shortcode:has(.sbi) { display: none !important; }

/* Slider: show only first slide */
.wd-slider { overflow: hidden !important; position: relative !important; max-height: 500px !important; }
.wd-slider .wd-slide:not(:first-child) { display: none !important; }
.wd-slider .wd-slide { position: relative !important; }
.wd-slide-bg.wd-fill { position: relative !important; height: auto !important; min-height: 200px !important; }

/* Fix wd-fill absolute elements */
.wd-fill { position: relative !important; width: 100% !important; height: auto !important; top: auto !important; left: auto !important; right: auto !important; bottom: auto !important; }

/* Fix nav to horizontal */
.wd-header-nav .menu > li, .site-navigation .menu > li { display: inline-block !important; }

/* === CATEGORY ICONS GRID (wd_infobox_carousel) === */
.wd-carousel-container.info-box-carousel-wrapper { display: flex !important; flex-wrap: wrap !important; justify-content: center !important; gap: 10px; }
.wd-carousel-container.info-box-carousel-wrapper > * { display: flex !important; flex-wrap: wrap !important; justify-content: center !important; gap: 10px; }
.info-box-wrapper { flex: 0 0 calc(12.5% - 10px) !important; max-width: calc(12.5% - 10px) !important; text-align: center !important; }
@media (max-width: 992px) { .info-box-wrapper { flex: 0 0 calc(20% - 10px) !important; max-width: calc(20% - 10px) !important; } }
@media (max-width: 768px) { .info-box-wrapper { flex: 0 0 calc(33.33% - 10px) !important; max-width: calc(33.33% - 10px) !important; } }
.info-box-wrapper .info-box { text-align: center; }
.info-box-wrapper .info-box svg, .info-box-wrapper .info-box img { max-width: 50px; height: auto; margin: 0 auto 5px; display: block; }

/* Product grids */
.products { display: flex !important; flex-wrap: wrap !important; gap: 20px; }
.products .product, .products .type-product { flex: 0 0 calc(25% - 20px); max-width: calc(25% - 20px); box-sizing: border-box; }
@media (max-width: 992px) { .products .product, .products .type-product { flex: 0 0 calc(33.33% - 15px); max-width: calc(33.33% - 15px); } }
@media (max-width: 768px) { .products .product, .products .type-product { flex: 0 0 calc(50% - 10px); max-width: calc(50% - 10px); } }

/* Category grid on category pages */
.wd-cats-design-default .category-grid-item, .wd-cat { display: inline-block; vertical-align: top; text-align: center; }

/* Images */
img { max-width: 100%; height: auto; }

/* Elementor fixes */
.elementor-section-full_width > .elementor-container { max-width: 100%; }
.elementor-background-overlay:empty { display: none !important; }
.elementor-section[data-element_type='section'] { min-height: 0 !important; }

/* Side panels - hidden (need JS toggle) */
.wd-side-hidden { display: none !important; }

/* Collapse empty elementor containers */
.elementor-widget-container:empty { display: none; }

/* Carousel without JS - show as grid */
.wd-carousel-container { overflow: visible !important; }
.wd-carousel { display: flex !important; flex-wrap: wrap !important; }
.wd-carousel .wd-carousel-item { flex: 0 0 25%; max-width: 25%; box-sizing: border-box; padding: 10px; }
@media (max-width: 768px) { .wd-carousel .wd-carousel-item { flex: 0 0 50%; max-width: 50%; } }

/* Footer dark scheme */
.footer-container.color-scheme-dark,
footer.color-scheme-dark { background-color: #1a1a2e !important; color: #ccc !important; padding: 30px 0; }
.footer-container.color-scheme-dark a { color: #e0e0e0 !important; }
.footer-container.color-scheme-dark h1,
.footer-container.color-scheme-dark h2,
.footer-container.color-scheme-dark h3,
.footer-container.color-scheme-dark h4 { color: #fff !important; }

/* Prefooter section */
.wd-prefooter { background-color: #f5f5f5; padding: 20px 0; }

/* WooCommerce login/account form - hide (no backend) */
.woocommerce-form-login, .woocommerce-form-register,
.login-form-side { display: none !important; }

/* Reduce excessive white space */
.elementor-section { margin-bottom: 0 !important; }
.elementor-column-gap-default > .elementor-column > .elementor-element-populated { padding: 10px !important; }

/* Homepage Elementor columns - side by side */
.elementor-section .elementor-container { display: flex !important; flex-wrap: wrap !important; }
.elementor-column { box-sizing: border-box; }
.elementor-col-50 { flex: 0 0 50% !important; max-width: 50% !important; }
.elementor-col-33 { flex: 0 0 33.33% !important; max-width: 33.33% !important; }
.elementor-col-25 { flex: 0 0 25% !important; max-width: 25% !important; }
.elementor-col-100 { flex: 0 0 100% !important; max-width: 100% !important; }
@media (max-width: 768px) { .elementor-col-50, .elementor-col-33, .elementor-col-25 { flex: 0 0 100% !important; max-width: 100% !important; } }

/* === Header layout: hide mobile header on desktop, desktop on mobile === */
.whb-hidden-lg { display: none !important; }
@media (max-width: 991px) {
  .whb-visible-lg { display: none !important; }
  .whb-hidden-lg { display: flex !important; }
}

/* Give center nav column proper space */
.whb-general-header-inner { display: flex !important; align-items: center; }
.whb-col-left.whb-visible-lg { flex: 0 0 160px !important; max-width: 160px; }
.whb-col-center.whb-visible-lg { flex: 1 1 auto !important; min-width: 0; }
.whb-col-right.whb-visible-lg { flex: 0 0 auto !important; }

/* Nav items horizontal in flex row */
.wd-header-nav { text-align: center; }
.wd-nav-main { display: inline-flex !important; flex-direction: row !important; flex-wrap: nowrap !important; gap: 0; list-style: none; }
.wd-nav-main > li { display: block; white-space: nowrap; padding: 0 12px; }

/* Hide sub-menus by default (no JS hover) */
.wd-nav-main .sub-menu-dropdown,
.wd-nav-main .sub-sub-menu,
.wd-nav-main > li > .sub-menu { display: none !important; }

/* Logo size */
.whb-col-left img, .site-logo img { max-height: 50px; width: auto; }

/* Remove duplicate SBI prefooter section entirely */
.wd-prefooter .sbi, .wd-prefooter .elementor-widget-shortcode:has(.sbi) { display: none !important; }

/* === Owl Carousel without JS → horizontal grid === */
.owl-carousel { display: flex !important; flex-wrap: wrap !important; justify-content: center !important; gap: 15px; overflow: hidden !important; }
.owl-carousel .owl-stage-outer, .owl-carousel .owl-stage { display: contents !important; }
.owl-carousel .owl-item, .owl-carousel .brand-item { flex: 0 0 auto !important; display: inline-block !important; }

/* Brand logos: small horizontal row */
.brands-items-wrapper .owl-carousel { max-height: 120px !important; align-items: center; }
.brands-items-wrapper .brand-item { flex: 0 0 calc(16.66% - 15px) !important; max-width: 130px !important; }
.brands-items-wrapper .brand-item img { max-height: 60px !important; width: auto !important; max-width: 100%; object-fit: contain; }

/* Hide fullscreen search overlay and header promo banner */
.wd-search-full-screen { display: none !important; }
.header-banner { display: none !important; }
.wd-popup, .wd-promo-popup { display: none !important; }

/* Hide empty Instagram section wrapper */
.wd-prefooter > .container > .elementor-element:has(> .elementor-widget-container > [id*="sb_instagram"]),
[id*="sb_instagram"] { display: none !important; }
.wd-prefooter .elementor-element[data-element_type="widget"]:has([id*="sb_instagram"]) { display: none !important; }

/* === v8: Slider full-width without JS === */
.wd-slide-container { width: 100% !important; flex: 1 1 100% !important; }
.wd-slide-inner { width: 100% !important; }
.wd-slide .elementor-inner-section { width: 100% !important; max-width: 100% !important; }
.wd-slide .elementor-inner-section .elementor-column { flex: 1 1 auto !important; max-width: 100% !important; }

/* Slider background image placeholder */
.wd-slide-bg { background-size: cover !important; background-position: center !important; }

/* Bottom nosotros/contacto section - reduce excess height */
.elementor-widget-form { max-width: 600px; }

/* === v8b: Fix slide bg taking flex space === */
.wd-slide-bg.wd-fill {
  position: absolute !important;
  top: 0 !important; left: 0 !important; right: 0 !important; bottom: 0 !important;
  width: 100% !important; height: 100% !important;
  z-index: 0;
}
.wd-slide-container { position: relative; z-index: 1; }

/* === v9: Missing Elementor column widths === */
.elementor-col-66 { flex: 0 0 66.66% !important; max-width: 66.66% !important; }
.elementor-col-70 { flex: 0 0 70% !important; max-width: 70% !important; }
.elementor-col-30 { flex: 0 0 30% !important; max-width: 30% !important; }
@media (max-width: 768px) {
  .elementor-col-66, .elementor-col-70, .elementor-col-30 { flex: 0 0 100% !important; max-width: 100% !important; }
}

/* Testimonials owl carousel - limit stacking height */
.elementor-widget-wd_testimonials .owl-carousel { max-height: 400px !important; overflow: hidden !important; }
.elementor-widget-wd_testimonials .owl-carousel .owl-item { flex: 0 0 100% !important; max-width: 100% !important; }

/* SEGUINOS / Instagram wrapper - collapse empty section */
.elementor-widget-shortcode:has([id*="sb_instagram"]) { display: none !important; }
.elementor-widget-shortcode:empty { display: none !important; min-height: 0 !important; }

/* Collapse slider min-height override from inline style */
.wd-slider { max-height: 420px !important; }

/* Zero-width column fix - ensure col-100 nested in slide gets full width */
.wd-slide .elementor-col-100 { flex: 0 0 100% !important; max-width: 100% !important; width: 100% !important; }

/* === v10: Testimonial avatars - hide lazy placeholders === */
.testimonial-avatar img[src*="lazy"] { display: none !important; }
.testimonial-avatar { width: 60px !important; height: 60px !important; overflow: hidden !important; }

/* Gallery lazy placeholders - hide */
.wd-gallery-item img[src*="lazy"] { display: none !important; }

/* Generic lazy placeholder styling - limit size */
img[src*="lazy.png"] { max-width: 100px !important; max-height: 100px !important; opacity: 0.3; }

/* Broken images - hide alt text box */
img[alt]:not([src*="lazy"]) { min-height: 0 !important; }

/* === v11: Collapse empty SEGUINOS/Instagram section === */
.elementor-top-section:has(.elementor-widget-shortcode:has([class*="instagram"])),
.elementor-top-section:has([class*="instagram"]) { max-height: 100px !important; overflow: hidden !important; }

/* Banner sections with no loaded images - reduce padding */
.elementor-widget-wd_banner .banner-image img[src*="lazy"] {
  max-width: 100% !important; max-height: 200px !important; opacity: 0;
}

/* Remove empty Nuke logo caption */
.wp-caption:has(img[src*="lazy"]) { display: none !important; }

/* === v11b: Override v11 instagram collapse — section has real contact content === */
.elementor-element-5712476 { max-height: none !important; overflow: visible !important; }

/* Just hide the empty shortcode widget inside contact section */
.elementor-widget-shortcode .elementor-widget-container:empty { display: none !important; }
.elementor-widget-shortcode { min-height: 0 !important; }

/* === v13: Comprehensive Elementor + slider + layout fixes === */


/* 2. Fix CTA background image in slider (Elementor call-to-action) */
.elementor-cta { position: relative; min-height: 300px; }
.elementor-cta__bg-wrapper { position: absolute; top: 0; left: 0; right: 0; bottom: 0; z-index: 0; overflow: hidden; }
.elementor-cta__bg { position: absolute; top: 0; left: 0; right: 0; bottom: 0; background-size: cover; background-position: center; }
.elementor-cta__content { position: relative; z-index: 1; padding: 30px; }

/* 3. Product tabs navigation — remove bullets, inline-flex, hide inactive */
.wd-products-tabs-nav, .wd-tabs-nav { list-style: none !important; padding-left: 0 !important; display: flex !important; flex-wrap: wrap; gap: 10px; justify-content: center; margin-bottom: 15px; }
.wd-products-tabs-nav li, .wd-tabs-nav li { list-style: none !important; display: inline-block !important; }
.wd-products-tabs-nav li::marker { content: "" !important; display: none !important; }
.wd-tab-content-wrapper .wd-tab-content { display: none; }
.wd-tab-content-wrapper .wd-tab-content:first-child { display: block !important; }
.active-tab-title { font-weight: bold; border-bottom: 2px solid #303030; padding-bottom: 3px; }

/* 4. Hide WooCommerce "Close" quickview checkboxes */
.wd-compare-btn, .wd-quick-shop label, .wd-product-actions .wd-action-btn[data-addtxt="Close"],
input[type="checkbox"] + label:has(+ .product-title),
.product-grid-item input[type="checkbox"],
.product-grid-item label:contains("Close") { display: none !important; }
.product-grid-item > input[type="checkbox"] { display: none !important; }
.product-grid-item > label { display: none !important; }

/* 5. Brands row — proper centered layout */
.elementor-element-4686967 { padding: 10px 0 !important; }
.elementor-element-4686967 .owl-carousel { display: flex !important; flex-wrap: nowrap !important; justify-content: center !important; align-items: center !important; gap: 30px; }
.elementor-element-4686967 .brand-item { flex: 0 0 auto !important; }
.elementor-element-4686967 .brand-item img { max-height: 50px !important; width: auto !important; }

/* 6. Instagram section cleanup */
.sbi_follow_btn, #sbi_load, .sbi-load-more, [id*="sbi_load"],
a[href*="instagram.com"]:has(> svg.instagram-icon),
.sb_instagram_header { display: none !important; }
.elementor-element-5712476 .elementor-col-33:first-child .elementor-widget-shortcode { display: none !important; }
.elementor-element-5712476 .elementor-col-33:first-child svg { max-width: 60px !important; max-height: 60px !important; }
.elementor-element-5712476 .elementor-col-33:first-child img[src*="instagram"] { max-width: 60px !important; }

/* 7. Hide "Load More" from stripped Instagram */
a:contains("Load More"), .sbi_load_btn { display: none !important; }

/* 8. Elementor inner section bg image (from recovered post CSS) */
.elementor-inner-section .elementor-background-overlay { display: block !important; }

/* 9. Fix slider height to accommodate new backgrounds */
.wd-slider { max-height: 500px !important; }

/* 10. Elementor section min-height override */
.elementor-section-height-min-height > .elementor-container { min-height: 300px; }

/* 11. CTA hover animation disabled (no JS) */
.elementor-animated-item--move-up { transform: none !important; }
.elementor-cta__bg-overlay { display: none !important; }

/* 12. Fix footer duplicate legal links (keep only first set) */
.footer-widget .menu li { list-style: none !important; }
.footer-widget .menu { padding-left: 0 !important; }

/* 13. Hide broken img alt text placeholders */
img:not([src])::before, img[src=""]::before { content: ""; display: block; }

/* 14. Product "SELECCIONAR OPCIONES" button styling */
.product .button, .product .add_to_cart_button, .product .product_type_variable {
  background: #303030 !important; color: #fff !important; border: none !important;
  padding: 8px 16px !important; text-decoration: none !important; display: inline-block;
  font-size: 12px !important; text-transform: uppercase; letter-spacing: 0.5px;
}

/* 15. Loading spinner characters — hide */
.wd-loader, .wd-preloader { display: none !important; }

/* === v14 fixes === */
/* Hide WooCommerce quick-shop close buttons */
.quick-shop-close { display: none !important; }
.quick-shop-wrapper { display: none !important; }

/* Product tabs navigation - remove bullets, horizontal layout */
ul.products-tabs-title { list-style: none !important; padding-left: 0 !important; display: flex !important; flex-wrap: wrap; gap: 10px; justify-content: center; margin-bottom: 15px; }
ul.products-tabs-title li { list-style: none !important; display: inline-block !important; }
ul.products-tabs-title li::marker { content: '' !important; display: none !important; }
.tabs-navigation-wrapper { text-align: center; }

/* Hide duplicate footer mobile nav toggle and second nav */
.elementor-element-f041168 .elementor-menu-toggle { display: none !important; }
.elementor-element-f041168 .elementor-nav-menu--dropdown { display: none !important; }

/* === v18 fixes: CTA promo banner layout === */
.elementor-element-9177690 .elementor-container {
  flex-wrap: nowrap !important;
  gap: 10px;
}
.elementor-element-9177690 .elementor-col-50 {
  flex-basis: calc(50% - 5px) !important;
  max-width: calc(50% - 5px) !important;
}
.elementor-element-9177690 .promo-banner-wrapper {
  margin-bottom: 10px;
}
.elementor-element-9177690 .promo-banner {
  position: relative !important;
  overflow: hidden !important;
  border-radius: 8px;
}
.elementor-element-9177690 .banner-image img {
  width: 100% !important;
  height: auto !important;
  display: block !important;
  object-fit: cover !important;
}
/* Force text overlay to absolute position over image */
.elementor-element-9177690 .promo-banner .wrapper-content-banner.wd-fill {
  position: absolute !important;
  bottom: 0 !important;
  left: 0 !important;
  right: 0 !important;
  top: auto !important;
  height: auto !important;
  padding: 20px !important;
  background: linear-gradient(transparent, rgba(0,0,0,0.6)) !important;
}
.elementor-element-9177690 .banner-title {
  color: #fff !important;
  text-shadow: 0 1px 3px rgba(0,0,0,0.4);
}
.elementor-element-9177690 .banner-subtitle {
  color: #fff !important;
}
.elementor-element-9177690 .btn-color-alt .wd-btn-text {
  color: #fff !important;
}
.elementor-element-933295 .elementor-widget-wrap {
  gap: 10px !important;
}
/* Right column banners: constrain height to stack evenly */
.elementor-element-933295 .promo-banner-wrapper .banner-image img {
  max-height: 230px !important;
  object-fit: cover !important;
}
/* Remove excess main-wrapp-img padding */
.elementor-element-9177690 .main-wrapp-img {
  line-height: 0 !important;
  font-size: 0 !important;
}
