/* Minimal stylesheet: keep only small theme tweaks and header-specific styles
   while letting Bootstrap handle layout and components. This file intentionally
   avoids custom grids or heavy overrides so the project follows Bootstrap's
   conventions. */

:root{
  --beige:#efeae3;
  --accent:#ff7a00;
  --text:#222;
}

*{box-sizing:border-box}

body{font-family:Segoe UI, Roboto, Arial, sans-serif;color:var(--text);margin:0;background:var(--beige)}

/* Top dark menu (removed - now merged into secondary header) */

/* Secondary header: narrower and Bootstrap-friendly */
.secondary-header { padding: 0.75rem 0; margin: 0; }
.secondary-header .brand { font-family: 'Gaude', sans-serif; font-size: 28px; font-weight: 900; letter-spacing: -0.05em; color: #f7570a; text-decoration: none; }
.secondary-header .brand .site-logo { height: 38px; display: block; object-fit: contain; }

/* Fallback: if the image is missing, ensure the brand text remains visible */
.secondary-header .brand { display: inline-block; }

/* Header nav links */
.header-nav { gap: 0; }
.nav-link-header {
  color: #222;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  padding: 0.5rem 1rem;
  transition: color 150ms;
}
.nav-link-header:hover { color: #000; text-decoration: underline; }

/* Search pill in header: minimal, reduced width */
.secondary-header .search-wrapper { width: 180px; position: relative; }
.secondary-header .search-wrapper .search-icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: #000; font-size: 16px; }
.secondary-header .search-wrapper .form-control { padding-left: 36px; border-radius: 999px; border: 1px solid #000 !important; background: #fff !important; height: 32px; font-size: 13px; }

/* Mega menu dropdown */
.nav-dropdown-wrap { position: relative; }
.mega-menu {
  visibility: hidden;
  opacity: 0;
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  background: #fff;
  border: 1px solid rgba(0,0,0,0.08);
  box-shadow: 0 8px 32px rgba(0,0,0,0.12);
  z-index: 1100;
  padding: 28px 40px;
  min-width: 750px;
  transition: opacity 200ms ease, visibility 200ms ease;
  pointer-events: none;
}
.nav-dropdown-wrap:hover .mega-menu {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}
.mega-menu-inner {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 60px;
}
.mega-cat-title {
  font-size: 14px;
  font-weight: 700;
  color: #0b0b0b;
  text-decoration: none;
  display: block;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--accent);
  transition: color 150ms;
}
.mega-cat-title:hover { color: var(--accent); }
.mega-col ul { list-style: none; padding: 0; margin: 0; }
.mega-col ul li { margin-bottom: 10px; }
.mega-col ul li a {
  color: #666;
  text-decoration: none;
  font-size: 13px;
  transition: color 150ms;
  display: inline-block;
}
.mega-col ul li a:hover { color: var(--accent); }

/* Small dark cart button */
.cart-btn { width:36px; height:36px; display:inline-flex; align-items:center; justify-content:center; background: transparent; color: #000; border-radius: 0; border: none; padding: 0; }
.cart-btn i { font-size: 16px; color: inherit; }

/* Keep product and bootstrap elements to their default styles. Avoid global overrides. */
.card-img-top, img { border-radius: 0; }

/* Footer minimal spacing */
.site-footer { background: #f8f9fa; }

/* Responsive search width */
@media (max-width: 767px) {
  /* Hide search bar on mobile — keep header clean */
  .secondary-header .d-flex.me-3.align-items-center { display: none !important; }

  /* Tighter header padding on mobile */
  .secondary-header .container-fluid { padding-left: 12px; padding-right: 12px; }

  /* Make hamburger clearly visible */
  .mobile-menu-btn {
    font-size: 1.8rem;
    padding: 2px 6px;
    color: #0b0b0b;
    background: none;
    border: none;
    display: flex !important;
    align-items: center;
  }

  .mega-menu {
    min-width: 320px;
    left: 0;
    transform: none;
    padding: 20px 24px;
  }
  .mega-menu-inner {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}

/* Make header fixed so it can hide/show on scroll; we'll toggle .header-hidden via JS */
header { position: fixed; top: 0; left: 0; right: 0; z-index: 1050; transition: transform 220ms ease; }
header.header-hidden { transform: translateY(-100%); }

.site-main { transition: padding-top 200ms ease; }

/* Horizontal New Arrivals scroll */
.arrivals-wrap { position: relative; }
.arr-track { scroll-behavior: smooth; padding-bottom: 6px; -ms-overflow-style: none; scrollbar-width: none; }
.arr-track::-webkit-scrollbar { display: none; }
.arrival-item .card { border: none; background: transparent; }

.arr-nav { position: absolute; top: 50%; transform: translateY(-50%); z-index: 5; width: 44px; height: 44px; border-radius: 6px; border: none; background: rgba(11,11,11,0.9); color: #fff; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.arr-prev { left: -12px; }
.arr-next { right: -12px; }

/* Style the New Arrivals as a distinct section */
.new-arrivals { background: transparent; padding: 48px 0; }

/* Collections as a distinct section */
.collections { background: transparent; padding: 56px 0; }
.collections .col-md-6 img { height: 420px; object-fit: cover; }
.collections .col-12 img { object-fit: cover; }

/* Category page: remove white card backgrounds so listing blends with site background */
.category-listing .card,
.category-listing .card-body {
  background: transparent !important;
  box-shadow: none !important;
  border: none !important;
}
.category-listing .list-group-item {
  background: transparent !important;
  border: none !important;
}

/* Make list group text clearly black */
.category-listing .list-group-item { color: #000 !important; }

/* Reduce horizontal padding and add comfortable margins for the category listing */
.category-listing { padding-left: 0 !important; padding-right: 0 !important; margin-left: 24px; margin-right: 24px; }
.category-listing .row { margin-left: 0; margin-right: 0; }

/* Add vertical breathing for the category area */
.category-listing { margin-top: 24px; }

/* Add left/right padding inside the secondary header so content doesn't touch the edges */
.secondary-header .container-fluid { padding-left: 24px; padding-right: 24px; }

/* Make the sort select transparent so the 'Recommended' placeholder/option has no white background */
.category-listing select {
  background: transparent !important;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  padding-right: 36px; /* space for custom caret */
  border: none !important;
  box-shadow: none !important;
}
.category-listing select option { background: transparent !important; color: inherit; }

/* Ensure the browse links inside the list are black */
.category-listing .list-group-item a { color: #000 !important; }

/* Style the 'Browse by' heading to have a subtle underline like the design */
.category-listing .card-title {
  position: relative;
  padding-bottom: 0.6rem;
  margin-bottom: 0.75rem;
  font-weight: 600;
}
.category-listing aside .card-title::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: rgba(0,0,0,0.12);
}

/* Tighter list spacing and subtle sizing to match the sample */
.category-listing .list-group-item {
  padding-top: 0.5rem !important;
  padding-bottom: 0.55rem !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
  font-size: 0.95rem;
  line-height: 1.6;
}

/* Underline links on hover and indicate active selection with underline */
.category-listing .list-group-item a {
  text-decoration: none !important;
}
.category-listing .list-group-item a:hover,
.category-listing .list-group-item.active a {
  text-decoration: underline !important;
}

/* Remove leftover borders between list items */
.category-listing .list-group-item + .list-group-item { border-top: none !important; }

/* Product card tweaks inside category listing to match the sample layout:
  - square image (ratio already applied in templates)
  - tighter card-body, black title, bolder price, and consistent spacing
*/
.category-listing .card { background: transparent !important; }
.category-listing .card .ratio { background: transparent; }
.category-listing .card-img-top { width: 100%; height: 100%; object-fit: cover; display: block; }
.category-listing .card-body { padding: 0.45rem 0 0 0 !important; }
.category-listing .card-title { font-size: 0.98rem; font-weight: 400; color: #0b0b0b; margin: 0 0 6px 0; }

/* Product titles (in the listing area) should have no bottom margin/padding so price sits tightly below */
.category-listing section .card-title {
  margin-bottom: 0 !important;
  padding-bottom: 0 !important;
}
.category-listing .card-body .text-muted { color: #0b0b0b !important; opacity: 1 !important; }
.category-listing .product-price { color: #0b0b0b; font-weight: 600; margin-top: 0; }

/* Make the sidebar card sticky within the viewport (respects header height via CSS variable set by JS) */
.category-listing aside .card {
  position: sticky;
  top: calc(var(--site-header-height, 110px) + 16px);
  align-self: flex-start;
  z-index: 5;
}

/* Sort wrapper caret icon positioning */
.sort-wrapper { display: inline-block; }
.sort-wrapper .sort-caret { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); pointer-events: none; color: #000; }

/* Product detail specific styles */
.product-detail .breadcrumb-wrap { margin-bottom: 18px; }
.product-detail .breadcrumb-wrap a { color: #6b6b6b; }
.product-detail .nav-prevnext a { color: #6b6b6b; }
.product-detail .thumb-img { border: 1px solid rgba(0,0,0,0.06); padding: 0 !important; border-radius: 0 !important; background: transparent !important; }
.product-detail .thumb-img.active { outline: 2px solid rgba(0,0,0,0.12); }
.product-detail .main-image-wrap { background: #f6f3ee; }
.product-detail .product-title { font-weight: 400; font-size: 1.8rem; margin-bottom: 18px; }
.product-detail .product-price { font-weight: 600; font-size: 1.25rem; margin-bottom: 6px; }
.product-detail .qty-box { border: 1px solid rgba(0,0,0,0.12); padding: 4px; border-radius: 2px; background: transparent; }
.product-detail .btn-qty { border: none; background: transparent; width: 34px; height: 34px; display: inline-flex; align-items:center; justify-content:center; cursor:pointer; }
.product-detail .qty-input { width:64px; max-width:64px; border: none; background: transparent; }
.product-detail .add-cart { background: #0b0b0b; border-color: #0b0b0b; border-radius: 0; }
.product-detail .add-cart:hover { background: #000; }

/* You may also like scroller uses existing arrivals styles; give a small top margin */
.you-may-like { padding-top: 12px; }

/* Accordion overrides to ensure no background */
.accordion {
  --bs-accordion-bg: transparent;
  --bs-accordion-border-color: transparent;
}

.accordion-item {
  background: transparent !important;
  border: none !important;
  border-color: transparent !important;
}

#productInfoAccordion .accordion-item {
  background: transparent !important;
  border: 0 !important;
  border-bottom: 0 !important;
}

#productInfoAccordion {
  --bs-accordion-bg: transparent;
  --bs-accordion-border-color: transparent;
}

/* Accordion overrides for product-detail to ensure no background, border or heavy font */
#productInfoAccordion .accordion-button,
#productInfoAccordion .accordion-button:not(.collapsed) {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  font-weight: 400 !important;
  color: inherit !important;
  padding-left: 0 !important;
}

#productInfoAccordion .accordion-body {
  background: transparent !important;
  padding-left: 0 !important;
  border-color: transparent !important;
}

#productInfoAccordion .accordion-body {
  background: transparent !important;
  padding-left: 0 !important;
}

/* ── Mosaic Grid for Rooted Forms & Built Forms ── */
.mosaic-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 280px;
  gap: 12px;
}

.mosaic-grid .mosaic-item {
  overflow: hidden;
  position: relative;
}

.mosaic-grid .mosaic-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 400ms ease;
}

.mosaic-grid .mosaic-item:hover img {
  transform: scale(1.04);
}

/* Rooted Forms – 5-image asymmetric layout */
.mosaic-rooted .mosaic-item:nth-child(1) { grid-column: 1 / 2; grid-row: 1 / 3; }       /* tall left */
.mosaic-rooted .mosaic-item:nth-child(2) { grid-column: 2 / 4; grid-row: 1 / 2; }       /* wide top-center */
.mosaic-rooted .mosaic-item:nth-child(3) { grid-column: 4 / 5; grid-row: 1 / 2; }       /* sm top-right */
.mosaic-rooted .mosaic-item:nth-child(4) { grid-column: 2 / 3; grid-row: 2 / 3; }       /* md bottom-center */
.mosaic-rooted .mosaic-item:nth-child(5) { grid-column: 3 / 5; grid-row: 2 / 3; }       /* wide bottom-right */

/* Built Forms – 5-image different asymmetric layout */
.mosaic-built .mosaic-item:nth-child(1) { grid-column: 1 / 3; grid-row: 1 / 2; }        /* wide top-left */
.mosaic-built .mosaic-item:nth-child(2) { grid-column: 3 / 4; grid-row: 1 / 2; }        /* md top-center */
.mosaic-built .mosaic-item:nth-child(3) { grid-column: 4 / 5; grid-row: 1 / 3; }        /* tall right */
.mosaic-built .mosaic-item:nth-child(4) { grid-column: 1 / 2; grid-row: 2 / 3; }        /* sm bottom-left */
.mosaic-built .mosaic-item:nth-child(5) { grid-column: 2 / 4; grid-row: 2 / 3; }        /* wide bottom-center */

/* Responsive: stack on smaller screens */
@media (max-width: 768px) {
  .mosaic-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 220px;
  }

  .mosaic-rooted .mosaic-item:nth-child(1) { grid-column: 1 / 2; grid-row: 1 / 3; }
  .mosaic-rooted .mosaic-item:nth-child(2) { grid-column: 2 / 3; grid-row: 1 / 2; }
  .mosaic-rooted .mosaic-item:nth-child(3) { grid-column: 2 / 3; grid-row: 2 / 3; }
  .mosaic-rooted .mosaic-item:nth-child(4) { grid-column: 1 / 2; grid-row: 3 / 4; }
  .mosaic-rooted .mosaic-item:nth-child(5) { grid-column: 2 / 3; grid-row: 3 / 4; }

  .mosaic-built .mosaic-item:nth-child(1) { grid-column: 1 / 3; grid-row: 1 / 2; }
  .mosaic-built .mosaic-item:nth-child(2) { grid-column: 1 / 2; grid-row: 2 / 3; }
  .mosaic-built .mosaic-item:nth-child(3) { grid-column: 2 / 3; grid-row: 2 / 4; }
  .mosaic-built .mosaic-item:nth-child(4) { grid-column: 1 / 2; grid-row: 3 / 4; }
  .mosaic-built .mosaic-item:nth-child(5) { grid-column: 1 / 3; grid-row: 4 / 5; }
}

/* ── Unified section typography ── */
/* All section titles share Cormorant Garamond — elegant, editorial, consistent */
.hero-title,
.collections h2,
.spaces h2,
.spaces h4,
.new-arrivals h2,
.rooted-forms h2,
.built-forms h2,
.bespoke-furniture h2,
.bespoke-furniture h5,
.section-title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 300;
  letter-spacing: 0.03em;
}

/* Section subtitles — same font, lighter weight */
.collections .lead,
.spaces .lead,
.new-arrivals .lead,
.rooted-forms .lead,
.built-forms .lead,
.bespoke-furniture .lead {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 300;
  font-style: italic;
  font-size: 1.15rem;
  letter-spacing: 0.01em;
}

/* ── Universal image hover zoom ── */
/* Works for hero images, collection cards, spaces, mosaic, arrivals */
.hero-section .col-4,
.collections .col-md-4,
.spaces .col-md-4,
.spaces .col-md-6,
.mosaic-item,
.arrival-item .ratio {
  overflow: hidden;
}

.hero-section .col-4 img,
.collections .col-md-4 img,
.spaces .col-md-4 img,
.spaces .col-md-6 img,
.arrival-item .ratio img {
  transition: transform 400ms ease;
}

.hero-section .col-4:hover img,
.collections .col-md-4:hover img,
.spaces .col-md-4:hover img,
.spaces .col-md-6:hover img,
.arrival-item:hover .ratio img {
  transform: scale(1.05);
}

/* mosaic items already have the rule; keep consistent duration */
.mosaic-grid .mosaic-item img {
  transition: transform 400ms ease;
}
.mosaic-grid .mosaic-item:hover img {
  transform: scale(1.05);
}

/* ── Tighter section gaps ── */
/* Reduce py-5 / mb-5 on homepage sections from 3rem down to 1.75rem */
.hero-section      { margin-bottom: 2rem !important; margin-top: 1.5rem !important; }
.new-arrivals      { padding-top: 1.75rem !important; padding-bottom: 1.75rem !important; margin-bottom: 0 !important; }
.collections       { padding-top: 1.75rem !important; padding-bottom: 1.75rem !important; margin-bottom: 0 !important; }
.spaces            { padding-top: 1.75rem !important; padding-bottom: 1.75rem !important; margin-bottom: 0 !important; }
.rooted-forms      { padding-top: 1.75rem !important; padding-bottom: 1.75rem !important; margin-bottom: 0 !important; }
.built-forms       { padding-top: 1.75rem !important; padding-bottom: 1.75rem !important; margin-bottom: 0 !important; }
.bespoke-furniture { padding-top: 1.75rem !important; padding-bottom: 2.5rem !important; margin-bottom: 0 !important; }

/* Tighten the mb-5 on the header row inside each section */
.collections .row.mb-5,
.rooted-forms .row.mb-5,
.built-forms .row.mb-5,
.bespoke-furniture .row.mb-5,
.spaces .d-flex.mb-5 {
  margin-bottom: 1.5rem !important;
}

/* ── Mobile hamburger button ── */
.mobile-menu-btn {
  background: none;
  border: none;
  padding: 4px 6px;
  cursor: pointer;
  font-size: 1.5rem;
  color: #0b0b0b;
  line-height: 1;
}
.mobile-menu-btn:focus { outline: none; }

/* ── Mobile drawer ── */
.mobile-drawer {
  position: fixed;
  top: 0;
  left: 0;
  width: min(320px, 85vw);
  height: 100vh;
  background: var(--beige);
  z-index: 2000;
  overflow-y: auto;
  transform: translateX(-100%);
  transition: transform 280ms ease;
  display: flex;
  flex-direction: column;
}
.mobile-drawer.is-open {
  transform: translateX(0);
}

.mobile-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid rgba(0,0,0,0.08);
}
.mobile-drawer-close {
  background: none;
  border: none;
  font-size: 1.4rem;
  cursor: pointer;
  color: #0b0b0b;
  padding: 4px;
  line-height: 1;
}
.mobile-drawer-close:focus { outline: none; }

/* Backdrop */
.mobile-drawer-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 1999;
}
.mobile-drawer-backdrop.is-open { display: block; }

/* Nav items inside drawer */
.mobile-drawer-nav {
  padding: 1rem 0;
  flex: 1;
}

.mobile-nav-link {
  display: block;
  padding: 0.75rem 1.25rem;
  font-size: 0.95rem;
  font-weight: 500;
  color: #0b0b0b;
  text-decoration: none;
  border-bottom: 1px solid rgba(0,0,0,0.05);
}
.mobile-nav-link:hover { background: rgba(0,0,0,0.03); }

/* Products accordion group */
.mobile-nav-group { border-bottom: 1px solid rgba(0,0,0,0.05); }

.mobile-nav-title {
  width: 100%;
  background: none;
  border: none;
  padding: 0.75rem 1.25rem;
  font-size: 0.95rem;
  font-weight: 500;
  color: #0b0b0b;
  text-align: left;
  cursor: pointer;
  display: flex;
  align-items: center;
}
.mobile-nav-title:focus { outline: none; }
.mobile-nav-title .bi { transition: transform 240ms ease; }
.mobile-nav-title.is-open .bi { transform: rotate(180deg); }

.mobile-nav-sub {
  display: none;
  padding: 0 0 0.5rem 0;
}
.mobile-nav-sub.is-open { display: block; }

.mobile-nav-category { padding: 0.5rem 1.25rem 0.25rem 1.5rem; }

.mobile-nav-cat-title {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #0b0b0b;
  text-decoration: none;
  margin-bottom: 0.4rem;
  padding-bottom: 0.3rem;
  border-bottom: 1px solid rgba(0,0,0,0.1);
}

.mobile-nav-category ul {
  list-style: none;
  padding: 0;
  margin: 0 0 0.75rem 0;
}
.mobile-nav-category ul li a {
  display: block;
  padding: 0.3rem 0;
  font-size: 0.88rem;
  color: #555;
  text-decoration: none;
}
.mobile-nav-category ul li a:hover { color: #0b0b0b; }
