:root {
  /* Fonts */
  --font-main: "Rubik", Arial, Helvetica, sans-serif;
  --font-serif: Georgia, serif;

  /* Base colors */
  --color-text: #2D372C;
  --color-text-soft: #5C6A57;
  --color-text-muted: #7A8A74;
  --color-text-strong: #1F2A1F;

  --color-primary: #5E8B63;
  --color-primary-dark: #3F6846;
  --color-primary-light: #8FB996;
  --color-primary-accent: #D9A441;
  --color-secondary-accent: #C97B3D;

  --color-link-brown: #5E8B63;
  --color-link-brown-2: #3F6846;
  --color-gold: #D9A441;

  --color-bg-body: #F6F3EA;
  --color-bg-page: #FBF9F4;
  --color-bg-soft: #F1EBDD;
  --color-bg-white: #fff;
  --color-bg-white-soft: #FFFDFA;

  --color-border: #DDD4C4;
  --color-border-soft: #D4C9B7;
  --color-border-mid: #CBBEAA;
  --color-border-warm: #E6DDCE;
  --color-border-sidebar: #DCD2C2;

  /* Decorative */
  --color-pattern-1: rgba(217,164,65,0.14);
  --color-pattern-2: rgba(94,139,99,0.10);
  --color-pattern-3: rgba(143,185,150,0.10);
  --color-pattern-4: rgba(63,104,70,0.06);

  --color-overlay-1: rgba(217,164,65,0.16);
  --color-overlay-2: rgba(63,104,70,0.10);

  /* Shadows */
  --shadow-page: 0 8px 30px rgba(45,55,44,0.18);
  --shadow-card: 0 4px 14px rgba(94,139,99,0.08);
  --shadow-card-hover:
    0 6px 18px rgba(94,139,99,0.12),
    0 0 0 1px rgba(143,185,150,0.16),
    0 0 18px rgba(143,185,150,0.10);
  --shadow-thumb-hover:
    0 0 0 1px rgba(143,185,150,0.18),
    0 0 14px rgba(143,185,150,0.10);
  --shadow-btn-hover:
    inset 0 0 0 1px rgba(255,255,255,.10),
    0 0 0 1px rgba(217,164,65,0.18),
    0 0 16px rgba(217,164,65,0.16);
  --shadow-floating: 0 4px 12px rgba(0,0,0,.2);
  --shadow-promo: 0 8px 18px rgba(0,0,0,.18);

  /* Radius */
  --radius-page: 15px;
  --radius-lg: 12px;
  --radius-md: 10px;
  --radius-sm: 8px;
  --radius-xs: 4px;
  --radius-pill: 50%;

  /* Layout */
  --page-width: 1260px;
  --sidebar-width: 250px;
  --header-right-width: 390px;
  --search-width: 320px;
  --content-min-height: 760px;
  --grid-gap: 20px;

  /* Transitions */
  --transition-fast: .18s ease;
  --transition-ui:
    color .2s ease,
    background-color .2s ease,
    border-color .2s ease,
    box-shadow .2s ease,
    filter .2s ease;

  /* Gradients */
  --gradient-body:
    radial-gradient(circle at 12% 20%, var(--color-pattern-1) 0 24px, transparent 25px),
    radial-gradient(circle at 87% 74%, var(--color-pattern-2) 0 22px, transparent 23px),
    linear-gradient(120deg, var(--color-pattern-3), rgba(143,185,150,0) 18%),
    linear-gradient(60deg, var(--color-pattern-4), rgba(63,104,70,0) 22%),
    var(--color-bg-body);

  --gradient-top: linear-gradient(180deg, #FFFDFA, #F1EBDD);
  --gradient-footer: linear-gradient(180deg, #F8F3EA, #EDE3D3);
  --gradient-btn: linear-gradient(180deg, var(--color-primary-light), var(--color-primary-dark));
  --gradient-progress: linear-gradient(90deg, #D9A441, #5E8B63);
  --gradient-progress-bg: linear-gradient(180deg, #F1EBDD, #E6DDCE);
  --gradient-mini-note: linear-gradient(180deg, #F6F3EA, #EDE3D3);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-main);
  color: var(--color-text);
  background: var(--gradient-body);
  min-height: 100vh;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .55;
  background-image:
    linear-gradient(65deg, transparent 48%, var(--color-overlay-1) 48% 52%, transparent 52%),
    linear-gradient(115deg, transparent 48%, var(--color-overlay-2) 48% 52%, transparent 52%);
  background-size: 180px 180px, 180px 180px;
  background-position: left -35px top 20px, right -40px top 0;
  background-repeat: repeat-y, repeat-y;
}

.page {
  width: var(--page-width);
  margin: 28px auto;
  background: var(--color-bg-page);
  box-shadow: var(--shadow-page);
  position: relative;
  border: 1px solid rgba(125, 94, 58, .12);
  border-radius: var(--radius-page);
}

.top {
  display: flex;
  justify-content: space-between;
  padding: 16px 22px 20px;
  background: var(--gradient-top);
  overflow: hidden;
  border-bottom: 1px solid rgba(152, 114, 68, .14);
  border-radius: var(--radius-page) var(--radius-page) 0 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 18px;
  min-width: 0;
}

.logo {
  height: 138px;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
}

.logo img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.header-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
  padding-top: 2px;
  margin: 0 0 auto;
  width: 100%;
}

.brand-title h1 {
  margin: 0;
  font-size: 52px;
  line-height: 1;
  color: var(--color-primary);
  font-family: var(--font-main);
  font-weight: 700;
  letter-spacing: .3px;
  white-space: nowrap;
}

.brand-title p {
  margin: 8px 0 0;
  color: var(--color-primary-accent);
  font-size: 28px;
  font-family: var(--font-main);
  font-weight: 500;
  white-space: nowrap;
}

.login-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: var(--radius-md);
  color: #fff;
  background: var(--color-primary);
  font-size: 17px;
  font-weight: 700;
  padding: 12px 20px;
  line-height: 1;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.12);
  cursor: pointer;
  text-decoration: none;
  transition: var(--transition-ui);
}

.login-btn .material-symbols-outlined {
  font-size: 20px;
  line-height: 1;
}

.support {
  color: var(--color-text-muted);
  font-size: 18px;
  font-family: var(--font-main);
}

.search {
  width: var(--search-width);
  position: relative;
  display: flex;
  align-items: center;
}

.search input {
  width: 100%;
  height: 42px;
  border: 1px solid #d6c5ae;
  background: var(--color-bg-white);
  padding: 10px 14px 10px 44px;
  font-size: 15px;
  font-family: var(--font-main);
  color: #786755;
  border-radius: var(--radius-sm);
  outline: none;
  transition: border-color .2s ease, box-shadow .2s ease, background-color .2s ease;
}

.search input::placeholder {
  color: #9c8a76;
}

.search input:focus {
  border-color: var(--color-primary-light);
  box-shadow:
    0 0 0 1px rgba(183, 131, 73, 0.18),
    0 0 14px rgba(183, 131, 73, 0.10);
  background: var(--color-bg-white-soft);
}

.search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 20px;
  color: #9a7b59;
  pointer-events: none;
}

.nav {
  background: var(--color-primary);
  color: #fff;
  padding: 13px 18px;
  position: relative;
  z-index: 20;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08);
}

.menu {
  display: flex;
  align-items: center;
  gap: 2px;
  position: relative;
}

.menu-item {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.menu-item > a {
  color: #fff;
  text-decoration: none;
  padding: 0 14px;
  line-height: 1;
  font-family: var(--font-main);
  font-size: 18px;
  font-weight: 500;
  transition: var(--transition-ui);
}

.menu-item .dot {
  color: rgba(255,255,255,0.45);
  font-size: 28px;
  line-height: 0.5;
  margin-top: -4px;
}

.cat-dropdown {
  background: var(--color-bg-soft);
  border-radius: var(--radius-md);
  opacity: 0;
  visibility: hidden;
  transition: var(--transition-fast);
  z-index: 30;
  padding: 8px 0;
}

.menu-dropdown {
  background: var(--color-primary);
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  opacity: 0;
  visibility: hidden;
  transition: var(--transition-fast);
  z-index: 30;
  padding: 8px 0;
  position: absolute;
  top: calc(100% + 3px);
  left: -18px;
  transform: translateY(-8px);
  min-width: 190px;
}

.menu-dropdown a {
  display: block;
  color: var(--color-bg-soft);
  text-decoration: none;
  padding: 11px 16px;
  font-size: 16px;
  line-height: 1.25;
  white-space: nowrap;
  transition: var(--transition-ui);
}

.cat-dropdown a {
  display: block;
  color: var(--color-primary);
  text-decoration: none;
  padding: 11px 16px;
  font-size: 16px;
  line-height: 1.25;
  transition: var(--transition-ui);
}

.menu-item:hover .menu-dropdown,
.menu-item:focus-within .menu-dropdown,
.cat-list > li:hover .cat-dropdown,
.cat-list > li:focus-within .cat-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) translateX(0);
}

.content {
  display: grid;
  grid-template-columns: var(--sidebar-width) 1fr;
  gap: 0;
  min-height: var(--content-min-height);
  background: var(--color-bg-page);
}

.sidebar {
  padding: 26px 20px 40px;
  background: var(--color-bg-soft);
  position: relative;
  z-index: 10;
  border-right: 1px solid rgba(143, 113, 80, .12);
}

.sidebar h2,
.main h2,
.forum-title,
.polls-title,
.news-title {
  margin: 0 0 16px;
  font-size: 23px;
  line-height: 1;
  color: #8a6032;
  font-family: var(--font-main);
  font-weight: 600;
}

.cat-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--color-border-sidebar);
}

.cat-list > li {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 11px 0;
  border-bottom: 1px solid var(--color-border-sidebar);
  color: var(--color-link-brown-2);
  font-size: 16px;
}

.cat-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 10px;
  cursor: pointer;
  transition: var(--transition-ui);
}

.cat-label {
  flex: 1 1 auto;
  color: var(--color-link-brown);
  text-decoration: none;
}

.count {
  color: var(--color-gold);
  margin-left: 4px;
}

.arrow {
  color: #a3927d;
  font-size: 20px;
  line-height: 1;
  flex: 0 0 auto;
}

.cat-dropdown {
  position: absolute;
  top: 0;
  left: calc(100% - 10px);
  width: 360px;
  transform: translateX(-10px);
}

.cat-dropdown a span {
  color: var(--color-gold);
  margin-left: 6px;
}

.show-all {
  display: inline-block;
  margin-top: 14px;
  color: #8c6438;
  text-decoration: none;
  font-size: 16px;
  transition: var(--transition-ui);
}

.side-section {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 4px solid #d4c09d;
}

.forum-link,
.poll-link,
.news-link,
.side-text a {
  color: var(--color-link-brown);
  text-decoration: none;
  transition: var(--transition-ui);
}

.forum-row,
.poll-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
}

.badge {
  border: 1px solid #dcc8a2;
  color: #9d7b4a;
  background: #fff1d7;
  border-radius: var(--radius-xs);
  text-align: center;
  padding: 2px 6px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
}

.news-image,
.promo-image {
  width: 100%;
  border: 1px solid var(--color-border-soft);
  margin: 10px 0 18px;
  background-size: cover;
  background-position: center;
  border-radius: var(--radius-md);
  overflow: hidden;
}

.news-image {
  height: 245px;
  background-image: url("https://images.pexels.com/photos/5998138/pexels-photo-5998138.jpeg?auto=compress&cs=tinysrgb&w=900");
  position: relative;
}

.news-image::before {
  content: "Новая коллекция\Aплетёной мебели";
  white-space: pre;
  position: absolute;
  left: 18px;
  top: 18px;
  color: #fff2dc;
  font-size: 22px;
  line-height: 1.25;
  font-family: var(--font-main);
  text-shadow: 0 1px 2px rgba(0,0,0,0.45);
}

.promo-image {
  height: 210px;
  background-image: url("https://images.pexels.com/photos/6585751/pexels-photo-6585751.jpeg?auto=compress&cs=tinysrgb&w=900");
}

.side-text {
  color: var(--color-text-soft);
  font-size: 15px;
  line-height: 1.4;
}

.main {
  padding: 26px 20px 40px 16px;
  background: var(--color-bg-page);
}

.section-title {
  margin: 0 0 18px;
  color: var(--color-secondary-accent);
  font-size: 25px;
  font-weight: 700;
}

.cards-row,
.cards-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--grid-gap);
  margin-bottom: 34px;
}

.top-picks {
  display: flex;
  gap: var(--grid-gap);
  margin-bottom: 34px;
  flex-wrap: wrap;
}

.product-card {
  background: #fffdf9;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 14px;
  box-shadow: var(--shadow-card);
  min-width: 0;
  transition: var(--transition-ui);
}

.top-picks .product-card {
  width: 225px;
}

.thumb {
  width: 100%;
  height: 186px;
  margin: 2px auto 16px;
  border: 1px solid var(--color-border);
  background-color: #ede6db;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
  border-radius: var(--radius-md);
  transition: var(--transition-ui);
}

.thumb.small {
  height: 152px;
}

.thumb.rattan-roll {
  background-image: url("https://images.pexels.com/photos/18464896/pexels-photo-18464896.jpeg?auto=compress&cs=tinysrgb&w=900");
}

.thumb.chair {
  background-image: url("https://images.pexels.com/photos/33869744/pexels-photo-33869744.jpeg?auto=compress&cs=tinysrgb&w=900");
}

.thumb.rattan-roll::before,
.thumb.chair::before,
.thumb.chair::after,
.img3::before,
.img3::after,
.img4::before,
.img4::after,
.img6::before,
.img6::after,
.img7::before,
.img8::before,
.img8::after,
.img9::before,
.img10::before,
.img11::before,
.img13::before,
.img13::after,
.img14::before {
  content: none;
}

.img1  { background-image: url("https://images.pexels.com/photos/27975920/pexels-photo-27975920.jpeg?auto=compress&cs=tinysrgb&w=900"); }
.img2  { background-image: url("https://images.pexels.com/photos/21614915/pexels-photo-21614915.jpeg?auto=compress&cs=tinysrgb&w=900"); }
.img3  { background-image: url("https://images.pexels.com/photos/33437876/pexels-photo-33437876.jpeg?auto=compress&cs=tinysrgb&w=900"); }
.img4  { background-image: url("https://images.pexels.com/photos/27975920/pexels-photo-27975920.jpeg?auto=compress&cs=tinysrgb&w=900"); }
.img5  { background-image: url("https://images.pexels.com/photos/18464896/pexels-photo-18464896.jpeg?auto=compress&cs=tinysrgb&w=900"); }
.img6  { background-image: url("https://images.pexels.com/photos/21614915/pexels-photo-21614915.jpeg?auto=compress&cs=tinysrgb&w=900"); }
.img7  { background-image: url("https://images.pexels.com/photos/18464896/pexels-photo-18464896.jpeg?auto=compress&cs=tinysrgb&w=900"); }
.img8  { background-image: url("https://images.pexels.com/photos/27975920/pexels-photo-27975920.jpeg?auto=compress&cs=tinysrgb&w=900"); }
.img9  { background-image: url("https://images.pexels.com/photos/33869744/pexels-photo-33869744.jpeg?auto=compress&cs=tinysrgb&w=900"); }
.img10 { background-image: url("https://images.pexels.com/photos/21614915/pexels-photo-21614915.jpeg?auto=compress&cs=tinysrgb&w=900"); }
.img11 { background-image: url("https://images.pexels.com/photos/33437876/pexels-photo-33437876.jpeg?auto=compress&cs=tinysrgb&w=900"); }
.img12 { background-image: url("https://images.pexels.com/photos/18464896/pexels-photo-18464896.jpeg?auto=compress&cs=tinysrgb&w=900"); }
.img13 { background-image: url("https://images.pexels.com/photos/33869744/pexels-photo-33869744.jpeg?auto=compress&cs=tinysrgb&w=900"); }
.img14 { background-image: url("https://images.pexels.com/photos/21614915/pexels-photo-21614915.jpeg?auto=compress&cs=tinysrgb&w=900"); }

.title {
  font-size: 15px;
  margin-bottom: 10px;
  color: #5d4734;
  line-height: 1.35;
  min-height: 40px;
}

.mini-note {
  width: 100%;
  height: 22px;
  background: var(--gradient-mini-note);
  border: 1px solid var(--color-border-mid);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: #6a5843;
  margin-bottom: 10px;
  font-weight: 500;
  letter-spacing: .2px;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.5),
    0 1px 2px rgba(120, 90, 60, 0.08);
}

.progress {
  width: 100%;
  height: 18px;
  background: var(--gradient-progress-bg);
  border: 1px solid var(--color-border-mid);
  border-radius: var(--radius-md);
  position: relative;
  overflow: hidden;
  margin-bottom: 10px;
}

.progress .bar {
  height: 100%;
  background: var(--gradient-progress);
  border-radius: var(--radius-md);
  position: relative;
}

.progress .bar::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    120deg,
    transparent 20%,
    rgba(255,255,255,0.25) 40%,
    transparent 60%
  );
  opacity: 0.6;
}

.progress .label {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: #5a4632;
  font-weight: 600;
  letter-spacing: .2px;
}

.meta {
  font-size: 14px;
  line-height: 1.7;
  color: #5b4a3a;
}

.meta .muted {
  color: var(--color-text-strong);
  font-weight: 700;
}

.meta .user {
  color: var(--color-link-brown-2);
  text-decoration: none;
  transition: var(--transition-ui);
}

.meta .icon {
  opacity: 0.75;
}

.show-all-wrap {
  display: flex;
  justify-content: center;
  margin: 26px 0 12px;
}

.show-btn {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  background: var(--gradient-btn);
  color: #fff;
  text-decoration: none;
  padding: 14px 22px;
  border-radius: var(--radius-sm);
  font-size: 18px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.08);
  transition: var(--transition-ui);
}

.show-btn span {
  font-size: 34px;
  line-height: 0.5;
  margin-top: -3px;
}

.footer {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  border-top: 1px solid rgba(144, 107, 67, .14);
  margin-top: 26px;
  padding: 18px 26px 26px;
  color: var(--color-text-muted);
  font-weight: 700;
  background: var(--gradient-footer);
  border-radius: 0 0 var(--radius-page) var(--radius-page);
}

.footer a {
  color: var(--color-text-muted);
  text-decoration: none;
  margin-right: 20px;
  transition: var(--transition-ui);
}

.to-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 42px;
  height: 42px;
  border-radius: var(--radius-pill);
  background: var(--color-primary);
  color: #fff;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-floating);
  font-size: 22px;
  z-index: 80;
}

.material-symbols-outlined {
  font-variation-settings:
    "FILL" 0,
    "wght" 400,
    "GRAD" 0,
    "opsz" 24;
}

.icon.material-symbols-outlined {
  font-size: 18px;
  vertical-align: middle;
  margin-right: 4px;
}

.menu-dropdown a:hover {
  color: white;
}

.cat-dropdown a:hover {
  filter: brightness(1.2);
}

.menu-item > a:hover {
  color: #fff4e7;
  text-shadow: 0 0 10px rgba(255, 230, 196, 0.28);
}

.cat-main:hover .cat-label {
  color: var(--color-primary-accent);
}

.forum-link:hover,
.poll-link:hover,
.news-link:hover,
.show-all:hover,
.meta .user:hover,
.footer a:hover {
  color: var(--color-primary-accent);
  text-shadow: 0 0 10px rgba(183, 131, 73, 0.16);
}

.product-card:hover {
  cursor: pointer;
  box-shadow: var(--shadow-card-hover);
}

.product-card:hover .thumb {
  box-shadow: var(--shadow-thumb-hover);
  filter: saturate(1.03) brightness(1.01);
}

.login-btn:hover,
.show-btn:hover {
  box-shadow: var(--shadow-btn-hover);
  filter: brightness(1.03);
}

.login-btn,
.show-btn,
.menu-item > a,
.menu-dropdown a,
.cat-main,
.cat-dropdown a,
.product-card,
.thumb,
.forum-link,
.poll-link,
.news-link,
.show-all,
.footer a,
.meta .user {
  transition: var(--transition-ui);
}

@media (max-width: 1320px) {
  .page { width: calc(100% - 32px); }

  .cards-row,
  .cards-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 1160px) {
  .top {
    flex-direction: column;
    gap: 18px;
  }

  .header-right {
    width: 100%;
    align-items: flex-start;
  }

  .content {
    grid-template-columns: 1fr;
  }

  .main {
    padding-left: 20px;
  }

  .cards-row,
  .cards-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .cat-dropdown {
    left: 20px;
    right: 20px;
    width: auto;
    top: calc(100% + 8px);
  }

  .menu {
    flex-wrap: wrap;
    row-gap: 10px;
  }
}

@media (max-width: 760px) {
  .brand {
    flex-direction: column;
    align-items: flex-start;
  }

  .brand-title h1 {
    font-size: 40px;
    white-space: normal;
  }

  .brand-title p {
    font-size: 22px;
    white-space: normal;
  }

  .search {
    width: 100%;
  }

  .cards-row,
  .cards-grid {
    grid-template-columns: 1fr;
  }

  .footer {
    flex-direction: column;
  }
}

/* =========================
   Auth pages
   ========================= */

.messages-wrap {
  padding: 16px 20px 0;
}

.message {
  width: 100%;
  max-width: 100%;
  border-radius: var(--radius-md);
  padding: 16px 18px;
  margin: 0 0 14px;
  font-size: 16px;
  line-height: 1.5;
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-card);
  word-break: break-word;
  overflow-wrap: anywhere;
}

.message-success {
  background: #eef7ef;
  border-color: #bfd8c2;
  color: var(--color-primary-dark);
}

.message-error {
  background: #fff2ef;
  border-color: #e4b7ab;
  color: #9a4b35;
}

.message-warning {
  background: #fff8e8;
  border-color: #e7d2a5;
  color: #8a6032;
}

.message-info {
  background: #eef5f8;
  border-color: #bfd0db;
  color: #45687a;
}

.auth-shell {
  max-width: 660px;
}

.auth-page {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}


.auth-card p {
  margin: 0 0 18px;
  color: var(--color-text);
  font-size: 17px;
  line-height: 1.6;
  text-align: center;
}

.auth-card p:last-child {
  margin-bottom: 0;
}

.auth-title {
  margin: 0 0 10px;
  color: var(--color-secondary-accent);
  font-size: 38px;
  line-height: 1.1;
  text-align: center;
  font-weight: 700;
}

.auth-subtitle {
  text-align: center;
  margin: 0 0 24px;
  color: var(--color-text-soft);
  font-size: 17px;
  line-height: 1.5;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.auth-form .form-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.auth-form label {
  color: #7d562f;
  font-size: 16px;
  font-weight: 600;
}

.auth-form input,
.auth-form textarea,
.auth-form select {
  width: 100%;
  border: 1px solid #d6c5ae;
  background: var(--color-bg-white);
  padding: 13px 14px;
  font-size: 16px;
  font-family: var(--font-main);
  color: #5c4b39;
  border-radius: var(--radius-sm);
  outline: none;
  transition: border-color .2s ease, box-shadow .2s ease, background-color .2s ease;
}

.auth-form input::placeholder,
.auth-form textarea::placeholder {
  color: #9c8a76;
}

.auth-form input:focus,
.auth-form textarea:focus,
.auth-form select:focus {
  border-color: var(--color-primary-light);
  box-shadow:
    0 0 0 1px rgba(183, 131, 73, 0.18),
    0 0 14px rgba(183, 131, 73, 0.10);
  background: var(--color-bg-white-soft);
}

.auth-form .helptext {
  color: var(--color-text-muted);
  font-size: 13px;
  line-height: 1.45;
}

.auth-form .errorlist {
  list-style: none;
  margin: 0;
  padding: 0;
  border-radius: var(--radius-sm);
  background: #fff2ef;
  color: #9a4b35;
  font-size: 14px;
  line-height: 1.45;
  padding: 10px 12px;
}


.auth-form .form-errors {
  border-radius: var(--radius-sm);
  background: #fff2ef;
  border: 1px solid #e4b7ab;
  color: #9a4b35;
  font-size: 14px;
  line-height: 1.45;
}

.auth-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 6px;
  flex-wrap: wrap;
  width: 100%;
  flex-direction: row;
  justify-content: flex-end;

}

.auth-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: var(--radius-md);
  color: #fff;
  background: var(--color-primary);
  font-size: 17px;
  font-weight: 700;
  padding: 13px 22px;
  line-height: 1;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.12);
  cursor: pointer;
  text-decoration: none;
  transition: var(--transition-ui);
}

.auth-btn:hover {
  box-shadow: var(--shadow-btn-hover);
  filter: brightness(1.15);
}

.auth-link {
  color: var(--color-link-brown);
  text-decoration: none;
  font-weight: 500;
  transition: var(--transition-ui);
}


.auth-link-reset {
  color: var(--color-text-muted);
  text-decoration: none;
  font-weight: 500;
  transition: var(--transition-ui);
}
.auth-link:hover {
  color: var(--color-primary-accent);
  text-shadow: 0 0 10px rgba(183, 131, 73, 0.16);
}

.auth-note {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--color-border-warm);
  color: var(--color-text-soft);
  font-size: 15px;
  line-height: 1.55;
  text-align: center;
}

.auth-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 18px;
}

.auth-grid .full {
  grid-column: 1 / -1;
}

@media (max-width: 760px) {
  .auth-card {
    padding: 20px 18px;
  }

  .auth-title {
    font-size: 30px;
  }

  .auth-grid {
    grid-template-columns: 1fr;
  }
}

.auth-form .form-errors {
  border-radius: var(--radius-sm);
  background: #fff2ef;
  border: 1px solid #e4b7ab;
  color: #9a4b35;
  font-size: 15px;
  line-height: 1.55;
  margin-bottom: 6px;
}

.auth-form .errorlist {
  list-style: none;
  padding: 0;
  border-radius: var(--radius-sm);
  background: #fff2ef;
  border: 1px solid #e4b7ab;
  color: #9a4b35;
  font-size: 14px;
  line-height: 1.5;
  padding: 10px 12px;
}

/* =========================
   Toast messages
   ========================= */

.toast-container {
  position: fixed;
  left: 50%;
  bottom: 30px;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 9999;
  pointer-events: none;
}

.toast {
  min-width: 320px;
  max-width: 520px;
  padding: 14px 18px;
  border-radius: var(--radius-md);
  font-size: 15px;
  line-height: 1.45;
  box-shadow: var(--shadow-floating);
  border: 1px solid transparent;
  opacity: 0;
  transform: translateY(20px);
  animation: toast-in 0.35s ease forwards;
}

/* Цвета */

.toast-success {
  background: #eef7ef;
  border-color: #bfd8c2;
  color: var(--color-primary-dark);
}

.toast-error {
  background: #fff2ef;
  border-color: #e4b7ab;
  color: #9a4b35;
}

.toast-warning {
  background: #fff8e8;
  border-color: #e7d2a5;
  color: #8a6032;
}

.toast-info {
  background: #eef5f8;
  border-color: #bfd0db;
  color: #45687a;
}

/* Анимации */

@keyframes toast-in {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes toast-out {
  to {
    opacity: 0;
    transform: translateY(20px);
  }
}

/* =========================
   Profile
   ========================= */

.profile-shell {
  max-width: 980px;
}

.profile-card {
  padding: 28px;
}

.profile-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 28px;
  align-items: start;
}

.profile-avatar-wrap {
  display: flex;
  justify-content: center;
}

.profile-avatar {
  width: 220px;
  height: 220px;
  object-fit: cover;
  border-radius: 18px;
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-card);
  background: #f3ede3;
}

.profile-avatar-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 72px;
  font-weight: 700;
  color: var(--color-primary-dark);
  background: linear-gradient(180deg, #f8f2e8, #eadfcd);
}

.profile-info {
  min-width: 0;
}

.profile-name {
  margin: 0 0 16px;
  color: #5d4734;
  font-size: 34px;
  line-height: 1.15;
  font-weight: 700;
}

.profile-meta {
  display: grid;
  gap: 10px;
  margin-bottom: 20px;
  color: var(--color-text);
  font-size: 16px;
  line-height: 1.5;
}

.profile-description {
  color: var(--color-text);
  font-size: 16px;
  line-height: 1.65;
  margin-bottom: 20px;
}

@media (max-width: 900px) {
  .profile-layout {
    grid-template-columns: 1fr;
  }

  .profile-avatar {
    width: 180px;
    height: 180px;
  }

  .profile-name {
    font-size: 28px;
  }
}

/* =========================
   Purchase catalog
   ========================= */

.pc-page {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.pc-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  flex-wrap: wrap;
}

.pc-header-left {
  min-width: 0;
  flex: 1 1 auto;
}

.pc-breadcrumbs {
  margin-bottom: 8px;
  color: var(--color-link-brown);
  text-decoration: none;
  font-weight: 600;
}

.pc-breadcrumbs a {
  color: var(--color-link-brown);
  text-decoration: none;
  transition: var(--transition-ui);
}

.pc-breadcrumbs a:hover {
  color: var(--color-primary-accent);
}

.pc-title {
  margin: 0;
  color: #8a6032;
  font-size: 25px;
  font-weight: 700;
  line-height: 1.1;
}

.pc-search {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

.pc-search input {
  min-width: 280px;
  height: 42px;
  border: 1px solid #d6c5ae;
  background: var(--color-bg-white);
  padding: 10px 14px;
  font-size: 15px;
  font-family: var(--font-main);
  color: #786755;
  border-radius: var(--radius-sm);
  outline: none;
  transition: border-color .2s ease, box-shadow .2s ease, background-color .2s ease;
}

.pc-search input::placeholder {
  color: #9c8a76;
}

.pc-search input:focus {
  border-color: var(--color-primary-light);
  box-shadow:
    0 0 0 1px rgba(183, 131, 73, 0.18),
    0 0 14px rgba(183, 131, 73, 0.10);
  background: var(--color-bg-white-soft);
}

.pc-search button {
  height: 42px;
  border: 0;
  padding: 0 18px;
  border-radius: var(--radius-sm);
  background: var(--color-primary);
  color: #fff;
  font-weight: 700;
  font-size: 15px;
  font-family: var(--font-main);
  cursor: pointer;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.08);
  transition: var(--transition-ui);
}

.pc-search button:hover {
  box-shadow: var(--shadow-btn-hover);
  filter: brightness(1.03);
}

.pc-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding-bottom: 2px;
  border-bottom: 1px solid var(--color-border-sidebar);
}

.pc-tab {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 10px 18px;
  border: 1px solid var(--color-border);
  background: linear-gradient(180deg, #faf6ef, #efe5d6);
  color: #6a5843;
  text-decoration: none;
  font-weight: 600;
  font-size: 16px;
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  transition: var(--transition-ui);
}

.pc-tab:hover {
  color: #8c6438;
  border-color: #d3c1a2;
  background: linear-gradient(180deg, #fdfaf4, #f1e8da);
}

.pc-tab.is-active {
  background: var(--color-primary);
  color: white;
  border-color: #a8be56;
  font-weight: 700;
}

.pc-list {
  display: grid;
  gap: 24px;
}

.pc-card {
  background: #fffdf9;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 16px;
  box-shadow: var(--shadow-card);
  transition: var(--transition-ui);
}

.pc-card:hover {
  box-shadow: var(--shadow-card-hover);
}

.pc-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  margin-bottom: 14px;
}

.pc-card-title-wrap {
  min-width: 0;
  margin: 0;
  flex: 1 1 auto;
}

.pc-card-title {
  margin: 0 0 10px;
  font-size: 25px;
  line-height: 1.15;
  color: #7d9440;
  font-weight: 700;
  margin: 0;
}

.pc-card-title a {
  color: inherit;
  text-decoration: none;
  margin: 0;
  font-size: 30px;
  transition: var(--transition-ui);
}

.pc-card-description {
  margin: 0;
  color: var(--color-text);
  font-size: 15px;
  line-height: 1.55;
}

.pc-card-organizer {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 0 0 auto;
  min-width: 220px;
}

.pc-card-organizer img,
.pc-card-organizer-placeholder {
  width: 54px;
  height: 54px;
  border-radius: var(--radius-pill);
  object-fit: cover;
  background: #e9ddc8;
  border: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: var(--color-primary-dark);
}

.pc-card-organizer-name {
  font-weight: 700;
  color: #5b4a3a;
  line-height: 1.25;
}

.pc-card-organizer-meta {
  font-size: 14px;
  color: var(--color-text-muted);
  margin-top: 2px;
}

.pc-products {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 14px;
}

.pc-product {
  border: 1px solid #e4d394;
  border-radius: var(--radius-md);
  padding: 12px;
  background: #fffdf7;
  transition: var(--transition-fast);
  cursor: pointer;
  text-decoration: none;
}

.pc-product:hover {
  box-shadow: 0 4px 12px rgba(94,139,99,0.08);
  transform: scale(1.02);
}

.pc-product-image {
  width: 100%;
  aspect-ratio: 1 / 1;
  background: #f2ebdc;
  border: 1px solid var(--color-border-soft);
  border-radius: var(--radius-sm);
  margin-bottom: 10px;
  overflow: hidden;
}

.pc-product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pc-product-price {
  color: #7d9440;
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
}

.pc-product-title {
  color: #5d4734;
  font-size: 17px;
  line-height: 1.4;
  font-weight: 700;
  margin: 0;
}


.pc-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  background: var(--color-primary);
  border: 1px solid #a5bf47;
  border-radius: var(--radius-md);
  padding: 10px 12px;
}

.pc-footer-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.pc-chip {
  font-size: 13px;
  line-height: 1;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.76);
  color: #4d4d1f;
  font-weight: 700;
}

.pc-progress {
  position: relative;
  width: 220px;
  height: 22px;
  background: rgba(255,255,255,0.64);
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid rgba(104, 120, 33, 0.22);
}

.pc-progress-bar {
  position: absolute;
  inset: 0 auto 0 0;
  background: linear-gradient(90deg, #8ccf00, #6ea800);
  border-radius: 999px;
}

.pc-progress span {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: #314300;
}

.pc-link {
  color: #3d4a18;
  font-weight: 700;
  text-decoration: none;
  background: rgba(255,255,255,0.82);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  transition: var(--transition-ui);
}

.pc-link:hover {
  background: #fff;
  color: #60761e;
}

.pc-empty {
  padding: 24px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: #fffdf9;
  color: var(--color-text-soft);
  box-shadow: var(--shadow-card);
}

@media (max-width: 1160px) {
  .pc-products {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 760px) {
  .pc-title {
    font-size: 30px;
  }

  .pc-search {
    width: 100%;
  }

  .pc-search input {
    min-width: 0;
    width: 100%;
  }

  .pc-card-head {
    flex-direction: column;
  }

  .pc-products {
    grid-template-columns: 1fr;
  }

  .pc-progress {
    width: 100%;
    max-width: 260px;
  }

  .pc-tab {
    border-radius: var(--radius-sm);
  }
}

/* =========================
   Purchase detail
   ========================= */

.pd-page {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.pd-back a {
  color: var(--color-link-brown);
  text-decoration: none;
  font-weight: 500;
}

.pd-top {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 24px;
  align-items: start;
}

.pd-title {
  margin: 0 0 16px;
  color: #8a6032;
  font-size: 30px;
  line-height: 1.1;
  font-weight: 700;
}

.pd-description {
  color: var(--color-text);
  font-size: 16px;
  line-height: 1.65;
}

.pd-description p {
  margin: 0 0 14px;
}

.pd-side {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.pd-organizer-card,
.pd-status-card,
.pd-side-box {
  background: #fffdf9;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 16px;
  box-shadow: var(--shadow-card);
}

.pd-side-title,
.pd-side-box-title,
.pd-status-title {
  margin: 0 0 12px;
  font-size: 22px;
  line-height: 1.1;
  color: #8a6032;
  font-weight: 700;
}

.pd-organizer {
  display: flex;
  align-items: center;
  gap: 12px;
}

.pd-organizer img,
.pd-organizer-placeholder {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  object-fit: cover;
  background: #e9ddc8;
  border: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: var(--color-primary-dark);
}

.pd-organizer-info a {
  color: var(--color-link-brown);
  text-decoration: none;
  font-weight: 700;
}

.pd-organizer-meta {
  margin-top: 4px;
  color: var(--color-text-muted);
  font-size: 14px;
}

.pd-progress {
  position: relative;
  width: 100%;
  height: 24px;
  background: var(--gradient-progress-bg);
  border: 1px solid var(--color-border-mid);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 14px;
}

.pd-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #8ccf00, #6ea800);
}

.pd-progress span {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: #314300;
}

.pd-status-list {
  display: grid;
  gap: 10px;
  color: var(--color-text);
  font-size: 15px;
  line-height: 1.5;
}

.pd-album-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.pd-album-list li + li {
  margin-top: 10px;
}

.pd-album-list a {
  color: #2356a4;
  text-decoration: none;
}

.pd-album-list a.is-active {
  color: var(--color-link-brown);
  font-weight: 700;
}

.pd-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding-bottom: 2px;
  border-bottom: 1px solid var(--color-border-sidebar);
}

.pd-tab {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 10px 18px;
  border: 1px solid var(--color-border);
  background: linear-gradient(180deg, #faf6ef, #efe5d6);
  color: #6a5843;
  text-decoration: none;
  font-weight: 600;
  font-size: 16px;
  border-radius: var(--radius-md) var(--radius-md) 0 0;
}

.pd-tab.is-active {
  background: linear-gradient(180deg, #b6cf54, #9ab83a);
  color: #4d4d1f;
  border-color: #a8be56;
  font-weight: 700;
}

.pd-catalog-tools {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  align-items: center;
}

.pd-search-form,
.pd-album-form {
  display: flex;
  gap: 10px;
  align-items: center;
}

.pd-search-form input,
.pd-album-form select {
  height: 42px;
  border: 1px solid #d6c5ae;
  background: var(--color-bg-white);
  padding: 10px 14px;
  font-size: 15px;
  font-family: var(--font-main);
  color: #786755;
  border-radius: var(--radius-sm);
  outline: none;
}

.pd-search-form input {
  min-width: 300px;
}

.pd-search-form button {
  height: 42px;
  border: 0;
  padding: 0 18px;
  border-radius: var(--radius-sm);
  background: var(--gradient-btn);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}

.pd-products {
  display: grid;
  gap: 18px;
}

.pd-product-card {
  background: #fffdf9;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 16px;
  box-shadow: var(--shadow-card);
}

.pd-product-main {
  display: grid;
  grid-template-columns: 150px 1fr 180px;
  gap: 18px;
  align-items: start;
}

.pd-product-photo {
  width: 150px;
  height: 150px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: #efe7d8;
  overflow: hidden;
}

.pd-product-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pd-product-title {
  margin: 0 0 10px;
  color: #2356a4;
  font-size: 26px;
  line-height: 1.15;
  font-weight: 500;
}

.pd-product-meta {
  margin-bottom: 8px;
  color: #5b4a3a;
  font-size: 15px;
}

.pd-product-text {
  color: var(--color-text);
  font-size: 15px;
  line-height: 1.55;
}

.pd-product-buy {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 14px;
}

.pd-product-price {
  font-size: 24px;
  font-weight: 700;
  color: #5d4734;
}

.pd-order-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 140px;
  padding: 12px 18px;
  border-radius: var(--radius-sm);
  background: linear-gradient(180deg, #ff7a2e, #ff5b0f);
  color: #fff;
  text-decoration: none;
  font-weight: 700;
}

.pd-rows-wrap {
  margin-top: 16px;
}

.pd-rows-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.pd-rows-table th,
.pd-rows-table td {
  border: 1px solid #e0ddd4;
  padding: 10px 12px;
  text-align: center;
}

.pd-rows-table thead th {
  background: #ebe8e1;
  color: #5b4a3a;
  font-weight: 700;
}

.pd-rows-table tbody td:first-child {
  text-align: left;
  background: #f5f2eb;
  color: #5b4a3a;
}

.pd-rows-table td.is-reserved {
  color: #d9342b;
  font-weight: 500;
}

.pd-rows-table td.is-free {
  color: #2e8c2e;
  font-weight: 500;
}

.pd-empty {
  padding: 24px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: #fffdf9;
  color: var(--color-text-soft);
  box-shadow: var(--shadow-card);
}

@media (max-width: 1160px) {
  .pd-top {
    grid-template-columns: 1fr;
  }

  .pd-product-main {
    grid-template-columns: 120px 1fr;
  }

  .pd-product-buy {
    grid-column: 1 / -1;
    align-items: flex-start;
  }
}

@media (max-width: 760px) {
  .pd-title {
    font-size: 28px;
  }

  .pd-search-form input {
    min-width: 0;
    width: 100%;
  }

  .pd-search-form,
  .pd-album-form {
    width: 100%;
    flex-wrap: wrap;
  }

  .pd-product-main {
    grid-template-columns: 1fr;
  }

  .pd-product-photo {
    width: 100%;
    height: 220px;
  }
}

/* =========================
   Product detail
   ========================= */

.prd-page {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.prd-back {
  display: flex;
  justify-content: space-between;
}

.prd-back a {
  color: var(--color-link-brown);
  text-decoration: none;
  transition: var(--transition-ui);
  font-weight: 500;
}

.prd-top {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 24px;
  align-items: start;
}

.prd-main {
  min-width: 0;
}

.prd-top-grid {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 22px;
  align-items: start;
}

.prd-gallery {
  min-width: 0;
}

.prd-main-image {
  width: 100%;
  aspect-ratio: 1 / 1;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: #efe7d8;
  overflow: hidden;
}

.prd-main-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.prd-thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.prd-thumb {
  width: 74px;
  height: 74px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: #efe7d8;
  overflow: hidden;
}

.prd-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.prd-title {
  margin: 0;
  color: #8a6032;
  font-size: 32px;
  line-height: 1.1;
  font-weight: 700;
}

.prd-meta {
  color: #5b4a3a;
  font-size: 15px;
  line-height: 1.45;
}

.prd-price {
  margin: 5px 0 5px;
  font-size: 30px;
  font-weight: 700;
  color: var(--color-secondary-accent);
}

.prd-actions {
  margin-bottom: 18px;
  display: flex;
  flex-direction: row;
  gap: var(--grid-gap);
}

.prd-order-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 150px;
  padding: 13px 20px;
  border-radius: var(--radius-sm);
  background: var(--color-gold);
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  transition: var(--transition-ui);
  cursor: pointer;
}

.prd-order-btn:hover {
  box-shadow: var(--shadow-btn-hover);
  filter: brightness(1.15);
}

.prd-short-text {
  color: var(--color-text);
  font-size: 15px;
  line-height: 1.6;
}

.prd-block {
  margin-top: 22px;
  background: #fffdf9;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 16px;
  box-shadow: var(--shadow-card);
}

.prd-block-title {
  margin: 0 0 14px;
  color: #8a6032;
  font-size: 24px;
  font-weight: 700;
}

.prd-description {
  color: var(--color-text);
  font-size: 15px;
  line-height: 1.7;
}

.prd-description p {
  margin: 0 0 14px;
}

.prd-side {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.prd-side-card {
  background: #fffdf9;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 16px;
  box-shadow: var(--shadow-card);
}

.prd-side-title {
  margin: 0 0 12px;
  font-size: 17px;
  line-height: 1.1;
  color: #8a6032;
  font-weight: 700;
}

.prd-organizer {
  display: flex;
  align-items: center;
  gap: 12px;
}

.prd-organizer img,
.prd-organizer-placeholder {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  object-fit: cover;
  background: #e9ddc8;
  border: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: var(--color-primary-dark);
}

.prd-organizer-info a {
  color: var(--color-link-brown);
  text-decoration: none;
  font-weight: 700;
}

.prd-organizer-meta {
  margin-top: 4px;
  color: var(--color-text-muted);
  font-size: 14px;
}

.prd-progress {
  position: relative;
  width: 100%;
  height: 24px;
  background: var(--gradient-progress-bg);
  border: 1px solid var(--color-border-mid);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 14px;
}

.prd-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #8ccf00, #6ea800);
}

.prd-progress span {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: #314300;
}

.prd-side-list {
  display: grid;
  gap: 10px;
  color: var(--color-text);
  font-size: 15px;
  line-height: 1.5;
}

.prd-side-list a {
  color: #2356a4;
  text-decoration: none;
}

.prd-rows-wrap {
  overflow-x: auto;
}

.prd-rows-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.prd-rows-table th,
.prd-rows-table td {
  border: 1px solid #e0ddd4;
  padding: 10px 12px;
  text-align: center;
}

.prd-rows-table thead th {
  background: #ebe8e1;
  color: #5b4a3a;
  font-weight: 700;
}

.prd-rows-table tbody td:first-child {
  text-align: left;
  background: #f5f2eb;
  color: #5b4a3a;
}

.prd-rows-table td.is-reserved {
  color: #d9342b;
  font-weight: 500;
}

.prd-rows-table td.is-free {
  color: #2e8c2e;
  font-weight: 500;
}

@media (max-width: 1160px) {
  .prd-top {
    grid-template-columns: 1fr;
  }

  .prd-top-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .prd-title {
    font-size: 28px;
  }

  .prd-main-image {
    aspect-ratio: 1 / 1;
  }
}

/* =========================
   Purchase detail v2
   ========================= */

.pd2-page {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.pd2-back a {
  color: var(--color-link-brown);
  text-decoration: none;
  font-weight: 500;
  transition: var(--transition-ui);
}

.pd2-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 24px;
  align-items: start;
}

.pd2-main {
  min-width: 0;
}

.pd2-sidebar {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.pd2-title {
  margin: 0 0 16px;
  color: #8a6032;
  font-size: 30px;
  line-height: 1.1;
  font-weight: 700;
}

.pd2-description {
  color: var(--color-text);
  font-size: 16px;
  line-height: 1.7;
  margin-bottom: 20px;
}

.richtext p {
  margin: 0 0 14px;
}

.richtext h2,
.richtext h3,
.richtext h4 {
  margin: 18px 0 10px;
  color: #5b4a3a;
  line-height: 1.2;
}

.richtext ul,
.richtext ol {
  margin: 0 0 14px 22px;
}

.richtext li {
  margin-bottom: 6px;
}

.richtext a {
  color: #2356a4;
  text-decoration: none;
}

.pd2-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding-bottom: 2px;
  border-bottom: 1px solid var(--color-border-sidebar);
  margin-bottom: 18px;
}

.pd2-tab {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 10px 18px;
  border: 1px solid var(--color-border);
  background: linear-gradient(180deg, #faf6ef, #efe5d6);
  color: #6a5843;
  text-decoration: none;
  font-weight: 600;
  font-size: 16px;
  border-radius: var(--radius-md) var(--radius-md) 0 0;
}

.pd2-tab.is-active {
  background: var(--color-primary);
  color: white;
  border-color: #a8be56;
  font-weight: 700;
}

.pd2-tools {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 18px;
}

.pd2-search-form,
.pd2-album-form {
  display: flex;
  gap: 10px;
  align-items: center;
}

.pd2-search-form input,
.pd2-album-form select {
  height: 42px;
  border: 1px solid #d6c5ae;
  background: var(--color-bg-white);
  padding: 10px 14px;
  font-size: 15px;
  font-family: var(--font-main);
  color: #786755;
  border-radius: var(--radius-sm);
  outline: none;
}

.pd2-search-form input {
  min-width: 300px;
}

.pd2-search-form button {
  height: 42px;
  border: 0;
  padding: 0 18px;
  border-radius: var(--radius-sm);
  background: var(--color-primary);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}

.pd2-products {
  display: grid;
  gap: 18px;
}

.pd2-product-card,
.pd2-side-card,
.pd2-empty {
  background: #fffdf9;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 16px;
  box-shadow: var(--shadow-card);
}

.pd2-product-main {
  display: grid;
  grid-template-columns: 150px 1fr 180px;
  gap: 18px;
  align-items: start;
}

.pd2-product-photo {
  width: 150px;
  height: 150px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: #efe7d8;
  overflow: hidden;
}

.pd2-product-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pd2-product-title {
  margin: 0 0 10px;
  font-size: 24px;
  line-height: 1.15;
  font-weight: 700;
}

.pd2-product-title a {
  color: #2356a4;
  text-decoration: none;
}

.pd2-product-meta {
  margin-bottom: 8px;
  color: #5b4a3a;
  font-size: 15px;
}

.pd2-product-text {
  color: var(--color-text);
  font-size: 15px;
  line-height: 1.55;
}

.pd2-product-buy {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 14px;
}

.pd2-product-price {
  font-size: 24px;
  font-weight: 700;
  color: #5d4734;
}

.pd2-order-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 140px;
  padding: 12px 18px;
  border-radius: var(--radius-sm);
  background: var(--color-primary);
  border: none;
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  transition: var(--transition-ui);
  cursor: pointer;
}

.pd2-order-btn:hover {
    box-shadow: var(--shadow-btn-hover);
  filter: brightness(1.15);
}

.pd2-rows-wrap {
  margin-top: 16px;
  overflow-x: auto;
}

.pd2-rows-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.pd2-rows-table th,
.pd2-rows-table td {
  border: 1px solid #e0ddd4;
  padding: 10px 12px;
  text-align: center;
}

.pd2-rows-table thead th {
  background: #ebe8e1;
  color: #5b4a3a;
  font-weight: 700;
}

.pd2-rows-table tbody td:first-child {
  text-align: left;
  background: #f5f2eb;
  color: #5b4a3a;
}

.pd2-rows-table td.is-reserved {
  color: #d9342b;
  font-weight: 500;
}

.pd2-rows-table td.is-free {
  color: #2e8c2e;
  font-weight: 500;
}

.pd2-side-title {
  margin: 0 0 12px;
  font-size: 17px;
  line-height: 1.1;
  color: #8a6032;
  font-weight: 700;
}

.pd2-organizer {
  display: flex;
  align-items: center;
  gap: 12px;
}

.pd2-organizer img,
.pd2-organizer-placeholder {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  object-fit: cover;
  background: #e9ddc8;
  border: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: var(--color-primary-dark);
}

.pd2-organizer-info a {
  color: var(--color-link-brown);
  text-decoration: none;
  font-weight: 700;
}

.pd2-organizer-meta {
  margin-top: 4px;
  color: var(--color-text-muted);
  font-size: 14px;
}

.pd2-progress {
  position: relative;
  width: 100%;
  height: 24px;
  background: var(--gradient-progress-bg);
  border: 1px solid var(--color-border-mid);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 14px;
}

.pd2-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #8ccf00, #6ea800);
}

.pd2-progress span {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: #314300;
}

.pd2-side-list {
  display: grid;
  gap: 10px;
  color: var(--color-text);
  font-size: 15px;
  line-height: 1.5;
}

.pd2-album-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.pd2-album-list li + li {
  margin-top: 10px;
}

.pd2-album-list a {
  color: #2356a4;
  text-decoration: none;
}

.pd2-album-list a.is-active {
  color: var(--color-link-brown);
  font-weight: 700;
}

.pd2-side-richtext {
  color: var(--color-text);
  font-size: 15px;
  line-height: 1.6;
}

@media (max-width: 1160px) {
  .pd2-layout {
    grid-template-columns: 1fr;
  }

  .pd2-product-main {
    grid-template-columns: 120px 1fr;
  }

  .pd2-product-buy {
    grid-column: 1 / -1;
    align-items: flex-start;
  }
}

@media (max-width: 760px) {
  .pd2-title {
    font-size: 28px;
  }

  .pd2-search-form,
  .pd2-album-form {
    width: 100%;
    flex-wrap: wrap;
  }

  .pd2-search-form input {
    min-width: 0;
    width: 100%;
  }

  .pd2-product-main {
    grid-template-columns: 1fr;
  }

  .pd2-product-photo {
    width: 100%;
    height: 220px;
  }
}
/* =========================
   Purchase detail page only
   ========================= */

body.purchase-detail-page .content {
  grid-template-columns: var(--sidebar-width) 1fr;
}

body.purchase-detail-page .content > .sidebar {
  display: block;
}

body.purchase-detail-page .pd2-layout {
  display: block;
}

body.purchase-detail-page .pd2-main {
  min-width: 0;
  width: 100%;
  max-width: none;
}

body.purchase-detail-page .pd2-sidebar {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
  min-width: 0;
  max-width: none;
}

body.purchase-detail-page .pd2-main > * {
  max-width: none;
}

@media (max-width: 1160px) {
  body.purchase-detail-page .content {
    grid-template-columns: 1fr;
  }

  body.purchase-detail-page .content > .sidebar {
    display: none;
  }
}

.pd2-description-wrap {
  margin-bottom: 20px;
}

.pd2-description {
  position: relative;
  overflow: hidden;
  transition: max-height 0.25s ease;
}

.pd2-description.is-collapsed {
  max-height: 420px;
}

.pd2-description.is-collapsed::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 90px;
  background: linear-gradient(
    180deg,
    rgba(251, 249, 244, 0) 0%,
    rgba(251, 249, 244, 0.92) 55%,
    rgba(251, 249, 244, 1) 100%
  );
  pointer-events: none;
}

.pd2-description.is-expanded {
  max-height: none;
}

.pd2-description-toggle {
  display: block;
  margin: 12px auto 0;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--color-border);
  background: linear-gradient(180deg, #faf6ef, #efe5d6);
  color: #6a5843;
  border-radius: var(--radius-sm);
  padding: 10px 16px;
  font-family: var(--font-main);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}

.pd2-description-toggle:hover {
  color: #8c6438;
  border-color: #d3c1a2;
  background: linear-gradient(180deg, #fdfaf4, #f1e8da);
}

/* =========================
   Product detail page only
   ========================= */

body.product-detail-page .content {
  grid-template-columns: var(--sidebar-width) 1fr;
}

body.product-detail-page .content > .sidebar {
  display: block;
}

body.product-detail-page .prd-top {
  display: block;
}

body.product-detail-page .prd-main {
  min-width: 0;
  width: 100%;
  max-width: none;
}

body.product-detail-page .prd-side {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
  min-width: 0;
  max-width: none;
}

body.product-detail-page .prd-main > * {
  max-width: none;
}

@media (max-width: 1160px) {
  body.product-detail-page .content {
    grid-template-columns: 1fr;
  }

  body.product-detail-page .content > .sidebar {
    display: none;
  }
}

.prd-main-image,
.prd-thumb {
  cursor: zoom-in;
}

.prd-lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
}

.prd-lightbox.is-open {
  display: block;
}

.prd-lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.82);
}

.prd-lightbox-dialog {
  position: relative;
  z-index: 2;
  width: min(96vw, 1400px);
  height: min(92vh, 980px);
  margin: 4vh auto;
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) 72px;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
}

.prd-lightbox-stage {
  grid-column: 2;
  grid-row: 1;
  min-width: 0;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.prd-lightbox-stage img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.35);
  background: #fff;
}

.prd-lightbox-nav {
  width: 56px;
  height: 56px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font-size: 40px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.prd-lightbox-prev {
  grid-column: 1;
  grid-row: 1;
  justify-self: center;
}

.prd-lightbox-next {
  grid-column: 3;
  grid-row: 1;
  justify-self: center;
}

.prd-lightbox-close {
  position: absolute;
  top: -4px;
  right: 0;
  width: 52px;
  height: 52px;
  border: 0;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  border-radius: 50%;
  font-size: 34px;
  line-height: 1;
  cursor: pointer;
  z-index: 3;
}

.prd-lightbox-thumbs {
  grid-column: 1 / -1;
  grid-row: 2;
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 0 24px;
}

.prd-lightbox-thumb {
  width: 72px;
  height: 72px;
  border: 2px solid transparent;
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  background: #fff;
  padding: 0;
}

.prd-lightbox-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.prd-lightbox-thumb.is-active {
  border-color: #d9a441;
}

@media (max-width: 760px) {
  .prd-lightbox-dialog {
    width: 100vw;
    height: 100vh;
    margin: 0;
    padding: 16px;
    grid-template-columns: 52px minmax(0, 1fr) 52px;
    grid-template-rows: minmax(0, 1fr) auto;
  }

  .prd-lightbox-nav {
    width: 44px;
    height: 44px;
    font-size: 32px;
  }

  .prd-lightbox-close {
    top: 12px;
    right: 12px;
    width: 44px;
    height: 44px;
    font-size: 28px;
  }

  .prd-lightbox-thumb {
    width: 56px;
    height: 56px;
  }
}

.prd-nav-links {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 16px;
}



.prd-nav-link {
  color: var(--color-link-brown);
  text-decoration: none;
  font-weight: 600;
  transition: var(--transition-ui);
}

.prd-nav-link:hover {
  color: var(--color-primary-accent);
}

.prd-back a:hover {
  color: var(--color-primary-accent);
}

.pd2-back a:hover {
  color: var(--color-primary-accent);
}

.prd-actions-secondary {
  margin-top: 10px;
}

.prd-fav-btn {
  border: 1px solid var(--color-border);
  background: linear-gradient(180deg, #faf6ef, #efe5d6);
  color: #6a5843;
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.prd-fav-btn.is-active {
  color: #d9342b;
  border-color: #e2b5b2;
  background: #fff;
}

.prd-external-link {
  margin-top: 2px;
  margin-bottom: 5px;
}

.prd-external-link a {
  color: #2356a4;
  text-decoration: none;
  font-size: 14px;
}

.prd-external-link a:hover {
  text-decoration: underline;
}

.prd-share {
  margin-top: 10px;
}

.prd-share-btn {
  border: 1px solid var(--color-border);
  background: #fff;
  color: #6a5843;
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.prd-actions-secondary {
  margin-top: 10px;
}

.prd-fav-btn,
.prd-fav-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--color-border);
  background: linear-gradient(180deg, #faf6ef, #efe5d6);
  color: #6a5843;
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
}

.prd-fav-btn.is-active {
  color: #d9342b;
  border-color: #e2b5b2;
  background: #fff;
}

.prd-prices {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  margin-top: auto;
}

.prd-info {
  display: flex;
  flex-direction: column;
  height: 100%;
}

/* =========================
   Product buttons (NEW)
   ========================= */

.prd-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 10px;
}

/* Базовая кнопка */
.prd-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;

  height: 44px;
  padding: 0 16px;

  border-radius: var(--radius-md);
  font-size: 15px;
  font-weight: 700;
  font-family: var(--font-main);

  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;

  transition: var(--transition-ui);
  box-shadow: var(--shadow-card);
}

.prd-btn:hover {
    box-shadow: var(--shadow-btn-hover);
  filter: brightness(1.15);
}

/* Иконка */
.prd-btn .material-symbols-outlined {
  font-size: 20px;
  line-height: 1;
}

/* =========================
   Primary (Заказать)
   ========================= */

.prd-btn-primary {
  background: var(--color-primary);
  color: #fff;
  border-color: rgba(255,255,255,0.12);
}

.prd-btn-primary:hover {
  box-shadow: var(--shadow-btn-hover);
}

/* =========================
   Secondary (Закладки)
   ========================= */

.prd-btn-secondary {
  background: linear-gradient(180deg, #faf6ef, #efe5d6);
  color: #6a5843;
  border: 1px solid var(--color-border);
}

.prd-btn-secondary:hover {
  color: var(--color-primary-accent);
  border-color: var(--color-border-mid);
  box-shadow: var(--shadow-btn-hover);
}

/* Активное состояние (в закладках) */
.prd-btn-secondary.is-active {
  background: #fff;
  color: #d9342b;
  border-color: #e2b5b2;
}

.prd-btn-secondary.is-active .material-symbols-outlined {
  font-variation-settings: "FILL" 1;
}

/* =========================
   Ghost (Поделиться)
   ========================= */

.prd-btn-ghost {
  background: #fff;
  color: var(--color-text-soft);
  border: 1px dashed var(--color-border);
}

.prd-btn-ghost:hover {
  color: var(--color-primary);
  border-color: var(--color-primary-light);
  box-shadow: var(--shadow-btn-hover);
}

/* =========================
   Mobile
   ========================= */

@media (max-width: 760px) {
  .prd-actions {
    flex-direction: column;
  }

  .prd-btn {
    width: 100%;
  }
}

/* =========================
   Public profile redesign
   ========================= */

.profile-page {
  max-width: 1120px;
}

.profile-card {
  overflow: hidden;
  padding: 0;
}

.profile-header {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 28px;
  align-items: center;
}

.profile-avatar-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
}

.profile-avatar {
  width: 210px;
  height: 210px;
  object-fit: cover;
  border-radius: 22px;
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-card);
  background: #f3ede3;
}

.profile-avatar-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 72px;
  font-weight: 700;
  color: var(--color-primary-dark);
  background: linear-gradient(180deg, #f8f2e8, #eadfcd);
}

.profile-head-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.profile-name-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 10px;
}

.profile-name {
  margin: 0;
  color: #5d4734;
  font-size: 38px;
  line-height: 1.1;
  font-weight: 700;
}

.profile-role-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .2px;
  border: 1px solid transparent;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.4);
}

.profile-role-badge.is-admin {
  color: #9a4b35;
  background: #fff2ef;
  border-color: #e4b7ab;
}

.profile-role-badge.is-organizer {
  color: #8a6032;
  background: #fff8e8;
  border-color: #e7d2a5;
}

.profile-subtitle {
  color: var(--color-text-soft);
  font-size: 17px;
  line-height: 1.5;
  margin-bottom: 18px;
}

.profile-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.profile-edit-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 12px 18px;
  border-radius: var(--radius-md);
  background: var(--color-primary);
  color: #fff;
  text-decoration: none;
  font-size: 16px;
  font-weight: 700;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.12);
  transition: var(--transition-ui);
  border: none;
  cursor: pointer;
}

.profile-password-form .errorlist,
.profile-form-row .errorlist {
  list-style: none;
  margin: 8px 0 0;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: #fff2ef;
  border: 1px solid #e4b7ab;
  color: #9a4b35;
  font-size: 14px;
  line-height: 1.5;
}

.profile-password-form .errorlist li,
.profile-form-row .errorlist li {
  margin: 0;
}

.profile-password-form input {
  width: 100%;
  border: 1px solid #d6c5ae;
  background: var(--color-bg-white);
  padding: 13px 14px;
  font-size: 16px;
  font-family: var(--font-main);
  color: #5c4b39;
  border-radius: var(--radius-sm);
  outline: none;
  transition: border-color .2s ease, box-shadow .2s ease, background-color .2s ease;
}

.profile-password-form input:focus {
  border-color: var(--color-primary-light);
  box-shadow:
    0 0 0 1px rgba(183, 131, 73, 0.18),
    0 0 14px rgba(183, 131, 73, 0.10);
  background: var(--color-bg-white-soft);
}

.profile-edit-btn:hover {
  box-shadow: var(--shadow-btn-hover);
  filter: brightness(1.03);
}

.profile-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 24px;
  padding: 28px 0 28px 0;
}

.profile-main,
.profile-sidebar {
  min-width: 0;
}

.profile-section,
.profile-side-card {
  background: #fffdf9;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 18px;
  box-shadow: var(--shadow-card);
}

.profile-section + .profile-section {
  margin-top: 24px;
}

.profile-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.profile-section-title,
.profile-side-title {
  margin: 0;
  color: #8a6032;
  font-weight: 700;
  line-height: 1.15;
}

.profile-section-title {
  font-size: 24px;
}

.profile-side-title {
  font-size: 20px;
  margin-bottom: 14px;
}

.profile-purchases-count {
  font-size: 14px;
  color: var(--color-text-muted);
  font-weight: 700;
}

.profile-description {
  color: var(--color-text);
  font-size: 16px;
  line-height: 1.7;
}

.profile-description p {
  margin: 0 0 14px;
}

.profile-description p:last-child {
  margin-bottom: 0;
}

.profile-description.is-empty {
  color: var(--color-text-muted);
}

.profile-facts {
  display: grid;
  gap: 14px;
}

.profile-fact {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 12px;
  align-items: start;
  padding: 12px 0;
  border-bottom: 1px solid var(--color-border-warm);
}

.profile-fact:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.profile-fact:first-child {
  padding-top: 0;
}

.profile-fact .material-symbols-outlined {
  font-size: 20px;
  line-height: 1;
  color: var(--color-primary);
  margin-top: 2px;
}

.profile-fact-label {
  color: var(--color-text-muted);
  font-size: 13px;
  line-height: 1.3;
  margin-bottom: 2px;
}

.profile-fact-value {
  color: #5b4a3a;
  font-size: 15px;
  line-height: 1.5;
  font-weight: 600;
  word-break: break-word;
}

/* purchases */

.profile-purchases-list {
  display: grid;
  gap: 16px;
}

.profile-purchase-card {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 18px;
  padding: 16px;
  background: #fffaf2;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  transition: var(--transition-ui);
}

.profile-purchase-card:hover {
  box-shadow: var(--shadow-card-hover);
}

.profile-purchase-cover {
  display: block;
  width: 150px;
  height: 150px;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--color-border);
  background: #efe7d8;
  text-decoration: none;
}

.profile-purchase-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-purchase-cover-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, #f8f2e8, #eadfcd);
  color: var(--color-primary-dark);
}

.profile-purchase-cover-placeholder .material-symbols-outlined {
  font-size: 44px;
}

.profile-purchase-body {
  min-width: 0;
}

.profile-purchase-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 10px;
}

.profile-purchase-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.profile-purchase-badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 13px;
  line-height: 1;
  font-weight: 700;
  border: 1px solid transparent;
}

.profile-purchase-badge.is-active {
  background: #eef7ef;
  border-color: #bfd8c2;
  color: var(--color-primary-dark);
}

.profile-purchase-badge.is-paused {
  background: #eef5f8;
  border-color: #bfd0db;
  color: #45687a;
}

.profile-purchase-badge.is-closed,
.profile-purchase-badge.is-archived {
  background: #f3efe8;
  border-color: var(--color-border);
  color: #6f6357;
}

.profile-purchase-badge.is-warm {
  background: #fff8e8;
  border-color: #e7d2a5;
  color: #8a6032;
}

.profile-purchase-badge.is-soft {
  background: #faf6ef;
  border-color: var(--color-border);
  color: #6a5843;
}

.profile-purchase-title {
  margin: 0 0 10px;
  font-size: 24px;
  line-height: 1.15;
  font-weight: 700;
}

.profile-purchase-title a {
  color: #7d9440;
  text-decoration: none;
  transition: var(--transition-ui);
}

.profile-purchase-title a:hover {
  color: var(--color-primary-accent);
}

.profile-purchase-description {
  color: var(--color-text);
  font-size: 15px;
  line-height: 1.6;
  margin-bottom: 12px;
}

.profile-purchase-meta {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
}

.profile-purchase-meta-item {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #5b4a3a;
  font-size: 14px;
  line-height: 1.45;
}

.profile-purchase-meta-item .material-symbols-outlined {
  font-size: 18px;
  color: var(--color-primary);
  flex: 0 0 auto;
}

.profile-purchase-progress {
  position: relative;
  width: 100%;
  height: 22px;
  background: var(--gradient-progress-bg);
  border: 1px solid var(--color-border-mid);
  border-radius: 999px;
  overflow: hidden;
}

.profile-purchase-progress-bar {
  position: absolute;
  inset: 0 auto 0 0;
  background: linear-gradient(90deg, #8ccf00, #6ea800);
  border-radius: 999px;
}

.profile-purchase-progress span {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: #314300;
}

@media (max-width: 960px) {
  .profile-header {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .profile-head-main {
    align-items: center;
  }

  .profile-name-row {
    justify-content: center;
  }

  .profile-content {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .profile-header,
  .profile-content {
    padding: 20px 18px;
  }

  .profile-avatar {
    width: 170px;
    height: 170px;
  }

  .profile-name {
    font-size: 30px;
  }

  .profile-subtitle {
    font-size: 15px;
  }

  .profile-edit-btn {
    width: 100%;
  }

  .profile-purchase-card {
    grid-template-columns: 1fr;
  }

  .profile-purchase-cover {
    width: 100%;
    height: 220px;
  }

  .profile-section-head {
    align-items: flex-start;
  }
}

.profile-secondary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 12px 18px;
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, #faf6ef, #efe5d6);
  color: #6a5843;
  text-decoration: none;
  font-size: 16px;
  font-weight: 700;
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-card);
  transition: var(--transition-ui);
  cursor: pointer;
}

.profile-secondary-btn:hover {
  color: var(--color-primary-accent);
  border-color: var(--color-border-mid);
  box-shadow: var(--shadow-btn-hover);
}

@media (max-width: 760px) {
  .profile-secondary-btn {
    width: 100%;
  }
}

/* =========================
   Profile edit
   ========================= */

.profile-page-edit .profile-card {
  overflow: hidden;
}

.profile-edit-content {
  align-items: start;
}

.profile-edit-form {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.profile-edit-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px 18px;
}

.profile-form-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.profile-form-row.full {
  grid-column: 1 / -1;
}

.profile-form-row label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #7d562f;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.35;
}

.profile-form-row label .material-symbols-outlined {
  font-size: 18px;
  color: var(--color-primary);
}

.profile-form-row input,
.profile-form-row textarea,
.profile-form-row select {
  width: 100%;
  border: 1px solid #d6c5ae;
  background: var(--color-bg-white);
  padding: 13px 14px;
  font-size: 16px;
  font-family: var(--font-main);
  color: #5c4b39;
  border-radius: var(--radius-sm);
  outline: none;
  transition: border-color .2s ease, box-shadow .2s ease, background-color .2s ease;
}

.profile-form-row input::placeholder,
.profile-form-row textarea::placeholder {
  color: #9c8a76;
}

.profile-form-row input:focus,
.profile-form-row textarea:focus,
.profile-form-row select:focus {
  border-color: var(--color-primary-light);
  box-shadow:
    0 0 0 1px rgba(183, 131, 73, 0.18),
    0 0 14px rgba(183, 131, 73, 0.10);
  background: var(--color-bg-white-soft);
}

.profile-form-row textarea {
  min-height: 180px;
  resize: vertical;
  line-height: 1.6;
}

.profile-form-row input[type="file"] {
  padding: 11px 12px;
  background: linear-gradient(180deg, #faf6ef, #efe5d6);
  cursor: pointer;
}

.profile-form-row .helptext {
  color: var(--color-text-muted);
  font-size: 13px;
  line-height: 1.45;
}

.profile-form-row .errorlist,
.profile-form-errors {
  list-style: none;
  margin: 0;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: #fff2ef;
  border: 1px solid #e4b7ab;
  color: #9a4b35;
  font-size: 14px;
  line-height: 1.5;
}

.profile-edit-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding-top: 4px;
}

.profile-edit-note {
  color: var(--color-text);
  font-size: 15px;
  line-height: 1.65;
}

@media (max-width: 900px) {
  .profile-edit-grid {
    grid-template-columns: 1fr;
  }

  .profile-form-row.full {
    grid-column: auto;
  }
}

@media (max-width: 760px) {
  .profile-edit-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .profile-edit-actions .profile-edit-btn,
  .profile-edit-actions .profile-secondary-btn {
    width: 100%;
  }
}

/* =========================
   Avatar upload
   ========================= */

.profile-form-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #7d562f;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.35;
}

.profile-form-label .material-symbols-outlined {
  font-size: 18px;
  color: var(--color-primary);
}


.avatar-upload-layout {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}

.avatar-preview-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.avatar-preview-box {
  width: 180px;
  height: 180px;
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid var(--color-border);
  background: linear-gradient(180deg, #f8f2e8, #eadfcd);
  box-shadow: var(--shadow-card);
  display: flex;
  align-items: center;
  justify-content: center;
}

.avatar-preview-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.avatar-preview-image.is-hidden {
  display: none;
}

.avatar-preview-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-primary-dark);
}

.avatar-preview-placeholder.is-hidden {
  display: none;
}

.avatar-preview-placeholder .material-symbols-outlined {
  font-size: 64px;
}

.avatar-preview-note {
  font-size: 14px;
  font-weight: 700;
  color: var(--color-text-soft);
  text-align: center;
}

.avatar-upload-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.avatar-dropzone {
  border: 2px dashed var(--color-border-mid);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(180deg, rgba(255,253,250,0.95), rgba(241,235,221,0.95));
  padding: 24px 18px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition-ui);
  outline: none;
}

.avatar-dropzone:hover,
.avatar-dropzone:focus {
  border-color: var(--color-primary-light);
  box-shadow:
    0 0 0 1px rgba(183, 131, 73, 0.18),
    0 0 14px rgba(183, 131, 73, 0.10);
  background: linear-gradient(180deg, #fffdf9, #f3ecdf);
}

.avatar-dropzone.is-dragover {
  border-color: var(--color-primary);
  background: linear-gradient(180deg, #f8fcf8, #edf5ef);
  box-shadow:
    0 0 0 1px rgba(94,139,99,0.18),
    0 0 18px rgba(94,139,99,0.12);
}

.avatar-dropzone-icon {
  display: flex;
  justify-content: center;
  margin-bottom: 10px;
}

.avatar-dropzone-icon .material-symbols-outlined {
  font-size: 40px;
  color: var(--color-primary);
}

.avatar-dropzone-title {
  color: #5d4734;
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 6px;
}

.avatar-dropzone-text {
  color: var(--color-text-soft);
  font-size: 15px;
  line-height: 1.5;
  margin-bottom: 6px;
}

.avatar-dropzone-hint {
  color: var(--color-text-muted);
  font-size: 13px;
  line-height: 1.4;
}

.avatar-upload-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.avatar-upload-fileinfo {
  min-height: 22px;
  font-size: 14px;
  color: #6a5843;
  font-weight: 600;
}

.avatar-native-input {
  display: none;
}

.avatar-remove-toggle {
  position: relative;
  display: inline-flex;
  cursor: pointer;
}

.avatar-remove-toggle input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.avatar-remove-toggle-ui {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 12px 18px;
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, #fff6f4, #f7e5df);
  color: #9a4b35;
  border: 1px solid #e4b7ab;
  box-shadow: var(--shadow-card);
  font-size: 15px;
  font-weight: 700;
  transition: var(--transition-ui);
}

.avatar-remove-toggle-ui .material-symbols-outlined {
  font-size: 20px;
}

.avatar-remove-toggle:hover .avatar-remove-toggle-ui {
  box-shadow:
    0 0 0 1px rgba(228,183,171,0.28),
    0 6px 16px rgba(154,75,53,0.08);
  filter: brightness(1.01);
}

.avatar-remove-toggle input:checked + .avatar-remove-toggle-ui {
  background: linear-gradient(180deg, #fff2ef, #f4d9d1);
  color: #8d3c28;
  border-color: #d99e90;
  box-shadow:
    0 0 0 1px rgba(217,158,144,0.24),
    0 6px 16px rgba(154,75,53,0.10);
}

@media (max-width: 760px) {
  .avatar-upload-layout {
    grid-template-columns: 1fr;
  }

  .avatar-preview-box {
    width: 160px;
    height: 160px;
  }

  .avatar-upload-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .avatar-upload-actions .profile-secondary-btn,
  .avatar-remove-toggle {
    width: 100%;
  }

  .avatar-remove-toggle-ui {
    width: 100%;
  }
}

/* =========================
   Profile password modal
   ========================= */

.profile-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
}

.profile-modal.is-open {
  display: block;
}

.profile-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(34, 29, 24, 0.56);
  backdrop-filter: blur(3px);
}

.profile-modal-dialog {
  position: relative;
  z-index: 2;
  width: min(92vw, 560px);
  margin: 7vh auto;
  background: linear-gradient(180deg, #fffdf9, #f7f0e4);
  border: 1px solid var(--color-border);
  border-radius: 20px;
  box-shadow: 0 18px 48px rgba(45,55,44,0.22);
  padding: 24px;
}

.profile-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 42px;
  height: 42px;
  border: 1px solid var(--color-border);
  border-radius: 50%;
  background: #fff;
  color: #6a5843;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  transition: var(--transition-ui);
}

.profile-modal-close:hover {
  color: var(--color-primary-accent);
  box-shadow: var(--shadow-card);
}

.profile-modal-head {
  margin-bottom: 18px;
  padding-right: 44px;
}

.profile-modal-title {
  margin: 0 0 8px;
  color: #8a6032;
  font-size: 28px;
  line-height: 1.1;
  font-weight: 700;
}

.profile-modal-subtitle {
  color: var(--color-text-soft);
  font-size: 15px;
  line-height: 1.55;
}

.profile-password-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.profile-password-note {
  padding: 12px 14px;
  border: 1px solid var(--color-border-warm);
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, #faf6ef, #f1e8da);
  color: var(--color-text-soft);
  font-size: 14px;
  line-height: 1.55;
}

.profile-modal-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  padding-top: 4px;
}

@media (max-width: 760px) {
  .profile-modal-dialog {
    width: min(96vw, 560px);
    margin: 4vh auto;
    padding: 20px 16px;
    border-radius: 16px;
  }

  .profile-modal-title {
    font-size: 24px;
  }

  .profile-modal-actions {
    flex-direction: column;
  }

  .profile-modal-actions .profile-edit-btn,
  .profile-modal-actions .profile-secondary-btn {
    width: 100%;
  }
}

/* =========================
   Logout button
   ========================= */

.profile-logout-form {
  display: inline-flex;
}

.profile-danger-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;

  min-height: 46px;
  padding: 12px 18px;

  border-radius: var(--radius-md);

  background: linear-gradient(180deg, #fff2ef, #f4d9d1);
  color: #9a4b35;

  border: 1px solid #e4b7ab;

  font-size: 16px;
  font-weight: 700;

  cursor: pointer;
  text-decoration: none;

  box-shadow: var(--shadow-card);
  transition: var(--transition-ui);
}

.profile-danger-btn .material-symbols-outlined {
  font-size: 20px;
}

.profile-danger-btn:hover {
  background: linear-gradient(180deg, #ffe9e5, #f1cdc3);
  border-color: #d99e90;
  color: #8d3c28;

  box-shadow:
    0 0 0 1px rgba(217,158,144,0.25),
    0 6px 16px rgba(154,75,53,0.10);
}

@media (max-width: 760px) {
  .profile-logout-form {
    width: 100%;
  }

  .profile-danger-btn {
    width: 100%;
  }
}

.pd2-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.pd2-bookmark-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
  background: #fffdf9;
  color: #8a6032;
  text-decoration: none;
  font-weight: 700;
  box-shadow: var(--shadow-card);
  transition: var(--transition-ui);
}

.pd2-bookmark-btn:hover {
  color: var(--color-primary-accent);
  border-color: #d3c1a2;
}

.pd2-bookmark-btn.is-active {
  background: linear-gradient(180deg, #fff4d9, #f2dfab);
  color: #8a6032;
  border-color: #dcc58a;
}

/* =========================
   Bookmarks
   ========================= */

.bm-page {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.bm-title {
  margin: 0;
  color: #8a6032;
  font-size: 30px;
  line-height: 1.1;
  font-weight: 700;
}

.bm-section {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.bm-section-title {
  margin: 0;
  color: #5b4a3a;
  font-size: 22px;
  line-height: 1.2;
  font-weight: 700;
}

.bm-list {
  display: grid;
  gap: 18px;
}

.bm-card,
.bm-empty {
  background: #fffdf9;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 18px;
  box-shadow: var(--shadow-card);
}

.bm-card {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
}

.bm-card-main {
  min-width: 0;
  flex: 1 1 auto;
}

.bm-card-title {
  margin: 0 0 10px;
  font-size: 24px;
  line-height: 1.15;
  font-weight: 700;
}

.bm-card-title a {
  color: #2356a4;
  text-decoration: none;
}

.bm-card-text {
  margin: 0 0 12px;
  color: var(--color-text);
  font-size: 15px;
  line-height: 1.55;
}

.bm-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  color: #5b4a3a;
  font-size: 14px;
  line-height: 1.4;
}

.bm-card-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 0 0 auto;
}

.bm-open-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 180px;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-weight: 700;
  background: var(--color-primary);
  color: #fff;
  cursor: pointer;
}

@media (max-width: 760px) {
  .bm-card {
    flex-direction: column;
  }

  .bm-card-actions {
    width: 100%;
  }

  .bm-open-btn {
    width: 100%;
  }
}

/* =========================
   Bookmarks
   ========================= */

.bm-page {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.bm-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  flex-wrap: wrap;
}

.bm-title {
  margin: 0 0 8px;
  color: #8a6032;
  font-size: 32px;
  line-height: 1.1;
  font-weight: 700;
}

.bm-subtitle {
  color: var(--color-text-soft);
  font-size: 16px;
  line-height: 1.6;
}


.bm-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.bm-section-title {
  margin: 0;
  color: #8a6032;
  font-size: 24px;
  line-height: 1.15;
  font-weight: 700;
}

.bm-count {
  min-width: 34px;
  height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  background: linear-gradient(180deg, #faf6ef, #efe5d6);
  border: 1px solid var(--color-border);
  color: #6a5843;
  font-size: 14px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.bm-list {
  display: grid;
  gap: 16px;
}

.bm-card {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr) auto;
  gap: 18px;
  align-items: stretch;
  padding: 16px;
  background: #fffaf2;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  transition: var(--transition-ui);
}

.bm-card:hover {
  box-shadow: var(--shadow-card-hover);
}

.bm-card-cover {
  width: 140px;
  min-height: 140px;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--color-border);
  background: #efe7d8;
  text-decoration: none;
  display: block;
}

.bm-card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.bm-card-cover-placeholder {
  width: 100%;
  height: 100%;
  min-height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, #f8f2e8, #eadfcd);
  color: var(--color-primary-dark);
}

.bm-card-cover-placeholder .material-symbols-outlined {
  font-size: 42px;
}

.bm-card-body {
  min-width: 0;
}

.bm-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.bm-card-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.bm-badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 13px;
  line-height: 1;
  font-weight: 700;
  border: 1px solid transparent;
}

.bm-badge.is-active {
  background: #eef7ef;
  border-color: #bfd8c2;
  color: var(--color-primary-dark);
}

.bm-badge.is-paused {
  background: #eef5f8;
  border-color: #bfd0db;
  color: #45687a;
}

.bm-badge.is-closed,
.bm-badge.is-archived {
  background: #f3efe8;
  border-color: var(--color-border);
  color: #6f6357;
}

.bm-badge.is-soft {
  background: #faf6ef;
  border-color: var(--color-border);
  color: #6a5843;
}

.bm-card-title {
  margin: 0 0 10px;
  font-size: 24px;
  line-height: 1.15;
  font-weight: 700;
}

.bm-card-title a {
  color: #7d9440;
  text-decoration: none;
  transition: var(--transition-ui);
}

.bm-card-title a:hover {
  color: var(--color-primary-accent);
}

.bm-card-text {
  color: var(--color-text);
  font-size: 15px;
  line-height: 1.6;
  margin-bottom: 12px;
}

.bm-card-meta {
  display: grid;
  gap: 8px;
}

.bm-card-meta-item {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #5b4a3a;
  font-size: 14px;
  line-height: 1.45;
}

.bm-card-meta-item .material-symbols-outlined {
  font-size: 18px;
  color: var(--color-primary);
  flex: 0 0 auto;
}

.bm-price {
  font-weight: 700;
  color: var(--color-secondary-accent);
}

.bm-progress {
  position: relative;
  width: 100%;
  height: 22px;
  margin-top: 14px;
  background: var(--gradient-progress-bg);
  border: 1px solid var(--color-border-mid);
  border-radius: 999px;
  overflow: hidden;
}

.bm-progress-bar {
  position: absolute;
  inset: 0 auto 0 0;
  background: linear-gradient(90deg, #8ccf00, #6ea800);
  border-radius: 999px;
}

.bm-progress span {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: #314300;
}

.bm-card-actions {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 10px;
  min-width: 180px;
}

.bm-open-btn,
.bm-remove-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 16px;
  border-radius: var(--radius-md);
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  transition: var(--transition-ui);
  cursor: pointer;
}

.bm-open-btn {
  background: var(--color-primary);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.08);
}

.bm-open-btn:hover {
  box-shadow: var(--shadow-btn-hover);
  filter: brightness(1.15);
}

.bm-remove-form {
  margin: 0;
}

.bm-remove-btn {
  width: 100%;
  background: linear-gradient(180deg, #fff2ef, #f4d9d1);
  color: #9a4b35;
  border: 1px solid #e4b7ab;
  box-shadow: var(--shadow-card);
}

.bm-remove-btn:hover {
  background: linear-gradient(180deg, #ffe9e5, #f1cdc3);
  border-color: #d99e90;
  color: #8d3c28;
  box-shadow:
    0 0 0 1px rgba(217,158,144,0.25),
    0 6px 16px rgba(154,75,53,0.10);
}

.bm-empty {
  padding: 24px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: #fffdf9;
  color: var(--color-text-soft);
  box-shadow: var(--shadow-card);
}

@media (max-width: 900px) {
  .bm-card {
    grid-template-columns: 120px minmax(0, 1fr);
  }

  .bm-card-actions {
    grid-column: 1 / -1;
    flex-direction: row;
    min-width: 0;
  }

  .bm-open-btn,
  .bm-remove-btn {
    flex: 1 1 0;
  }

  .bm-card-cover {
    width: 120px;
    min-height: 120px;
  }

  .bm-card-cover-placeholder {
    min-height: 120px;
  }
}

@media (max-width: 760px) {
  .bm-title {
    font-size: 28px;
  }

  .bm-card {
    grid-template-columns: 1fr;
  }

  .bm-card-cover {
    width: 100%;
    min-height: 220px;
  }

  .bm-card-cover-placeholder {
    min-height: 220px;
  }

  .bm-card-actions {
    flex-direction: column;
  }
}

.bm-remove-btn:disabled {
  opacity: 0.7;
  cursor: wait;
}

.home-card-link {
  display: block;
  color: inherit;
  text-decoration: none;
}

.home-empty {
  padding: 20px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: #fffdf9;
  color: var(--color-text-soft);
  box-shadow: var(--shadow-card);
}

.sidebar-news-item + .sidebar-news-item {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--color-border-warm);
}

.sidebar-news-date {
  margin-top: 6px;
  font-size: 13px;
  color: var(--color-text-muted);
}

.sidebar-news-text {
  margin-top: 8px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--color-text-soft);
}

.home-card-link {
  display: block;
  color: inherit;
  text-decoration: none;
}

.home-empty {
  padding: 20px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: #fffdf9;
  color: var(--color-text-soft);
  box-shadow: var(--shadow-card);
}

.purchase-home-card {
  padding: 18px;
}

.purchase-home-thumb {
  background-color: #efe7d8;
}

.purchase-home-title {
  font-size: 17px;
  font-weight: 500;
  color: #4f4a43;
  min-height: 0;
}

.purchase-home-status {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  color: #4e4a16;
  font-size: 15px;
  line-height: 1.4;
}

.purchase-home-status .material-symbols-outlined {
  font-size: 20px;
  color: #66615c;
}

.purchase-home-organizer {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #0d51c1;
  font-size: 16px;
  font-weight: 500;
}

.purchase-home-organizer img,
.purchase-home-organizer-placeholder {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-xs);
  object-fit: cover;
  background: #efe7d8;
  border: 1px solid var(--color-border);
  flex: 0 0 auto;
}

.purchase-home-thumb {
  padding: 0;
  background: #efe7d8;
  display: flex;
  align-items: center;
  justify-content: center;
}

.purchase-home-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: var(--radius-md);
}

.prd-order-status {
  min-height: 24px;
  margin-top: -6px;
  margin-bottom: 14px;
  font-size: 14px;
  line-height: 1.45;
  color: var(--color-text-soft);
}

.prd-order-status.is-success {
  color: var(--color-primary-dark);
}

.prd-order-status.is-error {
  color: #9a4b35;
}

.prd-btn[disabled],
.prd-btn.is-loading {
  opacity: 0.7;
  cursor: wait;
  pointer-events: none;
}

/* =========================
   Order modal
   ========================= */

body.order-modal-open {
  overflow: hidden;
}

.order-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(31, 42, 31, 0.52);
  backdrop-filter: blur(3px);
}

.order-modal-dialog {
  width: min(810px, calc(100vw - 32px));
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  background: var(--color-bg-page);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-page);
  padding: 22px;
}

.order-modal-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  padding-bottom: 18px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--color-border-warm);
}

.order-modal-product {
  display: flex;
  gap: 16px;
  min-width: 0;
}

.order-modal-thumb {
  width: 110px;
  height: 110px;
  flex: 0 0 110px;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--color-border);
  background: #efe7d8;
}

.order-modal-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.order-modal-product-info {
  min-width: 0;
}

.order-modal-title {
  margin: 0 0 10px;
  color: #8a6032;
  font-size: 28px;
  line-height: 1.15;
  font-weight: 700;
}

.order-modal-meta {
  margin-bottom: 8px;
  color: #5b4a3a;
  font-size: 15px;
  line-height: 1.45;
}

.order-modal-price {
  color: var(--color-secondary-accent);
  font-size: 28px;
  font-weight: 700;
}

.order-modal-close {
  width: 42px;
  height: 42px;
  border: 1px solid var(--color-border);
  border-radius: 50%;
  background: var(--color-bg-white);
  color: #7d562f;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  transition: var(--transition-ui);
  flex: 0 0 auto;
  margin-left: auto;
}

.order-modal-close:hover {
  background: var(--color-bg-soft);
  border-color: var(--color-border-mid);
}

.order-modal-grid {
  display: flex;
  flex-direction: column;
}

.order-modal-main {
  min-width: 0;
}

.order-modal-side {
  min-width: 0;
}

.order-modal-section,
.order-modal-summary {
  padding: 16px;
}


.order-modal-section-title {
  margin: 0 0 14px;
  color: #8a6032;
  font-size: 21px;
  line-height: 1.1;
  font-weight: 700;
}

.order-modal-fields {
  display: grid;
  gap: 14px;
}

.order-modal-form-inner .form-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.order-modal-form-inner label {
  color: #7d562f;
  font-size: 15px;
  font-weight: 600;
}

.order-modal-form-inner input,
.order-modal-form-inner textarea,
.order-modal-form-inner select {
  width: 100%;
  border: 1px solid #d6c5ae;
  background: var(--color-bg-white);
  padding: 13px 14px;
  font-size: 16px;
  font-family: var(--font-main);
  color: #5c4b39;
  border-radius: var(--radius-sm);
  outline: none;
  transition: border-color .2s ease, box-shadow .2s ease, background-color .2s ease;
  resize: vertical;
}

.order-modal-form-inner input:focus,
.order-modal-form-inner textarea:focus,
.order-modal-form-inner select:focus {
  border-color: var(--color-primary-light);
  box-shadow:
    0 0 0 1px rgba(183, 131, 73, 0.18),
    0 0 14px rgba(183, 131, 73, 0.10);
  background: var(--color-bg-white-soft);
}

.order-modal-summary {
  display: grid;
  gap: 12px;
  color: var(--color-text);
  font-size: 15px;
  line-height: 1.5;
  position: sticky;
  top: 0;
  padding: 16px;
}

.order-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding-top: 18px;
  margin-top: 18px;
  border-top: 1px solid var(--color-border-warm);
}

.order-modal-footer .prd-btn {
  min-width: 220px;
}

.pd2-order-btn.is-loading,
.prd-btn.is-loading {
  opacity: 0.7;
  cursor: wait;
  pointer-events: none;
}

@media (max-width: 980px) {
  .order-modal-dialog {
    padding: 18px;
  }

  .order-modal-grid {
    grid-template-columns: 1fr;
  }

  .order-modal-summary {
    position: static;
  }
}

@media (max-width: 760px) {
  .order-modal {
    padding: 10px;
  }

  .order-modal-dialog {
    width: 100%;
    max-height: calc(100vh - 20px);
    padding: 16px;
    border-radius: 16px;
  }

  .order-modal-head {
    align-items: flex-start;
  }

  .order-modal-product {
    gap: 12px;
  }

  .order-modal-thumb {
    width: 82px;
    height: 82px;
    flex-basis: 82px;
  }

  .order-modal-title {
    font-size: 22px;
  }

  .order-modal-price {
    font-size: 24px;
  }

  .order-modal-footer {
    flex-direction: column;
  }

  .order-modal-footer .prd-btn {
    width: 100%;
    min-width: 0;
  }
}

.order-modal-two-cols {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 16px;
}

.order-modal-two-cols--balanced .form-row--full {
  grid-column: 1 / -1;
}

.order-modal-summary {
  overflow: hidden;
}

.order-modal-summary-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  background: #fffdf9;
}

.order-modal-summary-table thead th {
  background: #ece8e1;
  color: #2d2d2d;
  font-size: 18px;
  font-weight: 600;
  text-align: left;
  padding: 18px 18px;
  border-bottom: 1px solid var(--color-border);
}

.order-modal-summary-table thead th:first-child {
  width: 32%;
}

.order-modal-summary-table thead th:nth-child(2) {
  width: 28%;
}

.order-modal-summary-table thead th:nth-child(3) {
  width: 18%;
}

.order-modal-summary-table thead th:nth-child(4) {
  width: 22%;
}

.order-modal-summary-table tbody td {
  padding: 18px 18px;
  font-size: 18px;
  line-height: 1.35;
  color: #2d2d2d;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  vertical-align: middle;
}

.order-modal-summary-table tbody tr:last-child td {
  border-bottom: none;
}

.order-modal-summary-total {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 38px;
  font-size: 20px;
  line-height: 1.1;
  color: #222;
  font-weight: 700;
}

.order-modal-summary-total strong {
  font-size: 20px;
  line-height: 1;
  color: #222;
  font-weight: 800;
}

.order-modal-form-inner select {
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, #7d562f 50%),
    linear-gradient(135deg, #7d562f 50%, transparent 50%);
  background-position:
    calc(100% - 18px) calc(50% - 3px),
    calc(100% - 12px) calc(50% - 3px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  padding-right: 36px;
}

@media (max-width: 980px) {
  .order-modal-two-cols {
    grid-template-columns: 1fr;
  }

  .order-modal-summary-table thead th,
  .order-modal-summary-table tbody td {
    font-size: 16px;
    padding: 14px 14px;
  }

  .order-modal-summary-total {
    gap: 18px;
    font-size: 20px;
    padding: 16px 14px;
  }

  .order-modal-summary-total strong {
    font-size: 20px;
  }
}

@media (max-width: 760px) {
  .order-modal-summary-table {
    table-layout: auto;
  }

  .order-modal-summary-table thead th,
  .order-modal-summary-table tbody td {
    font-size: 14px;
    padding: 12px 10px;
  }

  .order-modal-summary-total {
    justify-content: space-between;
    font-size: 18px;
    gap: 12px;
  }

  .order-modal-summary-total strong {
    font-size: 22px;
  }
}

.order-delivery-description {
  margin-top: 14px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: #fffdf9;
  padding: 14px 16px;
  box-shadow: var(--shadow-card);
}

.order-delivery-description-item {
  color: var(--color-text);
  font-size: 15px;
  line-height: 1.6;
}

.order-delivery-description-item p:last-child {
  margin-bottom: 0;
}

.order-delivery-description-item a {
  color: var(--color-link-brown);
  text-decoration: none;
}

.order-delivery-description-item a:hover {
  color: var(--color-primary-accent);
}

/* =========================
   Order success modal
   ========================= */

.order-success-dialog {
  position: relative;
  width: min(810px, calc(100vw - 32px));
  padding: 34px 36px 32px;
}

.order-success-head {
  margin-bottom: 22px;
}

.order-success-title {
  margin: 0 0 10px;
  font-size: 28px;
  line-height: 1.15;
  color: #2d2d2d;
  font-weight: 700;
}

.order-success-meta {
  display: grid;
  gap: 6px;
  margin-bottom: 10px;
  font-size: 18px;
  line-height: 1.5;
  color: #2d2d2d;
}

.order-success-note {
  font-size: 17px;
  line-height: 1.6;
  color: #3d3d3d;
}

.order-success-note a {
  color: var(--color-link-brown);
  text-decoration: none;
}

.order-success-note a:hover {
  color: var(--color-primary-accent);
}

.order-success-section {
  margin-top: 20px;
}

.order-success-section h3 {
  margin: 0 0 10px;
  font-size: 20px;
  line-height: 1.2;
  color: #2d2d2d;
  font-weight: 700;
}

.order-success-section p {
  margin: 0 0 10px;
  font-size: 17px;
  line-height: 1.4;
  color: #333;
}

.order-success-delivery-title {
  margin-bottom: 10px;
  font-size: 15px;
  line-height: 1.2;
  color: #2d2d2d;
  font-weight: 700;
}

.order-success-delivery-description {
  font-size: 15px;
  line-height: 1.2;
  color: #333;
}

.order-success-actions {
  display: flex;
  gap: 14px;
  margin-top: 20px;
  flex-wrap: wrap;
}

.order-success-actions .prd-btn {
  min-width: 220px;
}

@media (max-width: 760px) {
  .order-success-dialog {
    padding: 22px 18px;
  }

  .order-success-title {
    font-size: 28px;
  }

  .order-success-section h3 {
    font-size: 24px;
  }

  .order-success-actions {
    flex-direction: column;
  }

  .order-success-actions .prd-btn {
    width: 100%;
    min-width: 0;
  }
}

.order-success-head-up {
  display: flex;
  flex-direction: row;
}

/* =========================
   My orders
   ========================= */

.orders-page {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.orders-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  flex-wrap: wrap;
}

.orders-header-left {
  min-width: 0;
}

.orders-title {
  margin: 0;
  color: #8a6032;
  font-size: 34px;
  line-height: 1.1;
  font-weight: 700;
}

.orders-summary {
  margin-top: 8px;
  color: var(--color-text-soft);
  font-size: 15px;
}

.orders-search {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.orders-search input {
  min-width: 320px;
  height: 42px;
  border: 1px solid #d6c5ae;
  background: var(--color-bg-white);
  padding: 10px 14px;
  font-size: 15px;
  font-family: var(--font-main);
  color: #786755;
  border-radius: var(--radius-sm);
  outline: none;
  transition: border-color .2s ease, box-shadow .2s ease, background-color .2s ease;
}

.orders-search input::placeholder {
  color: #9c8a76;
}

.orders-search input:focus {
  border-color: var(--color-primary-light);
  box-shadow:
    0 0 0 1px rgba(183, 131, 73, 0.18),
    0 0 14px rgba(183, 131, 73, 0.10);
  background: var(--color-bg-white-soft);
}

.orders-search button {
  height: 42px;
  border: 0;
  padding: 0 18px;
  border-radius: var(--radius-sm);
  background: var(--color-primary);
  color: #fff;
  font-weight: 700;
  font-size: 15px;
  font-family: var(--font-main);
  cursor: pointer;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.08);
  transition: var(--transition-ui);
}

.orders-search button:hover {
  box-shadow: var(--shadow-btn-hover);
  filter: brightness(1.03);
}

.orders-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding-bottom: 2px;
  border-bottom: 1px solid var(--color-border-sidebar);
}

.orders-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 10px 18px;
  border: 1px solid var(--color-border);
  background: linear-gradient(180deg, #faf6ef, #efe5d6);
  color: #6a5843;
  text-decoration: none;
  font-weight: 600;
  font-size: 16px;
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  transition: var(--transition-ui);
}

.orders-tab span {
  color: var(--color-text-muted);
  font-size: 14px;
}

.orders-tab:hover {
  color: #8c6438;
  border-color: #d3c1a2;
  background: linear-gradient(180deg, #fdfaf4, #f1e8da);
}

.orders-tab.is-active {
  background: var(--color-primary);
  color: #fff;
  border-color: #a8be56;
  font-weight: 700;
}

.orders-tab.is-active span {
  color: rgba(255,255,255,0.85);
}

.orders-list {
  display: grid;
  gap: 18px;
}

.order-card {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr) 180px;
  gap: 30px;
  padding: 18px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: #fffaf2;
  box-shadow: var(--shadow-card);
  transition: var(--transition-ui);
}

.order-card:hover {
  box-shadow: var(--shadow-card-hover);
}

.order-card-left {
  display: flex;
  flex-direction: column;
}

.order-number {
  color: #7d9440;
  text-decoration: none;
  font-size: 28px;
  line-height: 1.1;
  font-weight: 700;
}

.order-date {
  color: var(--color-text-muted);
  font-size: 15px;
}

.order-status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  width: fit-content;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 13px;
  font-weight: 700;
}

.order-status-badge--draft {
  background: #fff8e8;
  border-color: #e7d2a5;
  color: #8a6032;
}

.order-status-badge--submitted {
  background: #eef5f8;
  border-color: #bfd0db;
  color: #45687a;
}

.order-status-badge--confirmed {
  background: #eef7ef;
  border-color: #bfd8c2;
  color: var(--color-primary-dark);
}

.order-status-badge--cancelled {
  background: #fff2ef;
  border-color: #e4b7ab;
  color: #9a4b35;
}

.order-card-center {
  min-width: 0;
}

.order-purchase-line {
  margin-bottom: 12px;
}

.order-purchase-title {
  color: #7d9440;
  text-decoration: none;
  font-size: 28px;
  line-height: 1.15;
  font-weight: 700;
}

.order-meta {
  display: grid;
  gap: 0;
  color: #5b4a3a;
  font-size: 15px;
  line-height: 1.45;
}

.order-meta a {
  color: var(--color-link-brown);
  text-decoration: none;
  font-weight: 700;
}

.order-preview {
  margin-top: 14px;
  width: 175px;
  height: 175px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: #efe7d8;
  overflow: hidden;
}

.order-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.order-card-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}

.order-sum-label,
.order-payment-label {
  color: var(--color-text-muted);
  font-size: 14px;
}

.order-sum {
  font-size: 28px;
  line-height: 1.1;
  font-weight: 700;
  color: #5d4734;
  text-align: right;
}

.order-payment-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 700;
  color: #5d4734;
  text-align: center;
}

.orders-empty {
  padding: 28px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: #fffdf9;
  box-shadow: var(--shadow-card);
}

.orders-empty-title {
  margin-bottom: 8px;
  color: #8a6032;
  font-size: 24px;
  font-weight: 700;
}

.orders-empty-text {
  color: var(--color-text-soft);
  font-size: 15px;
  line-height: 1.6;
}

@media (max-width: 980px) {
  .order-card {
    grid-template-columns: 1fr;
  }

  .order-card-right {
    align-items: flex-start;
  }
}

@media (max-width: 760px) {
  .orders-title {
    font-size: 28px;
  }

  .orders-search {
    width: 100%;
  }

  .orders-search input {
    min-width: 0;
    width: 100%;
  }

  .orders-tab {
    border-radius: var(--radius-sm);
  }

  .order-number,
  .order-purchase-title,
  .order-sum {
    font-size: 22px;
  }
}

/* =========================
   Order detail
   ========================= */

.order-detail-page {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.order-detail-back a {
  color: var(--color-link-brown);
  text-decoration: none;
  font-weight: 600;
  transition: var(--transition-ui);
}

.order-detail-back a:hover {
  color: var(--color-primary-accent);
}

.order-detail-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  flex-wrap: wrap;
}

.order-detail-title {
  margin: 0;
  color: #8a6032;
  font-size: 34px;
  line-height: 1.1;
  font-weight: 700;
}

.order-detail-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 14px;
  font-weight: 700;
}

.order-detail-status--draft {
  background: #fff8e8;
  border-color: #e7d2a5;
  color: #8a6032;
}

.order-detail-status--submitted {
  background: #eef5f8;
  border-color: #bfd0db;
  color: #45687a;
}

.order-detail-status--confirmed {
  background: #eef7ef;
  border-color: #bfd8c2;
  color: var(--color-primary-dark);
}

.order-detail-status--cancelled {
  background: #fff2ef;
  border-color: #e4b7ab;
  color: #9a4b35;
}

.order-detail-top {
  display: grid;
  grid-template-columns: repeat(1, minmax(0, 1fr));
  gap: 18px;
  align-items: start;
}

.order-detail-top-top {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  align-items: start;
}

.order-info-card,
.order-items-card {
  background: #fffdf9;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 18px;
  box-shadow: var(--shadow-card);
}

.order-info-card-title,
.order-items-title {
  margin: 0 0 16px;
  color: #8a6032;
  font-size: 24px;
  line-height: 1.15;
  font-weight: 700;
}

.order-info-card-title-pay {
    margin: 16px 0 16px;
  color: #8a6032;
  font-size: 24px;
  line-height: 1.15;
  font-weight: 700;
}

.order-info-list {
  display: grid;
  gap: 7px;
}

.order-info-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  color: #5b4a3a;
  font-size: 15px;
  line-height: 1.45;
}

.order-info-row--stack {
  flex-direction: row;
  gap: 6px;
}

.order-info-row span {
  color: var(--color-text-muted);
}

.order-info-link {
  color: #2356a4;
  text-decoration: none;
  font-weight: 700;
}

.order-info-note {
  margin-top: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--color-border);
  background: linear-gradient(180deg, #faf6ef, #efe5d6);
  color: #6a5843;
  font-size: 13px;
  font-weight: 700;
}

.order-delivery-box {
  margin-top: 14px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: #fffdf9;
  padding: 14px 16px;
  color: var(--color-text);
  font-size: 15px;
  line-height: 1.6;
}

.order-delivery-box.is-empty {
  color: var(--color-text-muted);
}

.order-delivery-box p:last-child {
  margin-bottom: 0;
}

.order-receive-code {
  margin-top: 14px;
  color: #5b4a3a;
  font-size: 15px;
  line-height: 1.45;
}

.order-items-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.order-items-count {
  color: var(--color-text-soft);
  font-size: 15px;
}

.order-items-table-wrap {
  width: 100%;
  overflow-x: auto;
}

.order-items-table {
  width: 100%;
  border-collapse: collapse;
  background: #fffdf9;
}

.order-items-table thead th {
  background: #ece8e1;
  color: #5b4a3a;
  font-size: 15px;
  font-weight: 700;
  text-align: left;
  padding: 14px 14px;
  border-bottom: 1px solid var(--color-border);
  white-space: nowrap;
}

.order-items-table tbody td {
  padding: 14px 14px;
  font-size: 15px;
  line-height: 1.45;
  color: #2d372c;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  vertical-align: top;
}

.order-items-table tbody tr:last-child td {
  border-bottom: none;
}

.order-items-photo-cell {
  width: 92px;
}

.order-items-photo {
  display: block;
  width: 68px;
  height: 68px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: #efe7d8;
  overflow: hidden;
}

.order-items-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.order-items-product-link {
  color: #2356a4;
  text-decoration: none;
  font-weight: 700;
  line-height: 1.4;
}

.order-item-comment {
  margin-top: 8px;
  color: var(--color-text-soft);
  font-size: 14px;
  line-height: 1.45;
}

.order-item-options {
  display: grid;
  gap: 6px;
}

.order-item-option {
  color: #5b4a3a;
  font-size: 14px;
  line-height: 1.4;
}

.order-item-option span {
  color: var(--color-text-muted);
  margin-right: 4px;
}

.order-item-muted {
  color: var(--color-text-muted);
  font-size: 14px;
}

.order-item-rows {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.order-item-row-chip {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 30px;
  padding: 6px 10px;
  border-radius: 999px;
  background: #eef7ef;
  border: 1px solid #bfd8c2;
  color: var(--color-primary-dark);
  font-size: 13px;
  font-weight: 700;
}

.order-item-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--color-border);
  background: linear-gradient(180deg, #faf6ef, #efe5d6);
  color: #6a5843;
  font-size: 13px;
  font-weight: 700;
}

.order-items-empty {
  color: var(--color-text-soft);
  font-size: 15px;
  line-height: 1.6;
}

@media (max-width: 1160px) {
  .order-detail-top {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .order-detail-title {
    font-size: 28px;
  }

  .order-items-table thead th,
  .order-items-table tbody td {
    font-size: 14px;
    padding: 12px 10px;
  }
}

.order-items-summary {
  margin-top: 2px;
  font-size: 15px;
  line-height: 1.45;
  color: #5b4a3a;
}

.order-meta-products {
  display: flex;
  flex-direction: row;
  gap: 10px;
  margin-top: 10px;
}

.order-meta-product {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 12px;
}

.order-meta-product-image {
  display: block;
  width: 72px;
  height: 72px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: #efe7d8;
  overflow: hidden;
  flex: 0 0 auto;
}

.order-meta-product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.order-meta-product-info {
  min-width: 0;
  padding-top: 2px;
}

.order-meta-product-link {
  color: #2356a4;
  text-decoration: none;
  font-weight: 700;
  line-height: 1.4;
}

.order-more-products {
  margin-top: 10px;
  color: var(--color-text-soft);
  font-size: 14px;
  line-height: 1.4;
}

.order-delivery-content {
  transition: max-height 0.3s ease;
}

.order-delivery-toggle {
  margin-top: 8px;
  background: none;
  border: none;
  color: var(--color-primary);
  cursor: pointer;
  font-size: 14px;
  padding: 0;
}

.order-info-delivery-row {
  display: flex;
  gap: 5px
}

.prd-rows-table td.is-mine {
  background: var(--color-primary);
  color: #fff;
  font-weight: 700;
}

.purchase-home-thumb-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, #f8f2e8, #eadfcd);
  color: var(--color-primary-dark);
}

.purchase-home-thumb-placeholder .material-symbols-outlined {
  font-size: 40px;
}

.purchase-home-meta {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
}

.purchase-home-meta-row {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 8px;
  align-items: start;
  color: var(--color-text-soft);
  font-size: 14px;
  line-height: 1.45;
}

.purchase-home-meta-row .material-symbols-outlined {
  font-size: 18px;
  line-height: 1;
  color: var(--color-primary);
  margin-top: 1px;
}

.purchase-home-card .mini-note {
  margin-bottom: 12px;
}

.purchase-home-status {
  margin-bottom: 12px;
}

.purchase-home-organizer {
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid var(--color-border-warm);
}

@media (max-width: 760px) {
  .purchase-home-meta {
    gap: 7px;
  }

  .purchase-home-meta-row {
    font-size: 13px;
  }
}