:root {
  --maroon: #7A1220; --maroon-deep: #4A0D14; --gold: #C89B3C; --gold-soft: #E7D4A6;
  --cream: #FBF5E9; --paper: #FFFDF8; --ink: #2B1B12; --ink-soft: #6E5B4E; --line: #E7DCC8; --olive: #5C7A4A;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Manrope', system-ui, sans-serif; background: var(--cream); color: var(--ink); }
h1 { font-family: 'Fraunces', serif; color: var(--maroon-deep); font-size: 32px; margin-bottom: 24px; }

.site-header {
  background: rgba(251,245,233,0.9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
  padding: 10px 32px;
  position: sticky;
  top: 0;
  z-index: 20;
}
.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--maroon-deep); font-weight: 700; }
.brand-badge {
  width: 36px; height: 36px; border-radius: 50%; background: var(--maroon); color: white;
  border: 2px solid var(--gold); display: flex; align-items: center; justify-content: center;
  font-family: 'Fraunces', serif; font-weight: 700; font-size: 11px;
}
.brand-logo { height: 46px; width: auto; flex-shrink: 0; }
.brand-name {
  font-family: 'Fraunces', serif;
  font-weight: 700; font-size: 19px;
  color: var(--maroon-deep);
  display: flex; flex-direction: column; line-height: 1.1;
}
.brand-name em {
  font-style: normal; font-size: 10px;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--gold); font-weight: 700;
}
.header-link { color: var(--maroon-deep); font-weight: 700; text-decoration: none; font-size: 14px; }

.header-nav { display: flex; gap: 28px; font-weight: 600; font-size: 14px; align-items: center; position: relative; }
.header-nav a { color: var(--ink); text-decoration: none; }
.header-nav a:hover { color: var(--maroon); }

.dropdown { position: relative; }
.dropdown-toggle {
  display: flex; align-items: center; gap: 6px;
  background: none; border: none;
  font-family: inherit; font-weight: 600; font-size: 14px;
  color: var(--ink); cursor: pointer;
  padding: 6px 2px;
}
.dropdown-toggle:hover { color: var(--maroon); }
.dropdown-toggle .chev { transition: transform 0.15s ease; }
.dropdown-toggle.open .chev { transform: rotate(180deg); }

.dropdown-menu {
  position: absolute; top: calc(100% + 12px); left: 50%;
  transform: translateX(-50%);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 16px 36px -14px rgba(74,13,20,0.25);
  min-width: 190px;
  padding: 8px;
  opacity: 0; visibility: hidden; pointer-events: none;
  transform: translateX(-50%) translateY(-6px);
  transition: all 0.15s ease;
  z-index: 30;
}
.dropdown-menu.open {
  opacity: 1; visibility: visible; pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}
.dropdown-item {
  display: block;
  width: 100%;
  text-align: left;
  background: none; border: none;
  font-family: inherit; font-size: 13.5px; font-weight: 600;
  color: var(--ink);
  padding: 10px 12px;
  border-radius: 8px;
  cursor: pointer;
  text-decoration: none;
}
.dropdown-item:hover { background: var(--cream); color: var(--maroon); }
.dropdown-item-primary {
  background: var(--maroon);
  color: white !important;
  margin-bottom: 4px;
}
.dropdown-item-primary:hover { background: var(--maroon-deep); color: white !important; }

.login-link {
  color: var(--ink);
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
}
.login-link:hover { color: var(--maroon); }

.cart-btn {
  background: var(--maroon);
  color: white;
  border: none;
  text-decoration: none;
  padding: 11px 20px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  display: flex; align-items: center; gap: 8px;
  transition: transform 0.15s ease;
}
.cart-btn:hover { transform: translateY(-1px); }
#cartCount {
  background: var(--gold);
  color: var(--maroon-deep);
  min-width: 20px; height: 20px;
  border-radius: 10px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 12px; padding: 0 4px;
}

.header-right { display: flex; align-items: center; gap: 12px; }
.mobile-nav-toggle {
  display: none;
  background: none; border: 1.5px solid var(--line); border-radius: 10px;
  width: 40px; height: 40px; align-items: center; justify-content: center;
  color: var(--maroon-deep); cursor: pointer; flex-shrink: 0;
}
.mobile-nav-toggle:hover { border-color: var(--gold); }

footer { background: var(--maroon-deep); color: var(--gold-soft); padding: 44px 24px 28px; margin-top: 60px; }
.footer-inner { max-width: 1100px; margin: 0 auto; display: flex; flex-wrap: wrap; gap: 30px; justify-content: space-between; align-items: center; }
.footer-brand { display: flex; align-items: center; gap: 12px; }
.footer-title { font-family: 'Fraunces', serif; color: white; font-size: 18px; }
.footer-tag { font-size: 12.5px; margin-top: 2px; }
.footer-contact p { font-size: 13.5px; margin-bottom: 6px; }
.footer-contact a { color: white; }
.footer-bottom-row {
  max-width: 1100px; margin: 30px auto 0; padding-top: 26px;
  border-top: 1px solid rgba(231,212,166,0.25);
  display: flex; flex-wrap: wrap; gap: 20px;
  justify-content: space-between; align-items: center;
}
.footer-badges { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.app-badge-img { height: 40px; width: auto; display: block; transition: transform 0.15s ease; }
.footer-badges a:hover .app-badge-img { transform: translateY(-1px); }
.footer-social { display: flex; align-items: center; gap: 14px; }
.social-icon-img { height: 32px; width: auto; display: block; transition: transform 0.15s ease; }
.footer-social a:hover .social-icon-img { transform: translateY(-1px); }

@media (max-width: 1024px) {
  .header-inner { flex-wrap: wrap; }
  .mobile-nav-toggle { display: flex; }

  .header-nav {
    display: none;
    order: 3; width: 100%;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--maroon-deep); border-radius: 14px;
    margin-top: 14px; padding: 8px;
    max-height: 70vh; overflow-y: auto;
  }
  .header-nav.mobile-open { display: flex; }
  .header-nav > a {
    color: var(--gold-soft); padding: 14px 12px;
    border-bottom: 1px solid rgba(251,245,233,0.14);
  }
  .header-nav > a:hover { color: white; }
  .header-nav > .dropdown:last-child > .dropdown-toggle { border-bottom: 1px solid rgba(251,245,233,0.14); }

  .header-nav .dropdown-toggle {
    width: 100%; color: var(--gold-soft);
    padding: 14px 12px; border-bottom: 1px solid rgba(251,245,233,0.14);
    justify-content: space-between;
  }
  .header-nav .dropdown-toggle:hover { color: white; }

  .header-nav .dropdown-menu {
    position: static; transform: none;
    display: none; opacity: 1; visibility: visible; pointer-events: auto;
    background: rgba(43,27,18,0.35); box-shadow: none; border: none;
    border-radius: 0; min-width: 0; padding: 4px 4px 4px 20px;
  }
  .header-nav .dropdown-menu.open { display: flex; flex-direction: column; }
  .header-nav .dropdown-item { color: var(--gold-soft); }
  .header-nav .dropdown-item:hover { background: rgba(251,245,233,0.08); color: white; }
  .header-nav .dropdown-item-primary { background: var(--gold); color: var(--maroon-deep) !important; }
  .header-nav .dropdown-item-primary:hover { background: var(--gold); color: var(--maroon-deep) !important; }
}

@media (max-width: 600px) {
  .site-header { padding: 8px 16px; }
  .brand-logo { height: 34px; }
  .brand-name { font-size: 15px; }
  .brand-name em { font-size: 8px; }
  .header-right { gap: 8px; }
  .cart-btn { padding: 8px 12px; font-size: 12.5px; gap: 5px; }
  .cart-label { display: none; }
  .mobile-nav-toggle { width: 34px; height: 34px; }
  .mobile-nav-toggle svg { width: 18px; height: 18px; }
}

.acct-main { max-width: 620px; margin: 0 auto; padding: 44px 24px; }

.logged-out-msg { text-align: center; }
.logged-out-msg p { margin-bottom: 16px; color: var(--ink-soft); }
.btn-primary {
  display: inline-block; background: var(--maroon); color: white; text-decoration: none;
  padding: 12px 26px; border-radius: 999px; font-weight: 700;
}

.loyalty-card {
  background: var(--paper); border: 1px solid var(--line); border-radius: 16px;
  padding: 20px; margin-bottom: 20px;
}
.loyalty-card-head { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.loyalty-icon { font-size: 26px; }
.loyalty-title { font-weight: 700; color: var(--maroon-deep); font-size: 15px; }
.loyalty-sub { color: var(--ink-soft); font-size: 13px; margin-top: 2px; }
.loyalty-bar { background: var(--cream); border-radius: 999px; height: 10px; overflow: hidden; }
.loyalty-bar-fill { background: var(--gold); height: 100%; border-radius: 999px; transition: width 0.3s ease; }

.acct-list { background: var(--paper); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.acct-row {
  display: flex; align-items: center; gap: 16px; padding: 18px 20px;
  border-bottom: 1px solid var(--line); width: 100%; background: none; border-left: none; border-right: none; border-top: none;
  font-family: inherit; text-align: left; cursor: default;
}
.acct-list .acct-row:last-child { border-bottom: none; }
.acct-row-clickable { cursor: pointer; }
.acct-row-clickable:hover { background: var(--cream); }
.acct-row-icon { font-size: 20px; width: 24px; text-align: center; }
.acct-row-main { flex: 1; }
.acct-row-label { font-weight: 700; color: var(--maroon-deep); font-size: 14.5px; }
.acct-row-value { color: var(--ink-soft); font-size: 13.5px; margin-top: 2px; }
.edit-btn {
  background: var(--cream); border: 1px solid var(--line); width: 34px; height: 34px; border-radius: 50%;
  cursor: pointer; font-size: 13px; color: var(--maroon-deep);
}
.chevron { font-size: 20px; color: var(--ink-soft); }

.edit-form {
  background: var(--paper); border: 1px solid var(--line); border-radius: 16px;
  padding: 20px; margin-top: 16px; display: flex; flex-direction: column; gap: 12px;
}
.edit-form input {
  padding: 11px 13px; border-radius: 10px; border: 1.5px solid var(--line); background: var(--cream);
  font-family: inherit; font-size: 14.5px;
}
.edit-form-actions { display: flex; gap: 10px; }
.edit-form-actions button[type="submit"] {
  background: var(--maroon); color: white; border: none; padding: 10px 20px;
  border-radius: 999px; font-weight: 700; cursor: pointer;
}
.edit-form-actions button[type="button"] {
  background: none; border: 1.5px solid var(--line); color: var(--ink-soft); padding: 10px 20px;
  border-radius: 999px; font-weight: 700; cursor: pointer;
}
.save-msg { font-size: 13px; color: var(--olive); margin-top: 14px; }

@media (max-width: 600px) {
  .acct-main { padding: 28px 18px; }
  h1 { font-size: 26px; }
  .acct-row { padding: 14px 16px; gap: 12px; }
}