/* Terra Design — shared storefront shell */
:root {
  --td-bg: #ffffff;
  --td-bg-soft: #f5f3ef;
  --td-bg-muted: #eceae5;
  --td-ink: #1a1a1a;
  --td-ink-soft: #4a4a4a;
  --td-muted: #7a7670;
  --td-line: #ddd9d2;
  --td-line-strong: #c8c3bb;
  --td-charcoal: #2a2a2a;
  --td-charcoal-deep: #1f1f1f;
  --td-accent: #b33a2b;
  --td-white: #fff;
  --td-max: 1440px;
  --td-header-h: 88px;
  --td-font-serif: "Cormorant Garamond", "Times New Roman", serif;
  --td-font-sans: "Montserrat", sans-serif;
  --td-radius: 2px;
  --td-shadow-soft: 0 10px 40px rgba(0, 0, 0, 0.08);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body.td-body {
  margin: 0;
  color: var(--td-ink);
  background: var(--td-bg);
  font-family: var(--td-font-sans);
  font-size: 14px;
  line-height: 1.55;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

.td-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.td-main {
  flex: 1 0 auto;
}

.td-container {
  width: min(calc(100% - 48px), var(--td-max));
  margin: 0 auto;
}

/* Shared buttons */
.td-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 50px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: var(--td-radius);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.td-btn--primary {
  background: var(--td-charcoal);
  color: #fff;
}

.td-btn--primary:hover {
  background: #111;
}

.td-btn--ghost {
  background: var(--td-bg-soft);
  border-color: var(--td-line-strong);
  color: var(--td-ink);
}

.td-btn--ghost:hover {
  background: #fff;
  border-color: var(--td-ink);
}

.td-btn--outline {
  background: #fff;
  border-color: var(--td-line-strong);
  color: var(--td-ink);
}

.td-btn--outline:hover {
  border-color: var(--td-ink);
}

.td-btn svg {
  width: 15px;
  height: 15px;
}

/* —— Top bar —— */
.td-topbar {
  background: var(--td-charcoal);
  color: rgba(255, 255, 255, 0.88);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.td-topbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 38px;
  padding: 8px 0;
}

.td-topbar__left,
.td-topbar__right {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 22px;
}

.td-topbar__item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.td-topbar__item svg {
  width: 13px;
  height: 13px;
  opacity: 0.85;
  flex-shrink: 0;
}

.td-topbar__social {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.td-topbar__social a {
  display: inline-flex;
  opacity: 0.85;
  transition: opacity 0.2s ease;
}

.td-topbar__social a:hover {
  opacity: 1;
}

.td-topbar__social svg {
  width: 14px;
  height: 14px;
}

@media (max-width: 900px) {
  .td-topbar {
    display: none;
  }
}

/* —— Header / nav —— */
.td-header {
  background: var(--td-white);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  position: sticky;
  top: 0;
  z-index: 40;
}

.td-header__inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 20px;
  min-height: var(--td-header-h);
}

.td-logo {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1;
  gap: 5px;
  flex-shrink: 0;
}

.td-logo__mark {
  font-family: var(--td-font-serif);
  font-weight: 500;
  font-size: 22px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--td-ink);
}

.td-logo__rule {
  width: 100%;
  height: 1px;
  background: var(--td-accent);
}

.td-logo img {
  display: block;
  height: 58px;
  width: auto;
  max-width: 120px;
  object-fit: contain;
}

.td-nav {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 4px 18px;
  flex-wrap: wrap;
}

.td-nav a {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--td-ink);
  padding: 6px 0;
  position: relative;
  white-space: nowrap;
}

.td-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: var(--td-ink);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}

.td-nav a:hover::after,
.td-nav a.is-active::after {
  transform: scaleX(1);
}

.td-nav__caret {
  display: inline-block;
  margin-left: 3px;
  width: 0;
  height: 0;
  border-left: 3px solid transparent;
  border-right: 3px solid transparent;
  border-top: 4px solid currentColor;
  opacity: 0.55;
  vertical-align: middle;
}

.td-nav__item {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.td-nav__dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  min-width: 220px;
  padding: 10px 0;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.08);
  z-index: 40;
}

.td-nav__item.has-dropdown:hover .td-nav__dropdown,
.td-nav__item.has-dropdown:focus-within .td-nav__dropdown {
  display: block;
}

.td-nav__dropdown a {
  display: block;
  padding: 8px 16px;
  white-space: nowrap;
  text-transform: none;
  letter-spacing: 0.04em;
  font-size: 12px;
}

.td-nav__dropdown a::after {
  display: none;
}

.td-nav__dropdown a:hover {
  background: rgba(0, 0, 0, 0.04);
}

.td-header__actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.td-icon-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: 0;
  background: transparent;
  cursor: pointer;
  color: var(--td-ink);
  padding: 0;
}

.td-icon-btn svg {
  width: 24px;
  height: 24px;
}

.td-icon-btn__badge {
  position: absolute;
  top: 2px;
  right: 0;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--td-ink);
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  line-height: 16px;
  text-align: center;
}

/* SM cart bubble must not stack on Terra header badge */
.td-icon-btn .sm-header-cart-bubble,
.td-header .sm-header-cart-bubble {
  display: none !important;
}

.td-nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  border: 1px solid var(--td-line);
  background: #fff;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}

.td-nav-toggle span {
  display: block;
  width: 18px;
  height: 1.5px;
  background: var(--td-ink);
}

@media (max-width: 1100px) {
  .td-header__inner {
    grid-template-columns: auto auto 1fr;
  }

  .td-logo img {
    height: 48px;
    max-width: 100px;
  }

  .td-nav-toggle {
    display: inline-flex;
    justify-self: end;
  }

  .td-header__actions {
    justify-self: end;
  }

  .td-nav {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    background: #fff;
    border-bottom: 1px solid var(--td-line);
    flex-direction: column;
    align-items: stretch;
    padding: 12px 24px 20px;
    gap: 0;
  }

  .td-header.is-open .td-nav {
    display: flex;
  }

  .td-nav__item {
    display: block;
  }

  .td-nav__dropdown {
    position: static;
    transform: none;
    display: none;
    min-width: 0;
    box-shadow: none;
    border: 0;
    border-left: 2px solid var(--td-line);
    margin: 4px 0 8px 8px;
    padding: 0;
    background: transparent;
  }

  .td-nav__item.has-dropdown.is-open .td-nav__dropdown,
  .td-nav__item.has-dropdown:focus-within .td-nav__dropdown {
    display: block;
  }

  .td-nav a {
    padding: 12px 0;
    border-bottom: 1px solid var(--td-bg-soft);
  }
}

/* —— Trust / contact bars —— */
.td-info-bar {
  background: var(--td-bg-soft);
  border-top: 1px solid rgba(0, 0, 0, 0.04);
}

.td-info-bar__grid {
  display: grid;
  gap: 28px;
  padding: 36px 0;
}

.td-info-bar__grid--3 {
  grid-template-columns: repeat(3, 1fr);
}

.td-info-bar__grid--4 {
  grid-template-columns: repeat(4, 1fr);
}

.td-info-item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.td-info-item__icon {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--td-ink);
}

.td-info-item__icon svg {
  width: 22px;
  height: 22px;
}

.td-info-item__title {
  margin: 0 0 4px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--td-ink);
}

.td-info-item__text {
  margin: 0;
  font-size: 12px;
  color: var(--td-muted);
  line-height: 1.5;
}

.td-info-item__text a {
  text-decoration: underline;
  text-underline-offset: 2px;
}

@media (max-width: 900px) {
  .td-info-bar__grid--3,
  .td-info-bar__grid--4 {
    grid-template-columns: 1fr;
    padding: 28px 0;
  }
}

/* —— Footer —— */
.td-footer {
  background: var(--td-charcoal-deep);
  color: rgba(255, 255, 255, 0.78);
}

.td-footer__main {
  padding: 56px 0 40px;
}

.td-footer__grid {
  display: grid;
  grid-template-columns: 1.35fr 0.9fr 0.9fr 0.9fr 1.15fr 1.2fr;
  gap: 28px 24px;
}

.td-footer__brand .td-logo__mark {
  color: #fff;
  font-size: 20px;
}

.td-footer__brand .td-logo__rule {
  background: var(--td-accent);
}

.td-footer__logo-img {
  display: block;
  height: 64px;
  width: auto;
  max-width: 140px;
  object-fit: contain;
}

.td-footer__about {
  margin: 16px 0 18px;
  font-size: 12px;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.62);
  max-width: 260px;
}

.td-footer__social {
  display: flex;
  gap: 14px;
}

.td-footer__social a {
  opacity: 0.8;
  transition: opacity 0.2s ease;
}

.td-footer__social a:hover {
  opacity: 1;
}

.td-footer__social svg {
  width: 16px;
  height: 16px;
}

.td-footer__title {
  margin: 0 0 16px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #fff;
}

.td-footer__links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.td-footer__links a {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.62);
  transition: color 0.2s ease;
}

.td-footer__links a:hover {
  color: #fff;
}

.td-footer__contact-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin: 0 0 12px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.62);
}

.td-footer__contact-row svg {
  width: 14px;
  height: 14px;
  margin-top: 2px;
  flex-shrink: 0;
  opacity: 0.8;
}

.td-footer__contact-row a {
  color: inherit;
  text-decoration: none;
}

.td-footer__contact-row a:hover {
  color: #fff;
}

.td-footer__consult {
  display: inline-flex;
  align-items: center;
  margin-top: 8px;
  padding: 10px 14px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.td-footer__consult:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: #fff;
}

.td-newsletter__title {
  margin: 0 0 14px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #fff;
}

.td-newsletter__form {
  position: relative;
  display: flex;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.04);
}

.td-newsletter__form input {
  flex: 1;
  border: 0;
  background: transparent;
  color: #fff;
  padding: 12px 14px;
  outline: none;
}

.td-newsletter__form input::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

.td-newsletter__form button {
  border: 0;
  background: transparent;
  color: #fff;
  width: 44px;
  cursor: pointer;
}

.td-newsletter__form button:disabled {
  opacity: 0.5;
  cursor: wait;
}

.td-newsletter__hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.td-newsletter__status {
  margin: 10px 0 0;
  font-size: 12px;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.7);
}

.td-newsletter__status.is-ok {
  color: #9fd89f;
}

.td-newsletter__status.is-err {
  color: #f0a8a0;
}

.td-footer__bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 16px 0;
}

.td-footer__bottom-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.5);
}

.td-footer__legal {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}

.td-footer__legal a:hover {
  color: #fff;
}

.td-back-top {
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: transparent;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.td-back-top svg {
  width: 14px;
  height: 14px;
}

@media (max-width: 1100px) {
  .td-footer__grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 640px) {
  .td-container {
    width: min(calc(100% - 32px), var(--td-max));
  }

  .td-footer__grid {
    grid-template-columns: 1fr;
  }

  .td-footer__bottom-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.td-header.is-search-open {
  box-shadow: 0 12px 40px rgba(28, 26, 23, 0.08);
}

.td-search {
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  background: linear-gradient(180deg, #fbfaf8 0%, #ffffff 100%);
  animation: td-search-in 0.22s ease;
}

@keyframes td-search-in {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

.td-search__inner {
  position: relative;
  padding: 14px 0 16px;
}

.td-search__form {
  display: grid;
  grid-template-columns: auto 1fr auto auto auto;
  align-items: center;
  gap: 8px;
  min-height: 54px;
  padding: 6px 8px 6px 14px;
  border: 1px solid #e7e2db;
  background: #fff;
  box-shadow: 0 10px 30px rgba(28, 26, 23, 0.05);
}

.td-search__label {
  display: inline-flex;
  color: #8a847c;
}

.td-search__icon svg {
  width: 18px;
  height: 18px;
}

.td-search__input {
  width: 100%;
  border: 0;
  outline: none;
  background: transparent;
  font: inherit;
  font-size: 16px;
  color: var(--td-ink);
  padding: 10px 4px;
}

.td-search__input::placeholder {
  color: #9a948c;
}

.td-search__clear,
.td-search__close,
.td-search__submit {
  border: 0;
  cursor: pointer;
  font: inherit;
}

.td-search__clear {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #f3f0eb;
  color: #6b6560;
  font-size: 18px;
  line-height: 1;
}

.td-search__submit {
  background: #1c1a17;
  color: #fff;
  padding: 10px 16px;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.td-search__submit:hover {
  background: #333;
}

.td-search__close {
  background: transparent;
  color: #8a847c;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 8px 10px;
}

.td-search__suggest {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% - 4px);
  z-index: 50;
  background: #fff;
  border: 1px solid #e7e2db;
  border-top: 0;
  box-shadow: 0 18px 40px rgba(28, 26, 23, 0.12);
  overflow: hidden;
}

.td-search__suggest-list {
  max-height: min(60vh, 420px);
  overflow: auto;
}

.td-search__item {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 12px 14px;
  text-decoration: none;
  color: inherit;
  border-bottom: 1px solid #f0ebe4;
}

.td-search__item:hover,
.td-search__item.is-active {
  background: #f7f4ef;
}

.td-search__thumb {
  width: 56px;
  height: 56px;
  background: #ece7e0;
  overflow: hidden;
  display: block;
}

.td-search__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.td-search__thumb-ph {
  display: block;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #ece7e0, #ddd6cc);
}

.td-search__item-title {
  display: block;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.35;
}

.td-search__item-meta {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  color: #6b6560;
}

.td-search__item-price {
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}

.td-search__item-price em {
  font-style: normal;
  font-weight: 400;
  font-size: 12px;
  color: #6b6560;
}

.td-search__empty {
  padding: 18px 16px;
  color: #6b6560;
  font-size: 14px;
}

.td-search__suggest-all {
  display: block;
  padding: 14px 16px;
  text-align: center;
  text-decoration: none;
  color: #1c1a17;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: #f7f4ef;
  border-top: 1px solid #e7e2db;
}

.td-search__suggest-all:hover {
  background: #efeae2;
}

button.td-icon-btn {
  appearance: none;
  background: transparent;
  border: 0;
  padding: 0;
  font: inherit;
  color: inherit;
  cursor: pointer;
}

@media (max-width: 700px) {
  .td-search__form {
    grid-template-columns: auto 1fr auto;
    grid-template-areas:
      "icon input clear"
      "submit submit close";
    gap: 10px;
    padding: 10px;
  }
  .td-search__label { grid-area: icon; }
  .td-search__input { grid-area: input; }
  .td-search__clear { grid-area: clear; }
  .td-search__submit { grid-area: submit; width: 100%; }
  .td-search__close { grid-area: close; }
}
