/**
 * Colchones Angar - Master Design Stylesheet
 * Incorporates Nordic Rest design tokens, luxury elevation, responsive typography, and layout.
 */

@import url('https://fonts.googleapis.com/css2?family=EB+Garamond:ital,wght@0,400..800;1,400..800&family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&family=Poppins:wght@300;400;500;600;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@20..48,100..700,0..1,-50..200');

:root {
  --color-surface: #faf9f6;
  --color-surface-dim: #dbdad7;
  --color-surface-bright: #faf9f6;
  --color-surface-container-lowest: #ffffff;
  --color-surface-container-low: #f4f3f1;
  --color-surface-container: #efeeeb;
  --color-surface-container-high: #e9e8e5;
  --color-surface-container-highest: #e3e2e0;
  --color-on-surface: #1a1c1a;
  --color-on-surface-variant: #44474c;
  --color-primary: #000000;
  --color-primary-container: #0e1c2f;
  --color-on-primary: #ffffff;
  --color-on-primary-container: #9ba8c0;
  --color-secondary: #735c00;
  --color-secondary-container: #fed65b;
  --color-on-secondary-container: #3d2f00;
  --color-outline: #75777d;
  --color-outline-variant: #c5c6cd;
  --color-error: #ba1a1a;
  --color-whatsapp: #25d366;
}

/* Base resets & typography */
*, ::before, ::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--color-surface);
  color: var(--color-on-surface);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  padding: 0;
  background-color: var(--color-surface);
  color: var(--color-on-surface);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  overflow-x: hidden;
}

/* Material Symbols Font Setup */
.material-symbols-outlined {
  font-family: 'Material Symbols Outlined', sans-serif !important;
  font-weight: normal;
  font-style: normal;
  font-size: 24px;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-block;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  -webkit-font-feature-settings: 'liga';
  -webkit-font-smoothing: antialiased;
  vertical-align: middle;
}

/* Typography Helpers */
.font-display {
  font-family: 'EB Garamond', Georgia, Cambria, serif !important;
}

.font-body, .font-sans {
  font-family: 'Inter', system-ui, -apple-system, sans-serif !important;
}

/* Explicit Color Utilities */
.bg-surface { background-color: var(--color-surface) !important; }
.bg-surface-container { background-color: var(--color-surface-container) !important; }
.bg-surface-container-low { background-color: var(--color-surface-container-low) !important; }
.bg-primary-container { background-color: #0e1c2f !important; }
.bg-primary { background-color: #0e1c2f !important; }
.bg-secondary-container { background-color: #fed65b !important; }
.bg-error { background-color: #ba1a1a !important; }

.text-primary { color: #0e1c2f !important; }
.text-on-primary { color: #ffffff !important; }
.text-on-surface { color: #1a1c1a !important; }
.text-on-surface-variant { color: #44474c !important; }
.text-on-primary-container { color: #9ba8c0 !important; }
.text-secondary { color: #735c00 !important; }
.text-secondary-container { color: #fed65b !important; }
.text-on-secondary-container { color: #3d2f00 !important; }
.text-error { color: #ba1a1a !important; }
.text-on-error { color: #ffffff !important; }

.border-outline-variant { border-color: #c5c6cd !important; }
.border-outline { border-color: #75777d !important; }
.border-secondary-container { border-color: #fed65b !important; }

/* Luxury Ambient Shadows */
.shadow-luxury {
  box-shadow: 0 4px 20px rgba(14, 28, 47, 0.05), 0 12px 40px rgba(14, 28, 47, 0.08) !important;
}

.shadow-luxury-hover {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.shadow-luxury-hover:hover {
  box-shadow: 0 8px 30px rgba(14, 28, 47, 0.12), 0 16px 48px rgba(14, 28, 47, 0.15) !important;
  transform: translateY(-2px);
}

/* Animations */
@keyframes subtle-pulse {
  0% { box-shadow: 0 0 0 0 rgba(254, 214, 91, 0.6); }
  70% { box-shadow: 0 0 0 14px rgba(254, 214, 91, 0); }
  100% { box-shadow: 0 0 0 0 rgba(254, 214, 91, 0); }
}

.pulse-gold {
  animation: subtle-pulse 2.2s infinite;
}

@keyframes whatsapp-pulse {
  0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.6); }
  70% { box-shadow: 0 0 0 16px rgba(37, 211, 102, 0); }
  100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}

.pulse-whatsapp {
  animation: whatsapp-pulse 2.2s infinite;
}

/* Hide Scrollbar */
.hide-scrollbar::-webkit-scrollbar {
  display: none;
}
.hide-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* Accordion Component */
.accordion-content {
  transition: max-height 0.35s ease-out, padding 0.3s ease;
  max-height: 0;
  overflow: hidden;
}

.accordion-item.active .accordion-content {
  max-height: 600px;
  padding-bottom: 24px;
}

.accordion-item.active .accordion-chevron {
  transform: rotate(180deg);
}

.accordion-chevron {
  transition: transform 0.3s ease;
}

/* Product Catalog Card & Filter */
.product-card {
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.product-card.hidden-card {
  display: none !important;
}

/* Mobile & Responsive Container Rules */
.max-w-container-max {
  max-width: 1280px;
  margin-left: auto;
  margin-right: auto;
}

.px-gutter {
  padding-left: 1rem;
  padding-right: 1rem;
}

@media (min-width: 640px) {
  .px-gutter {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
}

@media (min-width: 1024px) {
  .lg\:px-margin-desktop {
    padding-left: 3.5rem;
    padding-right: 3.5rem;
  }
}

/* Prevent image layout distortion */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Advisor shortcut rail (logged-in staff only) */
.angar-advisor-rail {
  position: fixed;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 50;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

body.admin-bar .angar-advisor-rail {
  top: calc(50% + 16px);
}

.angar-advisor-rail__btn {
  position: relative;
  width: 52px;
  height: 52px;
  border-radius: 9999px;
  background: #0e1c2f;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 24px rgba(14, 28, 47, 0.28);
  text-decoration: none;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.angar-advisor-rail__btn .material-symbols-outlined {
  font-size: 24px;
  color: inherit;
}

.angar-advisor-rail__label {
  position: absolute;
  left: calc(100% + 10px);
  top: 50%;
  transform: translateY(-50%);
  background: #ffffff;
  color: #0e1c2f;
  border: 1px solid rgba(197, 198, 205, 0.5);
  border-radius: 9999px;
  padding: 6px 12px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
  box-shadow: 0 8px 20px rgba(14, 28, 47, 0.12);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
}

.angar-advisor-rail__btn:hover,
.angar-advisor-rail__btn:focus-visible {
  background: #fed65b;
  color: #0e1c2f;
  transform: scale(1.06);
}

.angar-advisor-rail__btn:hover .angar-advisor-rail__label,
.angar-advisor-rail__btn:focus-visible .angar-advisor-rail__label {
  opacity: 1;
}

@media (max-width: 767px) {
  .angar-advisor-rail {
    top: auto;
    bottom: 16px;
    left: 12px;
    transform: none;
    flex-direction: row;
  }

  body.admin-bar .angar-advisor-rail {
    top: auto;
  }

  .angar-advisor-rail__btn {
    width: 46px;
    height: 46px;
  }

  .angar-advisor-rail__label {
    display: none;
  }
}

/* Footer brand mark: invert the (dark) logo artwork to white for legibility on the dark footer background. */
.angar-footer-logo {
  filter: brightness(0) invert(1);
}

/* Brand logo image: fixed narrow width regardless of the source file's native size. */
.angar-logo-img {
  width: auto;
  max-width: 150px;
}
