/*
 * Nikhil Vatika Premium Experience Layer
 * Canonical full-bleed page frame, responsive layout and Blocksy mega-menu styling.
 * Loaded after the legacy Design System so these rules replace the conflicting
 * v1.2.0 page-frame overrides without changing the Blocksy parent or child theme.
 */

:root {
  --nv-premium-page-bg: var(--theme-site-background, var(--theme-palette-color-8, #FFFDF8));
  --nv-premium-content-max: 1240px;
  --nv-premium-desktop-gutter: var(--nvcs-gutter-desktop, 32px);
  --nv-premium-tablet-gutter: var(--nvcs-gutter-tablet, 22px);
  --nv-premium-mobile-gutter: var(--nvcs-gutter-mobile, 16px);
  --nv-premium-section-space: clamp(34px, 4.3vw, 62px);
}

/* Never force a different background onto the WordPress body or Blocksy canvas. */

body.home .site-main > .ct-container,
body.home .site-main > .ct-container-fluid,
body.home .content-area > .ct-container,
body.home .content-area > .ct-container-fluid {
  display: block !important;
  width: 100% !important;
  max-width: none !important;
  margin-inline: 0 !important;
  padding-inline: 0 !important;
  background: transparent !important;
  box-sizing: border-box;
}

body.home .nv-home.nv-home--fullwidth {
  position: relative;
  left: auto !important;
  right: auto !important;
  width: 100vw !important;
  max-width: 100vw !important;
  margin-left: calc(50% - 50vw) !important;
  margin-right: calc(50% - 50vw) !important;
  padding: 0 !important;
  background: transparent !important;
  overflow-x: clip;
  overflow-y: visible;
  box-sizing: border-box;
  isolation: isolate;
}

body.home .nv-home.nv-home--fullwidth > .nv-section {
  width: 100%;
  max-width: none;
  margin-inline: 0;
  box-sizing: border-box;
}

/* Consistent readable inner frame; section backgrounds remain full width. */
body.home .nv-home.nv-home--fullwidth .nv-wrap,
body.home .nv-home.nv-home--fullwidth .nv-container,
body.home .nv-home.nv-home--fullwidth .nv-hero__content,
body.home .nv-home.nv-home--fullwidth .nv-hero__bottom {
  width: min(calc(100% - (2 * var(--nv-premium-desktop-gutter))), var(--nv-premium-content-max));
  max-width: var(--nv-premium-content-max);
  margin-inline: auto;
  padding-inline: 0;
  box-sizing: border-box;
}

body.home .nv-home .nv-section {
  min-width: 0;
  box-sizing: border-box;
}

body.home .nv-home .nv-section > .nv-wrap {
  width: min(calc(100% - (2 * var(--nv-premium-desktop-gutter))), var(--nv-premium-content-max));
  max-width: var(--nv-premium-content-max);
  margin-inline: auto;
  box-sizing: border-box;
}

/* Hero: full-bleed outer canvas, restrained readable text frame. */
body.home .nv-home .nv-hero {
  position: relative;
  width: 100%;
  max-width: none;
  min-height: clamp(500px, 58vw, 680px);
  margin: 0;
  border-radius: 0;
  box-sizing: border-box;
}

body.home .nv-home .nv-hero__slides,
body.home .nv-home .nv-hero__slide {
  min-height: clamp(500px, 58vw, 680px);
}

body.home .nv-home .nv-hero__content {
  width: min(calc(100% - (2 * var(--nv-premium-desktop-gutter))), var(--nv-premium-content-max));
  max-width: var(--nv-premium-content-max);
}

body.home .nv-home .nv-hero__bottom {
  width: min(calc(100% - (2 * var(--nv-premium-desktop-gutter))), var(--nv-premium-content-max));
  max-width: var(--nv-premium-content-max);
}

/* Pillars: full-width moving rail; only the heading uses a centred content frame. */
body.home .nv-home .nv-pillars-section {
  width: 100%;
  max-width: none;
  margin-inline: 0;
  padding-block: clamp(38px, 4.3vw, 60px) clamp(28px, 3vw, 42px);
  background: transparent !important;
  border-inline: 0;
  box-sizing: border-box;
}

body.home .nv-home .nv-pillars-inner {
  width: 100%;
  max-width: none;
  margin-inline: 0;
  padding-inline: 0;
}

body.home .nv-home .nv-pillars-section .nv-section-head {
  width: min(calc(100% - (2 * var(--nv-premium-desktop-gutter))), var(--nv-premium-content-max));
  max-width: var(--nv-premium-content-max);
  margin-inline: auto;
}

body.home .nv-home .nv-pillar-window {
  width: 100%;
  max-width: none;
  border-inline: 0;
  box-sizing: border-box;
}

body.home .nv-home .nv-pillar-track {
  gap: var(--nvcs-pillars-gap, 10px);
  padding-inline: 8px;
}

body.home .nv-home .nv-pillar-card {
  min-height: var(--nvcs-pillars-height, 188px);
  flex-basis: 250px;
  align-items: center;
  justify-content: flex-start;
  gap: 9px;
  padding: 20px 18px;
  border: 1px solid var(--nv-palette-border, #E4DED2);
  border-radius: 14px;
  background: var(--nv-palette-surface, #FFFDF8);
  text-align: center;
}

body.home .nv-home .nv-pillar-card__icon {
  margin-inline: auto;
}

body.home .nv-home .nv-pillar-card strong {
  max-width: 210px;
  font-size: var(--nvcs-pillars-font, 1.08rem);
  line-height: 1.22;
  text-align: center;
}

body.home .nv-home .nv-pillar-card__hint {
  margin-top: auto;
  text-align: center;
}

/* Reusable builder sections are full-width sections, not floating narrow panels. */
body.home .nv-home .nv-reusable-section {
  width: 100%;
  max-width: none;
  margin-inline: 0;
  box-sizing: border-box;
}

body.home .nv-home .nv-reusable-section > .nv-wrap {
  width: min(calc(100% - (2 * var(--nv-premium-desktop-gutter))), var(--nv-premium-content-max));
  max-width: var(--nv-premium-content-max);
  margin-inline: auto;
}

/* Shared grid safeguards: no child card may force horizontal overflow. */
body.home .nv-home :is(.nv-product-grid, .nv-action-grid, .nv-guidance-grid, .nv-blog-grid,
  .nv-founder-grid, .nv-parad-grid, .nv-content-card-grid, .nv-main-course-grid,
  .nv-institute-grid, .nv-founder-mission-vision) > * {
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

body.home .nv-home :is(img, video, iframe) {
  max-width: 100%;
}

/* Desktop mega menu — uses Blocksy's native menu structure and hover/focus handling. */
@media (min-width: 1025px) {
  body.nvcs-mega-menu-enabled .ct-header .nv-mega-menu-parent:not(.nv-tabbed-mega) {
    position: static !important;
  }

  body.nvcs-mega-menu-enabled .ct-header .nv-mega-menu-parent:not(.nv-tabbed-mega) > .ct-dropdown,
  body.nvcs-mega-menu-enabled .ct-header .nv-mega-menu-parent:not(.nv-tabbed-mega) > ul.sub-menu {
    width: min(var(--nvcs-mega-width, 1160px), calc(100vw - 36px)) !important;
    min-width: min(var(--nvcs-mega-width, 1160px), calc(100vw - 36px)) !important;
    max-width: calc(100vw - 36px) !important;
    padding: 24px 26px !important;
    border: 1px solid var(--nvcs-mega-border, #E4DED2) !important;
    border-radius: var(--nvcs-mega-radius, 18px) !important;
    background: var(--nvcs-mega-bg, #FFFDF8) !important;
    box-shadow: 0 18px 48px rgba(40, 41, 32, .13) !important;
    box-sizing: border-box;
  }

  body.nvcs-mega-menu-enabled .ct-header .nv-mega-menu-parent:not(.nv-tabbed-mega) > .ct-dropdown > ul,
  body.nvcs-mega-menu-enabled .ct-header .nv-mega-menu-parent:not(.nv-tabbed-mega) > ul.sub-menu {
    display: grid !important;
    grid-template-columns: repeat(var(--nvcs-mega-columns, 3), minmax(0, 1fr)) !important;
    align-items: start;
    gap: var(--nvcs-mega-gap, 22px) !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    list-style: none;
  }

  body.nvcs-mega-menu-enabled .ct-header .nv-mega-menu-parent:not(.nv-tabbed-mega) > .ct-dropdown > ul > li,
  body.nvcs-mega-menu-enabled .ct-header .nv-mega-menu-parent:not(.nv-tabbed-mega) > ul.sub-menu > li {
    display: block;
    min-width: 0;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
  }

  body.nvcs-mega-menu-enabled .ct-header .nv-mega-menu-parent:not(.nv-tabbed-mega) > .ct-dropdown > ul > li > a,
  body.nvcs-mega-menu-enabled .ct-header .nv-mega-menu-parent:not(.nv-tabbed-mega) > ul.sub-menu > li > a,
  body.nvcs-mega-menu-enabled .ct-header .nv-mega-menu-parent:not(.nv-tabbed-mega) > .ct-dropdown > ul > li > .ct-menu-link,
  body.nvcs-mega-menu-enabled .ct-header .nv-mega-menu-parent:not(.nv-tabbed-mega) > ul.sub-menu > li > .ct-menu-link {
    display: block;
    padding: 10px 12px !important;
    border-radius: 9px;
    color: var(--nvcs-mega-heading, #7B3100) !important;
    font-size: .94rem;
    font-weight: 750;
    line-height: 1.35;
    text-decoration: none;
  }

  body.nvcs-mega-menu-enabled .ct-header .nv-mega-menu-parent:not(.nv-tabbed-mega) > .ct-dropdown > ul > li.menu-item-has-children > a,
  body.nvcs-mega-menu-enabled .ct-header .nv-mega-menu-parent:not(.nv-tabbed-mega) > ul.sub-menu > li.menu-item-has-children > a {
    margin-bottom: 6px;
    border-bottom: 1px solid var(--nvcs-mega-border, #E4DED2);
    border-radius: 0;
  }

  body.nvcs-mega-menu-enabled .ct-header .nv-mega-menu-parent:not(.nv-tabbed-mega) > .ct-dropdown ul.sub-menu,
  body.nvcs-mega-menu-enabled .ct-header .nv-mega-menu-parent:not(.nv-tabbed-mega) > ul.sub-menu ul.sub-menu {
    position: static !important;
    inset: auto !important;
    display: block !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    height: auto !important;
    margin: 4px 0 0 !important;
    padding: 0 0 0 10px !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
    list-style: none;
  }

  body.nvcs-mega-menu-enabled .ct-header .nv-mega-menu-parent:not(.nv-tabbed-mega) > .ct-dropdown ul.sub-menu li,
  body.nvcs-mega-menu-enabled .ct-header .nv-mega-menu-parent:not(.nv-tabbed-mega) > ul.sub-menu ul.sub-menu li {
    display: block;
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
  }

  body.nvcs-mega-menu-enabled .ct-header .nv-mega-menu-parent:not(.nv-tabbed-mega) > .ct-dropdown ul.sub-menu a,
  body.nvcs-mega-menu-enabled .ct-header .nv-mega-menu-parent:not(.nv-tabbed-mega) > ul.sub-menu ul.sub-menu a,
  body.nvcs-mega-menu-enabled .ct-header .nv-mega-menu-parent:not(.nv-tabbed-mega) > .ct-dropdown ul.sub-menu .ct-menu-link,
  body.nvcs-mega-menu-enabled .ct-header .nv-mega-menu-parent:not(.nv-tabbed-mega) > ul.sub-menu ul.sub-menu .ct-menu-link {
    display: block;
    padding: 8px 10px !important;
    border-radius: 8px;
    color: var(--nvcs-mega-link, #40392F) !important;
    font-size: .88rem;
    font-weight: 500;
    line-height: 1.5;
    white-space: normal;
    text-decoration: none;
    transition: background-color .18s ease, color .18s ease;
  }

  body.nvcs-mega-menu-enabled .ct-header .nv-mega-menu-parent:not(.nv-tabbed-mega) > .ct-dropdown a:hover,
  body.nvcs-mega-menu-enabled .ct-header .nv-mega-menu-parent:not(.nv-tabbed-mega) > .ct-dropdown a:focus-visible,
  body.nvcs-mega-menu-enabled .ct-header .nv-mega-menu-parent:not(.nv-tabbed-mega) > ul.sub-menu a:hover,
  body.nvcs-mega-menu-enabled .ct-header .nv-mega-menu-parent:not(.nv-tabbed-mega) > ul.sub-menu a:focus-visible {
    color: var(--nvcs-mega-hover-color, #7B3100) !important;
    background: var(--nvcs-mega-hover-bg, #F8E7DC) !important;
    outline-color: #C84B00;
  }

  body.nvcs-hide-desktop-menu-arrows .ct-header .nv-mega-menu-parent:not(.nv-tabbed-mega) > a .ct-toggle-dropdown-desktop,
  body.nvcs-hide-desktop-menu-arrows .ct-header .nv-mega-menu-parent:not(.nv-tabbed-mega) > .ct-toggle-dropdown-desktop {
    display: none !important;
  }

}

/* Mobile/tablet: keep Blocksy's native collapsible menu; never force a desktop grid. */
@media (max-width: 1024px) {
  body.nvcs-mega-menu-enabled .ct-header .nv-mega-menu-parent:not(.nv-tabbed-mega) > .ct-dropdown,
  body.nvcs-mega-menu-enabled .ct-header .nv-mega-menu-parent:not(.nv-tabbed-mega) > ul.sub-menu {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    padding: 8px 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
  }

  body.nvcs-mega-menu-enabled .ct-header .nv-mega-menu-parent:not(.nv-tabbed-mega) > .ct-dropdown > ul,
  body.nvcs-mega-menu-enabled .ct-header .nv-mega-menu-parent:not(.nv-tabbed-mega) > ul.sub-menu {
    display: block !important;
    grid-template-columns: 1fr !important;
    gap: 0 !important;
  }

  body.nvcs-mobile-menu-plus :is(.ct-header, .ct-panel, #offcanvas) .ct-toggle-dropdown-mobile svg,
  body.nvcs-mobile-menu-plus :is(.ct-header, .ct-panel, #offcanvas) .ct-toggle-dropdown svg {
    display: none !important;
  }

  body.nvcs-mobile-menu-plus :is(.ct-header, .ct-panel, #offcanvas) .ct-toggle-dropdown-mobile::before,
  body.nvcs-mobile-menu-plus :is(.ct-header, .ct-panel, #offcanvas) .ct-toggle-dropdown::before {
    content: "+";
    display: inline-block;
    color: #7B3100;
    font-size: 1.25rem;
    font-weight: 500;
    line-height: 1;
  }

  body.nvcs-mobile-menu-plus :is(.ct-header, .ct-panel, #offcanvas) .ct-toggle-dropdown-mobile[aria-expanded="true"]::before,
  body.nvcs-mobile-menu-plus :is(.ct-header, .ct-panel, #offcanvas) .ct-toggle-dropdown[aria-expanded="true"]::before {
    content: "−";
  }
}

/* Tablet layout: controlled two-column content without cramped cards. */
@media (min-width: 768px) and (max-width: 1024px) {
  :root { --nv-premium-section-space: 28px; }
  body.home .nv-home.nv-home--fullwidth .nv-wrap,
  body.home .nv-home.nv-home--fullwidth .nv-container,
  body.home .nv-home.nv-home--fullwidth .nv-hero__content,
  body.home .nv-home.nv-home--fullwidth .nv-hero__bottom,
  body.home .nv-home .nv-section > .nv-wrap,
  body.home .nv-home .nv-pillars-section .nv-section-head {
    width: min(calc(100% - (2 * var(--nv-premium-tablet-gutter))), var(--nv-premium-content-max));
  }

  body.home .nv-home .nv-founder-grid,
  body.home .nv-home .nv-parad-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(20px, 3vw, 34px);
  }

  body.home .nv-home .nv-product-grid:not([class*="nv-product-grid--"]),
  body.home .nv-home .nv-action-grid,
  body.home .nv-home .nv-guidance-grid,
  body.home .nv-home .nv-blog-grid,
  body.home .nv-home .nv-content-card-grid,
  body.home .nv-home .nv-main-course-grid,
  body.home .nv-home .nv-institute-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  body.home .nv-home .nv-hero,
  body.home .nv-home .nv-hero__slides,
  body.home .nv-home .nv-hero__slide {
    min-height: 500px;
  }
}

/* Mobile layout: compact reading frame, single-column guidance/content and touch-sized controls. */
@media (max-width: 767px) {
  :root { --nv-premium-section-space: 24px; }
  body.home .nv-home.nv-home--fullwidth .nv-wrap,
  body.home .nv-home.nv-home--fullwidth .nv-container,
  body.home .nv-home.nv-home--fullwidth .nv-hero__content,
  body.home .nv-home.nv-home--fullwidth .nv-hero__bottom,
  body.home .nv-home .nv-section > .nv-wrap,
  body.home .nv-home .nv-pillars-section .nv-section-head {
    width: calc(100% - (2 * var(--nv-premium-mobile-gutter)));
  }

  body.home .nv-home .nv-section {
    padding-block: var(--nv-premium-section-space);
  }

  body.home .nv-home .nv-founder-grid,
  body.home .nv-home .nv-parad-grid,
  body.home .nv-home .nv-action-grid,
  body.home .nv-home .nv-guidance-grid,
  body.home .nv-home .nv-blog-grid,
  body.home .nv-home .nv-content-card-grid,
  body.home .nv-home .nv-main-course-grid,
  body.home .nv-home .nv-institute-grid,
  body.home .nv-home .nv-founder-mission-vision {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 14px;
  }

  body.home .nv-home .nv-hero,
  body.home .nv-home .nv-hero__slides,
  body.home .nv-home .nv-hero__slide {
    min-height: 460px;
  }

  body.home .nv-home .nv-hero__content {
    padding-top: 58px;
    padding-bottom: 100px;
  }

  body.home .nv-home .nv-hero__content h1 {
    max-width: 100%;
    margin-block: 12px 16px;
    font-size: clamp(2.1rem, 9.2vw, 3.25rem);
    line-height: 1.05;
    overflow-wrap: anywhere;
  }

  body.home .nv-home .nv-hero__content p {
    max-width: 100%;
    font-size: .96rem;
    line-height: 1.65;
  }

  body.home .nv-home .nv-hero__actions {
    gap: 9px;
    margin-top: 20px;
  }

  body.home .nv-home .nv-hero__actions .nv-btn {
    min-width: 0;
    min-height: 44px;
    padding: 10px 15px !important;
    font-size: .84rem !important;
  }

  body.home .nv-home .nv-hero__bottom {
    bottom: 14px;
    align-items: flex-end;
    gap: 8px;
  }

  body.home .nv-home .nv-hero__hint {
    max-width: 48%;
    font-size: .56rem;
    line-height: 1.35;
    letter-spacing: .08em;
    text-align: right;
  }

  body.home .nv-home .nv-pillars-section {
    padding-block: 30px 24px;
  }

  body.home .nv-home .nv-pillar-card {
    flex-basis: 218px;
    min-height: max(168px, var(--nvcs-pillars-height, 188px));
    padding: 17px 15px;
  }

  body.home .nv-home .nv-pillar-card strong {
    font-size: min(var(--nvcs-pillars-font, 1.08rem), 1.05rem);
  }

  body.home .nv-home .nv-updates-founder-section.has-both-columns {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 14px !important;
  }

  body.home .nv-home .nv-product-carousel__track > .nv-product-card {
    flex-basis: min(82vw, 310px);
    width: min(82vw, 310px);
  }

  body.home .nv-home .nv-category-card {
    flex-basis: min(74vw, 250px);
  }

  body.home .nv-home .nv-product-card__actions,
  body.home .nv-home .nv-actions {
    flex-wrap: wrap;
  }

  body.home .nv-home .nv-product-card__actions a,
  body.home .nv-home .nv-product-card__actions button {
    max-width: 100%;
  }

  body.home .nv-home .nv-trust-strip {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }

  body.home .nv-home .nv-section-head h2 {
    font-size: clamp(1.65rem, 7vw, 2.3rem);
    line-height: 1.15;
  }
}

@media (max-width: 420px) {
  body.home .nv-home .nv-hero,
  body.home .nv-home .nv-hero__slides,
  body.home .nv-home .nv-hero__slide {
    min-height: 430px;
  }

  body.home .nv-home .nv-hero__actions {
    flex-direction: column;
    align-items: flex-start;
  }

  body.home .nv-home .nv-hero__actions .nv-btn {
    min-width: 168px;
  }
}

/* Product/category archive cards remain legible on narrow screens. */
@media (max-width: 767px) {
  body.woocommerce.archive .site-main ul.products,
  body.woocommerce-page.archive .site-main ul.products {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 12px !important;
  }

  body.woocommerce.archive .site-main ul.products li.product,
  body.woocommerce-page.archive .site-main ul.products li.product {
    float: none !important;
    width: auto !important;
    min-width: 0;
    margin: 0 !important;
  }

  body.woocommerce.archive .site-main ul.products li.product a img,
  body.woocommerce-page.archive .site-main ul.products li.product a img {
    width: 100%;
    height: auto;
    object-fit: var(--nvcs-image-fit, cover);
  }
}

/* Avoid page-level horizontal scroll caused by one oversized component. */
body.home #main.site-main { overflow-x: clip; }

/* Site-wide responsive content frame for non-home pages. The Header/Footer are untouched. */
/* Non-home backgrounds remain controlled by Blocksy. */

:root {
  --nv-premium-content-max: 1240px;
}

body:not(.home) .site-main > .ct-container,
body:not(.home) .content-area > .ct-container {
  width: min(calc(100% - (2 * var(--nv-premium-desktop-gutter))), var(--nv-premium-content-max));
  max-width: var(--nv-premium-content-max);
  margin-inline: auto;
  box-sizing: border-box;
}

body:not(.home) .nv-editorial-page,
body:not(.home) .nv-editorial-custom-content {
  width: 100%;
  max-width: var(--nv-premium-content-max);
  margin-inline: auto;
  box-sizing: border-box;
}

.nv-editorial-page .nv-wrap,
.nv-editorial-custom-content .nv-wrap {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

/* Apply the chosen card-image fit consistently, without changing hero or service-icon behavior. */
.nv-home .nv-category-card__image img,
.nv-home .nv-blog-card__image img,
.nv-editorial-page .nv-editorial-card img,
.nv-editorial-page .nv-editorial-cards img,
.nv-editorial-custom-content img,
.nv-home .nv-product-card__media img,
.nv-product-grid .nv-product-card__media img,
.nv-product-carousel .nv-product-card__media img,
.woocommerce ul.products li.product a img,
.woocommerce-page ul.products li.product a img,
.wc-block-grid__product-image img {
  object-fit: var(--nvcs-image-fit, cover) !important;
}

.nv-home .nv-category-card__image,
.nv-home .nv-blog-card__image,
.nv-editorial-page .nv-editorial-card,
.nv-editorial-custom-content .nv-editorial-card {
  min-width: 0;
  overflow: hidden;
  box-sizing: border-box;
}

/* Prevent long titles, prices and descriptions from widening any card. */
.nv-home :is(.nv-product-card, .nv-category-card, .nv-guidance-card, .nv-blog-card, .nv-action-card),
.nv-editorial-page :is(.nv-editorial-card, .nv-editorial-note),
.woocommerce ul.products li.product,
.woocommerce-page ul.products li.product {
  min-width: 0;
  overflow-wrap: anywhere;
  box-sizing: border-box;
}

.nv-home :is(.nv-product-card__body, .nv-category-card, .nv-guidance-card, .nv-blog-card__body),
.nv-editorial-page :is(.nv-editorial-card, .nv-editorial-note) {
  min-width: 0;
}

/* Consistent tablet frame for editorial pages and WooCommerce listing grids. */
@media (min-width: 768px) and (max-width: 1024px) {
  body:not(.home) .site-main > .ct-container,
  body:not(.home) .content-area > .ct-container,
  body:not(.home) .nv-editorial-page,
  body:not(.home) .nv-editorial-custom-content {
    width: 100%;
  }

  .nv-editorial-page .nv-editorial-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(14px, 2.4vw, 24px);
  }

  body.woocommerce.archive .site-main ul.products,
  body.woocommerce-page.archive .site-main ul.products {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: clamp(14px, 2vw, 22px) !important;
  }

  body.woocommerce.archive .site-main ul.products li.product,
  body.woocommerce-page.archive .site-main ul.products li.product {
    float: none !important;
    width: auto !important;
    min-width: 0;
    margin: 0 !important;
  }
}

/* Mobile frame: no horizontal overflow, readable content and usable touch targets. */
@media (max-width: 767px) {
  body:not(.home) .site-main > .ct-container,
  body:not(.home) .content-area > .ct-container,
  body:not(.home) .nv-editorial-page,
  body:not(.home) .nv-editorial-custom-content {
    width: 100%;
    max-width: none;
  }

  .nv-editorial-page .nv-editorial-cards {
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
  }

  .nv-editorial-page .nv-editorial-hero,
  .nv-editorial-page .nv-editorial-body,
  .nv-editorial-page .nv-editorial-cta,
  .nv-editorial-page .nv-editorial-note {
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
  }

  .nv-home :is(.nv-product-card__actions, .nv-actions, .nv-hero__actions),
  .nv-editorial-page .nv-editorial-cta {
    flex-wrap: wrap;
  }

  .nv-home :is(.nv-product-card__actions a, .nv-product-card__actions button, .nv-actions a, .nv-actions button),
  .nv-editorial-page .nv-editorial-cta a,
  body.woocommerce .site-main .button,
  body.woocommerce .site-main button.button,
  body.woocommerce .site-main input.button {
    min-height: 42px;
    max-width: 100%;
  }

  body.woocommerce.archive .site-main ul.products,
  body.woocommerce-page.archive .site-main ul.products {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 12px !important;
  }

  body.woocommerce.archive .site-main ul.products li.product,
  body.woocommerce-page.archive .site-main ul.products li.product {
    padding: 0 !important;
  }

  body.woocommerce.archive .site-main ul.products li.product a img,
  body.woocommerce-page.archive .site-main ul.products li.product a img {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
  }

  body.single-product .site-main .woocommerce-product-gallery,
  body.single-product .site-main .summary,
  body.single-product .site-main div.product {
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
  }

  body.single-product .site-main .summary {
    clear: both;
  }

  .nv-editorial-page table {
    display: block;
    max-width: 100%;
    overflow-x: auto;
  }
}

/* Narrow phone refinements. */
@media (max-width: 420px) {
  .nv-editorial-page,
  .nv-editorial-custom-content {
    font-size: .96rem;
  }

  body.woocommerce.archive .site-main ul.products,
  body.woocommerce-page.archive .site-main ul.products {
    gap: 10px !important;
  }
}


/* ================================================================
 * v1.4.0 canonical layout & integration layer
 * - This is the ONLY viewport breakout (on the home wrapper).
 * - Sections are sized as percentages of that wrapper, never 100vw.
 * - Blocksy owns the site background and its header/footer.
 * ================================================================ */
body.nvcs-home-canvas { overflow-x: clip; }
body.nvcs-home-canvas #main,
body.nvcs-home-canvas #main.site-main,
body.nvcs-home-canvas .content-area,
body.nvcs-home-canvas .site-main > .ct-container,
body.nvcs-home-canvas .site-main > .ct-container-fluid {
  background-color: transparent !important;
}
body.nvcs-home-canvas .site-main > .ct-container,
body.nvcs-home-canvas .site-main > .ct-container-fluid,
body.nvcs-home-canvas .entry-content:has(> .nv-home) {
  width: 100% !important;
  max-width: none !important;
  padding-inline: 0 !important;
  margin-inline: 0 !important;
  box-sizing: border-box;
}
body.nvcs-home-canvas #main .nv-home.nv-home--fullwidth,
body.nvcs-home-canvas .nv-home.nv-home--fullwidth {
  position: relative !important;
  left: auto !important;
  right: auto !important;
  width: var(--nv-site-viewport, 100vw) !important;
  max-width: var(--nv-site-viewport, 100vw) !important;
  margin-left: calc(50% - (var(--nv-site-viewport, 100vw) / 2)) !important;
  margin-right: 0 !important;
  padding-inline: 0 !important;
  box-sizing: border-box;
  background: transparent !important;
  overflow-x: clip;
}
body.nvcs-home-canvas #main .nv-home > .nv-section,
body.nvcs-home-canvas #main .nv-home .nv-hero,
body.nvcs-home-canvas #main .nv-home .nv-pillars-section {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0;
  margin-inline: 0 !important;
  box-sizing: border-box;
}
/* Section surfaces inherit their intended design unless explicitly overridden in Control Studio. */
/* Readable content width. Section Layout generates stronger per-section overrides. */
body.nvcs-home-canvas #main .nv-home :is(.nv-wrap,.nv-container),
body.nvcs-home-canvas #main .nv-home .nv-section > .nv-wrap {
  width: min(calc(100% - (2 * var(--nv-premium-desktop-gutter))),var(--nv-premium-content-max)) !important;
  max-width: var(--nv-premium-content-max) !important;
  min-width: 0;
  margin-inline: auto !important;
  box-sizing: border-box;
}
body.nvcs-home-canvas #main .nv-home .nv-reusable-section > .nv-wrap {
  width: 100% !important; max-width: none !important;
}
/* The builder has its own internal controls; do not constrain its content by accident. */
body.nvcs-home-canvas #main .nv-home > .nv-section:not(.nv-hero):not(.nv-pillars-section) {
  padding-top: var(--nv-premium-section-space) !important;
  padding-bottom: var(--nv-premium-section-space) !important;
}
body.nvcs-home-canvas #main .nv-home .nv-hero,
body.nvcs-home-canvas #main .nv-home .nv-hero__slides,
body.nvcs-home-canvas #main .nv-home .nv-hero__slide {
  height: auto !important;
  min-height: clamp(380px, 41vw, 520px) !important;
}
body.nvcs-home-canvas #main .nv-home .nv-pillars-section {
  padding-block: clamp(24px,3.6vw,48px) !important;
}
body.nvcs-home-canvas #main .nv-home .nv-hero__content,
body.nvcs-home-canvas #main .nv-home .nv-hero__bottom,
body.nvcs-home-canvas #main .nv-home .nv-pillars-section .nv-section-head {
  width: min(calc(100% - (2 * var(--nv-premium-desktop-gutter))),var(--nv-premium-content-max)) !important;
  max-width: var(--nv-premium-content-max) !important;
  margin-inline: auto !important;
}
/* Preserve the approved product card styling. Make controls consistently usable. */
body.nvcs-home-canvas #main .nv-product-carousel,
body.nvcs-home-canvas #main .nv-product-carousel__viewport,
body.nvcs-home-canvas #main .nv-product-carousel__track,
body.nvcs-home-canvas #main .nv-category-carousel,
body.nvcs-home-canvas #main .nv-category-viewport {
  max-width: 100%; min-width: 0; box-sizing: border-box;
}
body.nvcs-home-canvas #main .nv-product-carousel__controls button {
  min-width: 40px; min-height: 40px; color: var(--nvcs-arrow,#7B3100) !important;
}
body.nvcs-home-canvas #main .nv-product-card__actions {display:flex; gap:8px; flex-wrap:nowrap;}
body.nvcs-home-canvas #main .nv-product-card__actions > * { min-width:0; max-width:100%; flex:1 1 auto; }
/* Card image fit applies to product/course/sadhana, category and WooCommerce slots. */
body.nvcs-home-canvas #main .nv-product-card__media,
body.nvcs-home-canvas #main .nv-category-card__image,
body.nvcs-home-canvas #main .nv-blog-card__image,
body.woocommerce.archive #main ul.products li.product a img {
  aspect-ratio: var(--nvcs-image-ratio,16 / 9) !important;
}
body.nvcs-home-canvas #main .nv-product-card__media img,
body.nvcs-home-canvas #main .nv-category-card__image img,
body.nvcs-home-canvas #main .nv-blog-card__image img,
body.woocommerce.archive #main ul.products li.product a img {
  object-fit: var(--nvcs-image-fit,contain) !important;
  max-width:100%;
}
body.nvcs-home-canvas #main .nv-product-card__media img { width:100%; height:100% !important; }
/* Overrides for NV button variants (category designs are kept intentionally). */
body.nvcs-home-canvas #main .nv-home .nv-btn--primary,
#main .nv-product-carousel .nv-btn--primary { background:var(--nvcs-primary-bg,#7B3100) !important; border-color:var(--nvcs-primary-bg,#7B3100) !important; color:var(--nvcs-primary-text,#FFFFFF) !important; }
body.nvcs-home-canvas #main .nv-home .nv-btn--secondary,
#main .nv-product-carousel .nv-btn--secondary { background:var(--nvcs-secondary-bg,#E8DDCA) !important; border-color:var(--nvcs-secondary-bg,#E8DDCA) !important; color:var(--nvcs-secondary-text,#282920) !important; }
body.nvcs-home-canvas #main .nv-home .nv-btn--tertiary,
#main .nv-product-carousel .nv-btn--tertiary { background:var(--nvcs-tertiary-bg,#F8E7DC) !important; border-color:var(--nvcs-tertiary-border,#B89B78) !important; color:var(--nvcs-tertiary-text,#7B3100) !important; }
@media(min-width:768px) and (max-width:1024px) {
  body.nvcs-home-canvas #main .nv-home :is(.nv-wrap,.nv-container),
  body.nvcs-home-canvas #main .nv-home .nv-section > .nv-wrap,
  body.nvcs-home-canvas #main .nv-home :is(.nv-hero__content,.nv-hero__bottom),
  body.nvcs-home-canvas #main .nv-home .nv-pillars-section .nv-section-head {
    width:min(calc(100% - (2 * var(--nv-premium-tablet-gutter))),var(--nv-premium-content-max)) !important;
  }
  body.nvcs-home-canvas #main .nv-home :is(.nv-hero,.nv-hero__slides,.nv-hero__slide) {min-height:400px !important;}
}
@media(max-width:767px) {
  body.nvcs-home-canvas #main .nv-home :is(.nv-wrap,.nv-container),
  body.nvcs-home-canvas #main .nv-home .nv-section > .nv-wrap,
  body.nvcs-home-canvas #main .nv-home :is(.nv-hero__content,.nv-hero__bottom),
  body.nvcs-home-canvas #main .nv-home .nv-pillars-section .nv-section-head {
    width:calc(100% - (2 * var(--nv-premium-mobile-gutter))) !important;
  }
  body.nvcs-home-canvas #main .nv-home :is(.nv-hero,.nv-hero__slides,.nv-hero__slide) {min-height:370px !important;}
  body.nvcs-home-canvas #main .nv-home > .nv-section:not(.nv-hero):not(.nv-pillars-section) {padding-block:24px !important;}
  body.nvcs-home-canvas #main .nv-home .nv-hero__actions {flex-direction:row !important;flex-wrap:wrap;justify-content:flex-start;}
  body.nvcs-home-canvas #main .nv-home .nv-hero__actions .nv-btn {min-width:0 !important; flex:1 1 130px;}
  body.nvcs-home-canvas #main .nv-home .nv-product-card__actions {flex-direction:row !important;flex-wrap:nowrap !important;}
  body.nvcs-home-canvas #main .nv-home .nv-product-card__actions > * {flex:1 1 0 !important;width:auto !important;min-width:0 !important;font-size:.8rem !important;padding-inline:8px !important;}
  body.nvcs-home-canvas #main .nv-home .nv-pillars-section {padding-block:24px !important;}
}
@media(max-width:420px) {
  body.nvcs-home-canvas #main .nv-home :is(.nv-hero,.nv-hero__slides,.nv-hero__slide) {min-height:350px !important;}
}

/* Mobile panel integrates with Blocksy native expand/collapse without overriding its visibility state. */
@media(max-width:1024px) {
  body.nvcs-mega-menu-enabled :is(.ct-panel,#offcanvas) .nv-mega-menu-parent:not(.nv-tabbed-mega) > .sub-menu,
  body.nvcs-mega-menu-enabled :is(.ct-panel,#offcanvas) .nv-mega-menu-parent:not(.nv-tabbed-mega) > .ct-dropdown {
    max-width:100%; box-sizing:border-box;
    border-color:var(--nvcs-mega-border,#E4DED2);
  }
  body.nvcs-mega-menu-enabled :is(.ct-panel,#offcanvas) .nv-mega-menu-parent:not(.nv-tabbed-mega) a:focus-visible {
    outline:2px solid var(--nvcs-mega-hover-color,#7B3100);
    outline-offset:2px;
  }
}

/* Native touch scrolling is required when the product rail's JS ignores touch pointers. */
.nv-product-carousel__viewport,
.nv-home .nv-product-carousel__viewport {
  touch-action: auto !important;
  overscroll-behavior-inline: contain;
  -webkit-overflow-scrolling: touch;
}
