﻿html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

input[type="number"] {
  appearance: auto;
  -moz-appearance: auto;
}

input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
  appearance: auto;
  margin: 0;
  opacity: 1;
}

body {
  margin-bottom: 60px;
}

.page-section {
  margin-bottom: 2rem;
}

.home-hero-section {
  margin: 0 0 2rem;
}

.home-hero-fullbleed {
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  width: 100vw;
}

.home-band {
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  padding: 0 clamp(1rem, 3vw, 2rem) 2rem;
  width: 100vw;
}

.home-band-inner {
  margin: 0 auto;
  max-width: 1320px;
}

.home-hero-eyebrow {
  color: #ffffff;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0;
  margin: 0;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
}

.home-hero-overlay h1 {
  color: #ffffff;
  font-size: 2.4rem;
  line-height: 1.1;
  margin: 0;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.45);
}

.home-hero-overlay .lead {
  color: #ffffff;
  max-width: 44rem;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
  margin: 0;
}

.home-carousel {
  display: grid;
  width: 100%;
}

.home-carousel-hero {
  position: relative;
}

.home-carousel-frame {
  position: relative;
  aspect-ratio: 21 / 9;
  width: 100%;
  max-width: none;
}

.home-carousel-frame img,
.home-carousel-frame .home-carousel-placeholder {
  position: absolute;
  inset: 0;
}

.home-carousel-frame img {
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.home-carousel-control {
  align-items: center;
  background: rgba(15, 23, 42, 0.5);
  border: 0;
  color: #fff;
  display: inline-flex;
  font-size: 2rem;
  height: 2.5rem;
  justify-content: center;
  line-height: 1;
  margin: auto 0;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 2.5rem;
  z-index: 3;
}

.home-carousel-control-prev {
  left: 0.5rem;
}

.home-carousel-control-next {
  right: 0.5rem;
}

.home-hero-overlay {
  align-items: start;
  bottom: 0;
  display: grid;
  gap: 1rem;
  left: 0;
  max-width: 56rem;
  padding: 3rem clamp(1rem, 4vw, 3rem);
  position: absolute;
  right: 0;
  top: 0;
  z-index: 2;
}

.home-hero-overlay::before {
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.7) 0%, rgba(15, 23, 42, 0.35) 45%, rgba(15, 23, 42, 0) 100%);
  content: "";
  inset: 0;
  pointer-events: none;
  position: absolute;
}

.home-hero-overlay > * {
  position: relative;
  z-index: 1;
}

.home-carousel-placeholder {
  align-items: center;
  background: #0f172a;
  color: #fff;
  display: flex;
  justify-content: center;
  padding: 1rem;
  text-align: center;
}

@media (max-width: 768px) {
  .home-carousel-frame {
    aspect-ratio: 16 / 12;
  }

  .home-hero-overlay {
    gap: 0.5rem;
    max-width: none;
    padding: 1rem 3.25rem 1rem 1rem;
  }

  .home-hero-overlay::before {
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.65) 0%, rgba(15, 23, 42, 0.2) 55%, rgba(15, 23, 42, 0) 100%);
  }

  .home-hero-eyebrow {
    font-size: 0.8rem;
    line-height: 1.2;
  }

  .home-hero-overlay h1 {
    font-size: clamp(1.35rem, 6vw, 1.8rem);
    line-height: 1.15;
  }

  .home-hero-overlay .lead {
    font-size: 0.95rem;
    line-height: 1.5;
    max-width: 100%;
  }

  .home-carousel-control {
    height: 2rem;
    width: 2rem;
    font-size: 1.4rem;
  }

  .home-carousel-control-prev {
    left: 0.35rem;
  }

  .home-carousel-control-next {
    right: 0.35rem;
  }
}

@media (max-width: 480px) {
  .home-carousel-frame {
    aspect-ratio: 1 / 1;
  }

  .home-hero-overlay {
    padding: 0.75rem 2.75rem 0.75rem 0.75rem;
  }

  .home-hero-overlay h1 {
    font-size: 1.2rem;
  }

  .home-hero-overlay .lead {
    font-size: 0.85rem;
    line-height: 1.4;
  }

  .home-carousel-control {
    top: auto;
    bottom: 0.5rem;
    transform: none;
  }
}

.home-hero-thumb,
.home-setting-gallery-thumb {
  appearance: none;
  background: #fff;
  border: 1px solid #cfd7df;
  cursor: pointer;
  padding: 0;
}

.home-hero-thumb.is-active,
.home-setting-gallery-thumb.is-active {
  border-color: #258cfb;
  box-shadow: 0 0 0 1px #258cfb inset;
}

.home-setting-form {
  max-width: 920px;
}

.home-setting-section {
  display: grid;
  gap: 0.75rem;
}

.home-setting-form {
  --home-setting-card-width: 360px;
}

.home-setting-preview-layout {
  display: grid;
  gap: 1rem;
  grid-template-columns: var(--home-setting-card-width) minmax(0, 1fr);
}

.home-setting-preview-block {
  display: grid;
  gap: 0.5rem;
}

.image-preview.image-preview-main.home-setting-frame {
  aspect-ratio: 21 / 9;
  max-width: none;
  width: 100%;
  border-radius: 8px;
}

.image-preview.image-preview-main.home-setting-frame img,
.image-preview.image-preview-main.home-setting-frame .image-preview-placeholder {
  position: absolute;
  inset: 0;
}

.image-preview.image-preview-main.home-setting-frame img {
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.home-setting-gallery-list {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fill, minmax(var(--home-setting-card-width), var(--home-setting-card-width)));
  justify-content: start;
}

.home-setting-image-card {
  border: 1px solid #d8dee4;
  border-radius: 8px;
  display: grid;
  gap: 0.5rem;
  padding: 0.75rem;
  background: #fff;
  width: 100%;
  max-width: var(--home-setting-card-width);
}

.home-setting-main-card {
  width: 100%;
  max-width: var(--home-setting-card-width);
}

.home-setting-card-header {
  display: flex;
  justify-content: flex-end;
}

.home-setting-delete-button {
  align-items: center;
  background: transparent;
  border: 0;
  color: #b42318;
  cursor: pointer;
  display: inline-flex;
  font-size: 1.4rem;
  height: 1.75rem;
  justify-content: center;
  line-height: 1;
  padding: 0;
  width: 1.75rem;
}

.home-setting-delete-button:hover {
  color: #7a1a12;
}

.home-setting-focus-frame {
  position: relative;
  touch-action: none;
  cursor: grab;
}

.home-setting-focus-frame img {
  object-fit: cover;
}

.home-setting-focus-frame:active {
  cursor: grabbing;
}

.home-setting-focus-frame[data-dragging="true"] {
  cursor: grabbing;
}

.home-setting-focus-marker {
  border: 2px solid rgba(37, 140, 251, 0.95);
  border-radius: 999px;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.9);
  height: 18px;
  left: 50%;
  pointer-events: none;
  position: absolute;
  top: var(--focus-y, 50%);
  transform: translate(-50%, -50%);
  width: 18px;
  z-index: 2;
}

.home-setting-focus-marker::after {
  background: rgba(37, 140, 251, 0.95);
  border-radius: 999px;
  content: "";
  height: 6px;
  left: 50%;
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 6px;
}

.home-setting-focus-row {
  align-items: center;
  color: #475569;
  display: flex;
  font-size: 0.9rem;
  gap: 0.5rem;
  justify-content: space-between;
}

.home-setting-image-card input[type="range"],
.home-setting-preview-block input[type="range"] {
  width: 100%;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 220px));
  gap: 1rem;
  justify-content: start;
  align-items: start;
}

.product-card {
  border: 1px solid #d8dee4;
  border-radius: 8px;
  box-sizing: border-box;
  display: grid;
  gap: 0.75rem;
  grid-template-rows: auto auto auto auto auto 1fr;
  padding: 1rem;
  width: 220px;
}

.product-card-image-frame,
.product-detail-main-frame {
  aspect-ratio: 1 / 1;
  border: 1px solid #d8dee4;
  border-radius: 8px;
  display: flex;
  margin: 0 0 0.75rem;
  overflow: hidden;
  align-items: center;
  justify-content: center;
  background: #fff;
}

@media (max-width: 480px) {
  .home-setting-preview-layout,
  .home-setting-gallery-list {
    grid-template-columns: 1fr;
  }

  .home-setting-main-card,
  .home-setting-image-card {
    max-width: none;
    width: 100%;
  }

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

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

.product-card-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.search-form,
.stacked-form {
  display: grid;
  gap: 0.75rem;
  max-width: 520px;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table th,
.data-table td {
  border-bottom: 1px solid #d8dee4;
  padding: 0.75rem;
  text-align: left;
}

.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.nav-form {
  margin: 0;
}

.nav-button {
  background: transparent;
  border: 0;
  cursor: pointer;
}

.admin-dropdown .dropdown-menu {
  margin-top: 0.25rem;
}

@media (min-width: 992px) {
  .admin-dropdown:hover > .dropdown-menu,
  .admin-dropdown:focus-within > .dropdown-menu {
    display: block;
  }
}

.cart-total {
  font-weight: 700;
  margin-top: 1rem;
}

.page-heading {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.checkbox-line {
  align-items: center;
  display: flex;
  gap: 0.5rem;
}

.checkout-recipient-row {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem;
}

.clearable-field {
  position: relative;
  width: 100%;
}

.clearable-field input,
.clearable-field textarea {
  padding-right: 2.75rem;
  width: 100%;
}

.clearable-field-button {
  align-items: center;
  background: transparent;
  border: 0;
  color: #5f6670;
  cursor: pointer;
  display: flex;
  font-size: 1.4rem;
  height: 2rem;
  justify-content: center;
  line-height: 1;
  padding: 0;
  position: absolute;
  right: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
  width: 2rem;
}

.clearable-field-textarea .clearable-field-button {
  top: 0.5rem;
  transform: none;
}

.clearable-field-button:hover,
.clearable-field-button:focus-visible {
  color: #111820;
}

.clearable-field-button[hidden] {
  display: none;
}

.order-create-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 120px auto;
  gap: 0.75rem;
  align-items: center;
  margin-bottom: 0.75rem;
}

.pagination-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1.5rem;
}

.pagination-nav a,
.pagination-nav span {
  display: inline-flex;
  min-width: 2.5rem;
  min-height: 2.5rem;
  align-items: center;
  justify-content: center;
  padding: 0.4rem 0.7rem;
  border: 1px solid #c9ced3;
  text-decoration: none;
}

.pagination-nav span[aria-current="page"] {
  border-color: #1f5f4a;
  background: #1f5f4a;
  color: #fff;
}

.footer-links {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-left: 1rem;
}

.legal-content h2 {
  margin-top: 1.5rem;
}

@media (max-width: 768px) {
  .order-create-item {
    grid-template-columns: 1fr;
  }
}

.checkout-copy-toggle {
  margin-left: auto;
}

.detail-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  margin-bottom: 1.5rem;
}

.subsection {
  margin: 1.5rem 0;
}

.remittance-panel {
  border: 1px solid #d8dee4;
  border-left: 4px solid #9b5f62;
  padding: 1.25rem;
}

.remittance-panel h2 {
  font-size: 1.25rem;
  margin: 0 0 0.75rem;
}

.remittance-form {
  grid-template-columns: minmax(0, 320px) auto;
  align-items: end;
  max-width: 560px;
}

.remittance-form label {
  grid-column: 1 / -1;
  margin: 0;
}

.remittance-form input {
  min-width: 0;
}

.remittance-help {
  margin: 0.75rem 0 0;
}

.remittance-panel-confirmed {
  border-left-color: #2f6f4e;
}

@media (max-width: 576px) {
  .remittance-form {
    grid-template-columns: 1fr;
  }

  .remittance-form label {
    grid-column: auto;
  }
}

.danger-form {
  margin-top: 1rem;
}

.cart-summary-widget {
  bottom: 1rem;
  position: fixed;
  right: 1rem;
  z-index: 1040;
}

.cart-summary-widget-link {
  background: #0f172a;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  color: #fff;
  display: grid;
  gap: 0.35rem;
  min-width: 220px;
  padding: 0.85rem 1rem;
  text-decoration: none;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.24);
}

.cart-summary-widget-link:hover,
.cart-summary-widget-link:focus {
  color: #fff;
  text-decoration: none;
}

.cart-summary-widget-title {
  font-size: 0.95rem;
  font-weight: 700;
}

.cart-summary-widget-body {
  display: grid;
  gap: 0.25rem;
  font-size: 0.92rem;
}

@media (max-width: 768px) {
  .cart-summary-widget {
    bottom: 0.5rem;
    right: 0.5rem;
    left: auto;
  }

  .cart-summary-widget-link {
    min-width: 0;
    max-width: 180px;
    padding: 0.6rem 0.75rem;
    gap: 0.25rem;
  }

  .cart-summary-widget-title {
    font-size: 0.8rem;
  }

  .cart-summary-widget-body {
    font-size: 0.78rem;
    gap: 0.15rem;
  }
}

.product-form {
  max-width: 680px;
}

.product-spec-section {
  border: 1px solid #d8dee4;
  border-radius: 8px;
  display: grid;
  gap: 0.75rem;
  padding: 1rem;
}

.product-spec-list {
  display: grid;
  gap: 0.75rem;
}

.product-spec-row {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr) auto;
  align-items: end;
  border: 1px solid #d8dee4;
  border-radius: 8px;
  padding: 0.75rem;
  background: #fff;
}

.product-spec-row label {
  display: block;
  margin-bottom: 0.25rem;
}

.product-spec-actions {
  display: flex;
  align-items: end;
}

@media (max-width: 768px) {
  .product-spec-row {
    grid-template-columns: 1fr;
  }
}

.product-form-preview-layout {
  display: grid;
  gap: 1rem;
  grid-template-columns: minmax(280px, 320px) minmax(0, 1fr);
}

.product-form-preview-block {
  display: grid;
  gap: 0.5rem;
}

.product-form-main-preview {
  max-width: 100%;
}

.product-gallery-thumb {
  appearance: none;
  background: #fff;
  border: 1px solid #cfd7df;
  cursor: pointer;
  padding: 0;
}

.product-detail-gallery-thumb {
  appearance: none;
  background: #fff;
  border: 1px solid #cfd7df;
  cursor: pointer;
  padding: 0;
}

.product-detail-gallery-thumb.is-active {
  border-color: #258cfb;
  box-shadow: 0 0 0 1px #258cfb inset;
}

.product-detail-layout {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: minmax(280px, 420px) minmax(0, 1fr);
}

.product-detail-media {
  display: grid;
  gap: 1rem;
}

.product-gallery-section {
  display: grid;
  gap: 0.75rem;
}

.product-gallery-title {
  margin: 0;
  font-weight: 700;
}

.product-gallery-grid {
  grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
}

.product-gallery-grid .image-preview-thumb {
  max-width: none;
}

.image-preview {
  align-items: center;
  border: 1px solid #cfd7df;
  border-radius: 8px;
  display: flex;
  justify-content: center;
  margin: 0;
  overflow: hidden;
  background: #fff;
}

.image-preview-main {
  aspect-ratio: 1 / 1;
  max-width: 320px;
}

.image-preview-thumb {
  aspect-ratio: 1 / 1;
  max-width: 140px;
}

.image-preview img {
  display: block;
  height: 100%;
  object-fit: contain;
  width: 100%;
}

.image-preview-placeholder {
  color: #6c757d;
  font-size: 0.95rem;
  padding: 1rem;
  text-align: center;
}

.image-preview-grid {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
}

.order-thumb {
  display: block;
  width: 56px;
  height: 56px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid #cfd7df;
  background: #fff;
}

.order-thumb-placeholder {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 6px;
  border: 1px solid #cfd7df;
  color: #6c757d;
  font-size: 0.85rem;
  background: #fff;
}

/* Kaira-inspired storefront theme */
:root {
  --store-ink: #20211f;
  --store-muted: #6d706a;
  --store-line: #dfe1dc;
  --store-canvas: #ffffff;
  --store-soft: #eef1ec;
  --store-accent: #9b5f62;
}

body {
  margin-bottom: 0;
}

.storefront-surface {
  background: var(--store-canvas);
  color: var(--store-ink);
  font-family: "Segoe UI", "Noto Sans TC", Arial, sans-serif;
  overflow-x: clip;
}

.site-header {
  background: rgba(255, 255, 255, 0.97);
  border-bottom: 1px solid var(--store-line);
  position: sticky;
  top: 0;
  z-index: 1030;
}

.site-navigation {
  min-height: 82px;
  padding: 0.75rem 0;
}

.site-navigation .navbar-toggler {
  border: 0;
  border-radius: 0;
  height: 44px;
  padding: 0.5rem;
  width: 44px;
}

.site-navigation .navbar-toggler:focus-visible {
  box-shadow: 0 0 0 2px rgba(32, 33, 31, 0.25);
  outline: 0;
}

.site-navigation .navbar-toggler-icon {
  height: 1.4rem;
  width: 1.4rem;
}

.site-brand,
.site-footer-brand > a {
  color: var(--store-ink);
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: 0;
  text-decoration: none;
}

.site-navigation-links {
  align-items: center;
  gap: 0.4rem;
}

.site-navigation .nav-link,
.site-navigation .nav-button {
  color: var(--store-ink);
  font-size: 0.92rem;
  padding: 0.75rem 0.85rem;
  position: relative;
}

.site-navigation .nav-link::after,
.site-navigation .nav-button::after {
  background: var(--store-ink);
  bottom: 0.35rem;
  content: "";
  height: 1px;
  left: 0.85rem;
  position: absolute;
  right: 0.85rem;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 180ms ease;
}

.site-navigation .nav-link:hover::after,
.site-navigation .nav-link:focus-visible::after,
.site-navigation .nav-button:hover::after,
.site-navigation .nav-button:focus-visible::after {
  transform: scaleX(1);
  transform-origin: left;
}

.site-navigation .dropdown-toggle::after {
  background: transparent;
  border-bottom: 0;
  border-left: 0.3em solid transparent;
  border-right: 0.3em solid transparent;
  border-top: 0.3em solid;
  display: inline-block;
  height: auto;
  left: auto;
  margin-left: 0.4em;
  position: static;
  transform: none;
  vertical-align: 0.18em;
  width: auto;
}

.nav-cart-count {
  align-items: center;
  background: var(--store-ink);
  border-radius: 50%;
  color: #fff;
  display: inline-flex;
  font-size: 0.68rem;
  height: 1.25rem;
  justify-content: center;
  margin-left: 0.2rem;
  min-width: 1.25rem;
  padding: 0 0.25rem;
}

.site-main {
  min-height: 62vh;
  padding-bottom: 4.5rem;
  padding-top: 2.5rem;
}

.storefront-page {
  margin: 0 auto;
  max-width: 1180px;
}

.storefront-page-header {
  margin-bottom: 2.5rem;
  text-align: center;
}

.storefront-page-header h1,
.home-band h2,
.product-detail-info h1 {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 400;
  letter-spacing: 0;
}

.storefront-page-header h1 {
  font-size: 2.6rem;
  margin: 0;
}

.section-kicker {
  color: var(--store-muted);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0;
  margin: 0 0 0.55rem;
  text-transform: uppercase;
}

.storefront-surface .btn {
  border-radius: 0;
  font-size: 0.86rem;
  font-weight: 600;
  min-height: 44px;
  padding: 0.7rem 1.35rem;
}

.storefront-surface .btn-primary {
  background: var(--store-ink);
  border-color: var(--store-ink);
  color: #fff;
}

.storefront-surface .btn-primary:hover,
.storefront-surface .btn-primary:focus-visible {
  background: var(--store-accent);
  border-color: var(--store-accent);
}

.storefront-surface .btn-secondary {
  background: transparent;
  border-color: var(--store-line);
  color: var(--store-ink);
}

.storefront-surface input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
.storefront-surface select,
.storefront-surface textarea {
  background: #fff;
  border: 1px solid #cfd2cc;
  border-radius: 0;
  min-height: 46px;
  padding: 0.7rem 0.85rem;
}

.storefront-surface textarea {
  min-height: 110px;
}

.storefront-surface input:focus,
.storefront-surface select:focus,
.storefront-surface textarea:focus {
  border-color: var(--store-ink);
  box-shadow: 0 0 0 2px rgba(32, 33, 31, 0.12);
  outline: 0;
}

.home-hero-section {
  margin-bottom: 5rem;
  margin-top: -2.5rem;
}

.home-carousel-frame {
  min-height: 0;
}

.home-hero-overlay {
  align-content: center;
  align-items: start;
  gap: 1rem;
  max-width: 46rem;
  padding: 4rem clamp(1.25rem, 7vw, 7rem);
}

.home-hero-overlay::before {
  background: rgba(24, 25, 23, 0.36);
}

.home-hero-overlay h1 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 3.5rem;
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1.12;
}

.home-hero-overlay .lead {
  font-size: 1.05rem;
  line-height: 1.8;
  max-width: 34rem;
}

.home-hero-link {
  border-bottom: 1px solid #fff;
  color: #fff;
  display: inline-block;
  font-size: 0.9rem;
  margin-top: 0.5rem;
  padding-bottom: 0.3rem;
  text-decoration: none;
  width: max-content;
}

.home-hero-link:hover,
.home-hero-link:focus-visible {
  color: #fff;
  opacity: 0.78;
}

.home-carousel-control {
  background: rgba(255, 255, 255, 0.9);
  color: var(--store-ink);
  height: 3rem;
  transition: background 160ms ease, color 160ms ease;
  width: 3rem;
}

.home-carousel-control:hover,
.home-carousel-control:focus-visible {
  background: var(--store-ink);
  color: #fff;
}

.home-band {
  padding-bottom: 5rem;
}

.home-band .page-heading {
  align-items: end;
  border-bottom: 1px solid var(--store-line);
  margin-bottom: 2rem;
  padding-bottom: 1.25rem;
}

.home-band h2 {
  font-size: 2.25rem;
  margin: 0;
}

.text-link {
  border-bottom: 1px solid var(--store-ink);
  color: var(--store-ink);
  font-size: 0.86rem;
  padding-bottom: 0.25rem;
  text-decoration: none;
}

.text-link:hover,
.text-link:focus-visible {
  color: var(--store-accent);
  border-color: var(--store-accent);
}

.storefront-surface .product-grid {
  align-items: start;
  gap: 2.25rem 1.5rem;
  grid-template-columns: repeat(auto-fill, minmax(220px, 280px));
  justify-content: center;
}

.storefront-surface .product-card {
  border: 0;
  border-radius: 0;
  display: block;
  padding: 0;
  width: 100%;
}

.product-card-image-link {
  display: block;
  overflow: hidden;
}

.storefront-surface .product-card-image-frame {
  background: var(--store-soft);
  border: 0;
  border-radius: 0;
  margin: 0;
}

.storefront-surface .product-card-image {
  mix-blend-mode: multiply;
  padding: 0.5rem;
  transition: transform 300ms ease;
}

.product-card-image-link:hover .product-card-image,
.product-card-image-link:focus-visible .product-card-image {
  transform: scale(1.035);
}

.product-card-content {
  display: grid;
  gap: 0.35rem;
  grid-template-columns: minmax(0, 1fr) auto;
  padding-top: 1rem;
}

.product-card-content h2,
.product-card-content h3 {
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.45;
  margin: 0;
}

.product-card-content h2 a,
.product-card-content h3 a {
  color: var(--store-ink);
  text-decoration: none;
}

.product-card-price {
  color: var(--store-ink);
  font-size: 0.95rem;
  margin: 0;
  white-space: nowrap;
}

.product-card-stock {
  color: var(--store-muted);
  font-size: 0.82rem;
  grid-column: 1 / -1;
  margin: 0;
}

.catalog-filter {
  align-items: end;
  background: var(--store-soft);
  display: grid;
  gap: 1rem;
  grid-template-columns: minmax(180px, 0.8fr) minmax(240px, 1.5fr) auto;
  margin: 0 0 3rem;
  max-width: none;
  padding: 1.5rem;
}

.catalog-filter-field {
  display: grid;
  gap: 0.45rem;
}

.catalog-filter-field label,
.checkout-form > label,
.product-detail-info .stacked-form > label {
  color: var(--store-muted);
  font-size: 0.8rem;
  font-weight: 600;
}

.product-detail-layout {
  gap: clamp(2rem, 6vw, 6rem);
  grid-template-columns: minmax(320px, 560px) minmax(300px, 430px);
  justify-content: center;
}

.product-detail-main-frame {
  background: var(--store-soft);
  border: 0;
  border-radius: 0;
}

.product-detail-main-frame img {
  mix-blend-mode: multiply;
  padding: 1rem;
}

.product-detail-info {
  align-self: start;
  padding-top: 1.5rem;
}

.product-detail-info h1 {
  font-size: 2.6rem;
  margin-bottom: 1.25rem;
}

.product-detail-description {
  color: var(--store-muted);
  line-height: 1.8;
  white-space: pre-line;
}

.product-detail-info .stacked-form {
  border-top: 1px solid var(--store-line);
  margin-top: 2rem;
  max-width: none;
  padding-top: 1.75rem;
}

.product-purchase-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.product-purchase-meta p {
  border-bottom: 1px solid var(--store-line);
  display: grid;
  gap: 0.25rem;
  margin: 0;
  padding: 0.85rem 0;
}

.product-purchase-meta span {
  color: var(--store-muted);
  font-size: 0.78rem;
}

.product-purchase-meta strong {
  font-size: 1.05rem;
  font-weight: 500;
}

.product-gallery-title {
  color: var(--store-muted);
  font-size: 0.8rem;
  font-weight: 600;
}

.product-detail-gallery-thumb,
.product-detail-gallery-thumb.is-active {
  border-radius: 0;
}

.product-detail-gallery-thumb.is-active {
  border-color: var(--store-ink);
  box-shadow: 0 0 0 1px var(--store-ink) inset;
}

.table-scroll {
  overflow-x: auto;
  width: 100%;
}

.storefront-surface .data-table th {
  color: var(--store-muted);
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
}

.storefront-surface .data-table td {
  padding-bottom: 1rem;
  padding-top: 1rem;
}

.cart-table input[type="number"] {
  max-width: 90px;
}

.cart-totals-panel {
  align-items: center;
  border-bottom: 1px solid var(--store-line);
  border-top: 1px solid var(--store-line);
  display: flex;
  justify-content: space-between;
  margin: 2rem 0 1rem auto;
  max-width: 360px;
  padding: 1.25rem 0;
}

.cart-totals-panel strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.5rem;
  font-weight: 400;
}

.cart-page .action-row {
  justify-content: flex-end;
}

.checkout-layout {
  align-items: start;
  display: grid;
  gap: clamp(2rem, 5vw, 5rem);
  grid-template-columns: minmax(320px, 1fr) minmax(320px, 1fr);
}

.checkout-summary {
  background: var(--store-soft);
  padding: 1.5rem;
}

.checkout-summary h2,
.checkout-form h2 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.6rem;
  font-weight: 400;
  margin: 0 0 1.25rem;
}

.checkout-form {
  max-width: none;
}

.site-footer {
  background: #20211f;
  color: #d6d8d2;
  padding: 4rem 0 0;
}

.site-footer-grid {
  display: grid;
  gap: 3rem;
  grid-template-columns: minmax(280px, 2fr) repeat(2, minmax(150px, 1fr));
  padding-bottom: 3.5rem;
}

.site-footer-brand > a {
  color: #fff;
}

.site-footer-brand p {
  color: #aeb1aa;
  line-height: 1.7;
  margin: 1rem 0 0;
  max-width: 26rem;
}

.site-footer nav {
  display: grid;
  gap: 0.65rem;
}

.site-footer h2 {
  color: #fff;
  font-size: 0.86rem;
  font-weight: 600;
  margin: 0 0 0.5rem;
}

.site-footer nav a {
  color: #aeb1aa;
  font-size: 0.86rem;
  text-decoration: none;
}

.site-footer nav a:hover,
.site-footer nav a:focus-visible {
  color: #fff;
}

.site-footer-bottom {
  border-top: 1px solid #3c3e39;
  color: #8f928b;
  font-size: 0.78rem;
  padding-bottom: 1.25rem;
  padding-top: 1.25rem;
}

.cart-summary-widget-link {
  background: var(--store-ink);
  border-radius: 0;
  box-shadow: 0 8px 24px rgba(20, 21, 19, 0.22);
}

@media (max-width: 991.98px) {
  .site-navigation .navbar-toggler {
    align-items: center;
    display: inline-flex;
    justify-content: center;
  }

  .site-navigation {
    min-height: 70px;
  }

  .site-navigation-links {
    align-items: stretch;
    border-top: 1px solid var(--store-line);
    margin-top: 0.75rem;
    padding-top: 0.75rem;
  }

  .site-navigation .nav-link::after,
  .site-navigation .nav-button::after {
    display: none;
  }

  .home-carousel-frame {
    aspect-ratio: 4 / 3;
    min-height: 0;
  }

  .product-detail-layout,
  .checkout-layout {
    grid-template-columns: 1fr;
  }

  .product-detail-media,
  .product-detail-info {
    margin: 0 auto;
    max-width: 620px;
    width: 100%;
  }

  .checkout-summary {
    order: 2;
  }
}

@media (max-width: 767.98px) {
  .site-main {
    padding-top: 1.5rem;
  }

  .home-hero-fullbleed,
  .home-band {
    margin-left: calc(var(--bs-gutter-x) * -0.5);
    margin-right: calc(var(--bs-gutter-x) * -0.5);
    width: auto;
  }

  .storefront-page-header {
    margin-bottom: 1.75rem;
  }

  .storefront-page-header h1,
  .product-detail-info h1 {
    font-size: 2rem;
  }

  .home-hero-section {
    margin-bottom: 3.5rem;
    margin-top: -1.5rem;
  }

  .home-carousel-frame {
    aspect-ratio: auto;
    height: 520px;
    min-height: 520px;
  }

  .home-hero-overlay {
    align-content: end;
    padding: 3rem 3.5rem 3rem 1.25rem;
  }

  .home-hero-overlay::before {
    background: rgba(24, 25, 23, 0.42);
  }

  .home-hero-overlay h1 {
    font-size: 2.2rem;
  }

  .home-hero-overlay .lead {
    display: -webkit-box;
    font-size: 0.92rem;
    line-height: 1.6;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
  }

  .home-carousel-control {
    bottom: auto;
    top: 50%;
    transform: translateY(-50%);
  }

  .home-band {
    padding-bottom: 3.5rem;
  }

  .catalog-filter {
    grid-template-columns: 1fr;
    padding: 1rem;
  }

  .catalog-filter .btn {
    width: 100%;
  }

  .site-footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .site-footer-brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 479.98px) {
  .storefront-surface .product-grid {
    grid-template-columns: 1fr;
  }

  .home-band .page-heading {
    align-items: start;
  }

  .checkout-summary {
    padding: 1rem;
  }

  .site-footer-grid {
    grid-template-columns: 1fr;
  }

  .site-footer-brand {
    grid-column: auto;
  }
}

/* Kaira-aligned administration theme */
.admin-surface {
  background: #f4f5f2;
  color: var(--store-ink);
  font-family: "Segoe UI", "Noto Sans TC", Arial, sans-serif;
}

.admin-surface .site-main {
  max-width: 1380px;
  padding-bottom: 4rem;
  padding-top: 2rem;
}

.admin-surface .page-section {
  margin-bottom: 2.5rem;
}

.admin-surface .page-heading {
  align-items: center;
  border-bottom: 1px solid #d7dad3;
  margin-bottom: 1.5rem;
  min-height: 54px;
  padding-bottom: 1rem;
}

.admin-surface .page-heading h1 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 2rem;
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1.2;
  margin: 0;
}

.admin-surface h2,
.admin-surface legend {
  color: var(--store-ink);
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 0;
}

.admin-surface .btn {
  border-radius: 0;
  font-size: 0.84rem;
  font-weight: 600;
  min-height: 40px;
  padding: 0.55rem 1rem;
}

.admin-surface .btn-primary {
  background: var(--store-ink);
  border-color: var(--store-ink);
  color: #fff;
}

.admin-surface .btn-primary:hover,
.admin-surface .btn-primary:focus-visible {
  background: var(--store-accent);
  border-color: var(--store-accent);
}

.admin-surface .btn-secondary {
  background: #fff;
  border-color: #c8cbc4;
  color: var(--store-ink);
}

.admin-surface .btn-secondary:hover,
.admin-surface .btn-secondary:focus-visible {
  background: #e8eae5;
  border-color: #aeb2aa;
  color: var(--store-ink);
}

.admin-surface input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="hidden"]),
.admin-surface select,
.admin-surface textarea {
  background: #fff;
  border: 1px solid #c9cdc5;
  border-radius: 0;
  color: var(--store-ink);
  min-height: 42px;
  padding: 0.6rem 0.75rem;
  width: 100%;
}

.admin-surface textarea {
  line-height: 1.6;
  min-height: 120px;
  resize: vertical;
}

.admin-surface input[readonly] {
  background: #e9ebe6;
  color: #6b6e68;
}

.admin-surface input:focus,
.admin-surface select:focus,
.admin-surface textarea:focus {
  border-color: var(--store-ink);
  box-shadow: 0 0 0 2px rgba(32, 33, 31, 0.12);
  outline: 0;
}

.admin-surface input[type="checkbox"] {
  accent-color: var(--store-ink);
  height: 1rem;
  width: 1rem;
}

.admin-surface input[type="file"] {
  padding: 0.35rem;
}

.admin-surface input[type="file"]::file-selector-button {
  background: #e8eae5;
  border: 0;
  color: var(--store-ink);
  cursor: pointer;
  margin: -0.35rem 0.75rem -0.35rem -0.35rem;
  min-height: 40px;
  padding: 0.55rem 0.85rem;
}

.admin-surface .search-form {
  align-items: center;
  background: #e9ece6;
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  margin-bottom: 1.5rem;
  max-width: none;
  padding: 1rem;
}

.admin-surface .search-form .checkbox-line {
  background: rgba(255, 255, 255, 0.6);
  min-height: 42px;
  padding: 0 0.75rem;
}

.admin-surface .search-form .btn {
  width: 100%;
}

.admin-surface .stacked-form {
  gap: 0.65rem;
  max-width: 720px;
}

.admin-surface .stacked-form > label:not(.checkbox-line),
.admin-surface .product-form-preview-block > label,
.admin-surface .home-setting-preview-block > label {
  color: #555952;
  font-size: 0.8rem;
  font-weight: 600;
  margin-top: 0.4rem;
}

.admin-surface .stacked-form .text-muted {
  color: #6d706a !important;
}

.admin-surface .data-table {
  background: #fff;
  border: 1px solid #d8dbd4;
  display: table;
  min-width: 720px;
  width: 100%;
}

.admin-surface .data-table thead {
  background: #e9ece6;
}

.admin-surface .data-table th {
  border-bottom: 1px solid #cfd3cb;
  color: #555952;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0;
  padding: 0.8rem 0.75rem;
  white-space: nowrap;
}

.admin-surface .data-table td {
  border-bottom: 1px solid #e4e6e1;
  font-size: 0.86rem;
  padding: 0.85rem 0.75rem;
  vertical-align: middle;
}

.admin-surface .data-table tbody tr:hover {
  background: #f7f8f5;
}

.admin-surface .data-table tbody tr:last-child td {
  border-bottom: 0;
}

.admin-surface .data-table a,
.admin-surface .data-table .nav-button {
  color: var(--store-ink);
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: #aeb2aa;
  text-underline-offset: 0.2rem;
}

.admin-surface .data-table a:hover,
.admin-surface .data-table a:focus-visible,
.admin-surface .data-table .nav-button:hover,
.admin-surface .data-table .nav-button:focus-visible {
  color: var(--store-accent);
  text-decoration-color: var(--store-accent);
}

.admin-surface .detail-grid {
  gap: 1px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  background: #d8dbd4;
  border: 1px solid #d8dbd4;
}

.admin-surface .detail-grid > div {
  background: #fff;
  min-height: 150px;
  padding: 1rem;
}

.admin-surface .detail-grid h2 {
  border-bottom: 1px solid #e1e3de;
  margin: 0 0 0.75rem;
  padding-bottom: 0.6rem;
}

.admin-surface .detail-grid p {
  color: #555952;
  font-size: 0.86rem;
  margin-bottom: 0.4rem;
  overflow-wrap: anywhere;
}

.admin-surface .subsection {
  border-left: 3px solid var(--store-accent);
  background: #fff;
  padding: 1rem;
}

.admin-surface .subsection h2 {
  margin-top: 0;
}

.admin-surface .pagination-nav a,
.admin-surface .pagination-nav span {
  background: #fff;
  border-color: #c9cdc5;
  color: var(--store-ink);
}

.admin-surface .pagination-nav span[aria-current="page"] {
  background: var(--store-ink);
  border-color: var(--store-ink);
  color: #fff;
}

.admin-surface .product-form,
.admin-surface .home-setting-form {
  max-width: none;
}

.admin-surface .product-form-preview-layout {
  background: #e9ece6;
  grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
  margin: 0.5rem 0 1rem;
  padding: 1rem;
}

.admin-surface .image-preview,
.admin-surface .product-card-image-frame,
.admin-surface .product-detail-main-frame {
  border-color: #c9cdc5;
  border-radius: 0;
}

.admin-surface .product-spec-section {
  background: #e9ece6;
  border: 0;
  border-radius: 0;
  margin: 1rem 0;
  padding: 1rem;
}

.admin-surface .product-spec-row {
  background: #fff;
  border: 1px solid #d4d7d0;
  border-radius: 0;
  padding: 0.85rem;
}

.admin-surface fieldset:not(.product-spec-section) {
  border: 1px solid #d4d7d0;
  display: grid;
  gap: 0.6rem;
  margin: 0.75rem 0;
  padding: 1rem;
}

.admin-surface fieldset:not(.product-spec-section) legend {
  float: none;
  margin-bottom: 0.5rem;
  padding: 0 0.35rem;
  width: auto;
}

.admin-surface .home-setting-section {
  border-top: 1px solid #d7dad3;
  margin-top: 1rem;
  padding-top: 1.25rem;
}

.admin-surface .home-setting-image-card {
  border-color: #c9cdc5;
  border-radius: 0;
  box-shadow: none;
}

.admin-surface .home-setting-focus-marker {
  border-color: var(--store-accent);
}

.admin-surface .home-setting-focus-marker::after {
  background: var(--store-accent);
}

.admin-surface .danger-form {
  border-top: 1px solid #d7dad3;
  padding-top: 1rem;
}

.admin-surface .danger-form .btn,
.admin-surface .home-setting-delete-button {
  color: #9a3f43;
}

.admin-surface .alert-info {
  background: #e9ece6;
  border-color: #cbd0c7;
  border-radius: 0;
  color: var(--store-ink);
}

@media (max-width: 991.98px) {
  .admin-surface .detail-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-surface .product-form-preview-layout,
  .admin-surface .home-setting-preview-layout {
    grid-template-columns: 1fr;
  }

  .admin-surface .data-table {
    display: block;
    overflow-x: auto;
  }
}

@media (max-width: 767.98px) {
  .admin-surface .site-main {
    padding-top: 1.25rem;
  }

  .admin-surface .page-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-surface .page-heading h1 {
    font-size: 1.65rem;
  }

  .admin-surface .page-heading > .btn,
  .admin-surface .page-heading > .action-row,
  .admin-surface .page-heading > .action-row .btn {
    width: 100%;
  }

  .admin-surface .search-form {
    grid-template-columns: 1fr;
  }

  .admin-surface .detail-grid {
    grid-template-columns: 1fr;
  }

  .admin-surface .product-form-preview-layout {
    padding: 0.75rem;
  }

  .admin-surface .product-spec-row {
    grid-template-columns: 1fr;
  }
}
