/* Appily Twentyseven — header, footer, chrome */

/* Announcement bar */
.ts-announce {
  background: var(--ts-charcoal);
  color: var(--ts-paper);
  font-size: 12px;
}
.ts-announce-inner {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 36px; gap: 16px; flex-wrap: wrap;
}
.ts-announce-msg { letter-spacing: .02em; }
.ts-announce-meta {
  display: flex; align-items: center; gap: 20px;
}
.ts-announce-meta a { opacity: .9; }
.ts-announce-meta a:hover { opacity: 1; text-decoration: underline; }

/* Header row */
.ts-header { background: var(--ts-paper); border-bottom: 1px solid var(--ts-line); }
.ts-header-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
  padding: 22px 0;
}
.ts-search {
  display: flex; max-width: 280px;
  border: 1px solid var(--ts-line);
}
.ts-search input {
  flex: 1; border: 0; padding: 10px 14px; background: var(--ts-paper);
  outline: none; font-size: 14px;
}
.ts-search button {
  border: 0; background: transparent; padding: 0 14px;
  font-size: 18px; cursor: pointer; color: var(--ts-muted);
}
.ts-search button:hover { color: var(--ts-ink); }

.ts-logo {
  text-align: center; display: flex; flex-direction: column; align-items: center;
}
.ts-logo-main {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 2.5vw, 1.85rem);
  font-weight: 700; letter-spacing: .18em;
  line-height: 1.1;
}
.ts-logo-sub {
  font-size: 10px; letter-spacing: .22em; color: var(--ts-muted);
  margin-top: 4px; font-weight: 500;
}

.ts-header-contact { justify-self: end; }
.ts-phone {
  display: flex; align-items: center; gap: 10px; text-align: left;
}
.ts-phone-icon { font-size: 22px; line-height: 1; }
.ts-phone-copy { display: flex; flex-direction: column; }
.ts-phone-copy strong { font-size: 14px; font-weight: 600; }
.ts-phone-copy small { font-size: 11px; color: var(--ts-muted); margin-top: 2px; }

/* Navbar */
.ts-navbar {
  background: var(--ts-surface);
  border-bottom: 1px solid var(--ts-line);
}
.ts-navbar-inner {
  display: flex; align-items: center; justify-content: center;
  min-height: 52px; position: relative;
}
.ts-nav {
  display: flex; align-items: center; justify-content: center;
  flex-wrap: wrap; gap: 0;
}
.ts-nav-link {
  padding: 16px 18px;
  font-size: 12px; font-weight: 600; letter-spacing: .1em;
  color: var(--ts-ink);
  border-bottom: 2px solid transparent;
  transition: .2s;
  text-transform: uppercase;
}
.ts-nav-link:hover, .ts-nav-link.is-active {
  color: var(--ts-wine);
  border-bottom-color: var(--ts-wine);
}
.ts-header-actions {
  position: absolute;
  right: 0;
  display: flex;
  align-items: center;
  gap: 22px;
}
.ts-account-pill,
.ts-cart-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .08em;
  padding: 8px 0;
  white-space: nowrap;
}
.ts-account-pill {
  width: 40px;
  height: 40px;
  justify-content: center;
  padding: 0;
  border: 1px solid var(--ts-line);
  border-radius: 50%;
  background: linear-gradient(165deg, var(--ts-paper) 0%, var(--ts-gold-pale) 100%);
  transition: border-color .25s, color .25s, background .25s, box-shadow .25s;
}
.ts-cart-pill {
  gap: 6px;
}
.ts-account-pill:hover,
.ts-cart-pill:hover,
.ts-account-pill.is-active {
  color: var(--ts-wine);
}
.ts-account-pill:hover,
.ts-account-pill.is-active {
  border-color: var(--ts-wine);
  background: linear-gradient(165deg, var(--ts-gold-pale) 0%, #fff 100%);
  box-shadow: 0 0 0 1px rgba(139, 41, 66, .12);
}
.ts-account-icon {
  display: block;
  width: 22px;
  height: 22px;
  position: relative;
}
.ts-account-bracket {
  position: absolute;
  width: 7px;
  height: 7px;
  border: 1.5px solid var(--ts-gold);
  opacity: .85;
  transition: opacity .25s, border-color .25s;
}
.ts-account-bracket-tl {
  top: -1px;
  left: -1px;
  border-right: 0;
  border-bottom: 0;
}
.ts-account-bracket-br {
  right: -1px;
  bottom: -1px;
  border-left: 0;
  border-top: 0;
}
.ts-account-pill:hover .ts-account-bracket,
.ts-account-pill.is-active .ts-account-bracket {
  border-color: var(--ts-wine);
  opacity: 1;
}
.ts-account-figure {
  position: absolute;
  inset: 3px 4px 2px;
}
.ts-account-figure::before {
  content: '';
  position: absolute;
  top: 1px;
  left: 50%;
  transform: translateX(-50%);
  width: 5px;
  height: 5px;
  background: currentColor;
  border-radius: 50%;
}
.ts-account-figure::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 13px;
  height: 7px;
  background: currentColor;
  border-radius: 7px 7px 3px 3px;
  clip-path: polygon(8% 0, 92% 0, 100% 100%, 0 100%);
}
.ts-cart-icon { font-size: 16px; }

.ts-menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  background: var(--ts-paper);
  border: 1px solid var(--ts-line);
  border-radius: 50%;
  padding: 0;
  cursor: pointer;
  z-index: 120;
  transition: border-color .2s, background .2s;
}
.ts-menu-toggle:hover {
  border-color: var(--ts-wine);
}
.ts-menu-bar {
  display: block;
  width: 18px;
  height: 2px;
  margin: 0 auto;
  background: var(--ts-ink);
  border-radius: 1px;
  transition: transform .25s ease, opacity .25s ease;
}
.ts-menu-toggle.is-open .ts-menu-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.ts-menu-toggle.is-open .ts-menu-bar:nth-child(2) {
  opacity: 0;
}
.ts-menu-toggle.is-open .ts-menu-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Mobile nav drawer (hidden on desktop) */
.ts-nav-backdrop {
  display: none;
}
.ts-nav-drawer-head,
.ts-nav-drawer-foot,
.ts-nav-drawer-kicker,
.ts-nav-link-arrow,
.ts-nav-close {
  display: none;
}
.ts-nav-drawer-body {
  display: contents;
}
.ts-nav-links {
  display: contents;
}

body.ts-nav-open {
  overflow: hidden;
}

/* Desktop — flat horizontal nav */
@media (min-width: 901px) {
  .ts-nav-drawer {
    display: contents;
  }
}

/* Newsletter */
.ts-newsletter {
  background: var(--ts-surface);
  border-top: 1px solid var(--ts-line);
  padding: 28px 0;
}
.ts-newsletter-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px; flex-wrap: wrap;
}
.ts-newsletter-inner strong {
  font-size: 13px; letter-spacing: .12em;
}
.ts-newsletter-form {
  display: flex; flex: 1; max-width: 480px; gap: 0;
}
.ts-newsletter-form input {
  flex: 1; border: 1px solid var(--ts-line); border-right: 0;
  padding: 12px 16px; background: var(--ts-paper); outline: none;
}
.ts-newsletter-form button {
  border: 0; background: var(--ts-ink); color: var(--ts-paper);
  padding: 12px 24px; font-size: 11px; font-weight: 700;
  letter-spacing: .1em; cursor: pointer;
}
.ts-newsletter-form button:hover { background: var(--ts-wine); }

/* Footer */
.ts-footer {
  background: var(--ts-surface);
  border-top: 1px solid var(--ts-line);
  padding: 48px 0 0;
}
.ts-footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr 1.2fr;
  gap: 32px;
  padding-bottom: 40px;
}
.ts-footer-logo {
  font-family: var(--font-display);
  font-size: 1.25rem; font-weight: 700; letter-spacing: .12em;
  display: block;
}
.ts-footer-tag {
  font-size: 10px; letter-spacing: .2em; color: var(--ts-muted);
  display: block; margin: 4px 0 12px;
}
.ts-footer-brand p { font-size: 13px; color: var(--ts-muted); margin: 0; line-height: 1.6; }
.ts-footer-col h4 {
  font-size: 12px; font-weight: 700; letter-spacing: .12em;
  margin: 0 0 16px; text-transform: uppercase;
}
.ts-footer-col a, .ts-footer-col p {
  display: block; font-size: 13px; color: var(--ts-muted);
  margin: 0 0 8px; line-height: 1.5;
}
.ts-footer-col a:hover { color: var(--ts-wine); }
.ts-footer-base {
  border-top: 1px solid var(--ts-line);
  padding: 16px 0 20px;
  font-size: 12px; color: var(--ts-muted);
}

@media (max-width: 900px) {
  .ts-header-row {
    grid-template-columns: 1fr;
    text-align: center;
    padding: 16px 0;
    gap: 14px;
  }
  .ts-search { max-width: 100%; order: 3; }
  .ts-logo { order: 1; }
  .ts-header-contact { order: 2; justify-self: center; }
  .ts-phone-copy small { display: none; }

  .ts-menu-toggle {
    display: flex;
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
  }
  .ts-menu-toggle.is-open {
    transform: translateY(-50%);
    border-color: var(--ts-wine);
    background: var(--ts-gold-pale);
  }

  .ts-navbar-inner {
    justify-content: center;
    min-height: 56px;
    padding: 0 52px;
    position: relative;
  }

  .ts-nav-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(17, 17, 17, .52);
    opacity: 0;
    pointer-events: none;
    transition: opacity .3s ease;
    z-index: 180;
  }
  .ts-nav-backdrop.is-open {
    opacity: 1;
    pointer-events: auto;
  }

  .ts-nav {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: min(320px, 88vw);
    max-width: 100%;
    transform: translateX(-105%);
    transition: transform .32s cubic-bezier(.4, 0, .2, 1);
    z-index: 190;
    visibility: hidden;
    box-shadow: none;
    border: 0;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    background: transparent;
  }
  .ts-nav.is-open {
    transform: translateX(0);
    visibility: visible;
  }

  .ts-nav-drawer {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: linear-gradient(180deg, var(--ts-charcoal) 0%, #1a1a1a 100%);
    color: var(--ts-paper);
    overflow: hidden;
  }

  .ts-nav-drawer-head,
  .ts-nav-drawer-foot,
  .ts-nav-drawer-kicker,
  .ts-nav-link-arrow,
  .ts-nav-close {
    display: flex;
  }
  .ts-nav-drawer-body {
    display: block;
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 8px 0 16px;
  }
  .ts-nav-links {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 0 16px;
  }

  .ts-nav-drawer-head {
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 20px 18px 18px;
    border-bottom: 1px solid rgba(196, 167, 125, .25);
    flex-shrink: 0;
  }
  .ts-nav-drawer-brand strong {
    display: block;
    font-family: var(--font-display);
    font-size: .95rem;
    letter-spacing: .14em;
    font-weight: 600;
    color: var(--ts-gold);
  }
  .ts-nav-drawer-brand span {
    display: block;
    font-size: .68rem;
    letter-spacing: .12em;
    text-transform: uppercase;
    opacity: .55;
    margin-top: 4px;
  }
  .ts-nav-close {
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1px solid rgba(196, 167, 125, .35);
    border-radius: 50%;
    background: transparent;
    color: var(--ts-paper);
    cursor: pointer;
    flex-shrink: 0;
    padding: 0;
    transition: border-color .2s, background .2s;
  }
  .ts-nav-close span {
    font-size: 1.5rem;
    line-height: 1;
    margin-top: -2px;
  }
  .ts-nav-close:hover {
    border-color: var(--ts-gold);
    background: rgba(196, 167, 125, .12);
  }

  .ts-nav-drawer-kicker {
    font-size: 9px;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--ts-gold);
    font-weight: 700;
    padding: 0 18px 10px;
    margin: 0;
  }

  .ts-nav-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    padding: 14px 16px;
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 2px;
    background: rgba(255, 255, 255, .04);
    font-size: .82rem;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: none;
    color: rgba(255, 255, 255, .88);
    border-bottom: 1px solid rgba(255, 255, 255, .08);
    transition: background .2s, border-color .2s, color .2s;
  }
  .ts-nav-link-label {
    flex: 1;
  }
  .ts-nav-link-arrow {
    font-size: .9rem;
    opacity: .45;
    transition: transform .2s, opacity .2s;
  }
  .ts-nav-link:hover,
  .ts-nav-link.is-active {
    color: var(--ts-paper);
    background: rgba(139, 41, 66, .35);
    border-color: rgba(196, 167, 125, .35);
  }
  .ts-nav-link.is-active {
    box-shadow: inset 3px 0 0 var(--ts-gold);
  }
  .ts-nav-link:hover .ts-nav-link-arrow,
  .ts-nav-link.is-active .ts-nav-link-arrow {
    opacity: 1;
    transform: translateX(3px);
  }

  .ts-nav-drawer-foot {
    flex-direction: column;
    gap: 8px;
    padding: 16px;
    border-top: 1px solid rgba(196, 167, 125, .25);
    background: rgba(0, 0, 0, .22);
    flex-shrink: 0;
  }
  .ts-drawer-action {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border: 1px solid rgba(255, 255, 255, .1);
    background: rgba(255, 255, 255, .05);
    color: var(--ts-paper);
    font-size: .78rem;
    font-weight: 600;
    letter-spacing: .04em;
    transition: background .2s, border-color .2s;
  }
  .ts-drawer-action-icon {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 1px solid rgba(196, 167, 125, .4);
    font-size: .75rem;
    flex-shrink: 0;
    color: var(--ts-gold);
  }
  .ts-drawer-action:hover,
  .ts-drawer-action.is-active {
    background: rgba(139, 41, 66, .4);
    border-color: rgba(196, 167, 125, .4);
  }
  .ts-drawer-action-muted {
    opacity: .75;
    font-size: .72rem;
  }

  .ts-header-actions {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    margin-left: 0;
    gap: 10px;
  }
  .ts-cart-label {
    display: none;
  }
  .ts-footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 560px) {
  .ts-announce-inner { justify-content: center; text-align: center; }
  .ts-announce-meta { display: none; }
  .ts-logo-main { font-size: 1.25rem; letter-spacing: .12em; }
  .ts-footer-grid { grid-template-columns: 1fr; }
  .ts-newsletter-inner { flex-direction: column; align-items: stretch; }
  .ts-newsletter-form { max-width: none; }
  .ts-header-contact { display: none; }
}
