/**
 * WPBakery Compatibility — GeneratePress Luxe
 *
 * Overrides WPBakery's default margins, paddings, and font resets so
 * WPBakery-built content inherits the luxury editorial aesthetic.
 *
 * PHILOSOPHY: We fix WPBakery's aggressive resets without breaking its
 * layout engine. We do not hardcode specific WPBakery layouts here —
 * those belong in page-specific custom CSS fields in the editor.
 *
 * @package GP_Luxe
 */

/* =========================================================================
   1. WPBakery row / column resets
   ========================================================================= */

/* Remove WPBakery's default 15px column padding that creates narrow gutters */
.wpb_row,
.vc_row {
  margin-bottom: 0;
}

.vc_column_container > .vc_column-inner {
  /* WPBakery defaults to 15px; we normalise to our spacing scale */
  padding-top: var(--luxe-space-6);
  padding-bottom: var(--luxe-space-6);
  padding-left: var(--luxe-space-6);
  padding-right: var(--luxe-space-6);
}

/* Full-width WPBakery rows — zero horizontal padding for true edge-to-edge */
.vc_row.vc_row-o-full-height,
.vc_row.vc_row-no-padding > .vc_column_container > .vc_column-inner {
  padding-left: 0;
  padding-right: 0;
}

/* =========================================================================
   2. WPBakery typography inheritance
   ========================================================================= */

/* Make WPBakery text blocks inherit our luxury font stack */
.wpb_text_column,
.wpb_text_column p,
.wpb_text_column h1,
.wpb_text_column h2,
.wpb_text_column h3,
.wpb_text_column h4,
.wpb_text_column h5,
.wpb_text_column h6 {
  /* Inherit from body — our base.css handles font families */
  font-family: inherit;
}

/* WPBakery often forces margin on headings — reset to our scale */
.wpb_text_column h1,
.wpb_text_column h2,
.wpb_text_column h3,
.wpb_text_column h4 {
  margin-top: 0;
  margin-bottom: var(--luxe-space-4);
}

.wpb_text_column p {
  margin-bottom: var(--luxe-space-4);
}

/* =========================================================================
   3. WPBakery single image element
   ========================================================================= */

.wpb_single_image .vc_figure,
.wpb_single_image img {
  display: block;
  max-width: 100%;
  height: auto;
}

/* Remove default WPBakery image border */
.wpb_single_image .vc_figure img {
  border: none;
  box-shadow: none;
}

/* =========================================================================
   4. WPBakery button — inherit our luxe-btn style when the class is added
   ========================================================================= */

.vc_btn3.luxe-btn,
.vc_btn3-container .luxe-btn {
  /* Allow our button styles to fully override WPBakery's inline button styles */
  font-family: var(--luxe-font-sans) !important;
  font-size: var(--luxe-text-xs) !important;
  letter-spacing: var(--luxe-tracking-widest) !important;
  text-transform: uppercase !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

/* =========================================================================
   5. WPBakery separator / divider
   ========================================================================= */

.vc_separator .vc_sep_holder .vc_sep_line,
.vc_separator hr {
  border-color: rgba(49, 22, 3, 0.1) !important;
}

/* =========================================================================
   6. WPBakery tab / accordion — light reset for luxury look
   ========================================================================= */

.vc_tta-tabs .vc_tta-tab > a,
.vc_tta-accordion .vc_tta-panel-heading {
  font-family: var(--luxe-font-sans);
  font-size: var(--luxe-text-xs);
  letter-spacing: var(--luxe-tracking-wider);
  text-transform: uppercase;
}

.vc_tta-tabs.vc_tta-style-flat .vc_tta-tab.vc_active > a,
.vc_tta-tabs.vc_tta-style-flat .vc_tta-tab > a:hover {
  background: var(--luxe-black);
  color: var(--luxe-white);
  border-color: var(--luxe-black);
}

/* =========================================================================
   7. WPBakery grid / media grid — product card override
   ========================================================================= */

/* WPBakery media grid items in a collection context */
.vc_grid-item .vc_gitem-animated-block {
  border: none;
}

/* =========================================================================
   8. WPBakery parallax rows
   ========================================================================= */

/* Ensure parallax rows with our hero class work correctly */
.vc_row.vc_parallax.luxe-hero .vc_parallax-inner {
  z-index: 0;
}

.vc_row.vc_parallax.luxe-hero > .vc_row-full-width {
  z-index: 2;
}

/* =========================================================================
   9. WPBakery frontend editor usability
   ========================================================================= */

/* In the WPBakery frontend editor (vc_editor body class), show spacing
   guides clearly so designers can work with the theme's whitespace. */
.vc_editor .vc_column-inner {
  min-height: 40px;
}

/* =========================================================================
   10. Full-width page template — remove WPBakery container restrictions
   ========================================================================= */

/* GP's full-width template removes the sidebar. WPBakery rows should
   then stretch to the true full width of the content area. */
.no-sidebar .vc_row.vc_row-fluid {
  max-width: none;
}

/* =========================================================================
   11. Spacing utilities for WPBakery rows — add via Extra CSS class field
   ========================================================================= */

/* Vertical padding helpers */
.row-pad-sm  { padding-top: var(--luxe-space-8)  !important; padding-bottom: var(--luxe-space-8)  !important; }
.row-pad-md  { padding-top: var(--luxe-space-12) !important; padding-bottom: var(--luxe-space-12) !important; }
.row-pad-lg  { padding-top: var(--luxe-space-16) !important; padding-bottom: var(--luxe-space-16) !important; }
.row-pad-xl  { padding-top: var(--luxe-space-20) !important; padding-bottom: var(--luxe-space-20) !important; }

/* Background colour helpers */
.row-bg-white    { background-color: var(--luxe-white) !important; }
.row-bg-offwhite { background-color: var(--luxe-off-white) !important; }
.row-bg-black    { background-color: var(--luxe-black) !important; color: var(--luxe-white); }

/* Text colour helpers for dark backgrounds */
.row-bg-black h1,
.row-bg-black h2,
.row-bg-black h3,
.row-bg-black p {
  color: var(--luxe-white);
}

/* Center-align helper */
.row-text-center { text-align: center !important; }
