* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg: #f5f5f7;
  --text: #1d1d1f;
  --header-bg: #fff;
  --header-border: #e0e0e0;
  --nav-text: #515154;
  --nav-hover: #0071e3;
  --menu-bg: #fff;
  --menu-border: #e0e0e0;
  --menu-text: #1d1d1f;
  --menu-hover-bg: #e8e8ed;
  --menu-hover-text: #0071e3;
  --card-bg: #fff;
  --card-shadow: rgba(0, 0, 0, 0.06);
  --card-shadow-hover: rgba(0, 0, 0, 0.1);
  --dropdown-bg: #fff;
  --dropdown-border: #e0e0e0;
  --dropdown-hover-bg: #f5f5f7;
  --active-bg: #0071e3;
  --active-text: #fff;
}

:root.dark {
  --bg: #0d0d0d;
  --text: #f5f5f7;
  --header-bg: #1c1c1e;
  --header-border: #38383a;
  --nav-text: #a1a1a6;
  --nav-hover: #64b5f6;
  --menu-bg: #1c1c1e;
  --menu-border: #38383a;
  --menu-text: #f5f5f7;
  --menu-hover-bg: #2c2c2e;
  --menu-hover-text: #64b5f6;
  --card-bg: #1c1c1e;
  --card-shadow: rgba(255, 255, 255, 0.04);
  --card-shadow-hover: rgba(255, 255, 255, 0.08);
  --dropdown-bg: #1c1c1e;
  --dropdown-border: #38383a;
  --dropdown-hover-bg: #2c2c2e;
  --active-bg: #64b5f6;
  --active-text: #000;
}

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  transition: background 0.3s, color 0.3s;
  display: flex;
  flex-direction: column;
}

body > main,
body > .cabinet-layout {
  flex: 1;
}

/* ── Cabinet layout / sidebar ── */
.cabinet-layout {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 48px 32px;
  min-height: calc(100vh - 120px);
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.cabinet-sidebar {
  width: 200px;
  flex-shrink: 0;
  position: sticky;
  top: 120px;
  align-self: flex-start;
}

.cabinet-sidebar nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  background: var(--card-bg);
  border-radius: 12px;
  padding: 8px;
  box-shadow: 0 2px 8px var(--card-shadow);
  margin-top: 0;
}

.cabinet-sidebar a {
  display: block;
  padding: 12px 16px;
  border-radius: 10px;
  text-decoration: none;
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  transition: background 0.15s;
}

.cabinet-sidebar a:hover {
  background: var(--dropdown-hover-bg);
}

.cabinet-sidebar a.active {
  background: var(--active-bg);
  color: var(--active-text);
}

.cabinet-sidebar__header {
  height: 44px;
  display: flex;
  align-items: center;
  padding: 0 16px;
}

.cabinet-sidebar__title {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--nav-text);
}

.cabinet-sidebar__body {
  padding-top: 24px;
}

.cabinet-content {
  flex: 1;
  min-width: 0;
}

.cabinet-content--wide {
  width: auto;
  flex: 1;
  min-width: 0;
}

.sidebar-dropdown__toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-radius: 10px;
  text-decoration: none;
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s;
}

.sidebar-dropdown__toggle:hover {
  background: var(--dropdown-hover-bg);
}

.sidebar-dropdown__toggle.active {
  background: var(--active-bg);
  color: var(--active-text);
}

.sidebar-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 17px;
  height: 17px;
  padding: 0 5px;
  border-radius: 9px;
  background: #ff3b30;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  margin-left: 6px;
  vertical-align: middle;
}

.sidebar-dropdown__arrow {
  transition: transform 0.2s;
}

.sidebar-dropdown.open .sidebar-dropdown__arrow {
  transform: rotate(180deg);
}

.sidebar-dropdown__menu {
  display: none;
  flex-direction: column;
  gap: 1px;
  margin-top: 2px;
}

.sidebar-dropdown.open .sidebar-dropdown__menu {
  display: flex;
}

.sidebar-dropdown__menu a {
  display: block;
  padding: 8px 16px 8px 32px;
  border-radius: 8px;
  text-decoration: none;
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
  transition: background 0.15s;
}

.sidebar-dropdown__menu a:hover {
  background: var(--dropdown-hover-bg);
}

.sidebar-dropdown__menu a.active {
  background: var(--active-bg);
  color: var(--active-text);
}

@media (max-width: 768px) {
  .cabinet-layout {
    flex-direction: column;
    padding: 24px 16px;
  }

  .cabinet-sidebar {
    width: 100%;
    position: static;
  }

  .cabinet-sidebar nav {
    flex-direction: row;
    overflow-x: auto;
  }

  .cabinet-sidebar a {
    white-space: nowrap;
  }

  .cabinet-content {
    width: 100%;
  }

  .cabinet-sidebar__body {
    padding-top: 8px;
  }
}

/* ── Header ── */
.header {
  background: var(--header-bg);
  border-bottom: 1px solid var(--header-border);
  transition: background 0.3s, border-color 0.3s;
  height: 110px;
  display: flex;
  align-items: center;
}

.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.logo-title {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: 1.5px;
  color: var(--text);
  line-height: 1.1;
  text-transform: uppercase;
}

.logo {
  width: fit-content;
}

.logo-sub {
  font-size: 13px;
  font-weight: 400;
  color: #6e6e73;
  letter-spacing: 1px;
  margin-top: 4px;
  width: 100%;
  text-align: center;
}

.user-nav {
  display: flex;
  gap: 2px;
  align-items: center;
}

.user-nav__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  text-decoration: none;
  color: var(--nav-text);
  font-size: 9px;
  font-weight: 500;
  width: 48px;
  height: 44px;
  flex-shrink: 0;
  transition: color 0.2s;
  cursor: pointer;
}

.user-nav__item:hover {
  color: var(--nav-hover);
}

.user-nav__item svg {
  display: block;
}

/* ── Dropdowns (Language & Currency & Theme) ── */
.nav-dropdown-wrapper {
  position: relative;
  width: 48px;
  flex-shrink: 0;
}

.nav-cart-wrapper {
  width: auto;
}

.nav-cart-wrapper > .user-nav__item {
  position: relative;
}

.cart-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  min-width: 16px;
  height: 16px;
  border-radius: 8px;
  background: #ff3b30;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 16px;
  text-align: center;
  padding: 0 4px;
  pointer-events: none;
}

.nav-notif-wrapper {
  width: auto;
}

.nav-notif-wrapper > .user-nav__item {
  position: relative;
}

.notif-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  min-width: 16px;
  height: 16px;
  border-radius: 8px;
  background: #ff3b30;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 16px;
  text-align: center;
  padding: 0 4px;
  pointer-events: none;
}

.nav-dropdown.notif-dropdown {
  min-width: 320px;
  padding: 8px;
}

.notif-dropdown__inner {
  max-height: 240px;
  overflow-y: auto;
}

.notif-dropdown__item {
  display: block;
  padding: 10px 12px;
  border-radius: 8px;
  text-decoration: none;
  color: var(--text);
  transition: background 0.15s;
}

.notif-dropdown__item:hover {
  background: var(--dropdown-hover-bg);
}

.notif-dropdown__text {
  font-size: 13px;
  font-weight: 500;
  line-height: 1.4;
  word-wrap: break-word;
}

.notif-dropdown__time {
  font-size: 11px;
  color: var(--nav-text);
  margin-top: 3px;
}

.notif-dropdown__empty {
  padding: 20px 12px;
  text-align: center;
  font-size: 13px;
  color: var(--nav-text);
}

.notif-dropdown__view {
  display: block;
  text-align: center;
  padding: 10px 12px;
  margin-top: 4px;
  border-top: 1px solid var(--dropdown-border);
  text-decoration: none;
  color: var(--active-text);
  font-size: 13px;
  font-weight: 600;
  transition: background 0.15s;
}

.notif-dropdown__view:hover {
  background: var(--dropdown-hover-bg);
}

.nav-dropdown.cart-dropdown {
  min-width: 320px;
  padding: 8px;
}

.cart-dropdown__inner {
  max-height: 240px;
  overflow-y: auto;
}

.cart-dropdown__item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border-radius: 8px;
  transition: background 0.15s;
}

.cart-dropdown__item:hover {
  background: var(--dropdown-hover-bg);
}

.cart-dropdown__img {
  width: 40px;
  height: 40px;
  border-radius: 6px;
  object-fit: cover;
  flex-shrink: 0;
}

.cart-dropdown__info {
  flex: 1;
  min-width: 0;
}

.cart-dropdown__name {
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cart-dropdown__qty {
  font-size: 11px;
  color: var(--nav-text);
  margin-top: 2px;
}

.cart-dropdown__empty {
  padding: 20px;
  text-align: center;
  font-size: 13px;
  color: var(--nav-text);
}

.cart-dropdown__view {
  display: block;
  padding: 10px;
  margin-top: 4px;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--active-bg);
  text-decoration: none;
  border-radius: 8px;
  transition: background 0.15s;
}

.cart-dropdown__view:hover {
  background: var(--dropdown-hover-bg);
}

.cart-dropdown__item {
  text-decoration: none;
  color: inherit;
}

.cart-item__qty {
  display: flex;
  align-items: center;
  gap: 0;
  border: 1px solid var(--header-border);
  border-radius: 8px;
  overflow: hidden;
  height: 32px;
}

.cart-qty__btn {
  width: 30px;
  height: 32px;
  border: none;
  background: var(--dropdown-hover-bg);
  color: var(--text);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
  font-family: inherit;
  line-height: 1;
}

.cart-qty__btn:hover {
  background: var(--menu-hover-bg);
}

.cart-qty__input {
  width: 44px;
  height: 32px;
  border: none;
  border-left: 1px solid var(--header-border);
  border-right: 1px solid var(--header-border);
  text-align: center;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  background: var(--card-bg);
  outline: none;
  -moz-appearance: textfield;
}

.cart-qty__input::-webkit-outer-spin-button,
.cart-qty__input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.cart-item__remove {
  width: 36px;
  height: 36px;
  border: none;
  background: none;
  color: var(--nav-text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  transition: background 0.15s, color 0.15s;
  flex-shrink: 0;
}

.cart-item__remove:hover {
  background: rgba(255, 59, 48, 0.1);
  color: #ff3b30;
}

.cart-total {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 16px;
  padding: 24px 0;
  margin-top: 8px;
}

.cart-total__label {
  font-size: 18px;
  font-weight: 600;
  color: var(--nav-text);
}

.cart-total__price {
  font-size: 24px;
  font-weight: 800;
  color: var(--text);
}

@media (max-width: 768px) {
  .cart-item {
    flex-wrap: wrap;
  }
  .cart-item__details {
    width: 100%;
    justify-content: flex-end;
  }
}

.nav-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: var(--dropdown-bg);
  border: 1px solid var(--dropdown-border);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  overflow: hidden;
  min-width: 140px;
  z-index: 200;
}

.nav-dropdown-wrapper.open > .user-nav__item {
  background: var(--dropdown-hover-bg);
  border-radius: 10px 10px 0 0;
}

.nav-dropdown-wrapper.open .nav-dropdown {
  display: block;
}

.dropdown-option {
  display: block;
  width: 100%;
  padding: 10px 18px;
  border: none;
  background: none;
  font-size: 14px;
  color: var(--text);
  cursor: pointer;
  text-align: left;
  transition: background 0.15s;
  font-family: inherit;
}

.dropdown-option:hover {
  background: var(--dropdown-hover-bg);
}

.dropdown-option.active {
  background: var(--active-bg);
  color: var(--active-text);
}

.dropdown-username {
  padding: 10px 18px 4px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  cursor: default;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: center;
}

.dropdown-divider {
  height: 1px;
  background: var(--dropdown-border);
  margin: 4px 8px;
}

/* ── Theme Toggle ── */
#themeToggle svg {
  transition: transform 0.3s;
}

:root.dark #themeToggle svg {
  transform: rotate(360deg);
}

/* ── Main Menu ── */
.header-wrapper {
  position: sticky;
  top: 0;
  z-index: 100;
}
.main-menu {
  background: var(--menu-bg);
  border-bottom: 1px solid var(--menu-border);
  transition: background 0.3s, border-color 0.3s;
}

.main-menu__list {
  max-width: 1280px;
  margin: 0 auto;
  padding: 8px 32px;
  list-style: none;
  display: flex;
  justify-content: center;
  gap: 4px;
}

.main-menu__list li {
  width: 150px;
  flex-shrink: 0;
  text-align: center;
}

.main-menu__list a {
  display: block;
  text-decoration: none;
  color: var(--menu-text);
  font-size: 13px;
  font-weight: 500;
  padding: 8px 12px;
  border-radius: 8px;
  transition: background 0.2s, color 0.2s;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.main-menu__list a:hover {
  background: var(--menu-hover-bg);
  color: var(--menu-hover-text);
}

/* ── Category Dropdown in Main Menu ── */
.menu-category {
  position: relative;
}

.menu-category .category-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: var(--dropdown-bg);
  border: 1px solid var(--dropdown-border);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  overflow: hidden;
  min-width: 180px;
  z-index: 200;
  padding: 6px;
}

.menu-category:hover .category-dropdown,
.menu-category .category-dropdown:hover {
  display: block;
}

.category-dropdown a {
  display: block !important;
  padding: 8px 14px !important;
  border-radius: 6px !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  color: var(--text) !important;
  text-decoration: none !important;
  border-bottom: none !important;
  transition: background 0.15s !important;
}

.category-dropdown a:hover {
  background: var(--dropdown-hover-bg) !important;
  color: var(--text) !important;
}

/* ── Products ── */
.products {
  max-width: 1280px;
  margin: 0 auto;
  padding: 32px;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

/* ── Product Card ── */
.product-card {
  background: var(--card-bg);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px var(--card-shadow);
  transition: transform 0.25s, box-shadow 0.25s, background 0.3s;
  display: flex;
  flex-direction: column;
  position: relative;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px var(--card-shadow-hover);
}

.product-card:active {
  transform: translateY(-2px);
}

.product-card__link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.product-card__overlay {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.product-card__image {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: block;
}

.product-card__img-wrap {
  position: relative;
  display: block;
}

.product-card__badge {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 16.6%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  pointer-events: none;
}

.product-card__badge--preorder { background: rgba(21, 101, 192, 0.85); color: #fff; }
.product-card__badge--prerelease { background: rgba(123, 31, 162, 0.85); color: #fff; }
.product-card__badge--sold_out { background: rgba(128, 128, 128, 0.85); color: #fff; }

.product-card__discount {
  position: absolute;
  top: 0;
  right: 18px;
  z-index: 2;
  width: 50px;
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2px 0 8px;
  box-sizing: border-box;
  background: linear-gradient(180deg, #ff3b30 0%, #d32f2f 100%);
  clip-path: polygon(0 0, 100% 0, 100% 78%, 50% 100%, 0 78%);
  filter: drop-shadow(0 4px 8px rgba(229, 57, 53, 0.35));
  color: #fff;
  font-size: 14px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0.02em;
  text-align: center;
  pointer-events: none;
}
.product-card__discount--amount { font-size: 11px; }
.product-card__discount span {
  display: block;
  white-space: nowrap;
}
.product-card__discount .discount-value {
  display: block;
}

.product-card__old-price {
  color: var(--nav-text);
  text-decoration: line-through;
  font-size: 12px;
  font-weight: 500;
  margin-right: 6px;
}

.product-card__name {
  font-size: 14px;
  font-weight: 600;
  padding: 12px 14px 6px;
  line-height: 1.3;
  min-height: 54px;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow-wrap: break-word;
  word-break: break-word;
  color: inherit;
  text-decoration: none;
}

.product-card__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px 14px;
  margin-top: auto;
}

.product-card__price {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  transition: color 0.3s;
}

.product-card__price--discount {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
}

.product-card__price--discount .product-card__old-price {
  margin-right: 0;
}

.product-card__price--discount .pc-now {
  color: #e53935;
  font-size: 19px;
  font-weight: 800;
}

.product-card__cart {
  width: 36px;
  height: 36px;
  border: none;
  background: var(--dropdown-hover-bg);
  color: var(--nav-text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background 0.2s, color 0.2s;
}

.product-card__cart:hover {
  background: var(--active-bg);
  color: var(--active-text);
}

.product-card__like {
  width: 36px;
  height: 36px;
  border: none;
  background: transparent;
  color: var(--nav-text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s;
  flex-shrink: 0;
}

.product-card__like:hover {
  color: #ff3b30;
  background: rgba(255,59,48,0.08);
}

.product-card__like.liked {
  color: #ff3b30;
}

.product-card__like.liked svg {
  fill: #ff3b30;
}

/* ── Responsive ── */
@media (max-width: 1024px) {
  .products-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .products-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .main-menu__list {
    gap: 4px;
    flex-wrap: wrap;
  }

  .main-menu__list li {
    min-width: 0;
    flex: 1;
  }

  .user-nav > .user-nav__item span {
    display: none;
  }

  .header-inner {
    padding: 12px 16px;
  }
}

@media (max-width: 480px) {
  .products-grid {
    grid-template-columns: 1fr;
  }
}

/* ── Lightbox ── */
.lightbox {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  align-items: center;
  justify-content: center;
}

.lightbox-content {
  max-width: 90%;
  max-height: 90%;
  object-fit: contain;
  border-radius: 8px;
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 32px;
  color: #fff;
  font-size: 40px;
  font-weight: 300;
  cursor: pointer;
  z-index: 10000;
  line-height: 1;
  transition: opacity 0.2s;
}

.lightbox-close:hover {
  opacity: 0.7;
}

.lightbox-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border: none;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 28px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  border-radius: 50%;
  transition: background 0.2s;
}

.lightbox-nav-btn:hover {
  background: rgba(255, 255, 255, 0.3);
}

.lightbox-nav-btn.prev {
  left: 20px;
}

.lightbox-nav-btn.next {
  right: 20px;
}

/* ── Pagination ── */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 4px;
  margin-top: 32px;
}
.pagination__btn {
  display: inline-flex;
  align-items: center;
  padding: 8px 16px;
  border: 1px solid var(--header-border);
  border-radius: 8px;
  background: var(--card-bg);
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.15s;
}
.pagination__btn:hover {
  background: var(--dropdown-hover-bg);
}
.pagination__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--card-bg);
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}
.pagination__num:hover {
  background: var(--dropdown-hover-bg);
}
.pagination__num.active {
  background: var(--active-bg);
  color: var(--active-text);
}

/* ── Footer ── */
.site-footer {
  margin-top: 32px;
  background: var(--header-bg);
  border-top: 1px solid var(--header-border);
  transition: background 0.3s, border-color 0.3s;
}

.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 40px 32px 24px;
  display: flex;
  gap: 40px;
  flex-wrap: wrap;
}

.footer-col {
  flex: 1;
  min-width: 140px;
}

.footer-col--brand {
  flex: 0 0 220px;
  text-align: center;
}

.footer-title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--nav-text);
  margin-bottom: 14px;
}

.footer-link {
  display: block;
  width: fit-content;
  font-size: 13px;
  color: var(--text);
  text-decoration: none;
  padding: 4px 0;
  transition: color 0.2s;
}

.footer-link:hover {
  color: var(--nav-hover);
}

.footer-brand {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text);
  line-height: 1.1;
  margin-bottom: 4px;
}

.footer-tagline {
  font-size: 11px;
  color: var(--nav-text);
  letter-spacing: 1px;
  margin-bottom: 16px;
}

.footer-social {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 20px auto 0;
}

.footer-social__row {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 12px;
  width: 100%;
}

.footer-social--grid .footer-social__row {
  flex-wrap: wrap;
}

.footer-social__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--dropdown-hover-bg);
  color: var(--text);
  transition: background 0.2s, color 0.2s;
  text-decoration: none;
}

.social-icon-glyph {
  width: 20px;
  height: 20px;
  object-fit: contain;
}

.social-icon-glyph--text {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
}

.footer-social__icon:hover {
  background: var(--active-bg);
  color: var(--active-text);
}

.footer-bottom {
  max-width: 1280px;
  margin: 0 auto;
  padding: 16px 32px 32px;
  font-size: 12px;
  color: var(--nav-text);
}

@media (max-width: 768px) {
  .footer-inner {
    flex-direction: column;
    gap: 24px;
    padding: 32px 16px 16px;
  }
  .footer-col--brand {
    flex: none;
  }
  .footer-bottom {
    padding: 12px 16px 24px;
  }
}

input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
input[type="number"] {
  -moz-appearance: textfield;
}

.qty-picker input[type="number"]::-webkit-inner-spin-button,
.qty-picker input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: inner-spin-button;
}
.qty-picker input[type="number"] {
  -moz-appearance: number-input;
}

/* ── Hashtags ── */
.hashtag-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--dropdown-hover-bg);
  color: var(--active-bg);
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid var(--header-border);
  transition: background 0.15s, border-color 0.15s;
  line-height: 1.5;
}
.hashtag-chip:hover { background: rgba(0,113,227,0.1); border-color: var(--active-bg); }
.hashtag-chip span { color: var(--nav-text); font-weight: 500; }
.product-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 8px; }
.product-tags .hashtag-chip { font-size: 12px; }
.product-card__tags-btn {
  position: absolute; bottom: 8px; right: 8px; z-index: 2;
  padding: 4px 9px; border: 1px solid rgba(255,255,255,0.35); border-radius: 6px;
  background: rgba(0,0,0,0.55); color: #fff; font-size: 10px; font-weight: 700;
  font-family: inherit; cursor: pointer; backdrop-filter: blur(2px);
  transform-origin: bottom right; transition: transform 0.15s ease, background-color 0.15s ease;
}
.product-card__tags-btn:hover { background: rgba(0,0,0,0.75); transform: scale(1.12); }
.product-card__tags-btn:focus-visible { outline: 2px solid #fff; outline-offset: 2px; transform: scale(1.12); }
.product-card__tags-overlay {
  position: absolute; inset: 0; z-index: 3; display: flex; align-items: flex-start; justify-content: center;
  padding: 10px; background: rgba(0,0,0,0); opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity 0.2s ease, background-color 0.25s ease, visibility 0s linear 0.25s;
}
.product-card__tags-overlay.open {
  background: rgba(0,0,0,0.55); opacity: 1; visibility: visible; pointer-events: auto;
  transition: opacity 0.2s ease, background-color 0.25s ease, visibility 0s;
}
.product-card__tags-panel {
  width: 100%; max-height: 100%; overflow-y: auto;
  background: var(--card-bg); border-radius: 8px; padding: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}
.product-card__tags-head {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  font-size: 11px; font-weight: 700; color: var(--text); margin-bottom: 6px;
}
.product-card__tags-head button {
  border: none; background: transparent; color: var(--nav-text); font-size: 18px;
  line-height: 1; cursor: pointer; padding: 0 2px;
}
.product-card__tags-list { display: flex; flex-wrap: wrap; gap: 4px; }
.product-card__tags-list .hashtag-chip {
  font-size: 10px; padding: 2px 7px; opacity: 0; transform: translateY(5px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.product-card__tags-overlay.open .hashtag-chip { opacity: 1; transform: none; }

/* search page */
.search-page { width: 100%; max-width: 1280px; margin: 0 auto; padding: 40px 32px 64px; }
.search-page__inner { min-width: 0; }
.search-page__title { font-size: 26px; font-weight: 800; margin: 0 0 6px; color: var(--text); }
.search-page__meta { font-size: 13px; color: var(--nav-text); margin: 0 0 18px; }
.search-page__form { display: flex; gap: 8px; margin: 0 0 16px; }
.search-page__form input {
  flex: 1; min-width: 0; padding: 10px 14px; border: 1px solid var(--header-border); border-radius: 9px;
  background: var(--bg); color: var(--text); font-size: 14px; font-family: inherit;
}
.search-page__form input:focus { outline: none; border-color: var(--active-bg); }
.search-page__form button {
  padding: 10px 20px; border: none; border-radius: 9px; background: var(--active-bg); color: #fff;
  font-size: 13px; font-weight: 700; font-family: inherit; cursor: pointer; white-space: nowrap;
}
.search-filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 18px; }
.search-filters select, .search-filters input[type="text"] {
  padding: 8px 10px; border: 1px solid var(--header-border); border-radius: 8px;
  background: var(--bg); color: var(--text); font-size: 12px; font-family: inherit;
}
.search-filters__check { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--text); cursor: pointer; }
.search-filters__check input { accent-color: var(--active-bg); }
.search-filters__btn {
  padding: 8px 16px; border: none; border-radius: 8px; background: var(--active-bg);
  color: #fff; font-size: 12px; font-weight: 700; font-family: inherit; cursor: pointer;
}
.search-matches { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 20px; }
.category-chip {
  display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 999px;
  background: var(--card-bg); color: var(--text); font-size: 12px; font-weight: 600;
  text-decoration: none; border: 1px solid var(--header-border);
}
.category-chip:hover { border-color: var(--active-bg); color: var(--active-bg); }
.category-chip span, .hashtag-chip span { font-size: 11px; color: var(--nav-text); }
.search-empty { padding: 36px 12px; text-align: center; color: var(--nav-text); }
.search-empty__title { font-size: 18px; font-weight: 700; color: var(--text); margin-bottom: 8px; }
.search-empty p { font-size: 13px; margin: 0 0 16px; }
.search-empty__chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-bottom: 10px; }
.search-page .products-grid { margin-top: 8px; }

/* search overlay in header */
button.user-nav__item { border: none; background: transparent; padding: 0; cursor: pointer; font-family: inherit; }
.search-overlay {
  position: fixed; inset: 0; z-index: 3000; background: rgba(0,0,0,0.45);
  display: flex; justify-content: center; align-items: flex-start; padding: 90px 16px 24px;
}
.search-overlay[hidden] { display: none; }
.search-overlay__inner { width: 100%; max-width: 680px; background: var(--card-bg); border-radius: 14px; box-shadow: 0 20px 60px rgba(0,0,0,0.35); overflow: hidden; }
.search-overlay__form { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--header-border); color: var(--nav-text); }
.search-overlay__form input {
  flex: 1; border: none; outline: none; background: transparent; color: var(--text);
  font-size: 16px; font-family: inherit; padding: 6px 0;
}
.search-overlay__close { border: none; background: transparent; color: var(--nav-text); font-size: 24px; line-height: 1; cursor: pointer; padding: 0 4px; }
.search-suggest { max-height: 60vh; overflow-y: auto; }
.search-suggest__group { padding: 8px 0; border-top: 1px solid var(--header-border); }
.search-suggest__group:first-child { border-top: none; }
.search-suggest__label { font-size: 10px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--nav-text); padding: 4px 16px; font-weight: 700; }
.search-suggest__item { display: block; padding: 9px 16px; text-decoration: none; color: var(--text); font-size: 13px; }
.search-suggest__item:hover, .search-suggest__item.is-active { background: var(--dropdown-hover-bg); }
.search-suggest__empty { padding: 18px 16px; font-size: 13px; color: var(--nav-text); text-align: center; }

/* hashtag picker in product add/edit */
.product-edit-info__hashtags { position: relative; margin: 6px 0 10px; }
.hashtag-block__head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.hashtag-block__title { font-size: 12px; font-weight: 700; color: var(--text); }
.hashtag-block__new {
  border: 1px dashed var(--header-border); background: transparent; color: var(--active-bg);
  border-radius: 6px; padding: 4px 10px; font-size: 11px; font-weight: 700; cursor: pointer; font-family: inherit;
}
.hashtag-block__new:hover { border-color: var(--active-bg); }
.hashtag-block__chips { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 6px; }
.hashtag-block__chips:empty { display: none; }
.hashtag-block__chip {
  display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px; border-radius: 999px;
  background: var(--dropdown-hover-bg); color: var(--text); font-size: 11px; border: 1px solid var(--header-border);
}
.hashtag-block__chip button { border: none; background: transparent; color: var(--nav-text); cursor: pointer; font-size: 14px; line-height: 1; padding: 0; }
.hashtag-block__chip button:hover { color: #ff3b30; }
.hashtag-block__search { position: relative; }
.hashtag-block__input {
  width: 100%; box-sizing: border-box; padding: 7px 10px; border: 1px solid var(--header-border);
  border-radius: 7px; background: var(--bg); color: var(--text); font-size: 12px; font-family: inherit;
}
.hashtag-block__dropdown {
  position: absolute; left: 0; right: 0; top: calc(100% + 3px); z-index: 40; max-height: 190px; overflow-y: auto;
  background: var(--card-bg); border: 1px solid var(--header-border); border-radius: 8px; box-shadow: 0 8px 24px var(--card-shadow);
}
.hashtag-block__dropdown[hidden] { display: none; }
.hashtag-block__option { padding: 7px 10px; font-size: 12px; color: var(--text); cursor: pointer; display: flex; justify-content: space-between; gap: 8px; }
.hashtag-block__option:hover, .hashtag-block__option.is-active { background: var(--dropdown-hover-bg); }
.hashtag-block__option small { color: var(--nav-text); font-size: 10px; }
.hashtag-block__option--empty { color: var(--nav-text); cursor: default; }
.hashtag-block__create {
  margin-top: 8px; padding: 10px; border: 1px solid var(--header-border); border-radius: 8px; background: var(--bg);
}
.hashtag-block__create[hidden] { display: none; }
.hashtag-block__create-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.hashtag-block__create-grid input {
  padding: 6px 8px; border: 1px solid var(--header-border); border-radius: 6px;
  background: var(--card-bg); color: var(--text); font-size: 12px; font-family: inherit;
}
.hashtag-block__create-actions { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.hashtag-block__error { flex: 1; color: #ff3b30; font-size: 11px; }

/* admin hashtag list */
.hashtag-admin-grid { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.hashtag-admin-grid input {
  flex: 1; min-width: 120px; padding: 7px 10px; border: 1px solid var(--header-border);
  border-radius: 7px; background: var(--bg); color: var(--text); font-size: 12px; font-family: inherit;
}
.hashtag-admin-row { display: flex; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--header-border); flex-wrap: wrap; }
.hashtag-admin-row:last-child { border-bottom: none; }
.hashtag-admin-edit { display: flex; gap: 6px; align-items: center; flex: 1; flex-wrap: wrap; margin: 0; }
.hashtag-admin-edit input {
  flex: 1; min-width: 90px; padding: 5px 8px; border: 1px solid var(--header-border);
  border-radius: 6px; background: var(--bg); color: var(--text); font-size: 12px; font-family: inherit;
}
.hashtag-admin-count { font-size: 11px; color: var(--nav-text); white-space: nowrap; }

@media (max-width: 720px) {
  .search-page { padding: 24px 16px 48px; }
  .search-page__form { flex-wrap: wrap; }
  .search-page__form button { flex: 1; }
  .hashtag-block__create-grid { grid-template-columns: 1fr; }
  .search-overlay { padding-top: 60px; }
}

@media (prefers-reduced-motion: reduce) {
  .product-card__tags-overlay,
  .product-card__tags-list .hashtag-chip {
    transition: none !important;
  }
}


/* ?? Public post feed (blog / in-dev) ?? */
.post-feed { width: 860px; max-width: 100%; margin: 0 auto; padding: 32px; box-sizing: border-box; }
.post-feed__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 24px; flex-wrap: wrap; }
.post-feed__head h1, .post-feed__head h2 { font-size: 28px; font-weight: 800; margin: 0; color: var(--text); }
.post-feed__actions { display: flex; gap: 6px; flex-wrap: wrap; }
.post-feed__btn { display: inline-flex; align-items: center; gap: 4px; padding: 6px 13px; border: 1px solid var(--header-border); border-radius: 7px; background: var(--card-bg); color: var(--text); font-size: 12px; font-weight: 700; text-decoration: none; white-space: nowrap; cursor: pointer; font-family: inherit; }
.post-feed__btn:hover { border-color: var(--nav-hover); color: var(--nav-hover); }
.post-feed__btn--primary { color: var(--active-bg); }
.post-feed__btn--primary:hover { border-color: var(--active-bg); color: var(--active-bg); }
.post-feed-card { background: var(--card-bg); border-radius: 14px; margin-bottom: 18px; overflow: hidden; box-shadow: 0 2px 10px var(--card-shadow); transition: box-shadow 0.2s, transform 0.2s; }
.post-feed-card:hover { box-shadow: 0 8px 24px var(--card-shadow-hover); transform: translateY(-1px); }
.post-feed-card__body { padding: 20px 24px 0; }
.post-feed-card__top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 6px; }
.post-feed-card__title { font-size: 19px; font-weight: 800; line-height: 1.3; margin: 0; color: var(--text); }
.post-feed-card__title a { color: inherit; text-decoration: none; }
.post-feed-card__title a:hover { color: var(--nav-hover); }
.post-feed-card__badge { flex-shrink: 0; display: inline-block; padding: 2px 8px; border-radius: 999px; background: #ff9500; color: #fff; font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.4px; }
.post-feed-card__meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 11px; color: var(--nav-text); margin-bottom: 12px; }
.post-feed-card__preview { position: relative; overflow: hidden; font-size: 14px; line-height: 1.65; color: var(--nav-text); }
.post-feed-card__preview.collapsed { max-height: 190px; }
.post-feed-card__preview.collapsed::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 48px; background: linear-gradient(transparent, var(--card-bg)); pointer-events: none; }
.post-feed-card__preview p { margin: 0 0 10px; }
.post-feed-card__preview img { max-width: 100%; border-radius: 8px; display: block; margin: 10px 0; }
.post-feed-card__preview ul, .post-feed-card__preview ol { margin: 4px 0 8px 22px; padding: 0; }
.post-feed-card__foot { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 13px 24px 16px; margin-top: 10px; }
.post-feed-card[data-expandable="1"] .post-feed-card__foot { cursor: pointer; }
.post-feed-card__more { border: none; background: none; padding: 0; color: var(--nav-hover); font-size: 12px; font-weight: 700; font-family: inherit; cursor: pointer; }
.post-feed-card__more:hover { text-decoration: underline; }
.post-feed-card__open { color: var(--nav-text); font-size: 12px; text-decoration: none; }
.post-feed-card__open:hover { color: var(--nav-hover); }
.post-feed-like { display: flex; align-items: center; gap: 5px; margin-left: auto; }
.post-feed-like__btn { display: inline-flex; align-items: center; gap: 4px; height: 24px; box-sizing: border-box; padding: 3px 9px; border: 1px solid var(--header-border); border-radius: 6px; background: var(--card-bg); color: var(--nav-text); font-size: 12px; font-family: inherit; cursor: pointer; transition: color 0.15s, border-color 0.15s, background 0.15s; }
.post-feed-like__btn svg { width: 13px; height: 13px; fill: none; }
.post-feed-like__btn:hover { color: #ff3b30; border-color: #ff3b30; }
.post-feed-like__btn.liked { color: #ff3b30; border-color: #ff3b30; background: rgba(255,59,48,0.06); }
.post-feed-like__btn.liked svg { fill: #ff3b30; }
.post-feed-like__static { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--nav-text); }
.post-feed-like__static svg { width: 13px; height: 13px; }
.post-feed-admin { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.post-feed-admin__btn { display: inline-flex; align-items: center; height: 24px; box-sizing: border-box; padding: 0 9px; border: 1px solid var(--header-border); border-radius: 6px; background: var(--card-bg); color: var(--nav-text); font-size: 12px; font-family: inherit; text-decoration: none; cursor: pointer; transition: color 0.15s, border-color 0.15s, background 0.15s; }
.post-feed-admin__btn:hover { border-color: var(--nav-hover); color: var(--nav-hover); background: var(--dropdown-hover-bg); }
.post-feed-admin__btn--danger:hover { border-color: #ff3b30; color: #ff3b30; background: rgba(255,59,48,0.06); }
.post-feed-empty { text-align: center; padding: 54px 20px; color: var(--nav-text); font-size: 14px; }
.indev-posts { width: 860px; max-width: calc(100% - 32px); margin: 28px auto 0; }
.indev-posts .post-feed__head h2 { font-size: 20px; }
/* Compact product cards inside post content */
.product-card.post-product-card { display: inline-flex; vertical-align: top; width: 128px; margin: 6px 10px 10px 0; border-radius: 8px; box-shadow: 0 1px 4px var(--card-shadow); color: var(--text); text-decoration: none; }
.product-card.post-product-card:hover { transform: translateY(-2px); box-shadow: 0 4px 12px var(--card-shadow-hover); }
.post-product-card .product-card__image { margin: 0; border-radius: 0; }
.post-product-card .product-card__badge { height: 15%; font-size: 7px; letter-spacing: 0.2px; }
.post-product-card .product-card__discount { width: 28px; height: 33px; right: 6px; font-size: 9px; padding: 1px 0 4px; }
.post-product-card .product-card__discount--amount { font-size: 7px; }
.post-product-card .product-card__name { font-size: 10px; padding: 6px 7px 0; min-height: 31px; line-height: 1.25; -webkit-line-clamp: 2; }
.post-product-card .product-card__bottom { padding: 3px 7px 7px; }
.post-product-card .product-card__price { font-size: 11px; }
.post-product-card .product-card__price--discount { flex-direction: row; align-items: baseline; gap: 4px; }
.post-product-card .product-card__price--discount .pc-now { font-size: 12px; }
.post-product-card .product-card__old-price { font-size: 9px; }
.post-product-card__placeholder { width: 100%; aspect-ratio: 1 / 1; background: var(--dropdown-hover-bg); display: flex; align-items: center; justify-content: center; color: var(--nav-text); }
@media (max-width: 768px) {
  .post-feed { padding: 16px; }
  .post-feed-card__body { padding: 16px 16px 0; }
  .post-feed-card__foot { padding: 12px 16px 14px; }
  .post-feed__head h1, .post-feed__head h2 { font-size: 23px; }
}
@media (prefers-reduced-motion: reduce) {
  .post-feed-card { transition: none; }
}
