/* Dockside Delights ordering — brand-matched styles.
   Palette & fonts mirror docksidedelights.ca (Hello Elementor + Prata/Roboto). */

:root {
  --charcoal: #29292A;
  --orange:   #DB6437;
  --orange-dark: #c1552c;
  --peach:    #FAB89F;
  --peach-soft: #fde8de;
  --offwhite: #F7F8FA;
  --gray:     #D3D3D9;
  --gray-text:#848484;
  --white:    #ffffff;
  --ok:       #2e7d52;
  --warn:     #b8860b;
  --danger:   #cf2e2e;
  --radius:   14px;
  --radius-sm:9px;
  --shadow:   0 6px 20px rgba(0,0,0,.08);
  --shadow-lg:0 12px 40px rgba(0,0,0,.16);
  --maxw:     1100px;
  --font-head:'Prata', Georgia, 'Times New Roman', serif;
  --font-body:'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--charcoal);
  background: var(--offwhite);
  line-height: 1.55;
  font-size: 16px;
}
h1,h2,h3,h4 { font-family: var(--font-head); font-weight: 400; color: var(--charcoal); line-height: 1.2; margin: 0 0 .5em; }
h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }
a { color: var(--orange); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; display: block; }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
.muted { color: var(--gray-text); }
.small { font-size: .85rem; }
.center { text-align: center; }
.mt { margin-top: 1rem; }
.mb { margin-bottom: 1rem; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font-family: var(--font-body); font-size: 1rem; font-weight: 600;
  padding: .7rem 1.4rem; border-radius: 999px; border: 2px solid transparent;
  cursor: pointer; transition: all .15s ease; text-decoration: none; line-height: 1;
}
.btn-primary { background: var(--orange); color: #fff; }
.btn-primary:hover { background: var(--orange-dark); text-decoration: none; }
.btn-dark { background: var(--charcoal); color: #fff; }
.btn-dark:hover { background: #000; text-decoration: none; }
.btn-ghost { background: transparent; color: var(--charcoal); border-color: var(--gray); }
.btn-ghost:hover { border-color: var(--charcoal); text-decoration: none; }
.btn-danger { background: var(--danger); color:#fff; }
.btn-block { width: 100%; }
.btn:disabled, .btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn-sm { padding: .4rem .85rem; font-size: .85rem; }

/* ---------- Header ---------- */
.site-header {
  background: var(--white); border-bottom: 1px solid var(--gray);
  position: sticky; top: 0; z-index: 50;
}
.site-header .container { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: flex; align-items: center; gap: .6rem; }
.brand img { height: 44px; width: auto; }
.brand .brand-name { font-family: var(--font-head); font-size: 1.25rem; color: var(--charcoal); }

/* ---------- Cards & forms ---------- */
.card { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.5rem; }
.field { margin-bottom: 1rem; }
.field label { display: block; font-weight: 600; margin-bottom: .35rem; font-size: .95rem; }
.field .hint { font-size: .8rem; color: var(--gray-text); margin-top: .25rem; }
input[type=text], input[type=email], input[type=password], input[type=number],
input[type=url], input[type=date], input[type=time], select, textarea {
  width: 100%; padding: .65rem .8rem; border: 1.5px solid var(--gray);
  border-radius: var(--radius-sm); font-family: var(--font-body); font-size: 1rem;
  background: #fff; color: var(--charcoal);
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--orange); box-shadow: 0 0 0 3px rgba(219,100,55,.15); }
textarea { min-height: 110px; resize: vertical; }
.checkbox { display: flex; gap: .6rem; align-items: flex-start; }
.checkbox input { margin-top: .25rem; }

/* ---------- Alerts ---------- */
.alert { padding: .85rem 1.1rem; border-radius: var(--radius-sm); margin-bottom: 1rem; font-size: .95rem; }
.alert-success { background: #e6f4ec; color: var(--ok); border: 1px solid #bfe2cd; }
.alert-error { background: #fdeaea; color: var(--danger); border: 1px solid #f5c6c6; }
.alert-info { background: var(--peach-soft); color: var(--charcoal); border: 1px solid var(--peach); }

/* ---------- Badges ---------- */
.badge { display: inline-block; padding: .2rem .6rem; border-radius: 999px; font-size: .75rem; font-weight: 600; }
.badge-pending { background: #fff3e0; color: var(--warn); }
.badge-filled { background: #e6f4ec; color: var(--ok); }
.badge-cancelled { background: #f1f1f3; color: var(--gray-text); }
.badge-paid { background: #e6f4ec; color: var(--ok); }
.badge-unpaid { background: #fdeaea; color: var(--danger); }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; background:#fff; border-radius: var(--radius); overflow: hidden; }
table.data th, table.data td { text-align: left; padding: .7rem .8rem; border-bottom: 1px solid var(--gray); font-size: .92rem; }
table.data th { background: var(--offwhite); font-weight: 600; }
table.data tr:last-child td { border-bottom: none; }

/* smooth in-page scrolling for the "Jump to" menu */
html { scroll-behavior: smooth; }

/* ---------- Shop: product menu ---------- */
.hero { background: var(--peach-soft); padding: 2.5rem 0; text-align: center; }
.group { scroll-margin-top: 84px; } /* clear the sticky header when jumping */

/* "Show me" group-navigation control (lives in the sticky header) */
.jumpto { position: relative; }
.jumpto-menu {
  position: absolute; right: 0; top: 100%; margin-top: .35rem; background: #fff;
  border: 1px solid var(--gray); border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg); min-width: 200px; max-height: 70vh; overflow-y: auto; padding: .35rem; z-index: 60;
}
.jumpto-menu a {
  display: block; padding: .55rem .7rem; border-radius: 8px;
  color: var(--charcoal); text-align: left; font-size: .95rem;
}
.jumpto-menu a:hover { background: var(--peach-soft); text-decoration: none; }
.hero h1 { margin-bottom: .25rem; }
.group { margin: 2.5rem 0; }
.group-title { display: flex; align-items: center; gap: .8rem; margin-bottom: 1rem; }
.group-title h2 { margin: 0; }
.group-title img { height: 48px; width: 48px; border-radius: 50%; object-fit: cover; }
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.2rem; }
.product { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; display: flex; flex-direction: column; }
.product .pimg { aspect-ratio: 4/3; background: var(--peach-soft) center/cover no-repeat; }
.product .pbody { padding: 1rem 1.1rem 1.2rem; display: flex; flex-direction: column; flex: 1; }
.product h3 { font-size: 1.2rem; margin-bottom: .3rem; }
.product .desc { font-size: .9rem; color: var(--gray-text); flex: 1; }
.product .price { font-weight: 700; margin: .6rem 0; font-size: 1.05rem; }

/* qty stepper */
.stepper { display: inline-flex; align-items: center; border: 1.5px solid var(--gray); border-radius: 999px; overflow: hidden; }
.stepper button { width: 40px; height: 40px; border: none; background: #fff; font-size: 1.3rem; cursor: pointer; color: var(--charcoal); line-height: 1; }
.stepper button:hover { background: var(--peach-soft); }
.stepper input { width: 48px; height: 40px; border: none; text-align: center; font-size: 1rem; -moz-appearance: textfield; }
.stepper input::-webkit-outer-spin-button, .stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* sticky footer bar */
.orderbar {
  position: sticky; bottom: 0; background: #fff; border-top: 1px solid var(--gray);
  box-shadow: 0 -6px 20px rgba(0,0,0,.06); padding: .9rem 0; z-index: 40;
}
.orderbar .container { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }

/* summary line items */
.summary-line { display: flex; justify-content: space-between; padding: .5rem 0; border-bottom: 1px dashed var(--gray); }
.summary-total { display: flex; justify-content: space-between; padding: .6rem 0; font-weight: 700; font-size: 1.1rem; }

/* ---------- Admin ---------- */
.admin-shell { display: flex; min-height: 100vh; }
.admin-nav { width: 230px; background: var(--charcoal); color: #fff; flex-shrink: 0; padding: 1.2rem 0; }
.admin-nav .brand-name { color:#fff; padding: 0 1.2rem 1rem; font-family: var(--font-head); font-size: 1.2rem; display:block; border-bottom: 1px solid rgba(255,255,255,.12); margin-bottom: .6rem; }
.admin-nav a { display: block; color: #d9d9dd; padding: .6rem 1.2rem; font-size: .95rem; }
.admin-nav a:hover, .admin-nav a.active { background: rgba(255,255,255,.08); color: #fff; text-decoration: none; border-left: 3px solid var(--orange); padding-left: calc(1.2rem - 3px); }
.admin-main { flex: 1; min-width: 0; background: var(--offwhite); }
.admin-topbar { background: #fff; border-bottom: 1px solid var(--gray); padding: .9rem 1.5rem; display: flex; justify-content: space-between; align-items: center; }
.admin-content { padding: 1.5rem; }
.admin-content .page-head { display:flex; justify-content: space-between; align-items:center; margin-bottom: 1.2rem; gap: 1rem; flex-wrap: wrap; }
.toolbar { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; margin-bottom: 1rem; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.row-actions { display: flex; gap: .4rem; flex-wrap: wrap; }

/* login */
.auth-wrap { max-width: 400px; margin: 8vh auto; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .admin-shell { flex-direction: column; }
  .admin-nav { width: 100%; display: flex; flex-wrap: wrap; padding: .5rem; gap: .2rem; }
  .admin-nav .brand-name { width: 100%; border: none; padding-bottom: .5rem; }
  .admin-nav a { border-radius: 999px; padding: .4rem .9rem; }
  .admin-nav a:hover, .admin-nav a.active { border-left: none; padding-left: .9rem; }
  .grid-2 { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  h1 { font-size: 1.6rem; }
  .product-grid { grid-template-columns: 1fr; }
  .orderbar .container { flex-direction: column; align-items: stretch; }
  .btn { padding: .8rem 1.2rem; }
}

/* ---------- Print (used by the Pack List) ---------- */
@media print {
  .admin-nav, .admin-topbar, .site-header, .orderbar, footer,
  .no-print, .btn, .toolbar { display: none !important; }
  .admin-shell { display: block; }
  .admin-main { background: #fff; }
  .admin-content { padding: 0; }
  body { background: #fff; color: #000; font-size: 12pt; }
  .card { box-shadow: none; border: 1px solid #bbb; break-inside: avoid; }
  .grid-2 { display: block; }
  .grid-2 > .card { margin-bottom: 10px; }
  table.data { border: 1px solid #999; }
  table.data th { background: #fff !important; border-bottom: 1px solid #999; }
  table.data th, table.data td { padding: 4px 6px; }
  table.data tr { break-inside: avoid; }
  .badge { border: 1px solid #999; background: #fff !important; color: #000 !important; }
  a { color: #000; text-decoration: none; }
  .page-head { margin-bottom: 8px; }
}
