/* ========================================
   MS InstruVibe - Industrial Instrumentation E-Commerce
   Modern Professional B2B/B2C Styling
   ======================================== */

/* === Color Palette - Professional Industrial === */
:root {
  --primary-color: #0066CC;        /* Trust Blue */
  --secondary-color: #FF6B00;      /* Action Orange */
  --accent-color: #00A651;         /* Success Green */
  --dark-bg: #1A1F2E;              /* Deep Navy */
  --light-bg: #F5F7FA;             /* Clean Gray */
  --text-dark: #2C3E50;            /* Professional Dark */
  --text-light: #FFFFFF;           /* Pure White */
  --border-color: #E1E8ED;         /* Subtle Border */
  --warning-red: #DC3545;          /* Alert Red */
}

/* Top Bar Styling - Above Header */
.instruvibe-top-bar {
    background: linear-gradient(135deg, #0066CC 0%, #1A1F2E 100%);
    color: white;
    padding: 10px 0;
    font-size: 0.9rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.instruvibe-top-bar a {
    background: linear-gradient(135deg, #0066CC 0%, #1A1F2E 100%);
    color: white;
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.instruvibe-top-bar a:hover {
    opacity: 0.8;
}

.instruvibe-top-bar .top-bar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.instruvibe-top-bar .top-bar-left,
.instruvibe-top-bar .top-bar-right {
    display: flex;
    gap: 25px;
    align-items: center;
}

.instruvibe-top-bar .top-bar-left span,
.instruvibe-top-bar .top-bar-right a {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .instruvibe-top-bar .top-bar-content {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    .instruvibe-top-bar .top-bar-left,
    .instruvibe-top-bar .top-bar-right {
        flex-direction: column;
        gap: 8px;
        width: 100%;
    }
    
    .instruvibe-top-bar {
        padding: 12px 0;
    }
}

/* === Global Improvements === */
body {
  font-family: 'Roboto', 'Inter', 'Segoe UI', sans-serif;
  color: var(--text-dark);
  line-height: 1.7;
  background: var(--light-bg);
}

.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
}

/* === Professional Header === */
.site-header {
  background: linear-gradient(135deg, var(--dark-bg) 0%, #2C3E50 100%);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 1000;
  transition: all 0.3s ease;
}

.top-bar {
  background: var(--primary-color);
  color: white;
  padding: 8px 0;
  font-size: 0.9rem;
  text-align: center;
}

.top-bar-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

.top-bar-left, .top-bar-right {
  display: flex;
  gap: 20px;
  align-items: center;
}

.top-bar a {
  color: white;
  text-decoration: none;
  transition: opacity 0.3s;
}

.top-bar a:hover {
  opacity: 0.8;
}

.site-header.scrolled {
  padding: 5px 0;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.main-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 0;
}

.site-logo img {
  max-height: 70px;
  transition: transform 0.3s ease;
}

.site-logo:hover img {
  transform: scale(1.05);
}

/* === Professional Navigation === */
.main-navigation ul {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 5px;
}

.main-navigation ul li a {
  color: var(--text-light);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 12px 20px;
  transition: all 0.3s ease;
  position: relative;
  display: block;
  font-size: 0.95rem;
}

.main-navigation ul li a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 3px;
  background: var(--secondary-color);
  transition: all 0.3s ease;
  transform: translateX(-50%);
}

.main-navigation ul li a:hover,
.main-navigation ul li.current-menu-item a {
  background: rgba(255, 255, 255, 0.1);
}

.main-navigation ul li a:hover::after,
.main-navigation ul li.current-menu-item a::after {
  width: 70%;
}

/* === Hero Section - B2B Professional === */
.hero-section {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--dark-bg) 100%);
  padding: 100px 0 80px;
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: 
    linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)),
    url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="%23ffffff" fill-opacity="0.03" d="M0,96L48,112C96,128,192,160,288,160C384,160,480,128,576,122.7C672,117,768,139,864,144C960,149,1056,139,1152,128C1248,117,1344,107,1392,101.3L1440,96L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"></path></svg>');
  background-position: bottom;
  background-repeat: no-repeat;
  background-size: cover;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 900px;
}

.hero-title {
  font-size: 3rem;
  font-weight: 800;
  color: var(--text-light);
  margin-bottom: 20px;
  line-height: 1.2;
}

.hero-subtitle {
  font-size: 1.3rem;
  color: var(--text-light);
  margin-bottom: 30px;
  opacity: 0.95;
  line-height: 1.6;
}

.hero-features {
  display: flex;
  gap: 30px;
  margin: 30px 0;
  flex-wrap: wrap;
}

.hero-feature {
  display: flex;
  align-items: center;
  gap: 10px;
  color: white;
  font-weight: 500;
}

.hero-feature-icon {
  width: 24px;
  height: 24px;
  background: var(--secondary-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

/* === Button Styles === */
.btn-primary {
  background: var(--secondary-color);
  color: white;
  padding: 15px 40px;
  border-radius: 5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border: none;
  box-shadow: 0 4px 15px rgba(255, 107, 0, 0.3);
  transition: all 0.3s ease;
  display: inline-block;
  text-decoration: none;
}

.btn-primary:hover {
  background: #E55F00;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 107, 0, 0.4);
  color: white;
}

.btn-secondary {
  background: transparent;
  color: var(--text-light);
  padding: 15px 40px;
  border-radius: 5px;
  border: 2px solid var(--text-light);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: all 0.3s ease;
  display: inline-block;
  text-decoration: none;
}

.btn-secondary:hover {
  background: var(--text-light);
  color: var(--primary-color);
}

.btn-outline {
  background: white;
  color: var(--primary-color);
  padding: 12px 30px;
  border-radius: 5px;
  border: 2px solid var(--primary-color);
  font-weight: 600;
  transition: all 0.3s ease;
}

.btn-outline:hover {
  background: var(--primary-color);
  color: white;
}

/* === Product Cards - Professional B2B Style === */
.woocommerce ul.products li.product,
.woocommerce-page ul.products li.product {
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  position: relative;
  margin-bottom: 30px;
  border: 1px solid var(--border-color);
}

.woocommerce ul.products li.product:hover,
.woocommerce-page ul.products li.product:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
  border-color: var(--primary-color);
}

.woocommerce ul.products li.product img,
.woocommerce-page ul.products li.product img {
  transition: transform 0.4s ease;
  background: #f8f9fa;
}

.woocommerce ul.products li.product:hover img,
.woocommerce-page ul.products li.product:hover img {
  transform: scale(1.05);
}

.woocommerce ul.products li.product .woocommerce-loop-product__title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-dark);
  margin: 15px 0 10px;
  min-height: 45px;
}

.woocommerce ul.products li.product .price {
  color: var(--primary-color);
  font-size: 1.4rem;
  font-weight: 700;
}

/* === Product Badges === */
.woocommerce span.onsale {
  background: var(--secondary-color);
  border-radius: 3px;
  padding: 6px 12px;
  font-weight: 700;
  font-size: 0.85rem;
  top: 15px;
  left: 15px;
  min-height: auto;
  min-width: auto;
  line-height: 1.5;
}

.new-badge {
  position: absolute;
  top: 15px;
  right: 15px;
  background: var(--accent-color);
  color: white;
  padding: 6px 12px;
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: 3px;
  z-index: 2;
}

.stock-badge {
  position: absolute;
  bottom: 15px;
  right: 15px;
  background: rgba(0, 166, 81, 0.9);
  color: white;
  padding: 4px 10px;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 3px;
}

/* === Add to Cart & Buttons === */
.woocommerce ul.products li.product .button,
.woocommerce #respond input#submit,
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button {
  background: var(--primary-color);
  color: white;
  border-radius: 5px;
  padding: 12px 25px;
  font-weight: 600;
  transition: all 0.3s ease;
  border: none;
  text-transform: uppercase;
  font-size: 0.9rem;
}

.woocommerce ul.products li.product .button:hover,
.woocommerce #respond input#submit:hover,
.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce input.button:hover {
  background: var(--secondary-color);
  transform: scale(1.02);
}

/* === Category Cards === */
.product-categories {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 25px;
  margin: 50px 0;
}

.category-card {
  background: white;
  border-radius: 8px;
  padding: 40px 25px;
  text-align: center;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  border: 2px solid var(--border-color);
}

.category-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.category-card:hover::before {
  opacity: 0.95;
}

.category-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  border-color: var(--primary-color);
}

.category-card:hover .category-icon,
.category-card:hover .category-title,
.category-card:hover .category-description {
  color: white;
  position: relative;
  z-index: 1;
}

.category-icon {
  font-size: 3.5rem;
  color: var(--primary-color);
  margin-bottom: 20px;
  transition: all 0.3s ease;
}

.category-title {
  color: var(--text-dark);
  font-size: 1.3rem;
  font-weight: 700;
  margin: 15px 0 10px;
  transition: all 0.3s ease;
}

.category-description {
  color: #7F8C8D;
  font-size: 0.95rem;
  transition: all 0.3s ease;
}

/* === Section Titles === */
.section-title {
  text-align: center;
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--text-dark);
  margin-bottom: 15px;
  position: relative;
  padding-bottom: 20px;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background: var(--secondary-color);
  border-radius: 2px;
}

.section-subtitle {
  text-align: center;
  font-size: 1.1rem;
  color: #7F8C8D;
  margin-bottom: 40px;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

/* === Trust Badges === */
.trust-badges {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 30px;
  padding: 40px 0;
}

.trust-badge {
  text-align: center;
  padding: 20px;
}

.trust-badge-icon {
  font-size: 2.5rem;
  color: var(--primary-color);
  margin-bottom: 15px;
}

.trust-badge-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 8px;
}

.trust-badge-text {
  font-size: 0.9rem;
  color: #7F8C8D;
  line-height: 1.5;
}

/* === Footer Styling === */
.site-footer {
  background: var(--dark-bg);
  color: var(--text-light);
  padding: 60px 0 20px;
}

.footer-widget-area {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 40px;
  margin-bottom: 40px;
}

.footer-widget h3 {
  color: var(--secondary-color);
  font-size: 1.2rem;
  margin-bottom: 20px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.footer-widget ul {
  list-style: none;
  padding: 0;
}

.footer-widget ul li {
  margin-bottom: 12px;
}

.footer-widget ul li a {
  color: var(--text-light);
  transition: all 0.3s ease;
  opacity: 0.8;
  display: inline-block;
}

.footer-widget ul li a:hover {
  color: var(--secondary-color);
  opacity: 1;
  padding-left: 5px;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 25px;
  text-align: center;
}

.footer-certifications {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin: 20px 0;
  flex-wrap: wrap;
}

.cert-badge {
  background: rgba(255, 255, 255, 0.1);
  padding: 8px 16px;
  border-radius: 5px;
  font-size: 0.85rem;
  font-weight: 600;
}

/* === Search Enhancement === */
.search-form {
  position: relative;
  max-width: 600px;
  margin: 0 auto;
}

.search-form input[type="search"] {
  width: 100%;
  padding: 15px 50px 15px 20px;
  border-radius: 5px;
  border: 2px solid var(--border-color);
  font-size: 1rem;
  transition: all 0.3s ease;
}

.search-form input[type="search"]:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
  outline: none;
}

/* === Product Filters === */
.woocommerce-ordering select,
.woocommerce .widget_price_filter .price_slider_amount input {
  padding: 10px 15px;
  border: 2px solid var(--border-color);
  border-radius: 5px;
  font-size: 0.95rem;
}

/* === Breadcrumbs === */
.woocommerce-breadcrumb {
  background: white;
  padding: 15px 20px;
  border-radius: 5px;
  margin-bottom: 25px;
  font-size: 0.9rem;
}

.breadcrumb-separator {
  margin: 0 10px;
  color: #7F8C8D;
}

/* === Specifications Table === */
.product-specifications {
  background: white;
  border-radius: 8px;
  padding: 25px;
  margin: 25px 0;
}

.spec-row {
  display: grid;
  grid-template-columns: 1fr 2fr;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-color);
}

.spec-label {
  font-weight: 600;
  color: var(--text-dark);
}

.spec-value {
  color: #7F8C8D;
}

/* === Responsive Design === */
@media (max-width: 1024px) {
  .hero-title {
    font-size: 2.5rem;
  }
  
  .main-navigation ul {
    flex-wrap: wrap;
  }
}

@media (max-width: 768px) {
  .hero-title {
    font-size: 2rem;
  }
  
  .hero-subtitle {
    font-size: 1rem;
  }
  
  .section-title {
    font-size: 1.8rem;
  }
  
  .product-categories {
    grid-template-columns: 1fr;
  }
  
  .top-bar-content {
    justify-content: center;
    text-align: center;
  }
  
  .top-bar-left, .top-bar-right {
    flex-direction: column;
    gap: 8px;
  }
}

/* === Loading States === */
.loading {
  opacity: 0.6;
  pointer-events: none;
}

/* === RFQ (Request for Quote) Button === */
.rfq-button {
  background: var(--accent-color);
  color: white;
  padding: 12px 25px;
  border-radius: 5px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  font-size: 0.9rem;
}

.rfq-button:hover {
  background: #008F45;
  transform: scale(1.02);
}

/* === Industry Certifications Display === */
.certifications-section {
  background: white;
  padding: 40px;
  border-radius: 8px;
  text-align: center;
}

.cert-logos {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 30px;
  flex-wrap: wrap;
  margin-top: 25px;
}

.cert-logo {
  max-height: 60px;
  opacity: 0.7;
  transition: opacity 0.3s;
  filter: grayscale(100%);
}

.cert-logo:hover {
  opacity: 1;
  filter: grayscale(0%);
}

/* -------------------------
   Quantity (+ / -) styling
   ------------------------- */

/* Scope to WooCommerce quantity fields */
.quantity {
  display: inline-flex;
  align-items: center;
  gap: 8px;               /* space between buttons and input */
  vertical-align: middle;
  margin: 0;
}

/* If theme outputs wrapper with class qty (or input.qty) */
.quantity .qty,
.quantity input.qty {
  width: 68px;            /* adjust width as needed */
  padding: 8px 10px;
  text-align: center;
  border: 1px solid #e6e9ed;
  border-radius: 6px;
  height: 40px;
  box-sizing: border-box;
  font-size: 0.95rem;
  line-height: 1;
}

/* + and - buttons */
.quantity .minus,
.quantity .plus,
.quantity button.qty-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  min-width: 36px;
  padding: 0;
  border-radius: 6px;
  background: #ffffff;
  border: 1px solid #e6e9ed;
  cursor: pointer;
  font-weight: 600;
  line-height: 1;
  box-sizing: border-box;
}

/* Slight hover/active states */
.quantity .minus:hover,
.quantity .plus:hover,
.quantity button.qty-btn:hover {
  border-color: #0066CC;
  background: #f5fbff;
}

/* Keep +/- vertically centered next to input on smaller screens */
@media (max-width: 480px) {
  .quantity {
    gap: 6px;
  }
  .quantity .qty { width: 56px; height: 36px; }
  .quantity .minus, .quantity .plus { width: 34px; height: 34px; }
}

/* -------------------------
   Gallery navigation arrows
   ------------------------- */

/* wrapper on single product gallery */
.woocommerce-product-gallery__wrapper { position: relative; }

/* arrows placed in the product gallery */
.gallery-nav-arrows {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  padding: 0 10px;
  pointer-events: none; /* enable click only on buttons */
  transform: translateY(-50%);
  z-index: 40;
}

/* arrow buttons */
.gallery-nav-arrows button {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(0,0,0,0.08);
  background: rgba(255,255,255,0.95);
  box-shadow: 0 4px 10px rgba(0,0,0,0.06);
  cursor: pointer;
}

/* ensure arrows are visible on dark/light images */
.gallery-nav-arrows button:hover {
  transform: scale(1.03);
  border-color: #0066CC;
}

/* simple left/right chevrons (in case SVG isn't injected) */
.gallery-nav-arrows button:before {
  content: "";
  display: inline-block;
  width: 10px;
  height: 10px;
  border-top: 2px solid #222;
  border-right: 2px solid #222;
  transform-origin: center;
}

/* left arrow */
.gallery-nav-arrows .gallery-prev:before {
  transform: rotate(-135deg);
}

/* right arrow */
.gallery-nav-arrows .gallery-next:before {
  transform: rotate(45deg);
}

/* fallback for shop grid product inline nav */
.product-image-nav {
  position: absolute;
  bottom: 10px;
  right: 10px;
  display: flex;
  gap: 6px;
  z-index: 15;
}

.woocommerce ul.products li.product {
  position: relative; /* ensure the inline nav can be absolutely positioned */
}

/* small buttons used in the grid/list */
.product-image-nav button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 6px;
  border: 1px solid rgba(0, 0, 0, 0.908);
  cursor: pointer;
}

/* Make sure thumbs and main image don't hide nav */
.woocommerce ul.products li.product .woocommerce-loop-product__link,
.woocommerce .woocommerce-product-gallery__wrapper {
  overflow: visible;
}

/* Accessibility: focus outlines */
.gallery-nav-arrows button:focus,
.product-image-nav button:focus,
.quantity .minus:focus,
.quantity .plus:focus {
  outline-offset: 2px;
}

/* Same Button Style Group */
.single-product .cart button.single_add_to_cart_button,
.instruvibe-buy-now-single,
.rfq-button,
.instruvibe-buy-now-loop,
.woocommerce ul.products li.product .button {
    display: block;
    width: 100%;
    padding: 13px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    transition: .25s;
}

/* Add to Cart Color */
.single_add_to_cart_button {
    background: #ff9f00 !important;
    color: #fff !important;
}
.single_add_to_cart_button:hover {
    background: #e58100 !important;
}

/* Buy Now Color */
.instruvibe-buy-now-single,
.instruvibe-buy-now-loop {
    background: #fb641b;
    color: #fff !important;
    margin-top: 8px;
}
.instruvibe-buy-now-single:hover,
.instruvibe-buy-now-loop:hover {
    background: #d44f12;
}

/* Request Quote Color */
.rfq-button {
    background: #0046ae;
    color: #fff !important;
    margin-top: 8px;
}
.rfq-button:hover {
    background: #073e8f;
}

/* Shop page button spacing */
.woocommerce ul.products li.product .button {
    margin-bottom: 8px;
}

/* ============================
   SHOP PAGE - SIDE-BY-SIDE BUTTONS
   ============================ */

.shop-buttons-wrapper {
    display: flex !important;
    gap: 8px !important;
    margin-top: 15px !important;
    width: 100% !important;
}

.shop-buttons-wrapper .button {
    flex: 1 !important;
    margin: 0 !important;
    width: auto !important;
    padding: 12px 16px !important;
    font-size: 14px !important;
    text-align: center !important;
}

/* Add to Cart - Yellow */
.shop-buttons-wrapper .add_to_cart_button,
.shop-buttons-wrapper .added_to_cart,
.shop-buttons-wrapper .product_type_simple {
    background: #ff9f00 !important;
    color: #fff !important;
}

.shop-buttons-wrapper .add_to_cart_button:hover {
    background: #e58100 !important;
}

/* Buy Now - Orange */
.shop-buttons-wrapper .instruvibe-buy-now-loop {
    background: #fb641b !important;
    color: #fff !important;
}

.shop-buttons-wrapper .instruvibe-buy-now-loop:hover {
    background: #d44f12 !important;
}

/* Mobile: Stack buttons vertically */
@media (max-width: 480px) {
    .shop-buttons-wrapper {
        flex-direction: column !important;
    }

    .shop-buttons-wrapper .button {
        width: 100% !important;
    }
}

/* ============================
   SHOP PAGE - PRODUCT IMAGE NAVIGATION
   Enhanced visibility with better styling
   ============================ */

.product-image-nav {
    position: absolute !important;
    top: 50% !important;
    left: 0 !important;
    right: 0 !important;
    transform: translateY(-50%) !important;
    display: flex !important;
    justify-content: space-between !important;
    padding: 0 8px !important;
    pointer-events: none !important;
    z-index: 10 !important;
    opacity: 0 !important;
    transition: opacity 0.3s ease !important;
}

/* Show navigation on hover */
.woocommerce ul.products li.product:hover .product-image-nav {
    opacity: 1 !important;
}

.product-image-nav button {
    pointer-events: auto !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 36px !important;
    height: 36px !important;
    border-radius: 50% !important;
    border: 2px solid rgba(0, 0, 0, 0.1) !important;
    background: rgba(255, 255, 255, 0.95) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15) !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    color: #333 !important;
}

.product-image-nav button:hover {
    transform: scale(1.1) !important;
    background: #fff !important;
    border-color: #0066CC !important;
    box-shadow: 0 4px 12px rgba(0, 102, 204, 0.3) !important;
}

.product-image-nav button:active {
    transform: scale(0.95) !important;
}

.product-image-nav svg {
    display: block !important;
    width: 20px !important;
    height: 20px !important;
}

/* ============================
   SINGLE PRODUCT PAGE - GALLERY NAVIGATION
   Better visibility and styling
   ============================ */

.gallery-nav-arrows {
    position: absolute !important;
    top: 50% !important;
    left: 0 !important;
    right: 0 !important;
    display: flex !important;
    justify-content: space-between !important;
    padding: 0 15px !important;
    pointer-events: none !important;
    transform: translateY(-50%) !important;
    z-index: 50 !important;
    opacity: 0 !important;
    transition: opacity 0.3s ease !important;
}

/* Show arrows on gallery hover */
.woocommerce-product-gallery:hover .gallery-nav-arrows {
    opacity: 1 !important;
}

.gallery-nav-arrows button {
    pointer-events: auto !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 48px !important;
    height: 48px !important;
    border-radius: 50% !important;
    border: 2px solid rgba(0, 0, 0, 0.08) !important;
    background: rgba(255, 255, 255, 0.95) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1) !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    color: #333 !important;
}

.gallery-nav-arrows button:hover {
    transform: scale(1.1) !important;
    background: #fff !important;
    border-color: #0066CC !important;
    box-shadow: 0 6px 16px rgba(0, 102, 204, 0.3) !important;
}

.gallery-nav-arrows button:active {
    transform: scale(0.95) !important;
}

.gallery-nav-arrows svg {
    display: block !important;
    width: 24px !important;
    height: 24px !important;
}

/* ============================
   SALE BADGE - PERCENTAGE ONLY
   ============================ */

.woocommerce ul.products li.product .onsale,
.woocommerce div.product .onsale {
    position: absolute !important;
    top: 12px !important;
    left: 12px !important;
    right: auto !important;
    background: #FF6B00 !important;
    color: white !important;
    font-size: 0.8rem !important;
    font-weight: 700 !important;
    padding: 6px 12px !important;
    border-radius: 4px !important;
    z-index: 5 !important;
    margin: 0 !important;
    text-transform: uppercase !important;
    line-height: 1.2 !important;
    min-width: auto !important;
    min-height: auto !important;
    transform: none !important;
    box-shadow: 0 2px 6px rgba(255, 107, 0, 0.3) !important;
}

/* Remove default WooCommerce "Sale!" text */
.woocommerce span.onsale {
    /* Only show our custom percentage badge */
}

/* Ensure visibility on light/dark images */
.woocommerce .onsale::before {
    display: none !important;
}

/* ============================
   MOBILE RESPONSIVENESS
   ============================ */

@media (max-width: 768px) {

    .product-image-nav button,
    .gallery-nav-arrows button {
        width: 32px !important;
        height: 32px !important;
    }

    .product-image-nav svg {
        width: 18px !important;
        height: 18px !important;
    }

    .gallery-nav-arrows svg {
        width: 20px !important;
        height: 20px !important;
    }

    /* Always show navigation on mobile */
    .product-image-nav,
    .gallery-nav-arrows {
        opacity: 1 !important;
    }
}

/* ============================
   ENSURE PROPER POSITIONING
   ============================ */

.woocommerce ul.products li.product .woocommerce-loop-product__link {
    position: relative !important;
    display: block !important;
}

.woocommerce-product-gallery__wrapper {
    position: relative !important;
}

/* Prevent navigation from interfering with clicks */
.woocommerce-loop-product__link,
.woocommerce-product-gallery__image>a {
    position: relative !important;
}

/* --- Button row: side-by-side layout for every product --- */
.woocommerce ul.products li.product .ivb-button-row {
    display: flex !important;
    gap: 10px;                 /* space between buttons */
    align-items: center;
    justify-content: center;   /* center horizontally in card; change to flex-start if you prefer left align */
    margin-top: 10px;
    flex-wrap: nowrap;
}

/* Buttons inside the row */
.woocommerce ul.products li.product .ivb-button-row .ivb-action-btn {
    flex: 1 1 50%;             /* share available width equally */
    min-width: 110px;         /* ensures buttons stay usable on narrow cards */
    box-sizing: border-box;
    display: inline-flex !important;
    justify-content: center;
    align-items: center;
    padding: 10px 14px !important;
    margin: 0 !important;
    white-space: nowrap;
}

/* If you want distinct styling: primary vs secondary */
.woocommerce ul.products li.product .ivb-button-row .add_to_cart_button.ivb-action-btn {
    background: #ff9f00 !important;
    color: #fff !important;
    border: none !important;
}
.woocommerce ul.products li.product .ivb-button-row .instruvibe-buy-now-loop.ivb-action-btn,
.woocommerce ul.products li.product .ivb-button-row .instruvibe-buy-now-single.ivb-action-btn {
    background: #fb641b !important;
    color: #fff !important;
    border: none !important;
}

/* Small-screen responsiveness: stack on narrow viewports */
@media (max-width: 480px) {
  .woocommerce ul.products li.product .ivb-button-row {
      flex-direction: column;
      gap: 8px;
  }
  .woocommerce ul.products li.product .ivb-button-row .ivb-action-btn {
      width: 100% !important;
      min-width: 0;
  }
}

/* === IVB: Button row styling - side-by-side for every product card === */
.woocommerce ul.products li.product .ivb-button-row {
    display: flex !important;
    gap: 10px !important;                /* space between buttons */
    align-items: center !important;
    justify-content: center !important;  /* change to flex-start if you prefer left aligned */
    margin-top: 12px !important;
    flex-wrap: nowrap !important;
}

/* Ensure action buttons are inline-flex and share width reasonably */
.woocommerce ul.products li.product .ivb-button-row .ivb-action-btn {
    display: inline-flex !important;
    justify-content: center !important;
    align-items: center !important;
    padding: 10px 14px !important;
    box-sizing: border-box !important;
    white-space: nowrap !important;
    min-width: 110px !important;         /* keeps them tappable on small cards */
}

/* Give each button proportional width on larger cards */
@media (min-width: 600px) {
    .woocommerce ul.products li.product .ivb-button-row .ivb-action-btn {
        flex: 1 1 0% !important;         /* equally share space */
    }
}

/* Styling: primary vs secondary (adjust colors to match your theme) */
.woocommerce ul.products li.product .ivb-button-row .add_to_cart_button.ivb-action-btn,
.woocommerce ul.products li.product .ivb-button-row .single_add_to_cart_button.ivb-action-btn {
    background: #ff9f00 !important;
    color: #fff !important;
    border: none !important;
    border-radius: 6px !important;
}

.woocommerce ul.products li.product .ivb-button-row .instruvibe-buy-now-loop.ivb-action-btn,
.woocommerce ul.products li.product .ivb-button-row .instruvibe-buy-now-single.ivb-action-btn,
.woocommerce ul.products li.product .ivb-button-row a.ivb-action-btn[href*="checkout"] {
    background: #fb641b !important;
    color: #fff !important;
    border: none !important;
    border-radius: 6px !important;
}

/* Reduce conflicts: ensure no legacy CSS forces 100% width */
.woocommerce ul.products li.product a.button,
.woocommerce ul.products li.product button.button {
    width: auto !important;
    display: inline-flex !important;
    margin: 0 !important;
}

/* Responsive: stack vertically on narrow screens */
@media (max-width: 480px) {
    .woocommerce ul.products li.product .ivb-button-row {
        flex-direction: column !important;
        gap: 8px !important;
    }
    .woocommerce ul.products li.product .ivb-button-row .ivb-action-btn {
        width: 100% !important;
        min-width: 0 !important;
    }
}

/* Add this to your custom-style.css file */

/* Make sure nav items are positioned relatively */
.main-header-menu .nav-item,
#primary-menu .nav-item,
.ast-desktop-menu .nav-item {
    position: relative;
}

/* Style for menu links */
.main-header-menu .nav-link,
#primary-menu .nav-link,
.ast-desktop-menu .nav-link {
    color: inherit;
    text-decoration: none;
    font-size: 16px;
    font-weight: 600;
    padding: 12px 24px;
    display: block;
    border-radius: 8px;
    transition: all 0.3s ease;
    cursor: pointer;
}

/* CRITICAL: Hide mega menu by default */
.mega-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    width: 1200px;
    max-width: 90vw;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 40px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none; /* Prevents accidental clicks when hidden */
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    z-index: 1000;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

/* Show mega menu ONLY on hover */
.nav-item:hover .mega-menu,
.menu-item:hover .mega-menu,
li.menu-item-has-children:hover .mega-menu {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
}

.mega-menu-content {
    display: flex;
    gap: 40px;
    justify-content: space-between;
}

.mega-column {
    flex: 1;
    min-width: 0;
    max-height: 450px;
    overflow-y: auto;
    padding-right: 10px;
}

.mega-column h3 {
    color: #ffffff;
    font-size: 18px;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.3);
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.mega-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 0;
    padding: 0;
}

.mega-list li {
    transition: all 0.3s ease;
}

.mega-list a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-size: 14px;
    display: block;
    padding: 8px 12px;
    border-radius: 6px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.mega-list a::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 3px;
    background: #ffffff;
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.mega-list a:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
    transform: translateX(5px);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.mega-list a:hover::before {
    transform: scaleY(1);
}

.brand-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.brand-item::before {
    content: '★';
    color: #ffd700;
    font-size: 12px;
    text-shadow: 0 0 8px rgba(255, 215, 0, 0.5);
}

.cert-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.cert-item::before {
    content: '✓';
    color: #4ade80;
    font-weight: bold;
    font-size: 16px;
    text-shadow: 0 0 8px rgba(74, 222, 128, 0.5);
}

/* Scrollbar styling for overflow content */
.mega-column::-webkit-scrollbar {
    width: 6px;
}

.mega-column::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}

.mega-column::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 10px;
}

.mega-column::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

/* Responsive design */
@media (max-width: 1024px) {
    .mega-menu {
        width: 95vw;
    }

    .mega-menu-content {
        flex-direction: column;
        gap: 30px;
    }

    .mega-column {
        max-height: 300px;
    }
}

@media (max-width: 768px) {
    .nav-link {
        font-size: 14px;
        padding: 10px 16px;
    }

    .mega-menu {
        padding: 25px;
    }

    .mega-column h3 {
        font-size: 16px;
    }
}

