body {
  background: #f5f7fb;
}

.shop-body {
  background: #f8f9fb;
}

.auth-body {
  min-height: 100vh;
  background: linear-gradient(135deg, #eef4ff, #f8f9fb);
}

.auth-card {
  width: min(100%, 420px);
  border: 0;
  border-radius: 1rem;
}

.auth-card-wide {
  width: min(100%, 640px);
}

.hero-slide {
  min-height: 360px;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
}

.product-thumb {
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.placeholder-product-image,
.product-thumb.placeholder {
  aspect-ratio: 4 / 3;
}

.product-image-frame img {
  max-height: 540px;
  object-fit: cover;
}

.shopping-cart-link {
  white-space: nowrap;
}

.admin-body .nav-link.active {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 0.75rem;
}

.CodeMirror {
  height: auto;
  min-height: 240px;
  border: 1px solid #dee2e6;
  border-radius: 0.75rem;
}

.min-editor .ql-editor {
  min-height: 220px;
}

.repeater-row {
  align-items: center;
}

.product-editor .card {
  border-radius: 1rem;
}

.cart-summary-item:last-child {
  border-bottom: 0 !important;
}

.hero-carousel .carousel-indicators [data-bs-target] {
  width: 10px;
  height: 10px;
  border-radius: 999px;
}

.table td,
.table th {
  vertical-align: middle;
}


.product-editor-wide-card {
  width: 100%;
}

#shared-modal.modal .modal-fullscreen .modal-body {
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

.product-editor-wide-card .table-responsive {
  width: 100%;
}

.product-editor-wide-card table {
  min-width: 100%;
}

.product-price-matrix-full {
  width: 100%;
}

.product-price-matrix-full .table-responsive {
  width: 100%;
}

.product-price-matrix-full table {
  min-width: 100%;
}

.dashboard-chart-wrap {
  position: relative;
  width: 100%;
  height: 400px;
}

.dashboard-chart-wrap canvas {
  width: 100% !important;
  height: 400px !important;
}

/* Stable storefront product image sizing: prevents initial stretched render before all scripts finish. */
.product-card img.product-thumb,
.product-image-frame img.product-main-image,
.checkout-cart-image {
  display: block;
}

.product-card img.product-thumb {
  width: 100%;
  aspect-ratio: 4 / 3;
  height: auto;
  object-fit: cover;
}

.product-image-frame {
  width: 100%;
  overflow: hidden;
}

.product-image-frame img.product-main-image {
  width: 100%;
  height: auto;
  max-height: 540px;
  object-fit: contain;
}

.checkout-cart-image {
  width: 72px;
  height: 72px;
  object-fit: cover;
}


/* Strong anti-flicker image frames: fixed ratio boxes are applied before images decode. */
.product-card-image-frame,
.product-detail-image-frame {
  position: relative;
  width: 100%;
  overflow: hidden;
  background: #f8f9fa;
  aspect-ratio: 4 / 3;
}
.product-card-image-frame > img,
.product-detail-image-frame > img {
  position: absolute;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  max-height: none !important;
  display: block;
}
.product-card-image-frame > img { object-fit: cover; }
.product-detail-image-frame > img { object-fit: contain; }

.product-description-editor-card .CodeMirror {
  height: 400px !important;
  min-height: 400px;
  max-height: 400px;
  width: 100%;
}

.product-description-editor-card .CodeMirror-scroll {
  max-height: 400px;
  overflow: auto !important;
}

/* Product page main image should have square corners. */
.product-detail-image-frame,
.product-detail-image-frame > img,
.product-main-image {
  border-radius: 0 !important;
}
.product-image-lightbox-trigger {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
}
.product-detail-image-frame .product-image-lightbox-trigger > img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100% !important;
  height: 100% !important;
  object-fit: contain;
}
