/* ==========================================================================
   PAPA COOKIES CAKE & BAKERY - CORE DESIGN SYSTEM & STYLESHEET
   Mobile-First CSS Architecture
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700;800;900&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
  /* Brand Palette - Bold Typography Theme */
  --primary: #4A2C2A;
  --primary-dark: #321B19;
  --primary-light: #673E3B;
  --primary-soft: #F8F1E9;
  --primary-subtle: #ECE0D1;
  
  --accent: #D4AF37;
  --accent-dark: #B89223;
  --accent-light: #E5C358;
  --accent-soft: #FFFBF0;
  --accent-subtle: #FEF3C7;

  --secondary: #4A2C2A;
  --success: #16a34a;
  --success-soft: #dcfce7;
  --whatsapp: #25D366;
  --whatsapp-dark: #128C7E;

  /* Neutral Spectrum */
  --neutral-900: #261413;
  --neutral-800: #4A2C2A;
  --neutral-700: #5C3E3C;
  --neutral-600: #7A5B59;
  --neutral-500: #9B7E7C;
  --neutral-400: #C2AEA8;
  --neutral-300: #E5D5C5;
  --neutral-200: #ECE0D1;
  --neutral-100: #F8F1E9;
  --neutral-50: #FFFBF5;
  --white: #ffffff;

  /* Typography */
  --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  /* Elevation Shadows */
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
  --shadow-xl: 0 16px 36px rgba(0, 0, 0, 0.16);

  /* Border Radii */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  /* Transitions */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 250ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 350ms cubic-bezier(0.4, 0, 0.2, 1);

  /* Layout Widths */
  --container-max: 1200px;
  --header-height-mobile: 68px;
  --header-height-desktop: 84px;
}

/* ==========================================================================
   RESET & BASE STYLES
   ========================================================================== */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--neutral-800);
  background-color: var(--neutral-50);
  overflow-x: hidden;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

img, picture, svg, video {
  display: block;
  max-width: 100%;
  height: auto;
}

input, button, textarea, select {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: transparent;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-fast);
}

ul, ol {
  list-style: none;
}

/* ==========================================================================
   TYPOGRAPHY
   ========================================================================== */

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--neutral-900);
  line-height: 1.25;
}

h1 { font-size: 1.75rem; }
h2 { font-size: 1.45rem; }
h3 { font-size: 1.2rem; }
h4 { font-size: 1.05rem; }
h5 { font-size: 0.95rem; }

p {
  margin-bottom: 0.75rem;
}

p:last-child {
  margin-bottom: 0;
}

.text-primary { color: var(--primary) !important; }
.text-accent { color: var(--accent) !important; }
.text-muted { color: var(--neutral-600) !important; }
.text-white { color: var(--white) !important; }
.text-success { color: var(--success) !important; }

.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }
.font-medium { font-weight: 500; }

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

/* ==========================================================================
   LAYOUT CONTAINERS & UTILITIES
   ========================================================================== */

.container {
  width: 100%;
  padding-left: 1rem;
  padding-right: 1rem;
  margin-left: auto;
  margin-right: auto;
  max-width: var(--container-max);
}

.section {
  padding-top: 2.5rem;
  padding-bottom: 2.5rem;
  position: relative;
}

.section-bg-white {
  background-color: var(--white);
}

.section-bg-warm {
  background-color: var(--neutral-100);
}

.section-bg-primary {
  background-color: var(--primary);
  color: var(--white);
}

.section-header {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 2rem auto;
}

.section-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.85rem;
  background-color: var(--primary-soft);
  color: var(--primary);
  border: 1px solid var(--primary-subtle);
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.75rem;
}

.section-badge.badge-accent {
  background-color: var(--accent-soft);
  color: var(--accent-dark);
  border-color: var(--accent-subtle);
}

.section-badge.badge-white {
  background-color: rgba(255, 255, 255, 0.18);
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.3);
}

.section-title {
  margin-bottom: 0.6rem;
}

.section-subtitle {
  color: var(--neutral-600);
  font-size: 0.95rem;
}

.section-header.text-white .section-title {
  color: var(--white);
}

.section-header.text-white .section-subtitle {
  color: rgba(255, 255, 255, 0.85);
}

/* ==========================================================================
   BUTTONS & ACTION LINKS
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  font-size: 0.925rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
  white-space: nowrap;
  user-select: none;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background-color: var(--primary);
  color: var(--white);
  box-shadow: 0 4px 10px rgba(158, 27, 34, 0.25);
}

.btn-primary:hover {
  background-color: var(--primary-dark);
  box-shadow: 0 6px 14px rgba(158, 27, 34, 0.35);
  color: var(--white);
}

.btn-accent {
  background-color: var(--accent);
  color: var(--white);
  box-shadow: 0 4px 10px rgba(240, 133, 25, 0.25);
}

.btn-accent:hover {
  background-color: var(--accent-dark);
  box-shadow: 0 6px 14px rgba(240, 133, 25, 0.35);
  color: var(--white);
}

.btn-whatsapp {
  background-color: var(--whatsapp);
  color: var(--white);
  box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
}

.btn-whatsapp:hover {
  background-color: var(--whatsapp-dark);
  color: var(--white);
}

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

.btn-outline:hover {
  background-color: var(--primary-soft);
  color: var(--primary-dark);
}

.btn-outline-white {
  background-color: transparent;
  color: var(--white);
  border: 1.5px solid var(--white);
}

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

.btn-sm {
  padding: 0.45rem 0.9rem;
  font-size: 0.825rem;
  border-radius: var(--radius-sm);
}

.btn-lg {
  padding: 0.9rem 1.8rem;
  font-size: 1rem;
  border-radius: var(--radius-lg);
}

.btn-full {
  width: 100%;
}

.btn-icon {
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: var(--radius-full);
}

/* ==========================================================================
   TOP BAR (DESKTOP / MOBILE CONTACT BAR)
   ========================================================================== */

.top-bar {
  background-color: var(--primary-dark);
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.8rem;
  padding: 0.4rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.top-bar-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.top-bar-left, .top-bar-right {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.top-bar-item {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.top-bar-item a:hover {
  color: var(--accent-light);
}

.top-bar-socials {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.top-bar-socials a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: var(--radius-full);
  background-color: rgba(255, 255, 255, 0.15);
  color: var(--white);
  transition: all var(--transition-fast);
}

.top-bar-socials a:hover {
  background-color: var(--accent);
}

/* ==========================================================================
   MAIN SITE HEADER & NAVIGATION
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background-color: var(--white);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-fast);
}

.site-header.is-scrolled {
  box-shadow: var(--shadow-md);
}

.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-height-mobile);
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
}

.brand-logo img {
  height: 44px;
  width: auto;
  object-fit: contain;
}

.brand-logo-text {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.brand-subtitle {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--accent-dark);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* Desktop Nav Menu */
.desktop-nav {
  display: none;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.nav-item {
  position: relative;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.65rem 0.9rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--neutral-700);
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

.nav-link:hover, .nav-link.active {
  color: var(--primary);
  background-color: var(--primary-soft);
}

.nav-link svg.chevron {
  transition: transform var(--transition-fast);
}

.nav-item:hover > .nav-link svg.chevron {
  transform: rotate(180deg);
}

/* Dropdown Menu */
.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 230px;
  background-color: var(--white);
  border: 1px solid var(--neutral-200);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: 0.5rem 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all var(--transition-normal);
  z-index: 100;
}

.nav-item:hover > .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.1rem;
  font-size: 0.875rem;
  color: var(--neutral-700);
  font-weight: 500;
}

.dropdown-link:hover, .dropdown-link.active {
  background-color: var(--primary-soft);
  color: var(--primary);
  padding-left: 1.3rem;
}

/* Header Actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.search-toggle-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  color: var(--neutral-700);
  background-color: var(--neutral-100);
  transition: all var(--transition-fast);
}

.search-toggle-btn:hover {
  background-color: var(--primary-soft);
  color: var(--primary);
}

.mobile-menu-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 4px;
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
  background-color: var(--primary-soft);
  color: var(--primary);
}

.mobile-menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background-color: currentColor;
  border-radius: 2px;
  transition: all var(--transition-fast);
}

.mobile-menu-toggle.is-active span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.mobile-menu-toggle.is-active span:nth-child(2) {
  opacity: 0;
}

.mobile-menu-toggle.is-active span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

/* ==========================================================================
   MOBILE DRAWER NAVIGATION
   ========================================================================== */

.mobile-drawer-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(2px);
  z-index: 1050;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-normal);
}

.mobile-drawer-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

.mobile-drawer {
  position: fixed;
  top: 0;
  right: -320px;
  width: 300px;
  max-width: 85vw;
  height: 100vh;
  background-color: var(--white);
  z-index: 1060;
  box-shadow: var(--shadow-xl);
  display: flex;
  flex-direction: column;
  transition: right var(--transition-normal);
  overflow-y: auto;
}

.mobile-drawer.is-open {
  right: 0;
}

.mobile-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--neutral-200);
}

.mobile-drawer-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  background-color: var(--neutral-100);
  color: var(--neutral-700);
}

.mobile-drawer-body {
  padding: 1rem 0;
  flex: 1;
}

.mobile-nav-list {
  display: flex;
  flex-direction: column;
}

.mobile-nav-item {
  border-bottom: 1px solid var(--neutral-100);
}

.mobile-nav-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1.25rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--neutral-800);
}

.mobile-nav-link:hover, .mobile-nav-link.active {
  background-color: var(--primary-soft);
  color: var(--primary);
}

.mobile-submenu {
  display: none;
  background-color: var(--neutral-50);
  padding: 0.5rem 0;
}

.mobile-submenu.is-open {
  display: block;
}

.mobile-submenu-link {
  display: block;
  padding: 0.6rem 1.75rem;
  font-size: 0.875rem;
  color: var(--neutral-700);
  font-weight: 500;
}

.mobile-submenu-link:hover, .mobile-submenu-link.active {
  color: var(--primary);
  background-color: var(--primary-subtle);
  padding-left: 2rem;
}

.mobile-drawer-footer {
  padding: 1.25rem;
  background-color: var(--neutral-50);
  border-top: 1px solid var(--neutral-200);
}

/* ==========================================================================
   GLOBAL SEARCH OVERLAY
   ========================================================================== */

.search-modal-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  z-index: 1100;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 3rem 1rem;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-normal);
}

.search-modal-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

.search-modal {
  background-color: var(--white);
  width: 100%;
  max-width: 620px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  overflow: hidden;
  transform: translateY(-20px);
  transition: transform var(--transition-normal);
}

.search-modal-overlay.is-open .search-modal {
  transform: translateY(0);
}

.search-input-box {
  display: flex;
  align-items: center;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--neutral-200);
  gap: 0.75rem;
}

.search-input-box input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 1.05rem;
  color: var(--neutral-900);
}

.search-results-area {
  max-height: 420px;
  overflow-y: auto;
  padding: 1rem;
}

.search-result-item {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.75rem;
  border-radius: var(--radius-md);
  margin-bottom: 0.5rem;
  border: 1px solid transparent;
  transition: all var(--transition-fast);
}

.search-result-item:hover {
  background-color: var(--primary-soft);
  border-color: var(--primary-subtle);
}

.search-result-thumb {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  background-color: var(--neutral-100);
}

.search-result-info {
  flex: 1;
}

.search-result-title {
  font-weight: 600;
  font-size: 0.925rem;
  color: var(--neutral-900);
  margin-bottom: 0.15rem;
}

.search-result-cat {
  font-size: 0.75rem;
  color: var(--neutral-500);
}

.search-result-price {
  font-weight: 700;
  color: var(--primary);
  font-size: 0.9rem;
}

/* ==========================================================================
   FOOTER SECTION
   ========================================================================== */

.site-footer {
  margin-top: auto;
  background-color: #1f1415;
  color: #d1cdc7;
  border-top: 4px solid var(--primary);
}

.footer-top {
  padding: 3rem 0 2rem 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

.footer-brand p {
  color: #a8a29e;
  font-size: 0.9rem;
  margin: 1rem 0 1.25rem 0;
  line-height: 1.6;
}

.footer-title {
  color: var(--white);
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 1.2rem;
  position: relative;
  padding-bottom: 0.5rem;
}

.footer-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 36px;
  height: 2.5px;
  background-color: var(--accent);
  border-radius: var(--radius-full);
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.footer-links a {
  color: #a8a29e;
  font-size: 0.885rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: all var(--transition-fast);
}

.footer-links a:hover {
  color: var(--accent-light);
  transform: translateX(4px);
}

.footer-contact-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
  font-size: 0.885rem;
  color: #a8a29e;
}

.footer-contact-item svg {
  flex-shrink: 0;
  margin-top: 0.2rem;
  color: var(--accent);
}

.footer-bottom {
  background-color: #150d0e;
  padding: 1.25rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.825rem;
  color: #8c827a;
}

.footer-bottom-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  text-align: center;
}

/* ==========================================================================
   FLOATING ACTION BUTTONS (WHATSAPP & BACK TO TOP)
   ========================================================================== */

.floating-actions {
  position: fixed;
  bottom: 1.25rem;
  right: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  z-index: 990;
}

.floating-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-lg);
  transition: all var(--transition-normal);
}

.floating-btn:hover {
  transform: scale(1.08);
}

.btn-floating-wa {
  background-color: var(--whatsapp);
  color: var(--white);
  position: relative;
}

.btn-floating-wa::before {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: var(--radius-full);
  background-color: var(--whatsapp);
  opacity: 0.35;
  animation: pulse-ring 2s infinite cubic-bezier(0.4, 0, 0.6, 1);
  z-index: -1;
}

@keyframes pulse-ring {
  0% { transform: scale(0.9); opacity: 0.6; }
  100% { transform: scale(1.4); opacity: 0; }
}

.btn-back-to-top {
  background-color: var(--neutral-800);
  color: var(--white);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
}

.btn-back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* Helper hidden class */
.d-none { display: none !important; }
.d-block { display: block !important; }
.d-flex { display: flex !important; }
