@import url("./auth.css");

:root {
  --index-header-height: 76px;
  --index-shell-width: 1360px;
  --index-surface: rgba(255, 255, 255, 0.84);
}

html,
body {
  width: 100%;
  min-height: 100%;
  margin: 0;
  background:
    radial-gradient(circle at top left, rgba(48, 224, 218, 0.08), transparent 24%),
    linear-gradient(180deg, #fcfdfd 0%, #f4f7f8 100%);
}

body {
  min-height: 100svh;
}

body.auth-pending .page {
  visibility: hidden;
}

body.search-open {
  overflow: hidden;
}

.page {
  width: 100%;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
}

.site-header {
  width: 100%;
  min-height: var(--index-header-height);
  margin: 0;
  padding: 14px 32px;
  display: grid;
  grid-template-columns: auto minmax(280px, 1fr) auto;
  align-items: center;
  gap: 16px;
  border: 0;
  border-radius: 0;
  background: #ffffff;
  backdrop-filter: none;
  box-shadow: 0 1px 0 rgba(15, 23, 32, 0.08);
  container-type: inline-size;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  color: var(--text);
  text-decoration: none;
}

.brand img {
  width: 23px;
  height: 23px;
  object-fit: contain;
  flex: 0 0 auto;
}

.brand span {
  font-family: var(--font-brand);
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.06em;
  line-height: 1;
  white-space: nowrap;
}

.header-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

.action-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  text-decoration: none;
  background: transparent;
  border: 0;
  padding: 0;
  cursor: pointer;
  transition: opacity 0.18s ease, color 0.18s ease;
}

.header-actions [hidden] {
  display: none !important;
}

.action-button[data-tooltip] {
  position: relative;
}

.action-button[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  left: 50%;
  top: calc(100% + 10px);
  transform: translateX(-50%) translateY(-4px);
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(15, 23, 32, 0.96);
  color: #ffffff;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.16s ease, transform 0.16s ease;
  box-shadow: 0 10px 24px rgba(16, 20, 24, 0.18);
  z-index: 4;
}

.action-button[data-tooltip]::before {
  content: "";
  position: absolute;
  left: 50%;
  top: calc(100% + 4px);
  transform: translateX(-50%) translateY(-4px);
  border: 6px solid transparent;
  border-bottom-color: rgba(15, 23, 32, 0.96);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.16s ease, transform 0.16s ease;
  z-index: 4;
}

.action-button[data-tooltip]:hover::after,
.action-button[data-tooltip]:hover::before {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.action-button--cart {
  position: relative;
}

.action-button svg,
.action-button i {
  width: 22px;
  height: 22px;
  font-size: 22px;
  line-height: 1;
}

.action-button--search {
  flex: 0 0 auto;
}

.action-button:hover {
  opacity: 0.72;
}

.search-panel {
  position: fixed;
  inset: 0;
  z-index: 36;
  display: grid;
  place-items: start center;
  padding: 88px 16px 24px;
  background: rgba(15, 23, 32, 0.52);
  backdrop-filter: blur(8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease;
}

.search-panel.is-open {
  opacity: 1;
  pointer-events: auto;
}

.search-panel__shell {
  width: min(100%, 760px);
  display: grid;
  gap: 18px;
  padding: 26px;
  border: 1px solid rgba(15, 23, 32, 0.08);
  border-radius: 28px;
  background: #ffffff;
  box-shadow: 0 28px 70px rgba(16, 20, 24, 0.22);
  transform: translateY(-10px) scale(0.985);
  transition: transform 0.22s ease;
}

.search-panel.is-open .search-panel__shell {
  transform: translateY(0) scale(1);
}

.search-panel__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.search-panel__head h2 {
  margin: 0;
  font-family: var(--font-heading);
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.search-panel__field {
  height: 52px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 18px;
  border: 1px solid rgba(15, 23, 32, 0.1);
  border-radius: 20px;
  background: #f7f9fa;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.search-panel__field:focus-within {
  border-color: rgba(48, 224, 218, 0.72);
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(48, 224, 218, 0.14);
}

.search-panel__icon {
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  flex: 0 0 auto;
}

.search-panel__icon svg,
.search-panel__icon i {
  width: 100%;
  height: 100%;
  font-size: 20px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.search-panel input {
  flex: 1;
  min-width: 0;
  height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  outline: none;
  appearance: none;
  background: transparent;
  color: var(--text);
  font-family: inherit;
  font-size: 16px;
  font-weight: 500;
  line-height: 52px;
}

.search-panel input:hover,
.search-panel input:focus,
.search-panel input:focus-visible {
  border: 0;
  outline: none;
  box-shadow: none;
  background: transparent;
}

.search-panel input::placeholder {
  color: #85909b;
}

.search-panel__close {
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.18s ease;
}

.search-panel__close:hover {
  opacity: 0.72;
}

.cart-badge {
  position: absolute;
  top: -6px;
  right: -7px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #0f1720;
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
}

.page-body {
  width: min(100%, var(--index-shell-width));
  margin: 18px auto 0;
  flex: 1;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 0 16px;
}

.products-empty {
  width: min(100%, 460px);
  margin-top: 54px;
  display: grid;
  gap: 14px;
  text-align: center;
}

.products-empty__eyebrow {
  margin: 0;
  color: var(--muted);
  font-family: "Plus Jakarta Sans", Arial, sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.products-empty h1 {
  margin: 0;
  color: var(--text);
  font-family: var(--font-heading);
  font-size: clamp(28px, 4.8vw, 38px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.products-empty p:not(.products-empty__eyebrow) {
  margin: 0;
  color: var(--text);
  font-family: "Plus Jakarta Sans", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.6;
}

.account-footer {
  width: min(100%, var(--index-shell-width));
  margin: 24px auto 0;
  padding: 0 16px;
}

.account-footer__inner {
  display: flex;
  justify-content: center;
}

.account-footer__links {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.account-footer__links[hidden] {
  display: none !important;
}

.account-footer__links a,
.account-footer__links button,
.account-footer__user {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  color: var(--muted);
  text-decoration: none;
}

.account-footer__links button {
  border: 0;
  padding: 0;
  background: transparent;
  font: inherit;
  cursor: pointer;
}

.account-footer__links button:disabled {
  cursor: default;
  opacity: 0.55;
}

.account-footer__links a:hover,
.account-footer__links button:hover {
  color: var(--text);
  text-decoration: underline;
}

.account-footer__links i {
  font-size: 17px;
  line-height: 1;
}

.account-footer__divider {
  color: rgba(15, 23, 32, 0.28);
}

.account-footer__user span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.site-footer {
  width: min(100%, var(--index-shell-width));
  margin: 12px auto 0;
  padding: 18px 16px 22px;
  border-top: 1px solid rgba(15, 23, 32, 0.08);
}

.site-footer p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
  text-align: center;
}

.cookie-banner {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 35;
  max-width: 980px;
  margin: 0 auto;
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border: 1px solid rgba(15, 23, 32, 0.1);
  background: #ffffff;
  box-shadow: 0 18px 50px rgba(16, 20, 24, 0.16);
}

.cookie-banner[hidden] {
  display: none !important;
}

.cookie-banner p {
  margin: 0;
  color: var(--text);
  font-size: 13px;
  line-height: 1.45;
}

.cookie-banner button {
  min-width: 128px;
  height: 42px;
  border: 0;
  background: #111111;
  color: #ffffff;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.18s ease;
}

.cookie-banner button:hover {
  opacity: 0.82;
}

.cart-overlay {
  position: fixed;
  inset: 0;
  z-index: 38;
  background: rgba(15, 23, 32, 0.34);
  backdrop-filter: blur(2px);
}

.cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 39;
  width: min(100%, 420px);
  height: 100dvh;
  display: flex;
  flex-direction: column;
  background: #ffffff;
  box-shadow: -24px 0 60px rgba(16, 20, 24, 0.16);
  transform: translateX(100%);
  transition: transform 0.25s ease;
}

.cart-drawer.is-open {
  transform: translateX(0);
}

.cart-drawer__header {
  padding: 22px 22px 18px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid rgba(15, 23, 32, 0.08);
}

.cart-drawer__eyebrow {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.cart-drawer__header h2 {
  margin: 0;
  font-family: var(--font-heading);
  font-size: 22px;
  letter-spacing: -0.03em;
}

.cart-close {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(15, 23, 32, 0.08);
  border-radius: 999px;
  background: #ffffff;
  color: var(--text);
  cursor: pointer;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.cart-close svg {
  width: 18px;
  height: 18px;
}

.cart-close:hover {
  opacity: 0.72;
  transform: translateY(-1px);
}

.cart-drawer__body {
  flex: 1;
  overflow: auto;
  padding: 18px 22px;
}

.cart-empty {
  padding: 28px 18px;
  border: 1px dashed rgba(15, 23, 32, 0.14);
  border-radius: 20px;
  background: linear-gradient(180deg, #fcfdfd 0%, #f6f8f9 100%);
}

.cart-empty strong {
  display: block;
  margin-bottom: 8px;
  font-size: 16px;
}

.cart-empty p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
  font-size: 14px;
}

.cart-items {
  display: grid;
  gap: 12px;
}

.cart-item {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 14px;
  padding: 14px;
  border: 1px solid rgba(15, 23, 32, 0.08);
  border-radius: 18px;
  background: #ffffff;
}

.cart-item__thumb {
  width: 72px;
  height: 72px;
  border-radius: 14px;
  background:
    radial-gradient(circle at 30% 30%, rgba(48, 224, 218, 0.22), transparent 42%),
    linear-gradient(180deg, #eef3f5 0%, #dfe8ec 100%);
}

.cart-item__title {
  margin: 0 0 6px;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.35;
}

.cart-item__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
}

.cart-item__controls {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
}

.cart-step {
  width: 30px;
  height: 30px;
  border: 1px solid rgba(15, 23, 32, 0.1);
  border-radius: 999px;
  background: #ffffff;
  cursor: pointer;
}

.cart-step:hover {
  opacity: 0.75;
}

.cart-remove {
  margin-left: auto;
  border: 0;
  background: transparent;
  color: #9a3d3d;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.cart-drawer__footer {
  padding: 18px 22px 22px;
  border-top: 1px solid rgba(15, 23, 32, 0.08);
  background: #ffffff;
}

.cart-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  font-size: 15px;
}

.cart-summary strong {
  font-size: 18px;
}

.cart-checkout,
.cart-clear {
  width: 100%;
  height: 52px;
  border-radius: 999px;
  border: 0;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.cart-checkout {
  background: #111111;
  color: #ffffff;
  transition: background 0.2s ease, box-shadow 0.2s ease;
}

.cart-checkout:hover {
  background: #2f2f2f;
  box-shadow: 0 14px 30px rgba(17, 17, 17, 0.18);
}

.cart-clear {
  margin-top: 10px;
  background: #f3f5f6;
  color: var(--text);
}

@media (max-width: 980px) {
  .page-body {
    margin-top: 14px;
  }

  .cart-drawer {
    width: min(100%, 100vw);
  }
}

@media (max-width: 640px) {
  :root {
    --index-header-height: auto;
  }

  .site-header {
    width: 100%;
    margin-top: 0;
    min-height: var(--index-header-height);
    padding: 20px 0 20px 12px;
  }

  .brand span {
    font-size: 15px;
  }

  .page-body {
    width: 100%;
    margin-top: 12px;
    padding: 0 12px;
  }

  .products-empty {
    margin-top: 42px;
  }

  .account-footer {
    margin-top: 22px;
    padding: 0 12px;
  }

  .account-footer__links {
    max-width: 100%;
    gap: 10px;
    font-size: 12px;
  }

  .account-footer__user {
    max-width: min(58vw, 260px);
  }

  .site-footer {
    padding: 16px 12px 20px;
  }

  .site-footer p {
    font-size: 12px;
  }

  .cookie-banner {
    left: 10px;
    right: 10px;
    bottom: 10px;
    padding: 14px;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .cookie-banner p {
    font-size: 12px;
  }

  .cookie-banner button {
    width: 100%;
  }

  .action-button[data-tooltip]::before,
  .action-button[data-tooltip]::after {
    display: none;
  }

  .cart-drawer__header,
  .cart-drawer__body,
  .cart-drawer__footer {
    padding-left: 16px;
    padding-right: 16px;
  }

  .search-panel {
    padding-top: 78px;
  }

  .search-panel__shell {
    gap: 16px;
    padding: 18px;
    border-radius: 22px;
  }

  .search-panel__head {
    align-items: flex-start;
  }

  .search-panel__field {
    height: 52px;
    border-radius: 18px;
    padding: 0 14px;
  }

  .search-panel input {
    height: 100%;
    line-height: 52px;
    font-size: 16px;
  }
}
