﻿/* --- TIPOGRAFIAS --- */
@font-face {
  font-family: 'Jedira';
  src: url('../media/font/jedira-regular.otf') format('opentype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Jedira';
  src: url('../media/font/jedira-italic.otf') format('opentype');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: 'Optima';
  src: url('../media/font/Optima.ttc') format('truetype');
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --clr-bg:      #f5f3f0;
  --clr-surface: #ffffff;
  --clr-text:    #1a1a1a;
  --clr-muted:   #888;
  --clr-dark:    #16120e;
  --topbar-h:    36px;
  --header-h:      92px;
  --sidebar-w:   280px;
  --tr:          0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html { scroll-behavior: smooth; }
body { font-family: 'Optima', system-ui, sans-serif; font-weight: 700; background: var(--clr-bg); color: var(--clr-text); overflow-x: hidden; }
a { text-decoration: none; color: inherit; }

/* ─── TOPBAR ─────────────────────────────────────────────── */
.topbar { position: fixed; top: 0; left: 0; right: 0; height: var(--topbar-h); z-index: 910; background: var(--clr-bg); display: flex; align-items: center; justify-content: space-between; padding: 0 48px; border-bottom: 1px solid rgba(0,0,0,0.06); transition: transform 0.5s cubic-bezier(0.4,0,0.2,1); }
.topbar--hidden { transform: translateY(-100%); }
.topbar-left, .topbar-center { font-size: 0.68rem; font-weight: 400; letter-spacing: 0.12em; text-transform: uppercase; color: var(--clr-muted); display: flex; align-items: center; gap: 7px; }
.topbar-center { position: absolute; left: 50%; transform: translateX(-50%); }
.topbar-right { display: flex; align-items: center; gap: 14px; }
.topbar-right a { color: var(--clr-muted); font-size: 1.2rem; transition: color var(--tr); }
.topbar-right a:hover { color: var(--clr-text); }

/* ─── HEADER ─────────────────────────────────────────────── */
.header { position: fixed; top: var(--topbar-h); left: 0; right: 0; z-index: 900; height: var(--header-h); display: flex; align-items: center; justify-content: space-between; padding: 0 48px; background: rgba(245,243,240,0.95); backdrop-filter: blur(14px); border-bottom: 1px solid rgba(0,0,0,0.07); transition: top 0.5s cubic-bezier(0.4,0,0.2,1); }
.hamburger { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 6px; }
.hamburger span { display: block; width: 24px; height: 2px; background: var(--clr-text); border-radius: 2px; transition: transform var(--tr), opacity var(--tr); }
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.logo-link { display: flex; }
.logo { height: 48px; width: auto; object-fit: contain; display: block; }
.header-nav { display: none; }
.header-actions { display: flex; align-items: center; gap: 20px; }
@media (min-width: 769px) {
  .header-nav { display: flex; align-items: center; gap: 36px; position: absolute; left: 50%; transform: translateX(-50%); }
  .header-nav a { font-size: 0.75rem; font-weight: 400; letter-spacing: 0.1em; text-transform: uppercase; color: var(--clr-muted); white-space: nowrap; transition: color var(--tr); }
  .header-nav a:hover, .header-nav a.active { color: var(--clr-muted); }
}
@media (max-width: 768px) {
  .topbar { padding: 0 20px; }
  .topbar-center { display: none; }
  .header { padding: 0 20px; }
  .hamburger { display: flex; }
  .logo-link { position: absolute; left: 50%; transform: translateX(-50%); }
}
.action-btn { font-size: 1.2rem; color: var(--clr-text); transition: color var(--tr); position: relative; }
.action-btn:hover { color: var(--clr-muted); }
.cart-badge { position: absolute; top: -6px; right: -8px; background: var(--clr-text); color: #fff; font-size: 0.6rem; font-weight: 700; min-width: 16px; height: 16px; border-radius: 50%; display: none; align-items: center; justify-content: center; padding: 0 3px; }

/* ─── SIDEBAR ─────────────────────────────────────────────── */
.overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.6); z-index: 950; opacity: 0; pointer-events: none; transition: opacity var(--tr); }
.overlay.active { opacity: 1; pointer-events: all; }
.sidebar { position: fixed; top: 0; left: 0; width: var(--sidebar-w); height: 100%; background: #faf8f5; z-index: 1000; display: flex; flex-direction: column; padding: 24px 0; transform: translateX(-100%); transition: transform var(--tr); }
.sidebar.open { transform: translateX(0); }
.sidebar-close { align-self: flex-end; background: none; border: none; color: #aaa; font-size: 1.4rem; cursor: pointer; padding: 4px 20px 16px; transition: color var(--tr); }
.sidebar-close:hover { color: var(--clr-text); }
.sidebar-nav { list-style: none; }
.sidebar-nav li a { display: flex; align-items: center; gap: 14px; padding: 13px 28px; font-size: 0.82rem; letter-spacing: 0.12em; text-transform: uppercase; color: #888; white-space: nowrap; transition: color var(--tr), background var(--tr); }
.sidebar-nav li a:hover, .sidebar-nav li a.active { color: var(--clr-text); background: rgba(0,0,0,0.06); }
.sidebar-nav li a i { width: 18px; text-align: center; }
.sidebar-nav--secondary li a { font-size: 0.76rem; padding: 10px 28px; }
.sidebar-section-label { font-size: 0.62rem; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase; color: #ccc; padding: 20px 28px 6px; }
.sidebar-social { padding-bottom: 8px; }
.sidebar-social-links { display: flex; gap: 4px; padding: 6px 24px; }
.sidebar-social-links a { width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; font-size: 1rem; color: #aaa; border-radius: 50%; transition: color var(--tr), background var(--tr); }
.sidebar-social-links a:hover { color: var(--clr-text); background: rgba(0,0,0,0.05); }
.sidebar-footer { margin-top: auto; padding: 20px 28px; border-top: 1px solid rgba(0,0,0,0.08); display: flex; flex-direction: column; gap: 14px; }
.sidebar-footer a { display: flex; align-items: center; gap: 12px; font-size: 0.78rem; letter-spacing: 0.1em; text-transform: uppercase; color: #888; transition: color var(--tr); }
.sidebar-footer a:hover { color: var(--clr-text); }

/* ─── AUTH LAYOUT ─────────────────────────────────────────── */
.auth-main {
  min-height: calc(100vh - var(--topbar-h) - var(--header-h));
  margin-top: calc(var(--topbar-h) + var(--header-h));
  display: flex;
  align-items: stretch;
}

.auth-card {
  display: flex;
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  box-shadow: 0 24px 96px rgba(0,0,0,0.12);
  min-height: calc(100vh - var(--topbar-h) - var(--header-h));
}

/* ─── BRAND PANEL ─────────────────────────────────────────── */
.auth-brand-panel {
  width: 40%;
  flex-shrink: 0;
  background: var(--clr-dark);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 48px;
  gap: 28px;
  position: sticky;
  top: calc(var(--topbar-h) + var(--header-h));
  height: calc(100vh - var(--topbar-h) - var(--header-h));
}

.auth-brand-logo {
  height: 32px;
  width: auto;
  object-fit: contain;
  filter: brightness(0) invert(1);
  opacity: 0.9;
}

.auth-brand-line {
  width: 40px;
  height: 1px;
  background: rgba(255,255,255,0.2);
}

.auth-brand-tagline {
  font-family: 'Jedira', serif;
  font-size: 1.55rem;
  font-weight: 300;
  font-style: normal;
  color: rgba(255,255,255,0.85);
  text-align: center;
  line-height: 1.45;
}

.auth-brand-tagline em {
  font-style: italic;
  color: #fff;
}

.auth-brand-dots {
  display: flex;
  gap: 7px;
  margin-top: 8px;
}

.auth-brand-dots span {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
}

.auth-brand-dots span:nth-child(2) { background: #fff; }

/* ─── FORM PANEL ──────────────────────────────────────────── */
.auth-form-panel {
  flex: 1;
  background: #fff;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

/* ─── TABS ────────────────────────────────────────────────── */
.auth-tabs {
  display: flex;
  padding: 0 48px;
  border-bottom: 1px solid rgba(0,0,0,0.08);
  flex-shrink: 0;
}

.auth-tab {
  flex: 1;
  padding: 24px 8px 22px;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  cursor: pointer;
  font-family: 'Optima', sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--clr-muted);
  transition: color var(--tr), border-color var(--tr);
}

.auth-tab.active { color: var(--clr-text); border-bottom-color: var(--clr-text); }

/* ─── PANELS ──────────────────────────────────────────────── */
.auth-panel { padding: 40px 48px 52px; flex: 1; }
.auth-panel--hidden { display: none; }

.auth-heading {
  font-family: 'Jedira', serif;
  font-size: 2.2rem;
  font-weight: 600;
  line-height: 1.1;
  color: var(--clr-text);
  margin-bottom: 8px;
}

.auth-sub {
  font-size: 0.82rem;
  font-weight: 300;
  line-height: 1.65;
  color: var(--clr-muted);
  margin-bottom: 32px;
}

/* ─── FIELDS ──────────────────────────────────────────────── */
.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.field-group { margin-bottom: 18px; }
.field-row .field-group { margin-bottom: 0; }
.field-row { margin-bottom: 18px; }

.field-label {
  display: block;
  font-size: 0.67rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--clr-text);
  margin-bottom: 7px;
}

.field-opt {
  font-weight: 400;
  font-size: 0.62rem;
  text-transform: none;
  letter-spacing: 0;
  color: #bbb;
  margin-left: 4px;
}

.field-input {
  width: 100%;
  padding: 11px 14px;
  background: #faf9f7;
  border: 1.5px solid rgba(0,0,0,0.09);
  border-radius: 4px;
  font-family: 'Optima', sans-serif; font-weight: 700;
  font-size: 0.88rem;
  color: var(--clr-text);
  transition: border-color 0.22s, background 0.22s, box-shadow 0.22s;
  outline: none;
}

.field-input::placeholder { color: #c0bbb5; }
.field-input:focus { border-color: var(--clr-text); background: #fff; box-shadow: 0 0 0 3px rgba(0,0,0,0.08); }
.field-date::-webkit-calendar-picker-indicator { opacity: 0.4; cursor: pointer; }

.field-wrap {
  position: relative;
  display: flex;
}

.field-wrap .field-input { padding-right: 44px; }

.field-eye {
  position: absolute;
  right: 0; top: 0; bottom: 0;
  width: 44px;
  background: none;
  border: none;
  color: #bbb;
  font-size: 0.9rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color var(--tr);
}

.field-eye:hover { color: var(--clr-text); }

/* ─── NEWSLETTER CHECKBOX ─────────────────────────────────── */
.auth-check {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
  margin-bottom: 22px;
  margin-top: 4px;
}

.auth-check input[type="checkbox"] { display: none; }

.auth-check-box {
  width: 18px; height: 18px;
  flex-shrink: 0;
  border: 1.5px solid rgba(0,0,0,0.15);
  border-radius: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 1px;
  transition: background var(--tr), border-color var(--tr);
  background: #faf9f7;
}

.auth-check-box i { font-size: 0.6rem; color: #fff; opacity: 0; transition: opacity 0.15s; }

.auth-check input:checked ~ .auth-check-box {
  background: var(--clr-text);
  border-color: var(--clr-text);
}

.auth-check input:checked ~ .auth-check-box i { opacity: 1; }

.auth-check-text {
  font-size: 0.78rem;
  color: var(--clr-muted);
  line-height: 1.55;
}

/* ─── ERROR ───────────────────────────────────────────────── */
.auth-error {
  font-size: 0.78rem;
  color: #c0392b;
  min-height: 18px;
  margin-bottom: 10px;
  line-height: 1.4;
}

/* ─── SUBMIT ──────────────────────────────────────────────── */
.auth-submit {
  width: 100%;
  padding: 14px 24px;
  background: var(--clr-dark);
  color: #fff;
  font-family: 'Optima', sans-serif;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  border: none;
  border-radius: 3px;
  cursor: pointer;
  transition: background var(--tr);
}

.auth-submit:hover:not(:disabled) { background: #333; }
.auth-submit:disabled { opacity: 0.55; cursor: not-allowed; }

/* ─── TOGGLE TEXT ─────────────────────────────────────────── */
.auth-toggle-text {
  text-align: center;
  font-size: 0.8rem;
  color: var(--clr-muted);
  margin-top: 24px;
}

.auth-toggle-link {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--clr-text);
  font-family: 'Optima', sans-serif; font-weight: 700;
  font-size: 0.8rem;
  text-decoration: underline;
  text-underline-offset: 3px;
  padding: 0;
  transition: opacity 0.2s;
}

.auth-toggle-link:hover { opacity: 0.75; }

/* ─── FORGOT PASSWORD LINK ────────────────────────────────── */
.auth-forgot-wrap { text-align: right; margin: -8px 0 16px; }
.auth-forgot-wrap .auth-toggle-link {
  font-size: 0.76rem;
  font-weight: 400;
  text-decoration: none;
  color: var(--clr-muted);
}
.auth-forgot-wrap .auth-toggle-link:hover { color: var(--clr-text); text-decoration: underline; }

/* ─── RESPONSIVE ──────────────────────────────────────────── */
@media (max-width: 720px) {
  .auth-brand-panel { display: none; }
  .auth-card { max-width: 480px; margin: 0 auto; min-height: auto; align-self: flex-start; }
  .auth-main { align-items: flex-start; padding: 24px 16px 64px; }
  .auth-tabs { padding: 0 28px; }
  .auth-panel { padding: 32px 28px 44px; }
  .field-row { grid-template-columns: 1fr; }
  .field-row { gap: 0; }
  .field-row .field-group { margin-bottom: 18px; }
}

@media (max-width: 400px) {
  .auth-heading { font-size: 1.8rem; }
}

/* Greeting (auth) */
.nav-greeting { font-family: 'Optima', sans-serif; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.06em; white-space: nowrap; }
