/* ============================================================
   THE DOUGH — New Design System
   Applies to: homepage, header, footer
   Does NOT override: ajaxcart, admin area
   ============================================================ */

:root {
  --cream: #F9F5EE;
  --cream-dark: #EFE9DC;
  --brown: #3D2B1F;
  --brown-light: #7A5C47;
  --gold: #C8A96E;
  --gold-light: #E8D5B0;
  --red: #A8192E;
  --red-dark: #7D1020;
  --red-light: #F5E8EA;
  --white: #FFFFFF;
  --text: #2A1A0E;
  --text-muted: #8A7060;
  --border: rgba(61,43,31,0.12);
  --serif: 'Cormorant Garamond', Georgia, serif;
  --sans: 'DM Sans', sans-serif;
}

/* ── BASE ── */
html { scroll-behavior: smooth; }
body {
  font-family: var(--sans) !important;
  background: var(--cream);
  color: var(--text);
  padding-top: 72px; /* compensate for fixed td-nav */
}

/* Noise texture */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 1000;
  opacity: .4;
}

/* ── NAV ── */
.td-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 900;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 48px;
  height: 72px;
  background: rgba(249,245,238,0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: all .3s;
}
.td-nav-logo {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--brown);
  text-decoration: none;
}
.td-nav-logo span {
  color: var(--red);
  font-style: italic;
}
.td-nav-links {
  display: flex;
  gap: 32px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.td-nav-links a {
  font-size: 13px;
  font-weight: 400;
  color: var(--text-muted);
  text-decoration: none;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: color .2s;
}
.td-nav-links a:hover {
  color: var(--brown);
}
.td-nav-right {
  display: flex;
  align-items: center;
  gap: 20px;
}
.td-nav-cart {
  position: relative;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  color: var(--brown);
  text-decoration: none;
  display: flex;
  align-items: center;
}
.td-nav-cart svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  fill: none;
}
.td-nav-cart .td-cart-count {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 16px;
  height: 16px;
  background: var(--red);
  border-radius: 50%;
  font-size: 9px;
  font-weight: 500;
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
}
.td-nav-order-btn {
  background: var(--red);
  color: var(--white);
  border: none;
  padding: 10px 22px;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background .2s;
  text-decoration: none;
  display: inline-block;
}
.td-nav-order-btn:hover {
  background: var(--red-dark);
  color: var(--white);
}

/* ── NAV AUTH ── */
.td-nav-login-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--brown);
  text-decoration: none;
  padding: 8px 14px;
  border: 1px solid var(--border);
  transition: all .2s;
  white-space: nowrap;
}
.td-nav-login-btn svg { width: 15px; height: 15px; flex-shrink: 0; }
.td-nav-login-btn:hover { border-color: var(--red); color: var(--red); }

.td-nav-user { position: relative; }
.td-nav-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  background: var(--cream-dark);
  color: var(--brown);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color .2s, background .2s;
}
.td-nav-avatar svg { width: 18px; height: 18px; }
.td-nav-avatar:hover,
.td-nav-user:has(.open) .td-nav-avatar {
  border-color: var(--red);
  background: var(--red-light);
  color: var(--red);
}

.td-nav-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 200px;
  background: var(--white);
  border: 1px solid var(--border);
  box-shadow: 0 8px 32px rgba(42,26,14,.12);
  z-index: 999;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-6px);
  transition: opacity .2s, transform .2s;
}
.td-nav-dropdown.open {
  opacity: 1;
  pointer-events: all;
  transform: translateY(0);
}
.td-nav-dropdown-name {
  padding: 12px 16px 10px;
  font-family: var(--serif);
  font-size: 15px;
  color: var(--brown);
  font-weight: 400;
}
.td-nav-dropdown-divider {
  height: 1px;
  background: var(--border);
  margin: 2px 0;
}
.td-nav-dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  font-size: 13px;
  color: var(--text-muted);
  text-decoration: none;
  transition: background .15s, color .15s;
}
.td-nav-dropdown-item svg { width: 15px; height: 15px; flex-shrink: 0; }
.td-nav-dropdown-item:hover { background: var(--cream); color: var(--brown); }
.td-nav-dropdown-item--logout { color: var(--red); }
.td-nav-dropdown-item--logout:hover { background: var(--red-light); color: var(--red); }
.td-nav-search-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  color: var(--brown);
  display: flex;
  align-items: center;
}
.td-nav-search-btn svg {
  width: 18px;
  height: 18px;
}
.td-mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  color: var(--brown);
}

/* ── HERO ── */
.td-hero {
  min-height: calc(100vh - 72px);
  display: grid;
  grid-template-columns: 1fr 1fr;
  position: relative;
  overflow: hidden;
}
.td-hero-left {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 80px 64px 80px;
  background: var(--cream);
}
.td-hero-eyebrow {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 24px;
}
.td-hero-title {
  font-family: var(--serif);
  font-size: clamp(52px, 6vw, 82px);
  font-weight: 300;
  line-height: 1.05;
  color: var(--brown);
  margin-bottom: 28px;
}
.td-hero-title em {
  font-style: italic;
  color: var(--red);
}
.td-hero-sub {
  font-size: 15px;
  line-height: 1.7;
  color: var(--text-muted);
  max-width: 400px;
  margin-bottom: 48px;
  font-weight: 300;
}
.td-hero-ctas {
  display: flex;
  gap: 16px;
  align-items: center;
}
.td-btn-primary {
  background: var(--red);
  color: var(--white);
  border: none;
  padding: 16px 36px;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all .25s;
  text-decoration: none;
  display: inline-block;
}
.td-btn-primary:hover {
  background: var(--red-dark);
  color: var(--white);
}
.td-btn-ghost {
  background: none;
  border: 1px solid var(--border);
  color: var(--brown);
  padding: 15px 32px;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all .25s;
  text-decoration: none;
  display: inline-block;
}
.td-btn-ghost:hover {
  border-color: var(--brown);
  color: var(--brown);
}
.td-hero-right {
  background: var(--cream-dark);
  position: relative;
  overflow: hidden;
}
.td-hero-right img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: sepia(8%);
}
.td-hero-badge {
  position: absolute;
  bottom: 48px;
  left: 48px;
  background: var(--white);
  padding: 20px 24px;
  border-left: 3px solid var(--red);
}
.td-hero-badge-num {
  font-family: var(--serif);
  font-size: 36px;
  font-weight: 600;
  color: var(--brown);
  line-height: 1;
}
.td-hero-badge-text {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* ── MARQUEE ── */
.td-marquee-wrap {
  background: var(--red);
  padding: 14px 0;
  overflow: hidden;
}
.td-marquee-track {
  display: flex;
  animation: tdMarquee 22s linear infinite;
  white-space: nowrap;
}
.td-marquee-item {
  font-family: var(--serif);
  font-size: 15px;
  font-style: italic;
  color: var(--gold-light);
  padding: 0 40px;
  display: flex;
  align-items: center;
  gap: 20px;
  flex-shrink: 0;
}
.td-marquee-item::after {
  content: '·';
  color: var(--gold);
}
@keyframes tdMarquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ── ABOUT ── */
.td-about {
  padding: 120px 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
  max-width: 1400px;
  margin: 0 auto;
}
.td-about-tag {
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--red);
  font-weight: 500;
  margin-bottom: 20px;
}
.td-about-title {
  font-family: var(--serif);
  font-size: clamp(36px, 3.5vw, 52px);
  font-weight: 300;
  line-height: 1.15;
  color: var(--brown);
  margin-bottom: 28px;
}
.td-about-text {
  font-size: 15px;
  line-height: 1.8;
  color: var(--text-muted);
  font-weight: 300;
  margin-bottom: 20px;
}
.td-about-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 40px;
  padding-top: 40px;
  border-top: 1px solid var(--border);
}
.td-stat-num {
  font-family: var(--serif);
  font-size: 38px;
  font-weight: 300;
  color: var(--red);
}
.td-stat-lbl {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
  letter-spacing: 0.04em;
}
.td-about-visual {
  position: relative;
}
.td-about-img-main {
  width: 100%;
  aspect-ratio: 4/5;
  object-fit: cover;
  filter: sepia(5%);
}
.td-about-img-accent {
  position: absolute;
  bottom: -32px;
  right: -32px;
  width: 55%;
  aspect-ratio: 1;
  object-fit: cover;
  border: 8px solid var(--cream);
  filter: sepia(5%);
}

/* ── CATEGORIES ── */
.td-categories {
  padding: 80px 0 60px;
  max-width: 1400px;
  margin: 0 auto;
}
.td-section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 48px;
}
.td-section-tag {
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--red);
  font-weight: 500;
  margin-bottom: 12px;
}
.td-section-title {
  font-family: var(--serif);
  font-size: clamp(32px, 3vw, 46px);
  font-weight: 300;
  color: var(--brown);
  line-height: 1.1;
}
.td-cat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2px;
}
.td-cat-card {
  position: relative;
  aspect-ratio: 3/4;
  overflow: hidden;
  cursor: pointer;
  display: block;
  text-decoration: none;
}
.td-cat-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .6s cubic-bezier(.25,.46,.45,.94);
  filter: sepia(5%) brightness(.95);
}
.td-cat-card:hover img {
  transform: scale(1.06);
}
.td-cat-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(42,26,14,.75) 0%, transparent 60%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 24px 20px;
}
.td-cat-name {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 300;
  color: var(--white);
  line-height: 1.1;
}
.td-cat-count {
  font-size: 11px;
  color: rgba(255,255,255,.6);
  margin-top: 4px;
  letter-spacing: 0.08em;
}

/* ── PRODUCTS SECTION WRAPPER ── */
.td-products-section {
  padding: 80px 80px;
  background: var(--white);
}
.td-products-inner {
  max-width: 1400px;
  margin: 0 auto;
}

/* ── PRODUCT FILTER & GRID ── */
.td-filter-bar { display:flex; gap:8px; margin-bottom:48px; flex-wrap:wrap; }
.td-filter-btn { background:none; border:1px solid var(--border); padding:8px 20px; font-family:var(--sans); font-size:12px; font-weight:400; color:var(--text-muted); letter-spacing:0.06em; text-transform:uppercase; cursor:pointer; transition:all .2s; }
.td-filter-btn:hover, .td-filter-btn.active { background:var(--red); color:var(--white); border-color:var(--red); }
.td-product-grid { display:grid; grid-template-columns:repeat(4,1fr); gap:32px 24px; }
.td-product-card { cursor:pointer; }
.td-product-card.td-hidden { display:none; }
.td-product-img-wrap { position:relative; aspect-ratio:1; overflow:hidden; background:var(--cream); margin-bottom:16px; display:block; width:100%; border:none; padding:0; cursor:pointer; }
.td-product-img-wrap img { width:100%; height:100%; object-fit:cover; transition:transform .5s cubic-bezier(.25,.46,.45,.94); }
.td-product-card:hover .td-product-img-wrap img { transform:scale(1.05); }
.td-product-badge-sale { position:absolute; top:12px; left:12px; background:var(--red); color:var(--white); font-size:10px; font-weight:500; padding:4px 10px; letter-spacing:0.06em; text-transform:uppercase; }
.td-product-origin { font-size:10px; letter-spacing:0.12em; text-transform:uppercase; color:var(--text-muted); margin-bottom:6px; font-weight:500; }
.td-product-name { font-family:var(--serif); font-size:18px; font-weight:400; color:var(--brown); line-height:1.3; margin-bottom:6px; background:none; border:none; padding:0; text-align:left; cursor:pointer; width:100%; transition:color .2s; }
.td-product-name:hover { color:var(--red); }
.td-product-qty { font-size:12px; color:var(--text-muted); margin-bottom:10px; }
.td-product-price-row { display:flex; align-items:center; justify-content:space-between; }
.td-product-price { font-size:16px; font-weight:500; color:var(--red); }
.td-product-old-price { font-size:12px; color:var(--text-muted); text-decoration:line-through; margin-left:8px; }
.td-add-to-cart { background:none; border:1px solid var(--border); width:34px; height:34px; display:flex; align-items:center; justify-content:center; cursor:pointer; color:var(--brown); transition:all .2s; flex-shrink:0; }
.td-add-to-cart:hover { background:var(--red); color:var(--white); border-color:var(--red); }
.td-add-to-cart.added { background:var(--red); border-color:var(--red); color:var(--white); }
.td-add-to-cart svg { width:16px; height:16px; stroke:currentColor; fill:none; }
@media(max-width:1100px) { .td-product-grid { grid-template-columns:repeat(3,1fr); } }
@media(max-width:768px) { .td-product-grid { grid-template-columns:repeat(2,1fr); } }
@media(max-width:480px) { .td-product-grid { grid-template-columns:1fr 1fr; } }

/* ── PROMO BANNER ── */
.td-promo-banner {
  margin: 0;
  background: var(--red);
  padding: 80px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}
.td-promo-tag {
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 500;
  margin-bottom: 16px;
}
.td-promo-title {
  font-family: var(--serif);
  font-size: clamp(32px, 3vw, 48px);
  font-weight: 300;
  color: var(--white);
  line-height: 1.15;
  margin-bottom: 20px;
}
.td-promo-text {
  font-size: 14px;
  line-height: 1.7;
  color: rgba(255,255,255,.6);
  margin-bottom: 36px;
  font-weight: 300;
}
.td-btn-light {
  background: var(--cream);
  color: var(--brown);
  border: none;
  padding: 16px 36px;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all .25s;
  text-decoration: none;
  display: inline-block;
}
.td-btn-light:hover {
  background: var(--gold-light);
  color: var(--brown);
}
.td-promo-right {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.td-promo-feat {
  background: rgba(255,255,255,.06);
  padding: 24px;
  border-left: 2px solid var(--gold);
}
.td-promo-feat-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(200,169,110,.12);
  border-radius: 50%;
  margin-bottom: 16px;
}
.td-promo-feat-icon svg {
  width: 22px;
  height: 22px;
  stroke: #c8a96e;
  flex-shrink: 0;
}
.td-promo-feat-title {
  font-family: var(--serif);
  font-size: 18px;
  color: var(--white);
  margin-bottom: 6px;
}
.td-promo-feat-text {
  font-size: 12px;
  color: rgba(255,255,255,.5);
  line-height: 1.6;
}

/* ── WHY SECTION ── */
.td-why {
  padding: 100px 80px;
  max-width: 1400px;
  margin: 0 auto;
  text-align: center;
}
.td-why-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 48px;
  margin-top: 60px;
}
.td-why-item {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.td-why-icon {
  width: 56px;
  height: 56px;
  border: 1px solid var(--red);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  color: var(--red);
}
.td-why-icon svg {
  width: 24px;
  height: 24px;
  stroke: currentColor;
  fill: none;
}
.td-why-title {
  font-family: var(--serif);
  font-size: 20px;
  color: var(--brown);
  margin-bottom: 10px;
}
.td-why-text {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.7;
  font-weight: 300;
}

/* ── TESTIMONIALS (CustomerRate restyle) ── */
.td-testimonials-wrap {
  background: var(--cream-dark);
  padding: 100px 80px;
}
.td-testimonials-inner {
  max-width: 1400px;
  margin: 0 auto;
}

/* ── FOOTER ── */
.td-footer {
  background: var(--brown);
  padding: 80px;
  color: rgba(255,255,255,.7);
}
.td-footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  max-width: 1400px;
  margin: 0 auto 60px;
}
.td-footer-logo {
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 300;
  color: var(--white);
  margin-bottom: 16px;
  text-decoration: none;
  display: block;
}
.td-footer-logo span {
  color: var(--red);
  font-style: italic;
}
.td-footer-desc {
  font-size: 13px;
  line-height: 1.8;
  font-weight: 300;
  margin-bottom: 28px;
  max-width: 280px;
  color: rgba(255,255,255,.7);
}
.td-footer-socials {
  display: flex;
  gap: 12px;
}
.td-footer-social svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  flex-shrink: 0;
}
.td-footer-social {
  width: 36px;
  height: 36px;
  border: 1px solid rgba(255,255,255,.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,.6);
  cursor: pointer;
  transition: all .2s;
  text-decoration: none;
}
.td-footer-social:hover {
  border-color: var(--red);
  color: var(--red);
}
.td-footer-col-title {
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--red);
  font-weight: 500;
  margin-bottom: 20px;
}
.td-footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 0;
  margin: 0;
}
.td-footer-links a {
  font-size: 13px;
  color: rgba(255,255,255,.6);
  text-decoration: none;
  font-weight: 300;
  transition: color .2s;
}
.td-footer-links a:hover {
  color: var(--white);
}
.td-footer-contact-item svg {
  width: 14px;
  height: 14px;
  stroke: #c8a96e;
  flex-shrink: 0;
  margin-top: 1px;
}
.td-footer-contact-item {
  font-size: 13px;
  color: rgba(255,255,255,.6);
  margin-bottom: 10px;
  font-weight: 300;
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.td-footer-contact-item a {
  color: rgba(255,255,255,.6);
  text-decoration: none;
  transition: color .2s;
}
.td-footer-contact-item a:hover {
  color: var(--white);
}
.td-footer-bottom {
  max-width: 1400px;
  margin: 0 auto;
  padding-top: 32px;
  border-top: 1px solid rgba(255,255,255,.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}
.td-footer-bottom-text {
  font-size: 12px;
  color: rgba(255,255,255,.35);
}

/* ── ANIMATIONS ── */
.td-fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .7s ease, transform .7s ease;
}
.td-fade-in.td-visible {
  opacity: 1;
  transform: translateY(0);
}
.td-fade-in:nth-child(2) { transition-delay: .1s; }
.td-fade-in:nth-child(3) { transition-delay: .2s; }
.td-fade-in:nth-child(4) { transition-delay: .3s; }
.td-fade-in:nth-child(5) { transition-delay: .4s; }
.td-slide-line {
  width: 0;
  height: 1px;
  background: var(--red);
  transition: width .8s ease;
  display: inline-block;
  vertical-align: middle;
  margin-right: 16px;
}
.td-visible .td-slide-line {
  width: 40px;
}

/* ── AUTH PAGE ── */
.td-auth-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 100vh;
}
.td-auth-panel {
  background: var(--brown);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.td-auth-panel::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url('/images/breadcrumb.jpg') center/cover no-repeat;
  opacity: .18;
}
.td-auth-panel-inner {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 40px;
}
.td-auth-logo {
  font-family: var(--serif);
  font-size: 48px;
  color: #fff;
  text-decoration: none;
  display: block;
  margin-bottom: 16px;
}
.td-auth-logo span { color: var(--gold); }
.td-auth-tagline {
  font-family: var(--sans);
  color: rgba(255,255,255,.7);
  font-size: 15px;
  line-height: 1.6;
  margin: 0;
}
.td-auth-panel-deco {
  margin-top: 48px;
  opacity: .5;
}
.td-auth-panel-deco svg { width: 160px; height: 160px; }

.td-auth-form-side {
  background: var(--cream);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 32px;
}
.td-auth-form-wrap {
  width: 100%;
  max-width: 400px;
}
.td-auth-form-header { margin-bottom: 32px; }
.td-auth-title {
  font-family: var(--serif);
  font-size: 32px;
  color: var(--brown);
  margin: 0 0 8px;
}
.td-auth-sub {
  font-family: var(--sans);
  font-size: 14px;
  color: #888;
  margin: 0;
}
.td-auth-err {
  display: block;
  font-size: 12px;
  color: var(--red);
  margin-top: 4px;
  min-height: 16px;
}
.td-auth-alert {
  background: #fff0f0;
  border: 1px solid var(--red);
  border-radius: 8px;
  color: var(--red);
  font-size: 13px;
  padding: 10px 14px;
  margin-bottom: 16px;
}
.td-auth-pw-wrap {
  position: relative;
}
.td-auth-pw-wrap .td-pf-input {
  padding-right: 44px;
}
.td-auth-pw-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  color: #aaa;
  display: flex;
  align-items: center;
}
.td-auth-pw-toggle svg { width: 18px; height: 18px; }
.td-auth-pw-toggle:hover { color: var(--brown); }
.td-auth-submit {
  width: 100%;
  justify-content: center;
  gap: 8px;
  margin-top: 8px;
}
.td-login-btn-spin { width: 18px; height: 18px; }
.td-auth-footer {
  text-align: center;
  margin-top: 20px;
  font-size: 13px;
  color: #888;
  font-family: var(--sans);
}
.td-auth-link {
  color: var(--brown);
  font-weight: 600;
  text-decoration: none;
  margin-left: 4px;
}
.td-auth-link:hover { color: var(--red); }
@keyframes td-spin { to { transform: rotate(360deg); } }

/* ── RESPONSIVE ── */
@media (max-width: 1100px) {
  .td-hero-title { font-size: 52px; }
  .td-nav { padding: 0 24px; }
}
@media (max-width: 900px) {
  .td-nav { padding: 0 24px; }
  .td-nav-links { display: none; }
  .td-mobile-menu-btn { display: flex; }
  .td-hero { grid-template-columns: 1fr; min-height: auto; }
  .td-hero-left { padding: 60px 32px 60px; }
  .td-hero-right { height: 50vw; }
  .td-about { grid-template-columns: 1fr; padding: 80px 0; gap: 40px; }
  .td-about-img-accent { display: none; }
  .td-categories { padding: 60px 0; }
  .td-products-section { padding: 60px 32px; }
  .td-promo-banner { grid-template-columns: 1fr; padding: 60px 32px; }
  .td-promo-right { grid-template-columns: 1fr 1fr; }
  .td-why { padding: 60px 32px; }
  .td-why-grid { grid-template-columns: repeat(2, 1fr); }
  .td-testimonials-wrap { padding: 60px 32px; }
  .td-footer { padding: 60px 32px; }
  .td-footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
}
@media (max-width: 600px) {
  .td-hero-ctas { flex-direction: column; align-items: flex-start; }
  .td-footer-grid { grid-template-columns: 1fr; }
  .td-why-grid { grid-template-columns: 1fr 1fr; }
  .td-auth-wrap { grid-template-columns: 1fr; }
  .td-auth-panel { display: none; }
  .td-auth-form-side { padding: 40px 20px; min-height: 100vh; }
}

/* ── MOBILE NAV OPEN STATE ── */
.td-nav-links.td-nav-open {
  display: flex;
  flex-direction: column;
  position: absolute;
  top: 72px;
  left: 0;
  right: 0;
  background: var(--cream);
  padding: 24px;
  gap: 20px;
  border-bottom: 1px solid var(--border);
  z-index: 800;
}

/* ── CART DRAWER ── */
.td-cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(42,26,14,.5);
  z-index: 990;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s;
}
.td-cart-overlay.open { opacity: 1; pointer-events: all; }

.td-cart-drawer {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: 420px;
  background: var(--white);
  z-index: 995;
  transform: translateX(100%);
  transition: transform .35s cubic-bezier(.25,.46,.45,.94);
  display: flex;
  flex-direction: column;
  font-family: var(--sans);
}
.td-cart-drawer.open { transform: translateX(0); }
@media (max-width: 480px) {
  .td-cart-drawer { width: 100%; }
}

.td-cart-drawer-header {
  padding: 28px 32px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}
.td-cart-drawer-title {
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 400;
  color: var(--brown);
}
.td-cart-drawer-close {
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px 10px;
  color: var(--text-muted);
  font-size: 22px;
  line-height: 1;
  transition: color .2s;
}
.td-cart-drawer-close:hover { color: var(--brown); }

.td-cart-drawer-items {
  flex: 1;
  overflow-y: auto;
  padding: 0 32px;
}

.td-cart-drawer-item {
  display: flex;
  gap: 14px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
  align-items: flex-start;
}
.td-cart-item-img {
  width: 72px;
  height: 72px;
  object-fit: cover;
  background: var(--cream);
  flex-shrink: 0;
}
.td-cart-item-info { flex: 1; min-width: 0; }
.td-cart-item-name {
  font-family: var(--serif);
  font-size: 15px;
  color: var(--brown);
  line-height: 1.3;
  margin-bottom: 10px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.td-cart-item-qty-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.td-cart-qty-btn {
  background: none;
  border: 1px solid var(--border);
  width: 26px;
  height: 26px;
  cursor: pointer;
  font-size: 15px;
  color: var(--brown);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .15s;
  flex-shrink: 0;
  padding: 0;
}
.td-cart-qty-btn:hover { background: var(--brown); color: var(--white); border-color: var(--brown); }
.td-cart-qty-num {
  font-size: 13px;
  font-weight: 500;
  width: 36px;
  text-align: center;
  border: 1px solid var(--border);
  padding: 2px 4px;
  color: var(--brown);
}
.td-cart-item-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  flex-shrink: 0;
}
.td-cart-item-price {
  font-size: 15px;
  font-weight: 500;
  color: var(--brown);
  white-space: nowrap;
}
.td-cart-item-remove {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 18px;
  line-height: 1;
  padding: 2px 4px;
  transition: color .15s;
}
.td-cart-item-remove:hover { color: var(--brown); }

.td-cart-drawer-empty {
  text-align: center;
  padding: 60px 0;
}
.td-cart-empty-icon { font-size: 48px; margin-bottom: 12px; opacity: .3; }
.td-cart-drawer-empty p {
  font-family: var(--serif);
  font-size: 18px;
  color: var(--text-muted);
}

.td-cart-drawer-footer {
  padding: 20px 32px 28px;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}
.td-cart-subtotal {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}
.td-cart-subtotal-label {
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .08em;
  font-weight: 500;
}
.td-cart-subtotal-val {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 400;
  color: var(--red);
}
.td-cart-ship-note {
  font-size: 12px;
  color: var(--gold);
  margin-bottom: 16px;
  min-height: 18px;
}
.td-btn-checkout {
  display: block;
  width: 100%;
  background: var(--red);
  color: var(--white);
  border: none;
  padding: 16px;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: .08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background .2s;
  margin-bottom: 10px;
  text-align: center;
  text-decoration: none;
}
.td-btn-checkout:hover { background: var(--red-dark); color: var(--white); }
.td-btn-continue {
  width: 100%;
  background: none;
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 12px;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: .06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all .2s;
}
.td-btn-continue:hover { border-color: var(--brown); color: var(--brown); }

/* ── CATEGORY SLIDER ── */
.td-cat-slider {
  position: relative;
  overflow: hidden;
}
.td-cat-slider .swiper-slide {
  height: auto;
}
.td-cat-slider .td-cat-card {
  width: 100%;
}
.td-cat-slider .swiper-button-prev,
.td-cat-slider .swiper-button-next {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.6);
  background: rgba(255,255,255,.15);
  backdrop-filter: blur(4px);
  color: var(--white);
  transition: background .2s, border-color .2s;
}
.td-cat-slider .swiper-button-prev::after,
.td-cat-slider .swiper-button-next::after {
  font-size: 14px;
  font-weight: 700;
}
.td-cat-slider .swiper-button-prev:hover,
.td-cat-slider .swiper-button-next:hover {
  background: var(--white);
  border-color: var(--white);
  color: var(--brown);
}
.td-cat-slider .swiper-button-disabled {
  opacity: 0.35;
}

/* ══════════════════════════════════════
   SHOP / PRODUCT LISTING PAGE
══════════════════════════════════════ */

/* Hero breadcrumb */
.td-page-hero {
  position: relative;
  height: 260px;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
}
.td-page-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0,0,0,.75), rgba(0,0,0,.4));
}
.td-page-hero-content {
  position: relative;
  text-align: center;
  z-index: 1;
}
.td-page-hero-title {
  font-family: var(--serif);
  font-size: clamp(28px, 4vw, 48px);
  font-weight: 300;
  color: var(--white);
  letter-spacing: 0.04em;
  margin-bottom: 12px;
}
.td-page-breadcrumb {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 13px;
  color: rgba(255,255,255,.6);
}
.td-page-breadcrumb a {
  color: rgba(255,255,255,.6);
  text-decoration: none;
  transition: color .2s;
}
.td-page-breadcrumb a:hover { color: var(--white); }
.td-page-breadcrumb svg { width: 14px; height: 14px; opacity: .5; }
.td-page-breadcrumb span { color: var(--gold); }

/* Shop layout */
.td-shop-wrap {
  max-width: 1400px;
  margin: 0 auto;
  padding: 60px 80px;
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 48px;
  align-items: start;
}

/* Sidebar */
.td-shop-sidebar {
  position: sticky;
  top: 92px;
}
.td-shop-sidebar-title {
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--red);
  font-weight: 500;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
.td-shop-cat-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.td-shop-cat-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  font-size: 14px;
  color: var(--text-muted);
  text-decoration: none;
  border-bottom: 1px solid var(--border);
  transition: color .2s;
}
.td-shop-cat-link:hover,
.td-shop-cat-link.active {
  color: var(--brown);
}
.td-shop-cat-link.active {
  font-weight: 500;
}
.td-shop-cat-arrow svg {
  width: 14px;
  height: 14px;
  opacity: 0;
  transition: opacity .2s;
}
.td-shop-cat-link:hover .td-shop-cat-arrow svg,
.td-shop-cat-link.active .td-shop-cat-arrow svg {
  opacity: 1;
}

/* Shop main */
.td-shop-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.td-shop-count {
  font-size: 13px;
  color: var(--text-muted);
}

/* Empty state */
.td-shop-empty {
  text-align: center;
  padding: 80px 0;
  color: var(--text-muted);
}
.td-shop-empty svg {
  width: 48px;
  height: 48px;
  stroke: var(--border);
  margin-bottom: 16px;
}
.td-shop-empty p {
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 300;
}

/* Product grid */
.td-shop-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

/* Product card */
.td-shop-card {
  display: flex;
  flex-direction: column;
}
.td-shop-card-img-wrap {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  display: block;
  background: var(--cream-dark);
}
.td-shop-card-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s cubic-bezier(.25,.46,.45,.94), opacity .3s;
}
.td-shop-card-img2 {
  position: absolute;
  inset: 0;
  opacity: 0;
}
.td-shop-card-img-wrap:hover img:first-child { opacity: 0; transform: scale(1.04); }
.td-shop-card-img-wrap:hover .td-shop-card-img2 { opacity: 1; }
.td-shop-card-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--red);
  color: var(--white);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 4px 8px;
}
.td-shop-card-badge--oos {
  background: rgba(42,26,14,.7);
}
.td-shop-card-body {
  padding: 14px 0 0;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.td-shop-card-origin {
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.td-shop-card-name {
  font-family: var(--serif);
  font-size: 16px;
  font-weight: 300;
  line-height: 1.3;
  margin-bottom: 4px;
  flex: 1;
}
.td-shop-card-name a {
  color: var(--brown);
  text-decoration: none;
  transition: color .2s;
}
.td-shop-card-name a:hover { color: var(--red); }
.td-shop-card-qty {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 10px;
}
.td-shop-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}
.td-shop-card-price-wrap {
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.td-shop-card-price {
  font-size: 15px;
  font-weight: 500;
  color: var(--red);
}
.td-shop-card-old-price {
  font-size: 12px;
  color: var(--text-muted);
  text-decoration: line-through;
}
.td-shop-card-btn {
  width: 32px;
  height: 32px;
  border: 1px solid var(--border);
  background: none;
  color: var(--brown);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all .2s;
  flex-shrink: 0;
}
.td-shop-card-btn svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  fill: none;
}
.td-shop-card-btn:hover {
  background: var(--red);
  border-color: var(--red);
  color: var(--white);
}
.td-shop-card-btn.added {
  background: var(--red);
  border-color: var(--red);
  color: var(--white);
}

/* Responsive */
@media (max-width: 1200px) {
  .td-shop-wrap { padding: 48px 40px; }
  .td-shop-grid { grid-template-columns: repeat(3, 1fr); gap: 20px; }
}
@media (max-width: 900px) {
  .td-shop-wrap { grid-template-columns: 1fr; padding: 32px 24px; gap: 32px; }
  .td-shop-sidebar { position: static; }
  .td-shop-cat-list { display: flex; flex-wrap: wrap; gap: 0; }
  .td-shop-cat-list li { flex-shrink: 0; }
  .td-shop-cat-link { border: 1px solid var(--border); padding: 6px 14px; font-size: 13px; border-bottom: 1px solid var(--border); }
  .td-shop-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
  .td-shop-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .td-page-hero { height: 180px; }
}

/* ══════════════════════════════════════
   PRODUCT DETAIL POPUP
══════════════════════════════════════ */
.td-popup-overlay {
  position: fixed;
  inset: 0;
  background: rgba(42,26,14,.55);
  z-index: 1100;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s;
}
.td-popup-overlay.open { opacity: 1; pointer-events: all; }

.td-popup-modal {
  position: fixed;
  inset: 0;
  z-index: 1101;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  pointer-events: none;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .3s, transform .3s;
}
.td-popup-modal.open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: all;
}
.td-popup-content {
  background: var(--cream);
  width: 100%;
  max-width: 860px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
}

/* Loading */
.td-popup-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 320px;
}
.td-popup-spinner {
  width: 32px;
  height: 32px;
  border: 2px solid var(--border);
  border-top-color: var(--red);
  border-radius: 50%;
  animation: td-spin .7s linear infinite;
}
@keyframes td-spin { to { transform: rotate(360deg); } }

/* Popup inner layout */
.td-popup-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  position: relative;
  min-height: 420px;
}

/* Close button */
.td-popup-close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 10;
  width: 36px;
  height: 36px;
  border: 1px solid var(--border);
  background: var(--white);
  color: var(--brown);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all .2s;
}
.td-popup-close:hover { background: var(--red); border-color: var(--red); color: var(--white); }
.td-popup-close svg { width: 16px; height: 16px; }

/* Image column */
.td-popup-img-col {
  background: var(--cream-dark);
}
.td-popup-img-wrap {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 320px;
}
.td-popup-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.td-popup-badge {
  position: absolute;
  top: 16px;
  left: 16px;
  background: var(--red);
  color: var(--white);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: 4px 10px;
}

/* Info column */
.td-popup-info-col {
  padding: 40px 36px 32px;
  display: flex;
  flex-direction: column;
}
.td-popup-origin {
  font-size: 10px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.td-popup-name {
  font-family: var(--serif);
  font-size: clamp(20px, 2.5vw, 28px);
  font-weight: 300;
  color: var(--brown);
  line-height: 1.2;
  margin-bottom: 16px;
}
.td-popup-price-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 4px;
}
.td-popup-price {
  font-size: 22px;
  font-weight: 500;
  color: var(--red);
}
.td-popup-old-price {
  font-size: 14px;
  color: var(--text-muted);
  text-decoration: line-through;
}
.td-popup-divider {
  height: 1px;
  background: var(--border);
  margin: 16px 0;
}

/* Details */
.td-popup-details { margin: 0 0 4px; }
.td-popup-detail-row {
  display: flex;
  gap: 8px;
  font-size: 13px;
  margin-bottom: 6px;
}
.td-popup-detail-row dt {
  color: var(--text-muted);
  flex-shrink: 0;
  font-weight: 400;
  min-width: 100px;
}
.td-popup-detail-row dd {
  color: var(--brown);
  margin: 0;
}

/* Actions */
.td-popup-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-top: auto;
}
.td-popup-qty {
  display: flex;
  align-items: center;
  border: 1px solid var(--border);
  flex-shrink: 0;
}
.td-popup-qty-btn {
  width: 36px;
  height: 40px;
  background: none;
  border: none;
  color: var(--brown);
  font-size: 18px;
  cursor: pointer;
  transition: background .15s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.td-popup-qty-btn:hover { background: var(--cream-dark); }
.td-popup-qty-input {
  width: 44px;
  height: 40px;
  border: none;
  border-left: 1px solid var(--border);
  border-right: 1px solid var(--border);
  text-align: center;
  font-size: 14px;
  font-family: var(--sans);
  color: var(--brown);
  background: var(--white);
  -moz-appearance: textfield;
}
.td-popup-qty-input::-webkit-outer-spin-button,
.td-popup-qty-input::-webkit-inner-spin-button { -webkit-appearance: none; }
.td-popup-add-btn {
  flex: 1;
  height: 40px;
  background: var(--red);
  color: var(--white);
  border: none;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .08em;
  text-transform: uppercase;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background .2s;
}
.td-popup-add-btn svg { width: 15px; height: 15px; stroke: currentColor; fill: none; flex-shrink: 0; }
.td-popup-add-btn:hover { background: var(--red-dark); }
.td-popup-add-btn--added { background: #3B6D11 !important; }
.td-popup-total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 12px;
  font-size: 13px;
}
.td-popup-total-label { color: var(--text-muted); }
.td-popup-total-val { font-family: var(--serif); font-size: 18px; color: var(--red); }

/* Responsive */
@media (max-width: 640px) {
  .td-popup-inner { grid-template-columns: 1fr; }
  .td-popup-img-wrap { min-height: 240px; }
  .td-popup-info-col { padding: 24px 20px; }
  .td-popup-modal { padding: 0; align-items: flex-end; }
  .td-popup-content { max-height: 92vh; border-radius: 0; }
}

/* --------------------------------------
   PROFILE PAGE
-------------------------------------- */
.td-profile-wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 40px 80px;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.td-profile-sidebar { width: 100%; }
.td-profile-avatar {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 20px 28px;
  border: 1px solid var(--border);
  border-bottom: none;
  background: var(--white);
}
.td-profile-avatar-icon {
  width: 52px; height: 52px;
  border-radius: 50%;
  background: var(--cream-dark);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.td-profile-avatar-icon svg { width: 26px; height: 26px; stroke: var(--brown-light); }
.td-profile-name { font-family: var(--serif); font-size: 17px; color: var(--brown); font-weight: 300; }
.td-profile-email { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.td-profile-nav {
  background: var(--white);
  border: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  gap: 0;
}
.td-profile-nav-group {
  display: flex;
  flex-wrap: wrap;
  border-right: 1px solid var(--border);
}
.td-profile-nav-group:last-child { border-right: none; }
.td-profile-nav-label { display: none; }
.td-profile-nav-item {
  display: flex; align-items: center; gap: 8px;
  padding: 14px 20px; font-size: 13px; color: var(--text-muted);
  text-decoration: none; cursor: pointer;
  transition: background .15s, color .15s;
  border: none; background: none;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
}
.td-profile-nav-item svg { width: 14px; height: 14px; flex-shrink: 0; }
.td-profile-nav-item:hover { background: var(--cream); color: var(--brown); }
.td-profile-nav-item.active { color: var(--red); font-weight: 500; border-bottom-color: var(--red); background: none; }
.td-profile-nav-badge {
  font-size: 10px; padding: 2px 7px;
  border-radius: 10px; font-weight: 500; letter-spacing: .04em;
}
.td-badge-pending { background: #FFF3CD; color: #856404; }
.td-badge-active  { background: #D1FAE5; color: #065F46; }

/* Main */
.td-profile-main { min-width: 0; padding-top: 28px; }
.td-profile-tab { display: none; flex-direction: column; gap: 24px; }
.td-profile-tab.active { display: flex; }
.td-profile-card {
  background: var(--white);
  border: 1px solid var(--border);
  padding: 28px 32px;
}
.td-profile-card-title {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--serif); font-size: 18px; font-weight: 300; color: var(--brown);
  margin-bottom: 24px; padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.td-profile-card-title svg { width: 18px; height: 18px; flex-shrink: 0; }

/* Forms */
.td-profile-form { display: flex; flex-direction: column; gap: 16px; }
.td-pf-group { display: flex; flex-direction: column; gap: 6px; }
.td-pf-label { font-size: 12px; font-weight: 500; color: var(--text-muted); letter-spacing: .04em; text-transform: uppercase; }
.td-pf-input {
  height: 42px; border: 1px solid var(--border);
  padding: 0 14px; font-size: 14px; font-family: var(--sans);
  color: var(--brown); background: var(--cream);
  transition: border-color .2s; outline: none; width: 100%;
}
.td-pf-input:focus { border-color: var(--brown); background: var(--white); }
.td-pf-note { font-size: 13px; color: var(--text-muted); margin: 0; }
.td-pf-btn {
  align-self: flex-start;
  background: var(--red); color: var(--white); border: none;
  padding: 11px 28px; font-family: var(--sans); font-size: 12px;
  font-weight: 500; letter-spacing: .08em; text-transform: uppercase;
  cursor: pointer; transition: background .2s;
}
.td-pf-btn:hover { background: var(--red-dark); }
.td-pf-btn--outline {
  background: none; border: 1px solid var(--border); color: var(--brown);
  display: flex; align-items: center; gap: 6px; flex-shrink: 0; height: 42px; padding: 0 16px;
}
.td-pf-btn--outline:hover { border-color: var(--brown); background: var(--cream); }
.td-pf-btn--outline svg { width: 14px; height: 14px; }

/* Affiliate register */
.td-aff-register { text-align: center; padding: 24px 0; }
.td-aff-register-icon { width: 64px; height: 64px; margin: 0 auto 20px; background: var(--cream-dark); border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.td-aff-register-icon svg { width: 28px; height: 28px; stroke: var(--gold); }
.td-aff-register h3 { font-family: var(--serif); font-size: 24px; font-weight: 300; color: var(--brown); margin-bottom: 10px; }
.td-aff-register p { font-size: 14px; color: var(--text-muted); margin-bottom: 24px; max-width: 360px; margin-left: auto; margin-right: auto; }
.td-aff-status {
  display: flex; align-items: flex-start; gap: 16px;
  padding: 20px; border-left: 3px solid;
}
.td-aff-status svg { width: 24px; height: 24px; flex-shrink: 0; margin-top: 2px; }
.td-aff-status > div { flex: 1; min-width: 0; }
.td-aff-status > div > strong { display: block; font-size: 15px; margin-bottom: 4px; }
.td-aff-status p { font-size: 13px; color: var(--text-muted); margin: 0; }
.td-aff-status--pending { border-color: #F59E0B; background: #FFFBEB; }
.td-aff-status--pending svg { stroke: #F59E0B; }
.td-aff-status--rejected { border-color: var(--red); background: var(--red-light); }
.td-aff-status--rejected svg { stroke: var(--red); }
.td-aff-status--active { border-color: #10B981; background: #ECFDF5; }
.td-aff-status--active svg { stroke: #10B981; }
.td-aff-reflink { margin-top: 20px; display: flex; flex-direction: column; gap: 8px; }
.td-aff-reflink-row { display: flex; gap: 10px; align-items: center; }
.td-aff-reflink small { font-size: 12px; color: var(--text-muted); }

/* Affiliate box wrapper */
.td-aff-box { border: 1px solid var(--border); border-radius: 8px; padding: 20px; margin-bottom: 16px; }

/* Affiliate ranks */
.td-aff-ranks { border: 1px solid var(--border); border-radius: 8px; padding: 20px; margin-bottom: 24px; }
.td-aff-ranks-title { font-family: var(--serif); font-size: 16px; font-weight: 400; color: var(--brown); margin-bottom: 12px; }
.td-aff-ranks-table-wrap { overflow-x: auto; }
.td-aff-ranks-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.td-aff-ranks-table thead tr { background: var(--cream-dark); }
.td-aff-ranks-table th { padding: 10px 14px; text-align: left; font-weight: 600; color: var(--brown); white-space: nowrap; border-bottom: 2px solid var(--border); }
.td-aff-ranks-table td { padding: 10px 14px; border-bottom: 1px solid var(--border); color: var(--text); vertical-align: middle; }
.td-aff-ranks-table tbody tr:last-child td { border-bottom: none; }
.td-aff-ranks-table td strong { color: var(--gold); }
.td-rank-row-active { background: #FFFBEB; }
.td-rank-row-active td { font-weight: 500; }
.td-rank-current-badge { display: inline-block; font-size: 10px; padding: 2px 7px; background: #FEF3C7; color: #92400E; border-radius: 10px; font-weight: 500; letter-spacing: .04em; margin-left: 6px; vertical-align: middle; }
.td-aff-rank-badge { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-muted); background: var(--cream); padding: 10px 14px; border-radius: 6px; margin-bottom: 20px; }
.td-aff-rank-badge strong { color: var(--gold); font-size: 14px; }
.td-aff-rank-min { color: var(--text-muted); font-size: 12px; }

/* Affiliate stats */
.td-aff-stats-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 16px; }
.td-aff-stat {
  text-align: center; padding: 24px 16px;
  border: 1px solid var(--border); background: var(--cream);
}
.td-aff-stat-val { font-family: var(--serif); font-size: 24px; font-weight: 300; color: var(--red); margin-bottom: 6px; }
.td-aff-stat-lbl { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: .1em; }

/* Tables */
.td-table-wrap { overflow-x: auto; }
.td-table { border-collapse: collapse; font-size: 13px; }
.td-table thead th {
  padding: 10px 12px; background: var(--cream); color: var(--text-muted);
  font-size: 11px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase;
  border-bottom: 1px solid var(--border); white-space: nowrap;
}
.td-table tbody td { padding: 10px 12px; border-bottom: 1px solid var(--border); color: var(--brown); }
.td-table tbody tr:last-child td { border-bottom: none; }
.td-table tbody tr:hover td { background: var(--cream); }

/* Responsive */
@media (max-width: 900px) {
  .td-profile-wrap { padding: 20px 16px 60px; }
  .td-profile-nav { overflow-x: auto; flex-wrap: nowrap; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  .td-profile-nav::-webkit-scrollbar { display: none; }
  .td-profile-nav-group { flex-wrap: nowrap; border-right: none; }
  .td-profile-avatar { padding: 16px; }
  .td-profile-nav-item { padding: 12px 16px; font-size: 12px; }
  .td-aff-stats-grid { grid-template-columns: 1fr 1fr; }
  .td-profile-card { padding: 20px; }
  .td-profile-main { padding-top: 16px; }
  .td-profile-tab { gap: 16px; }
  .td-profile-card-title { font-size: 16px; margin-bottom: 16px; padding-bottom: 12px; }
}
@media (max-width: 600px) {
  .td-profile-wrap { padding: 12px 12px 60px; }
  .td-profile-card { padding: 16px; }
  .td-aff-box { padding: 14px; }
  .td-aff-ranks { padding: 14px; }
  .td-aff-reflink-row { flex-direction: column; align-items: stretch; }
  .td-aff-reflink-row .td-pf-input { width: 100%; }
  .td-aff-reflink-row .td-pf-btn--outline { height: 42px; justify-content: center; }
  .td-pf-input { height: 46px; font-size: 16px; } /* 16px prevents iOS zoom */
  .td-profile-name { font-size: 15px; }
  .td-aff-register h3 { font-size: 20px; }
  .td-aff-stat-val { font-size: 20px; }
  .td-aff-status { gap: 12px; padding: 14px; }
}
@media (max-width: 480px) {
  .td-aff-stats-grid { grid-template-columns: 1fr; }
  .td-pf-btn { width: 100%; text-align: center; justify-content: center; }
  .td-profile-card-title { font-size: 15px; }
  .td-profile-avatar { gap: 12px; }
  .td-profile-avatar-icon { width: 44px; height: 44px; }
  .td-table thead th { font-size: 10px; padding: 8px 8px; }
  .td-table tbody td { padding: 8px 8px; font-size: 12px; }
}
