:root {
  --bg: #eaedf2;
  --bg-soft: #f7f8fa;
  --surface: #ffffff;
  --surface-alt: #f3f6f9;
  --text: #0f1111;
  --muted: #5f6b7a;
  --line: #d5d9d9;
  --brand: #223244;
  --brand-2: #31465d;
  --accent: #ffd84d;
  --accent-deep: #ffbf1f;
  --action: #007185;
  --shadow: 0 6px 20px rgba(15, 17, 17, 0.08);
  --radius-lg: 18px;
  --radius-md: 12px;
  --radius-sm: 8px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Manrope", sans-serif;
  color: var(--text);
  background: linear-gradient(180deg, #eef2f7 0%, #e8edf3 100%);
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

[hidden] {
  display: none !important;
}

.store-page {
  background: #eaedf2;
  padding-bottom: 96px;
}

.store-header {
  background: linear-gradient(180deg, #26384c 0%, var(--brand) 100%);
  color: #fff;
  box-shadow: var(--shadow);
}

.header-top {
  width: min(1500px, calc(100% - 24px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr) 180px;
  gap: 16px;
  align-items: center;
  padding: 14px 0;
}

.store-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: #fff;
  text-decoration: none;
}

.brand-logo {
  width: 190px;
  max-width: 100%;
  height: auto;
  display: block;
}

.brand-copy {
  display: grid;
}

.brand-copy small {
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.86rem;
}

.header-search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 120px;
  overflow: hidden;
  border-radius: 10px;
}

.header-search input,
.header-search button {
  border: none;
  height: 46px;
}

.header-search input {
  padding: 0 16px;
  background: #fff;
  color: var(--text);
  box-shadow: inset 0 1px 2px rgba(15, 17, 17, 0.06);
}

.header-search button {
  background: linear-gradient(180deg, #ffe27a 0%, var(--accent) 55%, var(--accent-deep) 100%);
  color: var(--text);
  font-weight: 700;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.header-contact,
.footer-btn,
.primary-btn,
.ghost-btn,
.floating-chat,
.product-action {
  border: none;
  border-radius: 999px;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.header-contact,
.footer-btn,
.primary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, #ffe27a 0%, var(--accent) 55%, var(--accent-deep) 100%);
  color: var(--text);
  font-weight: 800;
  box-shadow:
    0 8px 18px rgba(240, 184, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

.header-contact {
  min-height: 46px;
}

.header-bar {
  background: linear-gradient(180deg, #344b64 0%, var(--brand-2) 100%);
  color: #fff;
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  justify-content: center;
  padding: 10px 16px;
  font-size: 0.92rem;
}

.store-main,
.store-footer,
.admin-shell {
  width: min(1500px, calc(100% - 24px));
  margin: 18px auto;
}

.catalog-shell {
  display: grid;
  gap: 18px;
}

.toolbar-panel,
.booking-shell,
.product-card,
.admin-form,
.admin-preview,
.admin-header {
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.toolbar-panel,
.booking-shell,
.product-card,
.admin-form,
.admin-preview,
.admin-header {
  border-radius: var(--radius-lg);
  padding: 22px;
}

.booking-copy h2,
.toolbar-head h2,
.admin-header h1,
.admin-form h2,
.preview-head h2 {
  margin: 0 0 10px;
  line-height: 1.12;
}

.booking-copy p,
.store-footer p,
.field-group span,
.preview-head p,
.admin-header p,
.admin-product-meta {
  color: var(--muted);
}

.footer-copy {
  margin-top: 6px;
  font-size: 0.9rem;
}

.hero-chip,
.admin-chip {
  display: inline-flex;
  align-items: center;
  padding: 7px 12px;
  border-radius: 999px;
  background: #e8f4f7;
  color: #007185;
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.toolbar-panel {
  display: grid;
  gap: 16px;
}

.toolbar-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 14px;
}

.sort-wrap {
  display: grid;
  gap: 8px;
  min-width: 180px;
}

.sort-wrap span,
.field-group span {
  font-size: 0.9rem;
}

.sort-wrap select,
.field-group input,
.field-group select,
.field-group textarea {
  width: 100%;
  border: 1px solid #a6aeb7;
  border-radius: 10px;
  background: #fff;
  color: var(--text);
}

.sort-wrap select,
.field-group input,
.field-group select {
  min-height: 44px;
  padding: 0 14px;
}

.field-group textarea {
  padding: 12px 14px;
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.category-chip {
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid #cfd4da;
  background: #fff;
  color: var(--text);
  font-weight: 700;
}

.category-chip.active {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.product-card {
  display: grid;
  gap: 14px;
  padding: 18px;
  border-radius: 16px;
}

.product-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(15, 17, 17, 0.12);
}

.product-media {
  aspect-ratio: 1 / 1;
  border-radius: 12px;
  background: linear-gradient(180deg, #f6f7f9 0%, #edf1f5 100%);
  display: grid;
  place-items: center;
  overflow: hidden;
}

.product-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media-fallback {
  font-size: 2rem;
  font-weight: 800;
  color: #2f4057;
}

.product-topline,
.product-bottomline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 7px 10px;
  border-radius: 999px;
  background: #eef3f8;
  color: #334155;
  font-size: 0.8rem;
  font-weight: 700;
}

.badge.vendor {
  background: #fff7d6;
  color: #7a5b00;
}

.product-copy h3 {
  margin: 0 0 8px;
  font-size: 1.05rem;
}

.product-copy p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.product-price {
  font-weight: 800;
  font-size: 1.05rem;
}

.meta-line {
  color: var(--muted);
  font-size: 0.9rem;
}

.product-action,
.floating-chat {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  background: linear-gradient(180deg, #ffe27a 0%, #ffd84d 55%, #ffbf1f 100%);
  color: var(--text);
  font-weight: 800;
  box-shadow:
    0 8px 18px rgba(240, 184, 0, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

.product-action {
  width: 100%;
  min-height: 42px;
}

.booking-shell {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 20px;
  align-items: start;
}

.booking-form,
.admin-form {
  display: grid;
  gap: 16px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.field-group {
  display: grid;
  gap: 8px;
}

.store-footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  padding: 24px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.footer-btn,
.primary-btn {
  min-height: 44px;
  padding: 0 20px;
}

.ghost-btn {
  min-height: 44px;
  padding: 0 20px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  color: var(--text);
  font-weight: 700;
}

.floating-chat {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 30;
  min-height: 46px;
  padding: 0 20px;
  box-shadow: 0 4px 16px rgba(15, 17, 17, 0.18);
}

.empty-state {
  grid-column: 1 / -1;
  padding: 24px;
  border-radius: 14px;
  border: 1px dashed #b8c1cc;
  background: #fff;
  color: var(--muted);
}

.admin-page {
  background: #f3f6fa;
}

.admin-shell {
  display: grid;
  gap: 20px;
}

.admin-header {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: start;
}

.admin-branding {
  display: flex;
  align-items: center;
  gap: 16px;
}

.admin-logo {
  width: 220px;
  max-width: 100%;
  height: auto;
  display: block;
}

.admin-link {
  color: var(--action);
  font-weight: 700;
  text-decoration: none;
}

.admin-layout {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 20px;
}

.admin-auth {
  display: grid;
}

.admin-section-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.admin-status {
  margin: 0;
  font-size: 0.92rem;
  color: var(--muted);
}

.admin-product-list {
  display: grid;
  gap: 12px;
}

.admin-product-item {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--surface-alt);
}

.admin-product-copy {
  min-width: 0;
}

.admin-product-item strong {
  display: block;
  margin-bottom: 6px;
}

.admin-delete-btn {
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid #e1b3b3;
  border-radius: 999px;
  background: #fff;
  color: #b42318;
  font-weight: 700;
  flex-shrink: 0;
}

.header-contact:hover,
.footer-btn:hover,
.primary-btn:hover,
.ghost-btn:hover,
.floating-chat:hover,
.product-action:hover,
.header-search button:hover {
  transform: translateY(-1px);
  filter: brightness(1.02);
}

@media (max-width: 1180px) {
  .header-top,
  .booking-shell,
  .admin-layout,
  .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .header-top {
    grid-template-columns: 1fr;
  }

  .header-contact {
    width: 100%;
  }
}

@media (max-width: 860px) {
  .booking-shell,
  .admin-layout,
  .product-grid,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .admin-product-item {
    flex-direction: column;
  }

  .toolbar-head,
  .store-footer,
  .admin-header,
  .admin-section-head {
    flex-direction: column;
    align-items: stretch;
  }

  .header-search {
    grid-template-columns: minmax(0, 1fr) 96px;
  }

  .header-bar {
    gap: 10px;
    padding: 12px 14px;
    justify-content: flex-start;
    overflow-x: auto;
    flex-wrap: nowrap;
    scrollbar-width: none;
  }

  .header-bar::-webkit-scrollbar {
    display: none;
  }

  .header-bar span {
    white-space: nowrap;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
  }

  .toolbar-panel,
  .booking-shell {
    padding: 18px;
  }

  .toolbar-head h2,
  .booking-copy h2 {
    font-size: 1.5rem;
  }

  .product-grid {
    gap: 14px;
  }

  .product-card {
    border-radius: 14px;
    padding: 14px;
  }

  .product-copy h3 {
    font-size: 1rem;
  }

  .product-copy p {
    font-size: 0.95rem;
  }

  .product-action,
  .primary-btn,
  .footer-btn {
    min-height: 44px;
  }
}

@media (max-width: 560px) {
  .store-main,
  .store-footer,
  .admin-shell,
  .header-top {
    width: min(100% - 14px, 1500px);
  }

  .toolbar-panel,
  .booking-shell,
  .admin-form,
  .admin-preview,
  .admin-header,
  .store-footer {
    padding: 16px;
  }

  .store-page {
    padding-bottom: 112px;
  }

  .header-top {
    gap: 12px;
    padding: 12px 0;
  }

  .store-brand {
    gap: 10px;
  }

  .brand-logo {
    width: 136px;
  }

  .brand-copy strong {
    font-size: 1.05rem;
  }

  .brand-copy small {
    font-size: 0.8rem;
  }

  .admin-branding {
    flex-direction: column;
    align-items: flex-start;
  }

  .admin-logo {
    width: 168px;
  }

  .header-search {
    grid-template-columns: minmax(0, 1fr) 88px;
  }

  .header-search input,
  .header-search button,
  .header-contact {
    height: 44px;
  }

  .header-search input {
    font-size: 0.98rem;
  }

  .header-bar {
    padding-top: 10px;
    padding-bottom: 10px;
  }

  .booking-copy p,
  .product-copy p {
    font-size: 0.95rem;
  }

  .toolbar-head {
    gap: 12px;
  }

  .sort-wrap {
    min-width: 100%;
  }

  .filter-bar {
    gap: 8px;
  }

  .category-chip {
    padding: 9px 13px;
    font-size: 0.9rem;
  }

  .product-grid {
    gap: 12px;
  }

  .product-media {
    border-radius: 10px;
  }

  .product-topline,
  .product-bottomline {
    align-items: start;
  }

  .meta-line {
    line-height: 1.45;
  }

  .booking-shell {
    gap: 16px;
  }

  .form-grid {
    gap: 12px;
  }

  .field-group textarea {
    min-height: 110px;
  }

  .floating-chat {
    display: none;
  }
}
