/* ===================================================================
   THE SOCIAL MANILA BAKEHOUSE — Design System & Styles
   =================================================================== */

/* --- Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Assistant:wght@300;400;500;600;700&display=swap');

@font-face {
  font-family: 'Louize Display';
  src: url('../assets/fonts/louize-display.otf') format('opentype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Louize Display';
  src: url('../assets/fonts/louize-display-italic.otf') format('opentype');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: 'Louize Display';
  src: url('../assets/fonts/louize-display-medium.otf') format('opentype');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Louize Display';
  src: url('../assets/fonts/louize-display-medium-italic.otf') format('opentype');
  font-weight: 500;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: 'Vintage Goods';
  src: url('../assets/fonts/Vintage Goods.otf') format('opentype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Roca Two';
  src: url('../assets/fonts/fonnts.com-Roca_Two_Bold.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Roca Two';
  src: url('../assets/fonts/fonnts.com-Roca_Two_Thin.ttf') format('truetype');
  font-weight: 100;
  font-style: normal;
  font-display: swap;
}

/* --- CSS Custom Properties (Design Tokens) --- */
:root {
  /* Primary Palette from Brand Guidelines */
  --color-crimson: #B81B1B;
  --color-crimson-dark: #801810;
  --color-gold: #FFD166;
  --color-coral: #FF8A5B;
  --color-rose: #FFB6B9;
  --color-cream: #FFF9F0;

  --color-white: #FFFFFF;
  --bg-page: var(--color-cream);
  --bg-section-alt: #FFFFFF;
  --bg-dark: var(--color-crimson-dark);
  --color-gold: #FFD166;
  --color-coral: #FF8A5B;
  --color-rose: #FFB6B9;
  --color-cream: #FFF9F0;

  --color-white: #FFFFFF;
  --bg-page: var(--color-cream);
  --bg-section-alt: #FFFFFF;
  --bg-dark: var(--color-crimson-dark);

  /* Text */
  --color-text-primary: var(--color-crimson-dark);
  --color-text-secondary: var(--color-crimson);
  --color-text-muted: #8B6B68;
  --color-text-on-dark: var(--color-white);
  --color-text-on-crimson: var(--color-white);

  /* Typography */
  --font-heading: 'Assistant', 'Helvetica Neue', Arial, sans-serif;
  --font-body: 'Roca Two', 'Assistant', 'Helvetica Neue', Arial, sans-serif;

  /* Spacing */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2.5rem;
  --space-xl: 4rem;
  --space-2xl: 6rem;
  --space-3xl: 8rem;

  /* Sizing */
  --header-height: 96px;
  --container-max: 1200px;
  --container-wide: 1400px;

  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-base: 0.3s ease;
  --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);

  /* Border */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 16px;
  --radius-full: 9999px;
  --media-radius: 0px;
}

/* --- Reset & Base --- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  /* Prevent layout shift when scrollbar disappears on desktop */
  scrollbar-gutter: stable;
}

body {
  font-family: var(--font-body);
  color: var(--color-text-primary);
  background-color: var(--bg-page);
  line-height: 1.6;
  overflow-x: hidden;
}

body.cart-open {
  overflow: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

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

ul,
ol {
  list-style: none;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
}

/* --- Buttons (Dawn Theme Style) --- */
.btn {
  --btn-color: var(--color-white);
  --btn-hover-text: var(--color-crimson-dark);
  
  display: inline-flex;
  justify-content: center;
  align-items: center;
  border: 1px solid var(--btn-color);
  border-radius: 0px;
  padding: 10px 24px;
  min-height: 42px;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 500;
  text-decoration: none;
  background-color: transparent;
  color: var(--btn-color);
  position: relative;
  overflow: hidden;
  z-index: 1;
  transition: color 0.45s cubic-bezier(0.785, 0.135, 0.15, 0.86);
  white-space: nowrap;
}

.btn::before {
  content: '';
  position: absolute;
  top: calc(-1 * var(--btn-border-thickness, 1px));
  bottom: calc(-1 * var(--btn-border-thickness, 1px));
  left: calc(-1 * var(--btn-border-thickness, 1px));
  right: calc(-1 * var(--btn-border-thickness, 1px));
  background-color: var(--btn-color);
  z-index: -1;
  transform: scaleX(0);
  transform-origin: var(--btn-origin, left center);
  transition: transform 0.45s cubic-bezier(0.785, 0.135, 0.15, 0.86);
  border-radius: inherit !important;
}

.btn:hover {
  color: var(--btn-hover-text);
}

.btn:hover::before {
  transform: scaleX(1);
}

/* Dark outline variant (for light backgrounds) */
.btn-outline-dark {
  --btn-color: var(--color-crimson-dark);
  --btn-hover-text: var(--color-white);
}

/* --- Typography --- */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  font-weight: 400;
  line-height: 1.2;
  color: var(--color-text-primary);
}

h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  letter-spacing: -0.02em;
}

h2 {
  font-family: 'Vintage Goods', serif;
  font-size: clamp(2rem, 4vw, 3rem);
  letter-spacing: -0.01em;
}

h2::after {
  content: '';
  display: block;
  width: 60px;
  height: 1px;
  background-color: currentColor;
  margin-top: 15px;
  opacity: 0.5;
}

h3 {
  font-size: clamp(1.5rem, 3vw, 2rem);
}

p {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--color-text-secondary);
}

.section-label {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-crimson);
  margin-bottom: var(--space-sm);
  display: inline-block;
}

/* --- Layout / Container --- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--space-lg); /* Increased from var(--space-md) for better safety margins */
}

@media (max-width: 1024px) {
  .container {
    padding: 0 var(--space-lg);
  }
}

@media (max-width: 768px) {
  .container {
    padding: 0 var(--space-lg);
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 var(--space-md);
  }
}

.container--wide {
  max-width: var(--container-wide);
}

section {
  padding: var(--space-3xl) 0;
}

/* ===================================================================
   HEADER & NAVIGATION
   =================================================================== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: transparent;
  height: var(--header-height);
  transition: background var(--transition-base), box-shadow var(--transition-base), transform 0.3s ease;
}

@media (hover: hover) {
  .site-header:hover {
    background: #f0f2ed;
    box-shadow: 0 1px 0 rgb(217, 217, 217);
    backdrop-filter: none;
  }
}

.site-header.scrolled,
.site-header.menu-open,
.site-header.static-header {
  background: #f0f2ed;
  box-shadow: 0 1px 0 rgb(217, 217, 217);
  backdrop-filter: none;
}

.header-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  height: 100%;
  max-width: var(--container-wide);
  margin: 0 auto;
  padding: 0 40px;
}

.header-logo {
  grid-column: 2;
  justify-self: center;
  position: relative;
}

.header-logo img {
  height: 60px;
  width: auto;
  transition: opacity var(--transition-base);
}

.logo-red {
  position: absolute;
  top: 0;
  left: 0;
  opacity: 0;
}

@media (hover: hover) {
  .site-header:hover .logo-white {
    opacity: 0;
  }

  .site-header:hover .logo-red {
    opacity: 1;
  }
}

.site-header.scrolled .logo-white,
.site-header.menu-open .logo-white,
.site-header.static-header .logo-white {
  opacity: 0;
}

.site-header.scrolled .logo-red,
.site-header.menu-open .logo-red,
.site-header.static-header .logo-red {
  opacity: 1;
}

.mobile-nav {
  display: none;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  grid-column: 1;
  justify-self: start;
  flex-wrap: nowrap;
}

.nav-links a {
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 400;
  color: var(--color-white);
  padding: 12px;
  position: relative;
  text-transform: none;
  letter-spacing: normal;
  transition: color var(--transition-base);
  white-space: nowrap;
}

/* Adjust header for small desktops/large tablets before hamburger kicks in */
@media (max-width: 1200px) and (min-width: 1025px) {
  .header-inner {
    padding: 0 24px;
  }
  .nav-links {
    gap: var(--space-sm);
  }
  .nav-links a {
    font-size: 14px;
    padding: 8px;
  }
}

@media (hover: hover) {
  .site-header:hover .nav-links a {
    color: #1c1c1c;
  }
}

.site-header.scrolled .nav-links a,
.site-header.static-header .nav-links a {
  color: #1c1c1c;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 8px;
  left: 12px;
  width: calc(100% - 24px);
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transition: transform var(--transition-base);
  transform-origin: bottom right;
}

.nav-links a:hover::after,
.nav-links a.active::after,
.nav-item-dropdown:has(a.active)::after {
  transform: scaleX(1);
  transform-origin: bottom left;
}

/* Dropdown Menu (Mega Menu Style) */
.nav-item-dropdown {
  position: static;
  /* Let dropdown span full width of header */
  display: flex;
  align-items: center;
  height: 100%;
}

.dropdown-menu {
  position: fixed;
  top: 96px;
  left: 0;
  width: 100vw;
  background-color: #f0f2ed;
  /* Match header scrolled background */
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  border: none;
  border-radius: 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: opacity 0.3s ease, visibility 0.3s, transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  display: flex;
  flex-direction: column;
  padding: 20px 0 40px;
  padding-left: calc(max(40px, 50vw - (var(--container-wide) / 2) + 40px));
  align-items: flex-start;
}

@media (hover: hover) {
  .site-header:hover .dropdown-menu {
    background-color: #f0f2ed;
  }
}

.site-header.scrolled .dropdown-menu,
.site-header.menu-open .dropdown-menu,
.site-header.static-header .dropdown-menu {
  background-color: #f0f2ed;
}

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

.site-header .nav-links .dropdown-menu a {
  padding: 8px 0;
  color: #1c1c1c;
  /* Dark text matching the live site */
  font-size: 14px;
  font-family: var(--font-heading);
  font-weight: 400;
  border-bottom: none;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: block;
}

@media (hover: hover) {
  .site-header:hover .nav-links .dropdown-menu a {
    color: #1c1c1c;
  }
}

.site-header.scrolled .nav-links .dropdown-menu a,
.site-header.static-header .nav-links .dropdown-menu a {
  color: #1c1c1c;
}

.site-header .nav-links .dropdown-menu a:last-child {
  border-bottom: none;
}

.site-header .nav-links .dropdown-menu a:hover,
.site-header .nav-links .dropdown-menu a.active {
  background-color: transparent;
  text-decoration: underline;
  text-underline-offset: 4px;
  color: var(--color-crimson);
}

/* Remove underline for "Categories" label and "All Pastries" in dropdown */
.site-header .nav-links .dropdown-menu a[style*="pointer-events: none"]:hover,
.site-header .nav-links .dropdown-menu a[style*="pointer-events: none"].active,
.site-header .nav-links .dropdown-menu a[href*="#all"]:hover,
.site-header .nav-links .dropdown-menu a[href*="#all"].active {
  text-decoration: none !important;
}

.site-header .nav-links .dropdown-menu a::after {
  display: none;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  grid-column: 3;
  justify-self: end;
}

.nav-icon {
  color: var(--color-white);
  transition: color var(--transition-base);
  display: flex;
  align-items: center;
}

@media (hover: hover) {
  .site-header:hover .nav-icon {
    color: #1c1c1c;
  }
}

.site-header.scrolled .nav-icon,
.site-header.menu-open .nav-icon,
.site-header.static-header .nav-icon {
  color: #1c1c1c;
}

.nav-text-link {
  font-family: var(--font-heading);
  font-size: 16px;
  color: var(--color-white);
  transition: color var(--transition-base);
  display: flex;
  align-items: center;
  position: relative;
  text-decoration: none;
}

@media (hover: hover) {
  .site-header:hover .nav-text-link {
    color: #1c1c1c;
  }
}

.site-header.scrolled .nav-text-link,
.site-header.menu-open .nav-text-link,
.site-header.static-header .nav-text-link {
  color: #1c1c1c;
}

.nav-text-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 100%;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transition: transform var(--transition-base);
  transform-origin: bottom right;
}

.nav-text-link:hover::after {
  transform: scaleX(1);
  transform-origin: bottom left;
}

.cart-count {
  font-size: 0.7rem;
  background: var(--color-white);
  color: var(--color-crimson);
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

@media (hover: hover) {
  .site-header:hover .cart-count {
    background: var(--color-crimson);
    color: var(--color-white);
  }
}

.site-header.scrolled .cart-count,
.site-header.menu-open .cart-count,
.site-header.static-header .cart-count {
  background: var(--color-crimson);
  color: var(--color-white);
}

.mobile-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 4px;
  cursor: pointer;
  z-index: 1001;
  grid-column: 1;
  justify-self: start;
}

.mobile-toggle span {
  width: 24px;
  height: 2px;
  background: var(--color-white);
  transition: all var(--transition-base);
  transform-origin: center;
}

@media (hover: hover) {
  .site-header:hover .mobile-toggle span {
    background: #1c1c1c;
  }
}

.site-header.scrolled .mobile-toggle span,
.site-header.menu-open .mobile-toggle span,
.site-header.static-header .mobile-toggle span,
.mobile-toggle.open span {
  background: #1c1c1c;
}

.mobile-toggle.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

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

.mobile-toggle.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ===================================================================
   HERO SECTION
   =================================================================== */
.hero {
  position: relative;
  min-height: 60svh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  padding-top: var(--header-height);
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg,
      rgba(128, 24, 16, 0.25) 0%,
      rgba(59, 18, 16, 0.45) 100%);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 700px;
  padding: var(--space-lg);
  animation: fadeInUp 1s ease-out;
}

.hero-content h1 {
  font-family: 'Vintage Goods', serif;
  font-size: clamp(2.8rem, 6vw, 4.5rem);
  font-weight: 300;
  color: var(--color-white);
  margin-bottom: var(--space-md);
  line-height: 1.15;
  font-style: italic;
}

.hero-content p {
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: var(--space-lg);
  font-weight: 300;
  letter-spacing: 0.04em;
}

/* ===================================================================
   CO-BAKING STUDIO SECTION
   =================================================================== */
.studio-section {
  background: var(--bg-section-alt);
  padding: var(--space-3xl) 0;
}

.studio-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xl);
  align-items: center;
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.studio-image {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 4 / 3;
}

.studio-image img {
  width: 100%;
  height: 100%;
  object-fit: contain; /* Better for doodles/graphic elements */
  transition: transform var(--transition-slow);
}

.studio-image:hover img {
  transform: scale(1.02);
}

.studio-image::after {
  display: none;
}

.studio-text h2 {
  color: var(--color-crimson-dark);
  margin-bottom: var(--space-md);
}

.studio-text p {
  margin-bottom: var(--space-lg);
  max-width: 480px;
}

/* Fix for studio/story sections on wide mobile/tablet */
@media (max-width: 1200px) and (min-width: 769px) {
  .studio-inner,
  .story-inner {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-lg);
  }
  
  .studio-text h2, 
  .story-text h2 {
    font-size: 2.2rem;
  }
}

@media (max-width: 1024px) {
  .studio-inner,
  .story-inner {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .studio-text h2::after,
  .story-text h2::after {
    margin-left: auto;
    margin-right: auto;
  }
  
  .studio-text p,
  .story-text p {
    margin-left: auto;
    margin-right: auto;
  }
  
  .studio-image,
  .story-image {
    aspect-ratio: 16 / 9;
    max-width: 600px;
    margin: 0 auto;
  }
}

/* ===================================================================
   MENU FILTER BAR
   =================================================================== */

.menu-filter-bar {
  position: relative;
  z-index: 10;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.filter-categories a:hover {
  color: var(--color-white) !important;
}

.filter-categories a {
  text-decoration: none;
}

@media (max-width: 768px) {
  .menu-filter-bar {
    padding: 15px 0 !important;
  }

  .filter-categories {
    gap: 15px !important;
    overflow-x: auto;
    white-space: nowrap;
    padding-bottom: 5px;
  }

  .filter-categories::-webkit-scrollbar {
    display: none;
  }

  .filter-actions {
    width: 100%;
    justify-content: space-between;
    margin-top: 10px;
  }
}

/* ===================================================================
   PRODUCTS / PASTRIES SECTION
   =================================================================== */
.products-section {
  padding: var(--space-3xl) 0;
}

.section-header {
  text-align: center;
  margin-bottom: var(--space-xl);
}

.section-header h2 {
  color: var(--color-crimson-dark);
}

.section-header h2::after {
  margin-left: auto;
  margin-right: auto;
}

.section-header p {
  margin-top: var(--space-xs);
  font-size: 1.05rem;
}

/* ===================================================================
   COLLECTIONS HUB
   =================================================================== */
.collections-section {
  background: var(--color-cream);
}
.collections-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
}
.collection-card {
  display: block;
  text-decoration: none;
  background: var(--color-white);
  border: 1px solid #E8E2D9;
  transition: all var(--transition-base);
}
.collection-card:hover {
  transform: translateY(-2px);
  box-shadow: 0px 4px 15px rgba(0, 0, 0, 0.05);
}
.collection-image {
  aspect-ratio: 4/3;
  overflow: hidden;
  background: var(--color-rose-light);
}
.collection-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}
.collection-card:hover .collection-image img {
  transform: scale(1.03);
}
.collection-info {
  padding: var(--space-xl) var(--space-lg);
  text-align: center;
}
.collection-info h3 {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  color: var(--color-crimson-dark);
  margin-bottom: var(--space-sm);
}
.collection-info p {
  font-size: 0.95rem;
  color: var(--color-text-muted);
  margin-bottom: var(--space-md);
}

/* ===================================================================
   PREMIUM SHOP LAYOUT
   =================================================================== */
.shop-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: var(--space-3xl);
  padding: var(--space-xl) 0 var(--space-3xl);
  align-items: start;
}

/* Fix for overlapping header on pages without a hero */
main:has(.shop-layout),
main:has(.mobile-category-nav) {
  padding-top: var(--header-height);
}

.shop-sidebar {
  position: sticky;
  top: calc(var(--header-height) + var(--space-lg));
  padding-right: var(--space-lg);
  border-right: 1px solid rgba(184, 27, 27, 0.08);
}

.shop-sidebar h3 {
  font-family: var(--font-heading);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  margin-bottom: var(--space-md);
  color: var(--color-crimson);
  opacity: 0.8;
}

.shop-sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.shop-sidebar-nav a {
  text-decoration: none;
  color: var(--color-text-muted);
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 400;
  transition: all var(--transition-fast);
  position: relative;
  display: inline-block;
}

.shop-sidebar-nav a[href*="#all"] {
  font-family: 'Louize Display', serif;
  font-style: italic;
  font-size: 1.25rem;
  margin-bottom: var(--space-xs);
  color: var(--color-text-muted);
}

.shop-sidebar-nav a:hover,
.shop-sidebar-nav a.active {
  color: var(--color-crimson-dark);
  padding-left: 10px;
}

/* Hide bullet and remove padding for "All Pastries" */
.shop-sidebar-nav a[href*="#all"]:hover,
.shop-sidebar-nav a[href*="#all"].active {
  padding-left: 0;
}

.shop-sidebar-nav a::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  width: 4px;
  height: 4px;
  background: var(--color-crimson);
  border-radius: 50%;
  transform: translateY(-50%) scale(0);
  transition: transform var(--transition-fast);
}

.shop-sidebar-nav a.active::before {
  transform: translateY(-50%) scale(1);
}

.shop-sidebar-nav a[href*="#all"].active::before {
  transform: translateY(-50%) scale(0) !important;
}

/* Floating Mobile Category Bar */
.mobile-category-nav {
  display: none;
  position: sticky;
  top: var(--header-height);
  left: 0;
  right: 0;
  z-index: 900;
  background: rgba(255, 249, 240, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(184, 27, 27, 0.1);
  padding: 12px 0;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.mobile-category-nav::-webkit-scrollbar {
  display: none;
}

.mobile-category-nav-inner {
  display: flex;
  gap: 16px;
  padding: 0 var(--space-md);
  width: max-content;
}

.mobile-cat-link {
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-muted);
  padding: 6px 16px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(0, 0, 0, 0.05);
  background: var(--color-white);
  white-space: nowrap;
  transition: all var(--transition-base);
}

.mobile-cat-link[href*="#all"] {
  font-family: 'Louize Display', serif;
  text-transform: none;
  font-style: italic;
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0;
}

.mobile-cat-link.active {
  background: var(--color-crimson);
  color: var(--color-white);
  border-color: var(--color-crimson);
}

.shop-category {
  margin-bottom: var(--space-3xl);
  scroll-margin-top: calc(var(--header-height) + 60px);
}

.shop-category-header {
  margin-bottom: var(--space-xl);
  border-bottom: 1px solid rgba(184, 27, 27, 0.1);
  padding-bottom: var(--space-sm);
}

.shop-category-header h2 {
  font-family: 'Vintage Goods', serif;
  font-size: clamp(2.2rem, 5vw, 3.2rem);
  color: var(--color-crimson-dark);
  margin-bottom: 4px;
}

.shop-category-header h2::after {
  display: none;
}

.shop-category-header p {
  color: var(--color-text-muted);
  font-size: 1rem;
  font-style: italic;
  opacity: 0.9;
}

.shop-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-2xl) var(--space-lg);
}

@media (max-width: 1200px) {
  .shop-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.premium-product-card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  transition: transform var(--transition-base);
}

.premium-product-image {
  position: relative;
  aspect-ratio: 1 / 1.1;
  overflow: hidden;
  background: #fff;
  margin-bottom: var(--space-md);
  border: 1px solid rgba(184, 27, 27, 0.05);
  border-radius: var(--media-radius, 0px);
  transition: border-color 0.4s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.premium-product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
  border-radius: var(--media-radius, 0px);
}

.premium-product-card:hover .premium-product-image {
  border-color: rgba(184, 27, 27, 0.25);
  box-shadow: 0 8px 24px rgba(128, 24, 16, 0.08);
}

/* Badge System */
.product-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--color-crimson);
  color: var(--color-white);
  padding: 4px 10px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  z-index: 5;
}

.premium-add-cart {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  background-color: var(--color-crimson-dark, #7A1515);
  color: var(--color-white, #FFFFFF);
  border: none;
  text-align: center;
  padding: 14px;
  font-family: var(--font-heading);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  z-index: 5;
  
  /* Smooth entrance and hover transitions */
  transform: translateY(102%);
  opacity: 0;
  visibility: hidden;
  
  transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1), 
              opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1), 
              visibility 0.4s, 
              background-color 0.35s ease,
              letter-spacing 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.premium-product-card:hover .premium-add-cart {
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
}

.premium-add-cart:hover {
  background-color: #621010; /* Richer, deeper shade of crimson */
  color: var(--color-white, #FFFFFF);
  letter-spacing: 0.22em;
}

.premium-product-info {
  text-align: center;
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 0 5px; /* Added slight side padding for text safety */
}

.premium-product-info h3 {
  font-family: 'Louize Display', serif;
  font-size: 1.6rem;
  color: var(--color-text-primary);
  margin-bottom: 8px;
  line-height: 1.2;
  height: 2.4em; /* Hard-lock height to exactly 2 lines */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.premium-product-info p {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin-bottom: 15px;
  line-height: 1.5;
  height: 3em; /* Hard-lock height to exactly 2 lines */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.premium-product-price {
  font-family: var(--font-heading);
  font-weight: 500;
  color: var(--color-crimson);
  font-size: 1.1rem;
  margin-top: auto; /* Price is always at the absolute bottom of the info area */
  padding-top: 5px;
}

/* Mobile Quick Add */
.mobile-quick-add {
  display: none;
  position: absolute;
  bottom: 12px;
  right: 12px;
  width: 40px;
  height: 40px;
  background: var(--color-white);
  border-radius: 50%;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  align-items: center;
  justify-content: center;
  z-index: 10;
  color: var(--color-crimson-dark);
}

@media (max-width: 1024px) {
  .shop-layout {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }

  .shop-sidebar {
    display: none;
  }

  .mobile-category-nav {
    display: block;
  }

  .shop-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-lg) var(--space-sm);
  }

  .premium-product-image {
    aspect-ratio: 1 / 1.2;
  }

  .mobile-quick-add {
    display: flex;
  }

  .premium-add-cart {
    display: none;
  }

  .premium-product-info h3 {
    font-size: 1.3rem;
  }
}

@media (max-width: 480px) {
  .shop-grid {
    gap: var(--space-md) 10px;
  }
  
  .premium-product-info h3 {
    font-size: 1.1rem;
  }

  .premium-product-info p {
    font-size: 0.75rem;
    margin-bottom: 6px;
  }

  .premium-product-price {
    font-size: 0.95rem;
  }
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-lg);
}

.product-card {
  background: var(--color-white);
  border-radius: 0;
  overflow: hidden;
  transition: all var(--transition-base);
  cursor: pointer;
  border: 1px solid #E8E2D9;
}

.product-card:hover {
  transform: translateY(-2px);
  box-shadow: 0px 4px 15px rgba(0, 0, 0, 0.05);
}

.product-card-image {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: var(--color-rose-light);
  border-radius: var(--media-radius, 0px);
}

.product-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
  border-radius: var(--media-radius, 0px);
}

.product-card:hover .product-card-image img {
  transform: scale(1.03);
}

.product-card-add {
  position: absolute;
  bottom: 12px;
  right: 12px;
  width: 44px;
  height: 44px;
  background: var(--color-white);
  color: var(--color-text-primary);
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  font-weight: 300;
  opacity: 0;
  transform: translateY(4px);
  transition: all var(--transition-base);
}

.product-card:hover .product-card-add {
  opacity: 1;
  transform: translateY(0);
}

.product-card-add:hover {
  background: rgba(0, 0, 0, 0.03);
}

.product-card-info {
  padding: var(--space-md);
  text-align: center;
}

.product-card-info h3 {
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--color-text-primary);
  margin-bottom: 4px;
}

.product-card-info .product-desc {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  margin-bottom: 8px;
}

.product-card-info .product-price {
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--color-crimson);
}

.products-cta {
  text-align: center;
  margin-top: var(--space-xl);
}

.view-more-link {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-crimson);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 2px;
  border-bottom: 1.5px solid var(--color-crimson);
  transition: all var(--transition-base);
}

.view-more-link:hover {
  gap: 14px;
  color: var(--color-crimson-dark);
  border-color: var(--color-crimson-dark);
}

/* ===================================================================
   ABOUT / STORY SECTION
   =================================================================== */
.story-section {
  background: var(--bg-dark);
  color: var(--color-text-on-dark);
  padding: var(--space-3xl) 0;
  position: relative;
  overflow: hidden;
}

.story-section::before {
  content: '';
  position: absolute;
  top: -80px;
  right: -80px;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(243, 210, 208, 0.08) 0%, transparent 70%);
  border-radius: 50%;
}

.story-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xl);
  align-items: center;
}

.story-image {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 4/3;
}

.story-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: var(--space-lg);
}

.story-text .section-label {
  color: var(--color-rose);
}

.story-text h2 {
  color: var(--color-white);
  margin-bottom: var(--space-md);
}

.story-text p {
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: var(--space-lg);
  max-width: 480px;
  line-height: 1.8;
}

/* ===================================================================
   NETWORK SECTION
   =================================================================== */
.network-section {
  padding: var(--space-3xl) 0;
  background: var(--bg-section-alt);
  text-align: center;
}

.network-section .section-header h2 {
  color: var(--color-crimson-dark);
}

.network-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
  max-width: 1100px;
  margin: 0 auto;
}

.network-card {
  background: var(--color-white);
  padding: var(--space-xl);
  border-radius: 0;
  border: 1px solid rgba(0, 0, 0, 0.1);
  text-align: center;
  transition: all var(--transition-base);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.network-card:hover {
  transform: translateY(-2px);
  box-shadow: 0px 4px 15px rgba(0, 0, 0, 0.05);
}

.network-card:hover .view-more-link {
  gap: 14px;
  color: var(--color-crimson-dark);
  border-color: var(--color-crimson-dark);
}

.network-card h3 {
  font-family: 'Louize Display', serif;
  font-size: 1.6rem;
  color: var(--color-crimson-dark);
  margin-bottom: var(--space-sm);
  line-height: 1.2;
}

.network-card p {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  margin-bottom: var(--space-lg);
  line-height: 1.6;
  max-width: 280px;
}

.network-card .view-more-link {
  margin-top: auto;
  padding-top: 10px;
}

/* ===================================================================
   FOOTER
   =================================================================== */
.site-footer {
  background: var(--bg-page);
  color: rgba(0, 0, 0, 0.75);
  padding: 80px 0 40px;
  font-family: var(--font-heading);
  border-top: 1px solid rgba(184, 27, 27, 0.08);
}

@media (max-width: 1024px) {
  .site-footer {
    padding-left: var(--space-md);
    padding-right: var(--space-md);
  }
}

.footer-block h2,
.footer-block p:nth-child(odd) {
  font-family: var(--font-heading);
  font-size: 11.5px;
  font-weight: 400;
  color: #1c1c1c;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--space-sm);
}

.footer-block p {
  font-family: var(--font-heading);
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: var(--space-sm);
  color: rgba(0, 0, 0, 0.75);
}

.footer-links li {
  margin-bottom: 8px;
}

.footer-links a {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: 14px;
  color: rgba(0, 0, 0, 0.75);
  transition: color var(--transition-fast);
  text-transform: uppercase;
}

.footer-links a:hover {
  color: #1c1c1c;
}

.footer-social-icons {
  display: flex;
  gap: var(--space-sm);
}

.footer-social-icons a {
  width: 40px;
  height: 40px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(0, 0, 0, 0.75);
  transition: all var(--transition-base);
}

.footer-social-icons a:hover {
  background: var(--color-crimson);
  border-color: var(--color-crimson);
  color: var(--color-white);
  transform: translateY(-2px);
}

.footer-social-icons svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.footer-brand-block {
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
}

.footer-brand-block img {
  max-width: 150px;
  height: auto;
  opacity: 0.8;
}

.footer-bottom {
  border-top: 1px solid rgba(0, 0, 0, 0.1);
  padding-top: var(--space-md);
  margin-top: var(--space-lg);
  text-align: center;
  font-family: var(--font-body);
  font-size: 0.85rem;
  color: #696b66;
  opacity: 0.8;
  letter-spacing: 0.05em;
}

.footer-credit-link {
  color: inherit;
  text-decoration: none;
  transition: opacity var(--transition-base);
}

.footer-credit-link:hover {
  text-decoration: underline;
  opacity: 1;
}

/* ===================================================================
   PRODUCT MODAL
   =================================================================== */
.product-modal {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-md);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.product-modal.open {
  opacity: 1;
  visibility: visible;
}

.product-modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(59, 18, 16, 0.6);
  backdrop-filter: blur(4px);
}

.product-modal-content {
  position: relative;
  background: var(--color-white);
  width: 900px; /* Fixed width on desktop */
  height: 500px; /* Fixed height on desktop to prevent uncanny resizing */
  max-width: 95vw;
  border-radius: 0;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
  transform: translateY(30px) scale(0.95);
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 2;
}

.product-modal.open .product-modal-content {
  transform: translateY(0) scale(1);
}

.product-modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  z-index: 10;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-white);
  border-radius: 50%;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.product-modal-close:hover {
  transform: rotate(90deg);
  color: var(--color-crimson);
}

.product-modal-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  height: 100%;
}

.product-modal-image {
  background: #f9f9f9;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%; /* Adapts to parent container height */
}

.product-modal-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-modal-info {
  padding: var(--space-2xl);
  display: flex;
  flex-direction: column;
  justify-content: center; /* Center vertically for a premium feel */
}

.product-modal-info h2 {
  font-family: 'Louize Display', serif;
  font-size: 2.5rem;
  margin-bottom: 10px;
  color: var(--color-text-primary);
}

.modal-price {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--color-crimson);
  margin-bottom: 20px;
}

.modal-desc {
  font-size: 1rem;
  color: var(--color-text-muted);
  line-height: 1.7;
  margin-bottom: 40px;
  flex-grow: 0; /* Don't let description grow too much */
}

.modal-actions {
  display: flex;
  gap: 20px;
  align-items: center;
  height: 48px;
  margin-top: auto;
}

.quantity-selector {
  display: flex;
  align-items: center;
  border: 1px solid rgba(0, 0, 0, 0.1);
  height: 100%;
  flex-shrink: 0; /* Prevent resizing */
}

.qty-btn {
  width: 44px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  transition: background 0.2s;
}

.qty-btn:hover {
  background: rgba(0, 0, 0, 0.05);
}

#qty-input {
  width: 40px;
  border: none;
  text-align: center;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1.1rem;
  background: transparent;
}

#qty-input::-webkit-inner-spin-button,
#qty-input::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.btn-add-confirm {
  background: var(--color-crimson-dark);
  color: var(--color-white);
  height: 100%;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  width: 160px; /* Fixed width to prevent any horizontal resizing when text changes */
  flex-shrink: 0;
  justify-content: center;
}

@media (max-width: 1024px) {
  .product-modal {
    padding: 10px;
  }

  .product-modal-content {
    width: 100%;
    max-width: 450px;
    max-height: 85vh;
    height: auto;
    overflow-y: auto;
    border-radius: var(--radius-md);
  }
  
  .product-modal-inner {
    display: flex;
    flex-direction: column;
    height: auto;
  }
  
  .product-modal-image {
    height: 300px; /* Increased from 200px for better tablet viewing while still fitting mobile */
    flex-shrink: 0;
  }
  
  .product-modal-info {
    padding: var(--space-lg);
    justify-content: flex-start;
  }
  
  .product-modal-info h2 {
    font-size: 1.5rem;
    margin-bottom: 8px;
  }

  .modal-price {
    font-size: 1.25rem;
    margin-bottom: 12px;
  }

  .modal-desc {
    font-size: 0.9rem;
    margin-bottom: 25px;
    line-height: 1.5;
  }

  .modal-actions {
    flex-direction: row;
    gap: 10px;
    height: 44px;
    margin-top: 0;
  }

  .quantity-selector {
    height: 100%;
  }

  .qty-btn {
    width: 36px;
  }

  .btn-add-confirm {
    flex: 1;
    width: auto;
    height: 100%;
    font-size: 0.85rem;
  }

  .product-modal-close {
    top: 10px;
    right: 10px;
    width: 32px;
    height: 32px;
  }
}

/* Category Filtering Animation */
@keyframes categoryFadeIn {
  from {
    opacity: 0;
    transform: translateY(15px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.category-animate {
  animation: categoryFadeIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* ===================================================================
   ANIMATIONS
   =================================================================== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

/* Scroll-triggered reveal */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Staggered children */
.reveal-stagger>* {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.reveal-stagger.visible>*:nth-child(1) {
  transition-delay: 0.05s;
}

.reveal-stagger.visible>*:nth-child(2) {
  transition-delay: 0.15s;
}

.reveal-stagger.visible>*:nth-child(3) {
  transition-delay: 0.25s;
}

.reveal-stagger.visible>*:nth-child(4) {
  transition-delay: 0.35s;
}

.reveal-stagger.visible>* {
  opacity: 1;
  transform: translateY(0);
}

/* ===================================================================
   RESPONSIVE
   =================================================================== */
@media (max-width: 1024px) {
  .shop-layout {
    grid-template-columns: 1fr;
    gap: var(--space-xl);
  }

  .shop-sidebar {
    position: relative;
    top: 0;
    padding-right: 0;
    border-bottom: 1px solid #E8E2D9;
    padding-bottom: var(--space-md);
    display: none;
  }

  .shop-sidebar-nav {
    flex-direction: row;
    flex-wrap: wrap;
    gap: var(--space-md);
  }

  .products-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .collections-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .studio-inner,
  .story-inner {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }

  .footer-brand-block {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }

  .header-inner {
    padding: 0 16px;
    grid-template-columns: 1fr auto 1fr;
  }

  .header-logo img {
    height: 48px;
  }

  .nav-links {
    display: none;
  }

  .nav-actions {
    gap: 12px;
  }

  .mobile-toggle {
    display: flex;
  }

  .desktop-only {
    display: none !important;
  }

  /* Mobile nav full screen (under header) */
  .mobile-nav {
    display: flex;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 100%;
    background: #f0f2ed;
    z-index: 999;
    flex-direction: column;
    transform: translateX(-100%);
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  }

  .mobile-nav.open {
    transform: translateX(0);
  }

  /* Drawer nav links */
  .mobile-nav-links {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: var(--header-height) 0 0;
    /* Clear the header */
    overflow-y: auto;
  }

  .mobile-nav-links>a,
  .mobile-nav-dropdown-header>a {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 400;
    color: #1c1c1c;
    text-decoration: none;
    padding: 16px 24px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    opacity: 0;
    transform: translateX(-20px);
    transition: opacity 0.35s ease, transform 0.35s ease, background 0.2s ease;
  }

  .mobile-nav-links>a:first-child {
    border-top: 1px solid rgba(0, 0, 0, 0.08);
  }

  .mobile-nav-links a:hover {
    background: rgba(0, 0, 0, 0.03);
  }

  .mobile-nav-links a.active,
  .mobile-nav-dropdown-header>a.active,
  .mobile-sublink.active {
    color: var(--color-crimson) !important;
    font-weight: 700 !important;
    background: rgba(184, 27, 27, 0.05) !important;
  }

  .mobile-nav-dropdown-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  }

  .mobile-nav-dropdown-header>a {
    border-bottom: none;
    flex: 1;
  }

  .mobile-dropdown-toggle {
    padding: 16px 24px;
    background: transparent;
    border: none;
    color: #1c1c1c;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .mobile-dropdown-toggle svg {
    transition: transform 0.3s ease;
  }

  .mobile-nav-dropdown.open .mobile-dropdown-toggle svg {
    transform: rotate(180deg);
  }

  .mobile-dropdown-content {
    display: none;
    flex-direction: column;
  }

  .mobile-nav-dropdown.open .mobile-dropdown-content {
    display: flex;
  }

  .mobile-nav-dropdown .mobile-sublink {
    font-size: 0.95rem;
    padding: 12px 24px 12px 40px;
    color: #1c1c1c;
    text-decoration: none;
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
    background: rgba(0, 0, 0, 0.015);
  }

  .mobile-nav.open .mobile-nav-links>a,
  .mobile-nav.open .mobile-nav-dropdown-header>a {
    opacity: 1;
    transform: translateX(0);
  }

  .mobile-nav.open .mobile-nav-links>a:nth-child(1) {
    transition-delay: 0.08s;
  }

  .mobile-nav.open .mobile-nav-dropdown {
    transition-delay: 0.12s;
  }

  .mobile-nav.open .mobile-nav-dropdown-header>a {
    transition-delay: 0.12s;
  }

  .mobile-nav.open .mobile-nav-links>a:nth-child(3) {
    transition-delay: 0.16s;
  }

  .mobile-nav.open .mobile-nav-links>a:nth-child(4) {
    transition-delay: 0.2s;
  }

  /* Drawer footer with Login */
  .mobile-nav-footer {
    padding: 20px 24px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    background: #ebece8;
    opacity: 0;
    transform: translateX(-20px);
    transition: opacity 0.35s ease 0.3s, transform 0.35s ease 0.3s;
  }

  .mobile-nav.open .mobile-nav-footer {
    opacity: 1;
    transform: translateX(0);
  }

  .mobile-login-link {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: var(--font-heading);
    font-size: 1rem;
    color: #1c1c1c;
    text-decoration: none;
    transition: opacity 0.2s ease;
  }

  .mobile-login-link:hover {
    opacity: 0.6;
  }

  .hero-content h1 {
    font-size: clamp(2.2rem, 8vw, 3.2rem);
  }

  .products-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-sm);
  }

  .network-cards {
    grid-template-columns: 1fr;
  }

  section {
    padding: var(--space-2xl) 0;
  }

  .btn {
    padding: 10px 16px;
    min-height: 40px;
    font-size: 0.8rem;
    letter-spacing: 0.05em;
  }
}

@media (max-width: 480px) {
  .products-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
  
  .product-card-info {
    padding: var(--space-sm) 8px;
  }
  
  .product-card-info h3 {
    font-size: 0.9rem;
  }
  
  .product-card-info .product-desc {
    font-size: 0.75rem;
    margin-bottom: 6px;
    line-height: 1.2;
  }
  
  .product-card-info .product-price {
    font-size: 0.85rem;
  }
  
  .product-card-add {
    width: 32px;
    height: 32px;
    font-size: 1.2rem;
    bottom: 8px;
    right: 8px;
  }

  .collections-grid {
    grid-template-columns: 1fr;
  }

  .btn {
    padding: 8px 14px;
    min-height: 36px;
    font-size: 0.75rem;
    letter-spacing: 0.04em;
  }
}

/* ===================================================================
   MENU & PAGE HERO
   =================================================================== */
.page-hero {
  background: var(--bg-dark);
  padding: calc(var(--header-height) + var(--space-xl)) 0 var(--space-xl);
  text-align: center;
  color: var(--color-white);
}

.page-hero h1 {
  font-family: 'Vintage Goods', serif;
  color: var(--color-white);
  margin-bottom: var(--space-sm);
}

.page-hero p {
  color: rgba(255, 255, 255, 0.8);
  max-width: 600px;
  margin: 0 auto;
}

.menu-category {
  padding: var(--space-3xl) 0;
}

.menu-category:nth-of-type(even) {
  background: var(--bg-section-alt);
}

/* ===================================================================
   CART SLIDE-OUT PANEL
   =================================================================== */
.cart-panel {
  position: fixed;
  inset: 0;
  z-index: 2000;
  pointer-events: none;
  visibility: hidden;
  transition: visibility 0.4s;
}

.cart-panel.open {
  pointer-events: all;
  visibility: visible;
  transition: visibility 0s;
}

.cart-panel-overlay {
  position: absolute;
  inset: 0;
  background: rgba(59, 18, 16, 0.4);
  opacity: 0;
  transition: opacity var(--transition-base);
  backdrop-filter: blur(2px);
}

.cart-panel.open .cart-panel-overlay {
  opacity: 1;
}

.cart-panel-content {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 400px;
  max-width: 90vw;
  background: var(--color-white);
  box-shadow: -4px 0 30px rgba(0, 0, 0, 0.12);
  transform: translateX(100%);
  transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  display: flex;
  flex-direction: column;
}

.cart-panel.open .cart-panel-content {
  transform: translateX(0);
}

.cart-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-md) var(--space-lg);
  border-bottom: 1px solid rgba(166, 35, 25, 0.1);
}

.cart-panel-header h3 {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  color: var(--color-text-primary);
}

.cart-panel-close {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background var(--transition-fast);
  color: var(--color-text-primary);
}

.cart-panel-close:hover {
  background: var(--color-rose-light);
}

.cart-panel-body {
  flex: 1;
  padding: var(--space-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden; /* Let the internal .cart-items-list scroll */
}

.cart-empty-msg {
  font-size: 0.95rem;
  color: var(--color-text-muted);
  text-align: center;
}

/* ===================================================================
   CUTESY PAGE SPECIFIC STYLES (Studio & About)
   =================================================================== */

/* Page Hero */
.page-hero {
  position: relative;
  height: 40svh;
  min-height: 350px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  padding-top: var(--header-height);
  background-color: var(--color-crimson-dark);
}

.page-hero .hero-bg img {
  opacity: 0.7;
}

.page-hero .hero-content h1 {
  font-family: 'Vintage Goods', serif;
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 300;
  color: var(--color-white);
  line-height: 1.15;
  font-style: italic;
  animation: fadeInUp 1s ease-out;
}

/* Page Content Base */
.page-content-section {
  padding: var(--space-3xl) 20px;
  background-color: var(--bg-page);
  position: relative;
}

/* Cutesy Card Utility */
.cutesy-card {
  background-color: var(--color-white);
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 0;
  padding: 40px;
  transition: transform 0.3s ease;
}

.cutesy-link {
  color: var(--color-crimson-dark);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 4px;
  transition: color 0.3s ease;
}

.cutesy-link:hover {
  color: var(--color-crimson);
}

.hero-buttons {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
  justify-content: center;
}

.hero-buttons--left {
  justify-content: flex-start;
}

@media (max-width: 768px) {
  .hero-buttons--left {
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .hero-buttons {
    flex-direction: column;
    align-items: stretch;
  }
  
  .hero-buttons .btn {
    width: 100%;
    justify-content: center;
  }
}

.about-content-section {
  padding-top: calc(var(--header-height) + var(--space-xl));
}

@media (max-width: 768px) {
  .about-content-section {
    padding-top: calc(var(--header-height) + var(--space-lg));
  }
}

/* Studio Page Specifics */
.intro-desc {
  text-align: center;
  max-width: 650px;
  margin: 0 auto;
}

.intro-desc p {
  font-size: 1.1rem;
  margin-bottom: var(--space-md);
  color: var(--color-text-secondary);
}

.enhanced-form-container h2 {
  font-family: var(--font-heading);
  margin-bottom: 25px;
  color: var(--color-crimson-dark);
  font-size: 28px;
  text-align: center;
}

.order-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-align: left;
}

.form-group label {
  font-family: var(--font-body);
  font-size: 0.9em;
  font-weight: 600;
  color: var(--color-crimson-dark);
  letter-spacing: 0.5px;
}

.order-form input,
.order-form select,
.order-form textarea {
  padding: 14px 16px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 0;
  font-family: inherit;
  font-size: 0.95em;
  width: 100%;
  box-sizing: border-box;
  background-color: var(--color-white);
  color: var(--color-crimson-dark);
  transition: all 0.3s ease;
  appearance: none;
}

.order-form textarea {
  border-radius: 0;
}

.order-form input:focus,
.order-form select:focus,
.order-form textarea:focus {
  outline: none;
  border-color: var(--color-crimson-dark);
  box-shadow: 0px 4px 15px rgba(0, 0, 0, 0.05);
  background-color: var(--color-white);
}

.select-wrapper {
  position: relative;
}

.select-wrapper::after {
  content: '?';
  font-size: 12px;
  color: var(--color-crimson-dark);
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
}

.order-form .btn {
  color: var(--color-crimson-dark);
  border-color: var(--color-crimson-dark);
  background: var(--color-gold);
}

.order-form .btn:hover {
  background: var(--color-crimson-dark);
  color: var(--color-white);
}

.studio-field-error {
  display: block;
  color: #c1251d;
  font-size: 12px;
  font-weight: 500;
  margin-top: 4px;
  padding-left: 10px;
}

.studio-input-error {
  border-color: #c1251d !important;
}

.studio-success-overlay {
  display: none;
  position: absolute;
  inset: 0;
  z-index: 10;
  background: rgba(255, 255, 255, 0.95);
  border-radius: var(--radius-lg);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.studio-success-overlay.visible {
  display: flex;
  opacity: 1;
}

.studio-success-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--color-white);
  border: 1px solid rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-crimson-dark);
  font-size: 32px;
  animation: successPop 0.4s ease;
  box-shadow: 0px 4px 15px rgba(0, 0, 0, 0.05);
}

@keyframes successPop {
  0% {
    transform: scale(0);
  }

  60% {
    transform: scale(1.15);
  }

  100% {
    transform: scale(1);
  }
}

.studio-success-text {
  font-family: var(--font-heading);
  font-size: 24px;
  color: var(--color-crimson-dark);
}

.studio-success-subtext {
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--color-text-secondary);
  max-width: 360px;
  text-align: center;
}

/* About Page Specifics */
.about-content-block {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

@media(min-width: 900px) {
  .about-content-block {
    flex-direction: row;
    align-items: center;
  }

  .about-content-block.reverse {
    flex-direction: row-reverse;
  }

  .about-content-block .text-content,
  .about-content-block .image-content {
    width: 50%;
  }
}

.about-content-block h2 {
  font-size: 36px;
  margin-bottom: 20px;
  color: var(--color-crimson-dark);
}

.about-content-block p {
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.8;
  color: var(--color-text-secondary);
  margin-bottom: 20px;
}

/* ===================================================================
   FEATURED PRODUCT SECTION
   =================================================================== */
.featured-product-section {
  padding: 60px 0;
  background-color: var(--color-white);
}

.featured-product-inner {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

@media (min-width: 900px) {
  .featured-product-inner {
    flex-direction: row;
    align-items: center;
  }
}

.featured-product-image {
  flex: 1;
}

.featured-product-image img {
  width: 100%;
  height: auto;
  object-fit: cover;
  border: 1px solid rgba(0, 0, 0, 0.1);
}

.featured-product-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 20px 0;
}

@media (min-width: 900px) {
  .featured-product-content {
    padding: 20px 40px;
  }
}

.featured-product-badge {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-text-muted);
}

.featured-product-title {
  font-family: var(--font-heading);
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-style: italic;
  font-weight: 400;
  line-height: 1.1;
  color: var(--color-crimson-dark);
}

.featured-product-desc {
  font-size: 1.1rem;
  color: var(--color-text-primary);
  max-width: 500px;
}

.featured-product-price {
  font-size: 1.25rem;
  font-weight: 600;
}

/* ===================================================================
   PAGINATION
   =================================================================== */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 15px;
  margin-top: 60px;
  margin-bottom: 60px;
  padding-top: 40px;
  border-top: 1px solid rgba(0,0,0,0.1);
}

.page-link {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(0,0,0,0.1);
  color: var(--color-text-primary);
  text-decoration: none;
  transition: all var(--transition-base);
  font-size: 0.9rem;
}

.page-link:hover,
.page-link.active {
  background-color: var(--color-crimson-dark);
  color: var(--color-white);
  border-color: var(--color-crimson-dark);
}

/* ===================================================================
   ICONICS SECTION
   =================================================================== */
.iconics-layout {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

@media (min-width: 900px) {
  .iconics-layout {
    flex-direction: row;
    align-items: flex-start;
  }
  .iconics-header-col {
    flex: 0 0 250px;
  }
}

.iconics-carousel {
  display: flex;
  gap: 2px;
  overflow-x: auto;
  padding-bottom: 20px;
  scrollbar-width: none; /* Hide scrollbar for Firefox */
  -ms-overflow-style: none; /* Hide scrollbar for IE/Edge */
}

.iconics-carousel::-webkit-scrollbar {
  display: none; /* Hide scrollbar for Chrome/Safari */
}

.iconic-item {
  flex: 0 0 280px;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

@media (min-width: 900px) {
  .iconic-item {
    flex: 0 0 320px;
  }
}

.iconic-image {
  width: 100%;
  aspect-ratio: 3/4;
  overflow: hidden;
}

.iconic-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s ease;
}

.iconic-item:hover .iconic-image img {
  transform: scale(1.05);
}

.iconic-info {
  text-align: left;
}

.iconic-info h3 {
  font-family: var(--font-heading);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 5px;
  font-weight: 600;
}

.iconic-price {
  font-family: var(--font-body);
  font-size: 0.8rem;
  color: var(--color-text-muted);
}

/* ===================================================================
   FOOTER
   =================================================================== */
.footer-grid {
  display: flex;
  flex-direction: column;
  gap: 60px;
  text-align: left;
}

@media (min-width: 640px) {
  .footer-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px var(--space-xl);
  }
}

@media (max-width: 639px) {
  .site-footer {
    text-align: center;
    padding: 60px 0 40px;
  }

  .footer-grid {
    gap: 50px;
  }

  .footer-nav {
    align-items: center;
  }

  .footer-content {
    gap: 40px;
  }

  .footer-text-block p {
    margin: 0 auto;
    max-width: 90%;
  }
}

.footer-nav {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.footer-nav a {
  font-family: var(--font-body);
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  color: var(--color-text-primary);
  text-decoration: none;
  transition: opacity var(--transition-base);
}

.footer-nav a:hover {
  opacity: 0.7;
}

.footer-content {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.footer-nav-block h3,
.footer-text-block h3 {
  font-family: var(--font-heading);
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  margin-bottom: 20px;
  font-weight: 600;
  text-transform: uppercase;
}

.footer-text-block p {
  font-family: var(--font-body);
  font-size: 0.85rem;
  line-height: 1.8;
  color: var(--color-text-secondary);
  max-width: 750px;
}

/* ===================================================================
   NEWSLETTER SECTION
   =================================================================== */
.newsletter-section {
  background: var(--color-cream);
  padding: var(--space-xl) 0; /* Reduced height from 3xl */
  text-align: center;
  position: relative;
  overflow: hidden;
  border-top: 1px solid rgba(184, 27, 27, 0.05);
}

.newsletter-inner {
  max-width: 600px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

.newsletter-content h2 {
  font-family: 'Louize Display', serif;
  font-style: italic;
  font-size: clamp(2rem, 4vw, 2.8rem);
  color: var(--color-crimson-dark);
  margin-bottom: 4px;
}

.newsletter-content h2::after {
  margin-left: auto;
  margin-right: auto;
}

.newsletter-content p {
  color: var(--color-text-muted);
  margin-bottom: var(--space-lg);
  font-size: 1rem;
}

.newsletter-form {
  width: 100%;
}

.newsletter-form .input-group {
  display: flex;
  gap: 12px; /* Changed from 0 to gap for the new button style */
  background: transparent;
  padding: 0;
  border: none;
  box-shadow: none;
}

.newsletter-form input {
  flex: 1;
  padding: 12px 18px;
  border: 1px solid rgba(128, 24, 16, 0.2);
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--color-crimson-dark);
  background: var(--color-white);
  transition: border-color var(--transition-fast);
}

.newsletter-form input:focus {
  outline: none;
  border-color: var(--color-crimson-dark);
}

/* Matching the site's premium button vibe */
.newsletter-form .btn {
  --btn-color: var(--color-crimson-dark);
  --btn-hover-text: var(--color-white);
  padding: 0 35px;
  min-height: 48px;
  background-color: transparent;
}

.newsletter-doodle {
  position: absolute;
  top: -10px;
  right: -40px;
  width: 220px;
  opacity: 0.08;
  pointer-events: none;
  z-index: 1;
  transform: rotate(15deg);
}

@media (max-width: 768px) {
  .newsletter-section {
    padding: var(--space-lg) 0;
  }

  .newsletter-form .input-group {
    flex-direction: column;
    gap: 12px;
  }

  .newsletter-form input {
    padding: 14px 18px;
  }

  .newsletter-form .btn {
    width: 100%;
  }

  .newsletter-doodle {
    top: -30px;
    right: -10px;
    width: 130px;
  }
}

/* ===================================================================
   ENHANCED CART & A11Y STYLES
   =================================================================== */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.tsmb-cart-items-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  width: 100%;
  max-height: 100%;
  overflow-y: auto;
  padding-bottom: 20px;
}

.tsmb-cart-item-row {
  display: flex;
  align-items: center;
  gap: 15px;
  padding-bottom: 15px;
  border-bottom: 1px solid rgba(0,0,0,0.05);
}

.tsmb-cart-item-img {
  width: 70px;
  height: 70px;
  object-fit: cover;
  background: var(--color-rose-light);
}

.tsmb-cart-item-details {
  flex: 1;
}

.tsmb-cart-item-details h4 {
  font-family: var(--font-heading);
  font-size: 1rem;
  margin-bottom: 4px;
  color: var(--color-crimson-dark);
}

.tsmb-cart-item-price {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin-bottom: 8px;
}

.tsmb-cart-item-qty-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(0,0,0,0.1);
  width: fit-content;
  height: 30px;
}

.tsmb-cart-item-qty-controls .qty-btn {
  width: 30px;
  height: 100%;
  font-size: 1rem;
}

.tsmb-cart-item-qty-val {
  font-family: var(--font-heading);
  font-size: 0.9rem;
  min-width: 20px;
  text-align: center;
}

.tsmb-cart-item-remove {
  font-size: 1.5rem;
  color: var(--color-text-muted);
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color var(--transition-fast);
}

.tsmb-cart-item-remove:hover {
  color: var(--color-crimson);
}

.cart-footer-summary {
  margin-top: auto;
  padding-top: 20px;
  border-top: 1px solid rgba(0,0,0,0.1);
  width: 100%;
}

.cart-subtotal {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--color-crimson-dark);
  margin-bottom: 20px;
}

.btn-checkout {
  width: 100%;
  background: var(--color-crimson-dark);
  color: var(--color-white);
  padding: 15px;
  font-size: 1rem;
  --btn-color: var(--color-white);
}

.btn-checkout:hover {
  background: var(--color-crimson);
}

/* Magnetic Button Transition base */
.btn-outline, .btn-outline-dark {
  transition: transform 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94), color 0.45s cubic-bezier(0.785, 0.135, 0.15, 0.86), background 0.45s;
}

/* ===================================================================
   SEARCH OVERLAY
   =================================================================== */
.search-overlay {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: flex;
  flex-direction: column;
  pointer-events: none;
  visibility: hidden;
  transition: visibility 0.4s;
}

.search-overlay.open {
  pointer-events: all;
  visibility: visible;
  transition: visibility 0s;
}

.search-overlay-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity 0.4s ease;
}

.search-overlay.open .search-overlay-backdrop {
  opacity: 1;
}

.search-overlay-content {
  position: relative;
  background: var(--color-white);
  width: 100%;
  height: auto;
  max-height: 85vh;
  transform: translateY(-100%);
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
}

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

.search-overlay-top {
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  padding: 30px 0;
}

.search-input-wrapper {
  display: flex;
  align-items: center;
  position: relative;
}

.search-prompt-text {
  font-family: 'Louize Display', serif;
  font-style: italic;
  font-size: 1.6rem;
  color: var(--color-crimson-dark);
  padding-right: 15px;
  white-space: nowrap;
}

#search-input {
  flex: 1;
  border: none;
  font-family: var(--font-body);
  font-size: 1.2rem;
  color: var(--color-text-primary);
  background: transparent;
  outline: none;
}

#search-input::placeholder {
  color: rgba(0, 0, 0, 0.2);
}

.search-close {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-primary);
  transition: all 0.3s ease;
}

.search-close:hover {
  color: var(--color-crimson);
  transform: scale(1.1);
}

.search-results-container {
  flex: 1;
  overflow-y: auto;
  padding: 40px 0;
  background: var(--color-white);
}

.search-layout-split {
  display: grid;
  grid-template-columns: 250px 1fr;
  gap: 60px;
}

.search-sidebar-left {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.search-group-title {
  font-family: var(--font-heading);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-text-primary);
  margin-bottom: 20px;
  font-weight: 500;
}

.search-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.search-list li a {
  font-family: var(--font-heading);
  font-size: 1rem;
  color: var(--color-text-primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.search-list li a:hover {
  color: var(--color-crimson);
}

.search-main-right {
  display: flex;
  flex-direction: column;
}

.search-products-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.search-empty-state {
  text-align: center;
  font-family: var(--font-heading);
  font-size: 1.2rem;
  color: var(--color-text-muted);
  padding: 40px 0;
  font-style: italic;
}

/* Search Product Card */
.search-product-card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  transition: opacity var(--transition-fast);
}

.search-product-card:hover {
  opacity: 0.8;
}

.search-product-image {
  aspect-ratio: 3/4; /* Taller editorial look */
  overflow: hidden;
  background: var(--color-rose-light);
  margin-bottom: 15px;
  border-radius: var(--media-radius, 0px) !important;
}

.search-product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--media-radius, 0px) !important;
}

.search-product-info {
  text-align: left;
}

.search-product-info h3 {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-primary);
  margin-bottom: 5px;
}

.search-product-info .price {
  display: none; /* Hide price to match reference image clean look */
}

/* ===================================================================
   404 ERROR PAGE
   =================================================================== */
.error-404-section {
  padding: 120px 0 100px;
  text-align: center;
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-page);
}

.error-404-content {
  max-width: 600px;
  margin: 0 auto;
  position: relative;
}

.error-404-num {
  font-family: 'Louize Display', serif;
  font-style: italic;
  font-size: clamp(8rem, 20vw, 12rem);
  color: var(--color-crimson-dark);
  line-height: 0.8;
  margin-bottom: 20px;
  opacity: 0.1;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  z-index: 0;
  pointer-events: none;
}

.error-404-text {
  position: relative;
  z-index: 1;
}

.error-404-text h1 {
  font-family: 'Louize Display', serif;
  font-style: italic;
  font-size: 2.5rem;
  color: var(--color-crimson-dark);
  margin-bottom: 15px;
}

.error-404-text p {
  font-size: 1.1rem;
  color: var(--color-text-muted);
  margin-bottom: 40px;
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
}

.error-404-actions {
  display: flex;
  gap: 15px;
  justify-content: center;
}

.error-404-doodle {
  width: 120px;
  margin-bottom: 30px;
  opacity: 0.8;
}

@media (max-width: 768px) {
  .error-404-section {
    padding: 100px 20px;
  }
  
  .error-404-text h1 {
    font-size: 2rem;
  }
  
  .error-404-actions {
    flex-direction: column;
    width: 100%;
    max-width: 250px;
    margin: 0 auto;
  }
}

@media (max-width: 1024px) {
  .search-layout-split {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  
  .search-sidebar-left {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 60px;
  }
  
  .search-products-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
  }
}

@media (max-width: 768px) {
  .search-overlay-content {
    height: 100svh;
    max-height: 100svh;
  }
  
  .search-prompt-text {
    font-size: 1.2rem;
  }
  
  .search-sidebar-left {
    flex-direction: column;
    gap: 30px;
  }

  .search-products-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .search-product-card {
    flex-direction: row;
    align-items: center;
    gap: 15px;
  }

  .search-product-image {
    width: 70px;
    height: 70px;
    aspect-ratio: 1 / 1;
    margin-bottom: 0;
    flex-shrink: 0;
  }

  .search-product-info h3 {
    font-size: 0.85rem;
    letter-spacing: 0.02em;
  }
}

@media (max-width: 480px) {
  .search-products-grid {
    gap: 10px;
  }

  .search-product-info h3 {
    font-size: 0.85rem;
  }
}
/* ===================================================================
   CONTACT SECTION SPECIFICS (ABOUT PAGE)
   =================================================================== */
.contact-section {
  padding: 40px 0;
}

.contact-heading {
  font-size: 2rem;
  font-style: italic;
  color: var(--color-crimson-dark);
  margin-bottom: 10px;
}

.contact-info-block {
  margin-top: 25px;
}

.contact-info-block h3 {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1rem;
  margin-bottom: 5px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.contact-info-block p {
  font-size: 1rem;
  color: var(--color-text-primary);
  line-height: 1.6;
}

.contact-info-block a {
  font-size: 1rem;
  text-decoration: underline;
  color: var(--color-crimson);
  font-weight: 500;
}

.contact-map-wrapper {
  border-radius: var(--radius-lg);
  overflow: hidden;
  height: 100%;
  min-height: 300px;
  box-shadow: 0 10px 30px rgba(128, 24, 16, 0.08);
}

.contact-map-wrapper iframe {
  width: 100%;
  height: 100%;
  border: 0;
  min-height: 300px;
}

@media(min-width: 768px) {
  .contact-section {
    padding: 80px 0;
  }
  .contact-heading {
    font-size: 3rem;
  }
  .contact-info-block p, 
  .contact-info-block a {
    font-size: 1.1rem;
  }
  .contact-map-wrapper,
  .contact-map-wrapper iframe {
    min-height: 450px;
  }
}

/* --- Centered Headings Separator Line Alignment --- */
h2[style*="text-align: center"]::after,
h2[style*="text-align:center"]::after,
.text-center h2::after,
.about-gallery-section h2::after,
.about-gallery-section h2::after {
  margin-left: auto !important;
  margin-right: auto !important;
}

/* --- Co-baking Studio Section Heading Separator Line --- */
.section-studio-intro h1::after,
.template-page-studio h1::after {
  content: '';
  display: block;
  width: 60px;
  height: 1px;
  background-color: var(--color-crimson, #B81B1B);
  margin-top: 15px;
  opacity: 0.5;
}
