/* Medium Layout: 1280px. */
@media only screen and (min-width: 992px) and (max-width: 1200px) {
}

/* Tablet Layout: 768px. */
@media only screen and (min-width: 768px) and (max-width: 991px) {
}

/* Mobile Layout: 991px and below */
@media only screen and (max-width: 991px) {
  .mg-wrapper{
    padding: 0;
  }

  /* Hide desktop nav, show mobile menu bar */
  .shopvibe-desktop-nav {
    display: none;
  }
  .shopvibe-mobile-toggle {
    display: none;
  }
  .shopvibe-mobile-menu-bar {
    display: block;
    background: var(--color-primary);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
    position: relative;
    z-index: 1000;
    width: 100%;
  }
  .shopvibe-mobile-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px;
    gap: 12px;
  }
  .shopvibe-header-brand{
    display: none;
  }
  .shopvibe-mobile-topbar-logo {
    flex: 1;
    min-width: 0;
  }
  .shopvibe-mobile-topbar-logo a {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
  }
  .shopvibe-mobile-topbar-logo img {
    max-height: 40px;
    width: auto;
    display: block;
  }
  .shopvibe-mobile-site-title {
    color: #fff;
    font-size: 18px;
    font-weight: 700;
    text-decoration: none;
    line-height: 1.3;
    letter-spacing: 0.5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .shopvibe-mobile-site-title:hover,
  .shopvibe-mobile-site-title:focus {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
  }
  .shopvibe-mobile-topbar-logo .custom-logo-link {
    display: inline-flex;
  }
  .shopvibe-mobile-topbar-logo .custom-logo {
    max-height: 40px;
    width: auto;
  }
.shopvibe-header-inner{
  padding: 0;
}
  /* Hamburger Button */
  .shopvibe-menu-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.15);
    border: none;
    border-radius: 6px;
    padding: 8px;
    color: #fff;
    cursor: pointer;
    transition: background 0.25s ease;
    min-width: 44px;
    min-height: 44px;
  }
  .shopvibe-menu-btn:hover {
    background: rgba(255, 255, 255, 0.25);
  }
  .shopvibe-menu-btn:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
  }
  .shopvibe-menu-btn:focus:not(:focus-visible) {
    outline: none;
  }
  .shopvibe-menu-btn .hamburger-icon,
  .shopvibe-menu-btn .close-icon {
    width: 26px;
    height: 26px;
  }
  .shopvibe-menu-btn .mopen,
  .shopvibe-menu-btn .mclose {
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .shopvibe-menu-btn .mclose {
    display: none;
  }
  .shopvibe-mobile-menu-bar.menu-open .shopvibe-menu-btn .mopen {
    display: none;
  }
  .shopvibe-mobile-menu-bar.menu-open .shopvibe-menu-btn .mclose {
    display: flex;
  }

  /* Overlay */
  .shopvibe-mobile-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.55);
    z-index: 1001;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.3s ease, visibility 0s 0.3s;
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
  }
  .shopvibe-mobile-overlay.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transition: opacity 0.3s ease, visibility 0s 0s;
  }

  /* Slide-in Panel */
  .shopvibe-mobile-panel {
    position: fixed;
    top: 0;
    left: 0;
    width: 300px;
    max-width: 85vw;
    height: 100vh;
    height: 100dvh;
    background: #fff;
    z-index: 999999;
    overflow-y: auto;
    overflow-x: hidden;
    box-shadow: 4px 0 25px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    transform: translateX(-100%);
    visibility: hidden;
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1), visibility 0s 0.35s;
  }
  .admin-bar .shopvibe-mobile-panel {
    top: 32px;
    height: calc(100vh - 32px);
    height: calc(100dvh - 32px);
  }
  .shopvibe-mobile-panel.panel-open {
    transform: translateX(0);
    visibility: visible;
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1), visibility 0s 0s;
  }

  /* Panel Header */
  .shopvibe-mobile-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    background: var(--color-primary);
    flex-shrink: 0;
    gap: 10px;
  }
  .shopvibe-mobile-panel-logo {
    flex: 1;
    min-width: 0;
  }
  .shopvibe-mobile-panel-logo img {
    max-height: 36px;
    width: auto;
    display: block;
  }
  .shopvibe-mobile-panel-logo .custom-logo-link {
    display: inline-flex;
  }
  .shopvibe-mobile-panel-logo .custom-logo {
    max-height: 36px;
    width: auto;
  }
  .shopvibe-mobile-panel-logo .shopvibe-mobile-site-title {
    font-size: 16px;
  }

  /* Close Button */
  .shopvibe-menu-close-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.15);
    border: none;
    border-radius: 50%;
    padding: 6px;
    color: #fff;
    cursor: pointer;
    transition: background 0.25s ease, transform 0.25s ease;
    min-width: 38px;
    min-height: 38px;
    width: 38px;
    height: 38px;
  }
  .shopvibe-menu-close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
  }
  .shopvibe-menu-close-btn:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
  }
  .shopvibe-menu-close-btn:focus:not(:focus-visible) {
    outline: none;
  }
  .shopvibe-menu-close-btn svg {
    width: 20px;
    height: 20px;
  }

  /* Navigation inside Panel */
  .shopvibe-mobile-panel .shopvibe-mobile-navigation {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 20px;
  }

  /* Menu List */
  .shopvibe-mobile-panel .shopvibe-mobile-menu-list {
    list-style: none;
    margin: 0;
    padding: 0;
  }
  .shopvibe-mobile-panel .shopvibe-mobile-menu-list > li {
    border-bottom: 1px solid #eee;
  }
  .shopvibe-mobile-panel .shopvibe-mobile-menu-list > li:last-child {
    border-bottom: none;
  }
  .shopvibe-mobile-panel .shopvibe-mobile-menu-list li {
    position: relative;
  }
  .shopvibe-mobile-panel .shopvibe-mobile-menu-list a {
    display: block;
    padding: 13px 16px;
    color: #333;
    text-decoration: none;
    font-weight: 500;
    font-size: 15px;
    line-height: 1.4;
    transition: background 0.2s ease, color 0.2s ease;
  }
  .shopvibe-mobile-panel .shopvibe-mobile-menu-list a:hover,
  .shopvibe-mobile-panel .shopvibe-mobile-menu-list a:focus {
    background: #f5f5f5;
    color: var(--color-primary);
  }
  .shopvibe-mobile-panel .shopvibe-mobile-menu-list a:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: -2px;
    background: #f0f8ff;
  }
  .shopvibe-mobile-panel .shopvibe-mobile-menu-list a:focus:not(:focus-visible) {
    outline: none;
  }

  /* Parent items with children: flex row for link + toggle */
  .shopvibe-mobile-panel .menu-item-has-children,
  .shopvibe-mobile-panel .page_item_has_children {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
  }
  .shopvibe-mobile-panel .menu-item-has-children > a,
  .shopvibe-mobile-panel .page_item_has_children > a {
    flex: 1;
    min-width: 0;
  }

  /* Submenu toggle button */
  .shopvibe-mobile-panel .shopvibe-submenu-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 48px;
    min-height: 48px;
    background: none;
    border: none;
    border-left: 1px solid #eee;
    color: #666;
    cursor: pointer;
    padding: 0;
    transition: background 0.2s ease, color 0.2s ease;
  }
  .shopvibe-mobile-panel .shopvibe-submenu-toggle:hover {
    background: #f0f0f0;
    color: var(--color-primary);
  }
  .shopvibe-mobile-panel .shopvibe-submenu-toggle:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: -2px;
  }
  .shopvibe-mobile-panel .shopvibe-submenu-toggle:focus:not(:focus-visible) {
    outline: none;
  }
  .shopvibe-mobile-panel .shopvibe-submenu-toggle .toggle-icon {
    width: 18px;
    height: 18px;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
  }
  .shopvibe-mobile-panel .menu-item-has-children.submenu-open > .shopvibe-submenu-toggle .toggle-icon,
  .shopvibe-mobile-panel .page_item_has_children.submenu-open > .shopvibe-submenu-toggle .toggle-icon {
    transform: rotate(180deg);
  }
  .shopvibe-mobile-panel .menu-item-has-children.submenu-open > .shopvibe-submenu-toggle,
  .shopvibe-mobile-panel .page_item_has_children.submenu-open > .shopvibe-submenu-toggle {
    background: #f0f0f0;
    color: var(--color-primary);
  }

  /* Sub-menu animated expand/collapse */
  .shopvibe-mobile-panel .shopvibe-mobile-menu-list .sub-menu {
    width: 100%;
    margin: 0;
    padding: 0;
    list-style: none;
    background: #fafafa;
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.25s ease;
  }
  .shopvibe-mobile-panel .menu-item-has-children.submenu-open > .sub-menu,
  .shopvibe-mobile-panel .page_item_has_children.submenu-open > .sub-menu {
    max-height: 2000px;
    opacity: 1;
  }
  .shopvibe-mobile-panel .shopvibe-mobile-menu-list .sub-menu li {
    border-bottom: none;
    border-top: 1px solid #eee;
  }
  .shopvibe-mobile-panel .shopvibe-mobile-menu-list .sub-menu a {
    padding: 11px 16px 11px 32px;
    font-size: 14px;
    color: #555;
    font-weight: 400;
    position: relative;
  }
  .shopvibe-mobile-panel .shopvibe-mobile-menu-list .sub-menu a::before {
    content: '';
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #ccc;
    transition: background 0.2s ease;
  }
  .shopvibe-mobile-panel .shopvibe-mobile-menu-list .sub-menu a:hover::before,
  .shopvibe-mobile-panel .shopvibe-mobile-menu-list .sub-menu a:focus::before {
    background: var(--color-primary);
  }
  .shopvibe-mobile-panel .shopvibe-mobile-menu-list .sub-menu a:hover,
  .shopvibe-mobile-panel .shopvibe-mobile-menu-list .sub-menu a:focus {
    background: #f0f0f0;
    color: var(--color-primary);
  }

  /* Nested sub-menu (3rd level) */
  .shopvibe-mobile-panel .shopvibe-mobile-menu-list .sub-menu .sub-menu {
    background: #f5f5f5;
  }
  .shopvibe-mobile-panel .shopvibe-mobile-menu-list .sub-menu .sub-menu a {
    padding-left: 48px;
    font-size: 13px;
  }
  .shopvibe-mobile-panel .shopvibe-mobile-menu-list .sub-menu .sub-menu a::before {
    left: 32px;
    width: 5px;
    height: 5px;
    background: #ddd;
  }

  .shopvibe-mobile-panel .mobile-navigation ul {
    list-style: none;
  }
  .shopvibe-mobile-panel .menu-item-has-children .sub-menu,
  .shopvibe-mobile-panel .page_item_has_children .sub-menu {
    display: block;
  }

  /* Body scroll lock */
  body.shopvibe-mobile-menu-open {
    overflow: hidden;
  }

  /* Admin bar sticky fix */
  .admin-bar .shopvibe-header.is-sticky {
    top: 46px;
  }

  /* High Contrast Mode */
  @media (prefers-contrast: high) {
    .shopvibe-menu-btn,
    .shopvibe-menu-close-btn {
      border: 2px solid #fff;
    }
    .shopvibe-mobile-panel .shopvibe-mobile-menu-list a:focus {
      outline-width: 3px;
      background: #fff !important;
      color: #000 !important;
    }
    .shopvibe-mobile-panel .shopvibe-submenu-toggle:focus {
      outline-width: 3px;
    }
  }

  /* Reduced Motion */
  @media (prefers-reduced-motion: reduce) {
    .shopvibe-mobile-panel,
    .shopvibe-mobile-overlay,
    .shopvibe-menu-btn,
    .shopvibe-menu-close-btn,
    .shopvibe-mobile-panel .shopvibe-mobile-menu-list a,
    .shopvibe-mobile-panel .shopvibe-mobile-menu-list .sub-menu,
    .shopvibe-mobile-panel .shopvibe-submenu-toggle .toggle-icon {
      transition: none !important;
    }
  }

  /* Focus-visible support */
  .shopvibe-mobile-panel a:focus-visible,
  .shopvibe-mobile-panel button:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: -2px;
    z-index: 1;
    position: relative;
  }
}

@media only screen and (min-width: 783px) {
  .admin-bar .shopvibe-header.is-sticky {
    top: 32px;
  }
}

/* Wide Mobile Layout: 767px. */
@media only screen and (max-width: 767px) {
  .shopvibe-blog-grid {
    grid-template-columns: 1fr;
  }
  .pagination {
    margin-top: 1.5rem;
  }
  .pagination .nav-links {
    gap: 0.35rem;
    padding: 1rem 0;
  }
  .pagination .nav-links a,
  .pagination .nav-links span {
    min-width: 36px;
    height: 36px;
    font-size: 13px;
    border-radius: 10px;
    padding: 0 0.5rem;
  }
  .pagination .nav-links .prev,
  .pagination .nav-links .next {
    padding: 0 0.75rem;
    font-size: 12px;
  }
}
@media only screen and (max-width: 599px) {
  .admin-bar .shopvibe-header.is-sticky {
        top: 0;
    }
}
@media only screen and (max-width: 479px) {
  .shopvibe-header-brand h1.site-title {
    font-size: 1.2rem;
  }
  .pagination .nav-links a,
  .pagination .nav-links span {
    min-width: 36px;
    height: 36px;
    font-size: 13px;
    border-radius: 10px;
  }
}
