/*
Theme Name: Hello Elementor Child - Taste of Asia
Theme URI: https://tasteofasia.io
Description: Child theme for Taste of Asia WooCommerce store - IKEA-style UX with crimson/gold branding
Author: Taste of Asia
Template: hello-elementor
Version: 1.0.0
Text Domain: hello-elementor-child-toa
*/

/* =============================================
   TASTE OF ASIA - DESIGN TOKENS
   ============================================= */

:root {
  /* Brand Colors - hex fallbacks for older browsers */
  --toa-crimson: #82001b;
  --toa-crimson: oklch(24% 0.13 18);
  --toa-crimson-dark: #5a0012;
  --toa-crimson-dark: oklch(18% 0.1 18);
  --toa-crimson-light: #9d0021;
  --toa-crimson-light: oklch(30% 0.13 18);
  --toa-gold: #c9a227;
  --toa-gold: oklch(72% 0.14 62);
  --toa-gold-light: #dbb82e;
  --toa-gold-light: oklch(78% 0.14 62);
  --toa-cream: #f5f5f3;
  --toa-white: #ffffff;
  --toa-text-dark: #1a1a1a;
  --toa-text-muted: #888888;

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

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

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

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

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

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

  /* Transitions */
  --toa-transition-fast: 0.15s ease;
  --toa-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: var(--toa-font-body);
  background-color: var(--toa-cream);
  color: var(--toa-text-dark);
  line-height: 1.6;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--toa-font-heading);
  color: var(--toa-crimson);
  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
   ============================================= */

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

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

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

.toa-btn:focus-visible {
  outline: 2px solid var(--toa-crimson);
  outline-offset: 2px;
}

/* Variant modifiers */
.toa-btn--primary {
  background: var(--toa-crimson);
  color: var(--toa-white);
}

.toa-btn--primary:hover {
  background: oklch(28% 0.13 18);
}

.toa-btn--secondary {
  background: var(--toa-gold);
  color: var(--toa-crimson);
}

.toa-btn--secondary:hover {
  background: var(--toa-gold-light);
  transform: translateY(-1px);
}

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

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

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

.toa-btn--ghost:hover {
  color: var(--toa-gold-light);
}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

.toa-btn-secondary {
  display: inline-flex;
  background: transparent;
  color: var(--toa-white);
  border: 2px solid rgba(255, 255, 255, 0.6);
  padding: 14px 28px;
  font-family: var(--toa-font-body);
  font-weight: 600;
  font-size: 15px;
  border-radius: var(--toa-btn-radius);
  cursor: pointer;
  transition: all var(--toa-transition-fast);
  text-decoration: none;
}

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

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

.toa-btn-ghost:hover {
  color: var(--toa-gold-light);
}

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

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

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

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

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

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

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

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

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

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

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

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

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

.toa-product-placeholder-icon {
  font-size: 32px;
  color: #b0926a;
}

.toa-product-placeholder-label {
  font-family: monospace;
  font-size: 10px;
  color: #b0926a;
  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 {
    --toa-section-padding: 40px;
    --toa-gutter: 16px;
  }

  body {
    padding-top: 100px; /* Mobile header offset */
  }
}

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

  body {
    padding-top: 120px; /* Tablet header offset */
  }
}

@media (min-width: 1024px) {
  body {
    padding-top: 120px; /* Elementor Pro header min_height */
  }
}
