:root {
  --site-card-radius: 1rem;
  --site-card-inner-radius: calc(var(--site-card-radius) - 1px);
  --site-media-aspect: 4 / 3;
}

/* ========================================
   PAGE SHELLS / LAYOUT CONTAINERS
======================================== */

.page-shell {
  max-width: 1100px;
  margin-left: auto;
  margin-right: auto;
  padding-top: 1.5rem;
  padding-bottom: 1.5rem;
}

.page-shell-wide {
  max-width: 1100px;
}

.page-shell-detail {
  max-width: 1000px;
}

/* ========================================
   SHARED CARD SHAPE
======================================== */

.page-shell .card {
  border-radius: var(--site-card-radius);
}

/* ========================================
   HERO / PLACEHOLDER BLOCKS
======================================== */

.hero-shell {
  isolation: isolate;
}

.hero-placeholder {
  min-height: 300px;
}

.hero-placeholder-content {
  min-height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-placeholder-text {
  max-width: 760px;
}

.hero-media-layer {
  overflow: hidden;
}

.hero-media-layer img,
.hero-media-layer video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.hero-overlay {
  opacity: var(--hero-overlay-opacity, 0.48);
}

.hero-overlay-dark {
  background: #000;
}

.hero-overlay-light {
  background: #fff;
}

.hero-height-standard {
  min-height: 360px;
}

.hero-height-standard .hero-placeholder-content {
  min-height: 360px;
}

.hero-height-tall {
  min-height: 440px;
}

.hero-height-tall .hero-placeholder-content {
  min-height: 440px;
}

.hero-height-cinematic {
  min-height: 520px;
}

.hero-height-cinematic .hero-placeholder-content {
  min-height: 520px;
}

.hero-media-position-top .hero-media-layer img,
.hero-media-position-top .hero-media-layer video {
  object-position: center top;
}

.hero-media-position-center .hero-media-layer img,
.hero-media-position-center .hero-media-layer video {
  object-position: center center;
}

.hero-media-position-bottom .hero-media-layer img,
.hero-media-position-bottom .hero-media-layer video {
  object-position: center bottom;
}

@media (max-width: 767.98px) {
  .hero-placeholder,
  .hero-placeholder-content,
  .hero-height-standard,
  .hero-height-standard .hero-placeholder-content,
  .hero-height-tall,
  .hero-height-tall .hero-placeholder-content,
  .hero-height-cinematic,
  .hero-height-cinematic .hero-placeholder-content {
    min-height: 300px;
  }

  .hero-placeholder-text {
    max-width: 100%;
  }
}

/* ========================================
   MEDIA CARDS / IMAGE PRESENTATION
======================================== */

.card-media-shell,
.vendor-media-shell,
.product-detail-media-shell {
  position: relative;
  overflow: hidden;
  background: var(--bs-tertiary-bg);
}

.card-media-shell {
  aspect-ratio: var(--site-media-aspect);
  border-bottom: 1px solid var(--bs-border-color);
  border-top-left-radius: var(--site-card-inner-radius);
  border-top-right-radius: var(--site-card-inner-radius);
}

.vendor-media-shell,
.product-detail-media-shell {
  border: 1px solid var(--bs-border-color);
  border-radius: var(--site-card-radius);
}

.vendor-media-ratio-standard,
.product-media-ratio-standard {
  aspect-ratio: 4 / 3;
}

.vendor-media-ratio-square,
.product-media-ratio-square {
  aspect-ratio: 1 / 1;
}

.vendor-media-ratio-wide,
.product-media-ratio-wide {
  aspect-ratio: 16 / 9;
}

.card-media-image,
.vendor-media-image,
.product-detail-media-image {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.vendor-media-position-top .vendor-media-image,
.product-media-position-top .product-detail-media-image {
  object-position: center top;
}

.vendor-media-position-center .vendor-media-image,
.product-media-position-center .product-detail-media-image {
  object-position: center center;
}

.vendor-media-position-bottom .vendor-media-image,
.product-media-position-bottom .product-detail-media-image {
  object-position: center bottom;
}

.card-media-placeholder,
.vendor-media-placeholder,
.product-detail-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.media-shell-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: var(--media-overlay-opacity, 0);
}

.media-shell-overlay-dark {
  background: #000;
}

.media-shell-overlay-light {
  background: #fff;
}

.shop-avatar-placeholder {
  width: 52px;
  height: 52px;
  font-size: 1.1rem;
}

/* ========================================
   LEGACY MEDIA HELPERS
======================================== */

.card-media-top {
  width: 100%;
  height: 220px;
  display: block;
  object-fit: cover;
}

.vendor-media {
  width: 100%;
  height: 320px;
  display: block;
  object-fit: cover;
}

.vendor-media-placeholder {
  font-size: 3.25rem;
}

.product-detail-media {
  width: 100%;
  max-height: 360px;
  display: block;
  object-fit: cover;
}

.product-detail-placeholder {
  min-height: 300px;
  padding: 3rem 1rem;
  text-align: center;
}

/* ========================================
   ICONS / SMALL UI ELEMENTS
======================================== */

.icon-wrap {
  width: 1.25rem;
  min-width: 1.25rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.icon-ui {
  font-size: 1rem;
  line-height: 1;
}

/* ========================================
   STORE HOURS
======================================== */

.store-hours-list {
  display: grid;
  gap: 0.5rem;
  margin: 0;
}

.store-hours-row {
  display: grid;
  grid-template-columns: 5.5rem minmax(0, 1fr);
  gap: 0.75rem;
  align-items: start;
}

.store-hours-day {
  font-weight: 500;
  color: var(--bs-body-color);
  white-space: nowrap;
}

.store-hours-value {
  min-width: 0;
  text-align: left;
  white-space: nowrap;
}

@media (max-width: 359.98px) {
  .store-hours-row {
    grid-template-columns: 1fr;
    gap: 0.15rem;
  }

  .store-hours-value {
    white-space: normal;
  }
}

/* ========================================
   BOOKING / INVOICE DOCUMENTS
======================================== */

.booking-doc-card,
.invoice-card {
  border: 1px solid var(--bs-border-color);
  border-radius: 12px;
  background: var(--bs-body-bg);
  color: var(--bs-body-color);
  box-shadow: var(--bs-box-shadow-sm);
  margin-bottom: 16px;
}

.booking-doc-card {
  padding: 18px;
}

.invoice-card {
  padding: 20px;
}

.booking-doc-renter {
  border: 1px solid var(--bs-border-color);
  border-radius: 10px;
  padding: 16px;
  background: var(--bs-secondary-bg);
  color: var(--bs-body-color);
  margin-bottom: 14px;
}

.booking-doc-section-title,
.invoice-title {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--bs-emphasis-color);
}

.booking-doc-label,
.invoice-label {
  font-weight: 600;
  color: var(--bs-emphasis-color);
}

.booking-doc-mono {
  font-family:
    ui-monospace,
    SFMono-Regular,
    Menlo,
    Monaco,
    Consolas,
    "Liberation Mono",
    "Courier New",
    monospace;
  word-break: break-word;
}

.booking-doc-shell {
  max-width: 1000px;
}

.booking-doc-table thead th,
.invoice-table thead th {
  color: var(--bs-emphasis-color);
  border-bottom-color: var(--bs-border-color);
}

.booking-doc-table tbody td,
.invoice-table tbody td {
  color: var(--bs-body-color);
  border-color: var(--bs-border-color);
}

/* ========================================
   PRINT STYLES
======================================== */

@media print {
  .no-print {
    display: none !important;
  }

  body {
    background: #fff !important;
    color: #000 !important;
  }

  .container,
  .booking-doc-shell {
    max-width: none !important;
    width: 100% !important;
  }

  .booking-doc-card,
  .booking-doc-renter,
  .invoice-card,
  table,
  tr,
  td,
  th {
    break-inside: avoid;
    page-break-inside: avoid;
    box-shadow: none !important;
    background: #fff !important;
    color: #000 !important;
  }

  a[href]::after {
    content: none !important;
  }
}

/* ========================================
   CMS PAGE BODY - TYPOGRAPHY
======================================== */

.cms-page-body {
  line-height: 1.7;
}

.cms-page-body > *:last-child {
  margin-bottom: 0;
}

.cms-page-body h2,
.cms-page-body h3,
.cms-page-body h4 {
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
  line-height: 1.25;
  font-weight: 600;
}

.cms-page-body h2:first-child,
.cms-page-body h3:first-child,
.cms-page-body h4:first-child {
  margin-top: 0;
}

.cms-page-body p {
  margin-bottom: 1rem;
}

.cms-page-body ul {
  margin-bottom: 1rem;
  padding-left: 1.25rem;
}

.cms-page-body li + li {
  margin-top: 0.35rem;
}

.cms-page-body a {
  text-underline-offset: 0.14em;
}

.cms-page-body strong {
  font-weight: 700;
}

.cms-page-body em {
  font-style: italic;
}

/* ========================================
   CMS MEDIA ASSETS - SHARED BLOCKS
======================================== */

.cms-page-body .cms-asset-block {
  margin: 1.5rem 0;
}

.cms-page-body .cms-asset-block:first-child {
  margin-top: 0;
}

.cms-page-body .cms-asset-block:last-child {
  margin-bottom: 0;
}

.cms-page-body .cms-asset-caption {
  margin-top: 0.5rem;
  font-size: 0.875rem;
  color: var(--bs-secondary-color);
}

.cms-page-body .cms-asset-link {
  word-break: break-word;
}

.cms-page-body .cms-asset-image,
.cms-page-body .cms-asset-gallery {
  width: 100%;
}

.cms-page-body .cms-asset-video video,
.cms-page-body .cms-asset-image img,
.cms-page-body .cms-gallery-item img {
  display: block;
  width: 100%;
  height: auto;
  background: var(--bs-body-bg);
}

.cms-page-body .cms-asset-embed-ratio {
  overflow: hidden;
  border: 1px solid var(--bs-border-color);
  border-radius: 0.5rem;
  background: var(--bs-body-bg);
}

.cms-page-body .cms-asset-embed-frame {
  border: 0;
  width: 100%;
  height: 100%;
}

/* ========================================
   CMS MEDIA ASSETS - SIZE VARIANTS
======================================== */

.cms-page-body .cms-asset-size-sm {
  max-width: 320px;
}

.cms-page-body .cms-asset-size-md {
  max-width: 520px;
}

.cms-page-body .cms-asset-size-lg {
  max-width: 760px;
}

.cms-page-body .cms-asset-size-full {
  max-width: 100%;
}

/* ========================================
   CMS MEDIA ASSETS - ALIGNMENT
======================================== */

.cms-page-body .cms-asset-align-left {
  margin-left: 0;
  margin-right: auto;
}

.cms-page-body .cms-asset-align-center {
  margin-left: auto;
  margin-right: auto;
}

.cms-page-body .cms-asset-align-right {
  margin-left: auto;
  margin-right: 0;
}

/* ========================================
   CMS GALLERY
======================================== */

.cms-page-body .cms-gallery-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}

.cms-page-body .cms-gallery-item {
  margin: 0;
}

@media (min-width: 576px) {
  .cms-page-body .cms-gallery-cols-2,
  .cms-page-body .cms-gallery-cols-3,
  .cms-page-body .cms-gallery-cols-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 992px) {
  .cms-page-body .cms-gallery-cols-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .cms-page-body .cms-gallery-cols-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* ========================================
   CMS TEXT ALIGNMENT BLOCKS
======================================== */

.cms-page-body .cms-text-align-left {
  text-align: left;
}

.cms-page-body .cms-text-align-center {
  text-align: center;
}

.cms-page-body .cms-text-align-right {
  text-align: right;
}

.cms-page-body .cms-text-align-center ul,
.cms-page-body .cms-text-align-right ul {
  display: inline-block;
  text-align: left;
}

/* ========================================
   CMS TABLE OF CONTENTS
======================================== */

.cms-page-body .cms-toc {
  margin: 1.25rem 0 1.5rem;
  padding: 1rem 1.125rem;
  border: 1px solid var(--bs-border-color);
  border-radius: 0.75rem;
  background: var(--bs-secondary-bg);
}

.cms-page-body .cms-toc-title {
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--bs-emphasis-color);
}

.cms-page-body .cms-toc-list {
  list-style: none;
  padding-left: 0;
  margin: 0;
}

.cms-page-body .cms-toc-item + .cms-toc-item {
  margin-top: 0.35rem;
}

.cms-page-body .cms-toc-level-2 {
  padding-left: 1rem;
}

.cms-page-body .cms-toc a {
  text-decoration: none;
}

.cms-page-body .cms-toc a:hover {
  text-decoration: underline;
}

/* ========================================
   CMS TABLES
======================================== */

.cms-page-body .cms-table-wrap {
  margin: 1.5rem 0;
}

.cms-page-body .cms-table {
  margin-bottom: 0;
  background: var(--bs-body-bg);
}

.cms-page-body .cms-table th {
  white-space: nowrap;
}

/* ========================================
   CMS BACKGROUND IMAGE SECTIONS
======================================== */

.cms-page-body .cms-bg-section {
  position: relative;
  overflow: hidden;
  margin: 1.5rem 0;
  border-radius: 0.9rem;
  background-color: var(--bs-dark);
  background-image: var(--cms-bg-image);
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}

.cms-page-body .cms-bg-section::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.cms-page-body .cms-bg-section-inner {
  position: relative;
  z-index: 1;
  padding: 2rem 1.25rem;
}

.cms-page-body .cms-bg-tone-dark {
  color: #fff;
}

.cms-page-body .cms-bg-tone-dark::before {
  background: rgba(0, 0, 0, 0.45);
}

.cms-page-body .cms-bg-tone-dark a {
  color: #fff;
}

.cms-page-body .cms-bg-tone-dark h2,
.cms-page-body .cms-bg-tone-dark h3,
.cms-page-body .cms-bg-tone-dark h4 {
  color: #fff;
}

.cms-page-body .cms-bg-tone-light {
  color: var(--bs-emphasis-color);
}

.cms-page-body .cms-bg-tone-light::before {
  background: rgba(255, 255, 255, 0.6);
}

/* ========================================
   CMS FAQ
======================================== */

.cms-faq-intro {
  margin-bottom: 1.5rem;
}

.cms-faq-nav {
  margin: 1.5rem 0;
  padding: 1rem 1.125rem;
  border: 1px solid var(--bs-border-color);
  border-radius: 0.75rem;
  background: var(--bs-secondary-bg);
}

.cms-faq-nav-title {
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--bs-emphasis-color);
}

.cms-faq-nav-list {
  list-style: none;
  padding-left: 0;
  margin: 0;
}

.cms-faq-nav-item + .cms-faq-nav-item {
  margin-top: 0.35rem;
}

.cms-faq-nav a {
  text-decoration: none;
}

.cms-faq-nav a:hover {
  text-decoration: underline;
}

.cms-faq-sections {
  display: grid;
  gap: 1.5rem;
}

.cms-faq-section {
  scroll-margin-top: 5rem;
  padding: 1.25rem;
  border: 1px solid var(--bs-border-color);
  border-radius: 0.75rem;
  background: var(--bs-body-bg);
}

.cms-faq-section-header {
  margin-bottom: 1rem;
}

.cms-faq-accordion .accordion-item {
  border: 1px solid var(--bs-border-color);
}

.cms-faq-accordion .accordion-item + .accordion-item {
  margin-top: 0.75rem;
}

.cms-faq-question {
  font-weight: 600;
}

.cms-faq-question:not(.collapsed) {
  color: var(--bs-emphasis-color);
}

.cms-faq-answer > *:last-child {
  margin-bottom: 0;
}

.cms-faq-answer .accordion-collapse,
.cms-faq-item .accordion-collapse {
  scroll-margin-top: 6rem;
}

/* ========================================
   COMPACT CMS TEXT SURFACES
======================================== */

.cms-hero-copy > :last-child,
.cms-page-body-compact > :last-child,
.cms-page-body-card > :last-child {
  margin-bottom: 0;
}

.cms-page-body-compact p,
.cms-page-body-card p,
.cms-page-body-compact ul,
.cms-page-body-card ul,
.cms-page-body-compact ol,
.cms-page-body-card ol {
  margin-bottom: 0.5rem;
}

.cms-page-body-compact h2,
.cms-page-body-compact h3,
.cms-page-body-compact h4,
.cms-page-body-card h2,
.cms-page-body-card h3,
.cms-page-body-card h4 {
  font-size: 1rem;
  margin-bottom: 0.5rem;
}