/* =============================================
   BOOKING WIDGET LAYOUTS
   =============================================
   Self-contained layout CSS for the three
   booking page layout modes. All classes use
   the bw- prefix to avoid host-site conflicts.
   ============================================= */

/* ---- Shared layout wrapper ---- */
.bw-layout {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 40px;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 clamp(15px, 2vw, 24px);
}

.bw-main {
  flex: 0 0 66.6%;
  max-width: 66.6%;
  min-width: 0;
}

.bw-sidebar {
  flex: 1;
  min-width: 0;
  position: sticky;
  top: 5rem;
  max-height: calc(100vh - 6rem);
  overflow-y: auto;
}

/* Thin scrollbar for sidebar */
.bw-sidebar::-webkit-scrollbar { width: 4px; }
.bw-sidebar::-webkit-scrollbar-thumb { background: #ccc; border-radius: 2px; }
.bw-sidebar { scrollbar-width: thin; scrollbar-color: #ccc transparent; }

/* ---- Page heading ---- */
.bw-heading {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 2rem;
}
.bw-heading h1 {
  font-family: 'Outfit', 'Segoe UI', system-ui, sans-serif;
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  color: #0C1227;
  margin: 0 0 0.5rem;
}
.bw-heading p {
  font-size: 1rem;
  color: #808384;
  margin: 0;
}
.bw-heading a {
  color: #0C1227;
  text-decoration: underline;
}

/* ---- Category tabs ---- */
.bw-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.bw-tab {
  display: inline-block;
  padding: 0.5rem 1.25rem;
  border: 1px solid #eaeaea;
  border-radius: 2rem;
  background: #fff;
  color: #0C1227;
  font-family: 'Open Sans', system-ui, sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  text-decoration: none;
  line-height: 1.3;
}

.bw-tab:hover {
  border-color: #0C1227;
}

.bw-tab.bw-active {
  background: #0C1227;
  border-color: #0C1227;
  color: #fff;
}

/* ---- Product card grid (Layout A: catalog-main) ---- */
.bw-product-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}

.bw-product-card {
  display: block;
  border: 1px solid #eaeaea;
  border-radius: 12px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  cursor: pointer;
  background: #fff;
}

.bw-product-card:hover {
  border-color: #0C1227;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.bw-product-card.bw-card-active {
  border-color: #0C1227;
  box-shadow: 0 0 0 2px #0C1227;
}

.bw-product-card-img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  display: block;
}

.bw-product-card-body {
  padding: 0.75rem 1rem 1rem;
}

.bw-product-card-name {
  font-weight: 700;
  font-size: 0.9rem;
  color: #0C1227;
  line-height: 1.3;
  margin: 0 0 0.25rem;
}

.bw-product-card-price {
  font-size: 0.8rem;
  color: #808384;
  margin: 0 0 0.75rem;
}

.bw-product-card-btn {
  display: inline-block;
  padding: 0.4rem 1rem;
  background: #0C1227;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}

.bw-product-card-btn:hover {
  background: #242A3D;
}

/* ---- Sidebar product cards (Layout B: widget-main) ---- */
.bw-sidebar-group-heading {
  font-size: 0.8rem;
  font-weight: 700;
  color: #808384;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 1.25rem 0 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #eaeaea;
}

.bw-sidebar-group-heading:first-child {
  margin-top: 0;
}

.bw-sidebar-card {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  padding: 0.6rem 0.75rem;
  border: 1px solid #eaeaea;
  border-radius: 10px;
  margin-bottom: 0.5rem;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: border-color 0.15s;
}

.bw-sidebar-card:hover {
  border-color: #0C1227;
}

.bw-sidebar-card.bw-card-active {
  border-color: #0C1227;
  background: #F8F8F8;
}

.bw-sidebar-card-img {
  width: 60px;
  height: 44px;
  object-fit: cover;
  border-radius: 6px;
  flex-shrink: 0;
}

.bw-sidebar-card-info {
  flex: 1;
  min-width: 0;
}

.bw-sidebar-card-name {
  font-weight: 600;
  font-size: 0.8rem;
  color: #0C1227;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bw-sidebar-card-price {
  font-size: 0.75rem;
  color: #808384;
  margin-top: 0.15rem;
}

/* ---- Accordion nav (Layout C: accordion-nav) ---- */
.bw-accordion {
  list-style: none;
  margin: 0;
  padding: 0;
}

.bw-accordion-item {
  border-bottom: 1px solid #eaeaea;
}

.bw-accordion-item:first-child {
  border-top: 1px solid #eaeaea;
}

.bw-accordion-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 0.5rem;
  cursor: pointer;
  font-weight: 700;
  font-size: 0.9rem;
  color: #0C1227;
  transition: color 0.15s;
  user-select: none;
}

.bw-accordion-header:hover {
  color: #242A3D;
}

.bw-accordion-count {
  font-weight: 400;
  font-size: 0.8rem;
  color: #808384;
  margin-left: 0.5rem;
}

.bw-accordion-arrow {
  width: 12px;
  height: 12px;
  transition: transform 0.2s ease;
  flex-shrink: 0;
  fill: #808384;
}

.bw-accordion-item.bw-open .bw-accordion-arrow {
  transform: rotate(180deg);
}

.bw-accordion-body {
  display: none;
  padding: 0 0.5rem 0.75rem;
}

.bw-accordion-item.bw-open .bw-accordion-body {
  display: block;
}

.bw-accordion-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  color: #0C1227;
  text-decoration: none;
  font-size: 0.85rem;
  cursor: pointer;
  transition: background 0.1s;
}

.bw-accordion-link:hover {
  background: #F8F8F8;
}

.bw-accordion-link.bw-link-active {
  background: #F8F8F8;
  font-weight: 700;
  position: relative;
}

.bw-accordion-link.bw-link-active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.35rem;
  bottom: 0.35rem;
  width: 3px;
  background: #0C1227;
  border-radius: 2px;
}

.bw-accordion-link-name {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bw-accordion-link-price {
  font-size: 0.75rem;
  color: #808384;
  margin-left: 0.75rem;
  flex-shrink: 0;
}

/* ---- Sidebar info block ---- */
.bw-sidebar-info {
  margin-top: 1.5rem;
  padding: 1rem;
  background: #F8F8F8;
  border-radius: 10px;
  font-size: 0.85rem;
  color: #808384;
  line-height: 1.5;
}

.bw-sidebar-info strong {
  color: #0C1227;
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
}

.bw-sidebar-info a {
  color: #0C1227;
  font-weight: 600;
  text-decoration: underline;
}

/* ---- Layout D: full-tabs (no sidebar) ---- */
.bw-fulltabs-wrapper {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 clamp(15px, 2vw, 24px);
}

.bw-ftab-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.bw-ftab-card {
  border: 1px solid #eaeaea;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.bw-ftab-card:hover {
  border-color: #0C1227;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.bw-ftab-card-active {
  border-color: #0C1227;
  box-shadow: 0 0 0 2px #0C1227;
}

.bw-ftab-card-top {
  cursor: pointer;
}

.bw-ftab-card-img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  display: block;
}

.bw-ftab-card-body {
  padding: 0.75rem 1rem 1rem;
}

.bw-ftab-embed {
  padding: 1rem;
  border-top: 1px solid #eaeaea;
  grid-column: 1 / -1;
}

/* When a card is active, span it full width */
.bw-ftab-card-active {
  grid-column: 1 / -1;
}

/* ---- Layout E: split-view (50/50) ---- */
.bw-layout-split {
  gap: 0;
}

.bw-layout-split .bw-main {
  flex: 0 0 50%;
  max-width: 50%;
  padding-right: 1.5rem;
  max-height: calc(100vh - 6rem);
  overflow-y: auto;
}

.bw-layout-split .bw-main::-webkit-scrollbar { width: 4px; }
.bw-layout-split .bw-main::-webkit-scrollbar-thumb { background: #ccc; border-radius: 2px; }
.bw-layout-split .bw-main { scrollbar-width: thin; scrollbar-color: #ccc transparent; }

.bw-sidebar-split {
  flex: 0 0 50% !important;
  max-width: 50%;
}

.bw-split-card {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  padding: 0.75rem;
  border: 1px solid #eaeaea;
  border-radius: 10px;
  margin-bottom: 0.75rem;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.bw-split-card:hover {
  border-color: #0C1227;
}

.bw-split-card.bw-card-active {
  border-color: #0C1227;
  background: #F8F8F8;
  box-shadow: inset 3px 0 0 #0C1227;
}

.bw-split-card-img {
  width: 80px;
  height: 56px;
  object-fit: cover;
  border-radius: 8px;
  flex-shrink: 0;
}

.bw-split-card-body {
  flex: 1;
  min-width: 0;
}

/* ---- Layout F: hero-feature ---- */
.bw-hero-wrapper {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 clamp(15px, 2vw, 24px);
}

.bw-hero {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 1.5rem;
  height: 300px;
}

.bw-hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.bw-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(12,18,39,0.85) 0%, rgba(12,18,39,0.2) 60%, transparent 100%);
  display: flex;
  align-items: flex-end;
  padding: 2rem;
}

.bw-hero-content {
  color: #fff;
}

.bw-hero-name {
  font-family: 'Outfit', system-ui, sans-serif;
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 0.25rem;
}

.bw-hero-price {
  font-size: 1.1rem;
  font-weight: 600;
  opacity: 0.9;
  margin-bottom: 0.5rem;
}

.bw-hero-summary {
  font-size: 0.9rem;
  opacity: 0.8;
  max-width: 600px;
  line-height: 1.4;
}

/* Horizontal product strip */
.bw-hero-strip {
  margin-top: 1.5rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 0.5rem;
}

.bw-hero-strip-inner {
  display: flex;
  gap: 1rem;
}

.bw-hero-thumb {
  flex: 0 0 160px;
  cursor: pointer;
  border: 2px solid #eaeaea;
  border-radius: 10px;
  overflow: hidden;
  transition: border-color 0.15s, box-shadow 0.15s;
  background: #fff;
}

.bw-hero-thumb:hover {
  border-color: #0C1227;
}

.bw-hero-thumb.bw-thumb-active {
  border-color: #0C1227;
  box-shadow: 0 0 0 2px #0C1227;
}

.bw-hero-thumb-img {
  width: 100%;
  height: 80px;
  object-fit: cover;
  display: block;
}

.bw-hero-thumb-name {
  padding: 0.5rem 0.6rem 0.15rem;
  font-weight: 600;
  font-size: 0.75rem;
  color: #0C1227;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bw-hero-thumb-price {
  padding: 0 0.6rem 0.5rem;
  font-size: 0.7rem;
  color: #808384;
}

/* ---- Mobile (stacked) ---- */
@media (max-width: 880px) {
  .bw-layout {
    flex-direction: column;
    gap: 1.5rem;
  }

  .bw-main,
  .bw-sidebar {
    flex: 0 0 100%;
    max-width: 100%;
  }

  .bw-sidebar {
    position: static;
    max-height: none;
    overflow-y: visible;
  }

  .bw-product-grid {
    grid-template-columns: 1fr;
  }

  .bw-tabs {
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 0.25rem;
  }

  .bw-tab {
    white-space: nowrap;
    flex-shrink: 0;
  }

  /* Layout D: full-tabs — single column on mobile */
  .bw-ftab-grid {
    grid-template-columns: 1fr;
  }

  /* Layout E: split-view — stack on mobile */
  .bw-layout-split .bw-main {
    flex: 0 0 100%;
    max-width: 100%;
    padding-right: 0;
    max-height: none;
    overflow-y: visible;
  }

  .bw-sidebar-split {
    flex: 0 0 100% !important;
    max-width: 100%;
  }

  /* Layout F: hero — smaller hero on mobile */
  .bw-hero {
    height: 200px;
  }

  .bw-hero-name {
    font-size: 1.25rem;
  }

  .bw-hero-thumb {
    flex: 0 0 130px;
  }
}
