/*
Theme Name: Hello Elementor Child - 4B Plus
Theme URI: https://4bplus.com.au
Description: Child theme for 4B Plus WooCommerce store with custom brand styling
Author: 4B Plus
Template: hello-elementor
Version: 1.0.0
Text Domain: hello-elementor-child-4bplus
*/

/* =============================================
   4B PLUS - DESIGN TOKENS
   ============================================= */

:root {
  /* Brand Colors - hex fallbacks for older browsers */
  --fourbplus-crimson: #82001b;
  --fourbplus-crimson: oklch(24% 0.13 18);
  --fourbplus-crimson-dark: #5a0012;
  --fourbplus-crimson-dark: oklch(18% 0.1 18);
  --fourbplus-crimson-light: #9d0021;
  --fourbplus-crimson-light: oklch(30% 0.13 18);
  --fourbplus-secondary: #0099f4;
  --fourbplus-secondary-light: #33adf6;
  --fourbplus-secondary-dark: #007ac3;
  --fourbplus-gold: var(--fourbplus-secondary);
  --fourbplus-gold-light: var(--fourbplus-secondary-light);
  --fourbplus-primary: #52e078;
  --fourbplus-primary-light: #6af08c;
  /* Semantic UI tokens (use these in components) */
  --fourbplus-color-primary: var(--fourbplus-primary);
  --fourbplus-color-primary-hover: var(--fourbplus-primary-light);
  --fourbplus-color-on-primary: var(--fourbplus-white);
  --fourbplus-color-secondary: var(--fourbplus-secondary);
  --fourbplus-color-secondary-hover: var(--fourbplus-secondary-light);
  --fourbplus-color-on-secondary: #0a0a0a;
  --fourbplus-cream: #f5f5f3;
  --fourbplus-white: #ffffff;
  --fourbplus-text-dark: #1a1a1a;
  --fourbplus-text-muted: #888888;

  /* Typography */
  --fourbplus-font-heading: "Cormorant Garamond", Georgia, serif;
  --fourbplus-font-body:
    "DM Sans", -apple-system, BlinkMacSystemFont, sans-serif;

  /* Spacing & Layout */
  --fourbplus-container-width: 1400px;
  --fourbplus-section-padding: 60px;
  --fourbplus-gutter: 32px;
  --fourbplus-gutter-mobile: 16px;

  /* Hero */
  --fourbplus-hero-gradient: radial-gradient(
    at top right,
    #82011bad 50%,
    #1a0008 90%
  );

  /* Header */
  --fourbplus-header-height: 120px; /* Elementor Pro header min_height */
  --fourbplus-header-top-bar: 0px; /* Not used with Elementor Pro */
  --fourbplus-header-main-nav: 72px;
  --fourbplus-header-cat-nav: 48px;
  --fourbplus-header-scrolled-bg: rgba(0, 0, 0, 0.7);
  --fourbplus-header-blur: saturate(180%) blur(20px);

  /* Buttons */
  --fourbplus-btn-radius: 4px;
  --fourbplus-btn-padding: 8px 20px;

  /* Shadows */
  --fourbplus-shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.05);
  --fourbplus-shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
  --fourbplus-shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.12);

  /* Transitions */
  --fourbplus-transition-fast: 0.15s ease;
  --fourbplus-transition-normal: 0.3s ease;
}

/* =============================================
   ELEMENTOR PRO HEADER COMPATIBILITY
   ============================================= */

/* Elementor Pro sticky header */
.elementor-location-header {
  position: fixed !important;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100 !important;
}

/* Ensure Elementor Pro header sticky container is properly positioned */
.elementor-location-header .e-con.e-parent[data-settings*="sticky"] {
  position: relative;
}

/* =============================================
   BASE RESET & TYPOGRAPHY
   ============================================= */

/* Reset parent theme site-content wrapper - our layouts handle their own padding */
.site-content,
.content-area,
.site-main {
  max-width: none;
  padding: 0;
  margin: 0;
  background: transparent;
}

body {
  font-family: "Poppins", var(--fourbplus-font-body), sans-serif;
  background-color: var(--fourbplus-cream);
  color: var(--fourbplus-text-dark);
  line-height: 1.6;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: "Manrope", var(--fourbplus-font-body);
  color: var(--fourbplus-secondary);
  line-height: 1.15;
  margin-top: 0;
}

h1 {
  font-size: clamp(32px, 5vw, 58px);
}
h2 {
  font-size: clamp(28px, 4vw, 42px);
}
h3 {
  font-size: clamp(24px, 3vw, 36px);
}
h4 {
  font-size: clamp(20px, 2.5vw, 28px);
}

/* =============================================
   UTILITY CLASSES
   ============================================= */

.fourbplus-container {
  max-width: var(--fourbplus-container-width);
  margin: 0 auto;
  padding: 0 var(--fourbplus-gutter);
}

.fourbplus-section {
  padding: var(--fourbplus-section-padding) 0;
}

/* Buttons - CSS Component System */
.fourbplus-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  border: 2px solid transparent;
  padding: var(--fourbplus-btn-padding, 8px 20px);
  font-family: "Manrope", var(--fourbplus-font-body), sans-serif;
  font-weight: 700;
  font-size: 15px;
  border-radius: var(--fourbplus-btn-radius, 4px);
  cursor: pointer;
  transition: all var(--fourbplus-transition-fast);
  white-space: nowrap;
}

.fourbplus-btn:focus-visible {
  outline: 2px solid var(--fourbplus-color-primary);
  outline-offset: 2px;
}

/* Variant modifiers */
.fourbplus-btn--primary {
  background: var(--fourbplus-color-primary);
  color: var(--fourbplus-color-on-primary);
}

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

.fourbplus-btn--secondary {
  background: var(--fourbplus-color-secondary);
  color: var(--fourbplus-color-on-secondary);
}

.fourbplus-btn--secondary:hover {
  background: var(--fourbplus-color-secondary-hover);
  transform: translateY(-1px);
}

.fourbplus-btn--outline {
  background: transparent;
  color: var(--fourbplus-color-primary);
  border: 2px solid var(--fourbplus-color-primary);
}

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

.fourbplus-btn--ghost {
  background: transparent;
  color: var(--fourbplus-secondary);
  border: none;
  padding: 0;
}

.fourbplus-btn--ghost:hover {
  color: var(--fourbplus-secondary-light);
}

.fourbplus-btn--white {
  background: transparent;
  color: var(--fourbplus-white);
  border: 2px solid rgba(255, 255, 255, 0.6);
  padding: 14px 28px;
}

.fourbplus-btn--white:hover {
  border-color: var(--fourbplus-white);
  background: rgba(255, 255, 255, 0.1);
}

/* Size modifiers */
.fourbplus-btn--sm {
  padding: 8px 16px;
  font-size: 13px;
}

.fourbplus-btn--lg {
  padding: 15px 32px;
  font-size: 16px;
}

/* State modifiers */
.fourbplus-btn--disabled,
.fourbplus-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

.fourbplus-btn--loading {
  position: relative;
  color: transparent;
}

.fourbplus-btn--loading::after {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  animation: fourbplus-spin 0.6s linear infinite;
}

@keyframes fourbplus-spin {
  to {
    transform: rotate(360deg);
  }
}

/* Icon support */
.fourbplus-btn--icon {
  padding: 12px;
  width: 44px;
  height: 44px;
}

.fourbplus-btn svg,
.fourbplus-btn i {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  color: inherit; /* Inherit parent color for hover states */
}

/* Ensure icons match button color on hover */
.fourbplus-btn:hover svg,
.fourbplus-btn:hover i {
  color: inherit;
}

/* Outline button: icon stays visible on hover (white on crimson bg) */
.fourbplus-btn--outline:hover svg,
.fourbplus-btn--outline:hover i {
  color: var(--fourbplus-white);
}

/* Legacy aliases (backwards compatibility) */
.fourbplus-btn-primary {
  display: inline-flex;
  background: var(--fourbplus-primary);
  color: var(--fourbplus-white);
  padding: var(--fourbplus-btn-padding);
  font-family: var(--fourbplus-font-body);
  font-weight: 700;
  font-size: 15px;
  border-radius: var(--fourbplus-btn-radius);
  cursor: pointer;
  transition: all var(--fourbplus-transition-fast);
  text-decoration: none;
}

.fourbplus-btn-primary:hover {
  background: var(--fourbplus-primary-light);
  transform: translateY(-1px);
}

.fourbplus-btn-secondary {
  display: inline-flex;
  background: transparent;
  color: var(--fourbplus-secondary);
  border: 2px solid var(--fourbplus-color-secondary-hover);
  font-family: var(--fourbplus-font-body);
  font-weight: 600;
  font-size: 15px;
  border-radius: var(--fourbplus-btn-radius);
  cursor: pointer;
  transition: all var(--fourbplus-transition-fast);
  text-decoration: none;
}

.fourbplus-btn-secondary:hover {
  background: var(--fourbplus-secondary);
  color: var(--fourbplus-white);
}

.fourbplus-btn-ghost {
  display: inline-flex;
  background: transparent;
  color: var(--fourbplus-secondary);
  border: none;
  padding: 0;
  font-family: var(--fourbplus-font-body);
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  transition: color var(--fourbplus-transition-fast);
}

.fourbplus-btn-ghost:hover {
  color: var(--fourbplus-secondary-light);
}

/* =============================================
   PLACEHOLDER COMPONENT
   Reusable image placeholder with diagonal stripes
   ============================================= */

.fourbplus-placeholder {
  width: 100%;
  height: 100%;
  min-height: 100px;
  background: repeating-linear-gradient(
    135deg,
    var(--fourbplus-placeholder-bg-light, #eef9f2) 0px,
    var(--fourbplus-placeholder-bg-light, #eef9f2) 8px,
    var(--fourbplus-placeholder-bg-dark, #e2f3e8) 8px,
    var(--fourbplus-placeholder-bg-dark, #e2f3e8) 16px
  );
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 8px;
  overflow: hidden;
}

/* Placeholder icon */
.fourbplus-placeholder__icon {
  color: var(--fourbplus-placeholder-color, var(--fourbplus-primary));
  font-size: 32px;
}

.fourbplus-placeholder__icon svg {
  width: 32px;
  height: 32px;
  stroke: currentColor;
  fill: none;
}

/* Placeholder label/text */
.fourbplus-placeholder__label {
  font-family: var(--fourbplus-font-body);
  font-size: 10px;
  color: var(--fourbplus-placeholder-color, var(--fourbplus-primary));
  text-align: center;
  padding: 0 12px;
  line-height: 1.4;
  max-width: 80%;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Size modifiers */
.fourbplus-placeholder--sm {
  min-height: 60px;
}

.fourbplus-placeholder--sm .fourbplus-placeholder__icon {
  font-size: 20px;
}

.fourbplus-placeholder--sm .fourbplus-placeholder__icon svg {
  width: 20px;
  height: 20px;
}

.fourbplus-placeholder--lg {
  min-height: 200px;
}

.fourbplus-placeholder--lg .fourbplus-placeholder__icon {
  font-size: 48px;
}

.fourbplus-placeholder--lg .fourbplus-placeholder__icon svg {
  width: 48px;
  height: 48px;
}

/* Variant: compact (no label) */
.fourbplus-placeholder--compact {
  gap: 0;
}

/* Legacy alias (backwards compatibility) */
.fourbplus-product-placeholder {
  width: 100%;
  height: 100%;
  background: repeating-linear-gradient(
    135deg,
    var(--fourbplus-placeholder-bg-light, #eef9f2) 0px,
    var(--fourbplus-placeholder-bg-light, #eef9f2) 8px,
    var(--fourbplus-placeholder-bg-dark, #e2f3e8) 8px,
    var(--fourbplus-placeholder-bg-dark, #e2f3e8) 16px
  );
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 6px;
}

.fourbplus-product-placeholder-icon {
  font-size: 32px;
  color: var(--fourbplus-primary);
}

.fourbplus-product-placeholder-label {
  font-family: monospace;
  font-size: 10px;
  color: var(--fourbplus-primary);
  text-align: center;
  padding: 0 8px;
  line-height: 1.4;
}

/* =============================================
   SCROLLBAR
   ============================================= */

::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
  background: oklch(24% 0.13 18 / 0.3);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: oklch(24% 0.13 18 / 0.5);
}

/* =============================================
   RESPONSIVE BASE
   ============================================= */

@media (max-width: 767px) {
  :root {
    --fourbplus-section-padding: 40px;
    --fourbplus-gutter: 16px;
  }
}

@media (min-width: 768px) and (max-width: 1023px) {
  :root {
    --fourbplus-section-padding: 50px;
    --fourbplus-gutter: 24px;
  }
}
