:root {
  --ink: #20201d;
  --muted: #706b62;
  --paper: #fffdf8;
  --line: #e8dfd0;
  --sage: #6f7d55;
  --olive: #3f4d2f;
  --berry: #9a3038;
  --honey: #d89b37;
  --cream: #f8f1e5;
  --white: #ffffff;
  --shadow: 0 18px 50px rgba(32, 32, 29, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 76px;
  padding: 14px clamp(18px, 4vw, 64px);
  background: rgba(255, 253, 248, 0.9);
  border-bottom: 1px solid rgba(232, 223, 208, 0.8);
  backdrop-filter: blur(16px);
}

.admin-mode {
  background: var(--cream);
}

.admin-mode .main-nav,
.admin-mode .cart-pill,
.admin-mode .hero,
.admin-mode .trust-strip,
.admin-mode #urunler,
.admin-mode #hikaye,
.admin-mode #siparis,
.admin-mode #hesabim,
.admin-mode #takip,
.admin-mode .site-footer {
  display: none;
}

.admin-mode .site-header {
  background: rgba(248, 241, 229, 0.94);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: max-content;
}

.brand-logo {
  width: 82px;
  height: 46px;
  object-fit: contain;
  opacity: 0.92;
}

.brand strong,
.brand small {
  display: block;
}

.brand small {
  color: var(--muted);
  font-size: 12px;
}

.main-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(14px, 3vw, 34px);
  color: var(--muted);
  font-weight: 650;
}

.main-nav a:hover {
  color: var(--ink);
}

.header-actions {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: max-content;
}

.cart-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: max-content;
  padding: 10px 14px;
  color: var(--paper);
  background: var(--berry);
  border-radius: 999px;
  font-weight: 750;
}

.cart-pill strong {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  color: var(--berry);
  background: var(--paper);
  border-radius: 50%;
  font-size: 13px;
}

.account-menu {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.account-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  min-width: max-content;
  padding: 0 16px;
  color: var(--berry);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 999px;
  cursor: pointer;
  font-weight: 850;
}

.account-toggle[hidden] {
  display: none;
}

.account-toggle.is-active,
.account-toggle:hover {
  color: var(--white);
  background: var(--olive);
  border-color: var(--olive);
}

.signup-toggle {
  color: var(--olive);
}

.account-popover {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  z-index: 40;
  width: min(380px, calc(100vw - 36px));
  max-height: calc(100vh - 110px);
  overflow: auto;
  padding: 22px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.account-popover[hidden] {
  display: none;
}

.hero {
  position: relative;
  min-height: calc(100vh - 76px);
  display: grid;
  align-items: end;
  overflow: hidden;
}

.hero-media {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(20, 21, 16, 0.78), rgba(20, 21, 16, 0.24) 58%, rgba(20, 21, 16, 0.08)),
    url("assets/asrin-parmak-sucuk-hero.png") center / cover;
}

.hero-content {
  position: relative;
  width: min(760px, calc(100% - 36px));
  margin: 0 clamp(18px, 5vw, 76px) clamp(44px, 9vh, 96px);
  color: var(--white);
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--honey);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(54px, 11vw, 132px);
  line-height: 0.9;
  letter-spacing: 0;
}

.hero p:not(.eyebrow) {
  max-width: 620px;
  margin: 24px 0 0;
  color: rgba(255, 255, 255, 0.9);
  font-size: clamp(18px, 2.2vw, 24px);
  line-height: 1.45;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 800;
}

.button.primary {
  color: var(--white);
  background: var(--berry);
}

.button.ghost {
  color: var(--white);
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.45);
}

.button.ghost.dark {
  color: var(--berry);
  background: var(--white);
  border-color: var(--line);
}

.button.wide {
  width: 100%;
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.trust-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.trust-strip div {
  padding: 24px clamp(18px, 4vw, 56px);
  background: var(--cream);
}

.trust-strip strong,
.trust-strip span {
  display: block;
}

.trust-strip span {
  margin-top: 4px;
  color: var(--muted);
}

.section {
  padding: clamp(56px, 8vw, 112px) clamp(18px, 4vw, 64px);
}

.section-heading {
  max-width: 720px;
  margin-bottom: 32px;
}

.section-heading.compact {
  max-width: 640px;
}

.section-heading h2,
.story-copy h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(36px, 5vw, 68px);
  line-height: 1;
  letter-spacing: 0;
}

.section-heading p:last-child,
.story-copy p:last-child {
  color: var(--muted);
  font-size: 18px;
  line-height: 1.65;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.product-card {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  overflow: hidden;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(32, 32, 29, 0.06);
}

.product-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.product-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 14px;
  padding: 18px;
}

.product-body h3 {
  margin: 0;
  font-size: 19px;
}

.product-body p {
  flex: 1;
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.product-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.price {
  color: var(--berry);
  font-size: 22px;
  font-weight: 900;
}

.price small {
  font-size: 14px;
  font-weight: 800;
}

.add-button {
  min-width: 118px;
  min-height: 42px;
  color: var(--white);
  background: var(--olive);
  border: 0;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 800;
}

.story-band {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: 0;
  background: var(--olive);
}

.story-copy {
  align-self: center;
  padding: clamp(48px, 7vw, 96px) clamp(18px, 5vw, 76px);
  color: var(--white);
}

.story-copy p:last-child {
  color: rgba(255, 255, 255, 0.78);
}

.story-photo {
  min-height: 520px;
  background:
    linear-gradient(rgba(32, 32, 29, 0.05), rgba(32, 32, 29, 0.1)),
    url("assets/asrin-parmak-sucuk-hero.png") center / cover;
}

.order-section {
  background: var(--cream);
}

.account-dashboard-section {
  background: var(--paper);
}

.account-dashboard-section[hidden] {
  display: none;
}

.tracking-section {
  background: var(--paper);
}

.admin-section {
  background: var(--cream);
}

.admin-section[hidden] {
  display: none;
}

.tracking-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
  align-items: start;
}

.checkout-layout {
  display: grid;
  grid-template-columns: minmax(280px, 0.8fr) minmax(320px, 1.2fr);
  gap: 22px;
  align-items: start;
}

.cart-panel,
.order-form,
.panel,
.tracking-form,
.tracking-result,
.admin-panel {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.cart-panel,
.panel,
.tracking-form,
.tracking-result,
.admin-panel {
  padding: 22px;
}

.orders-panel {
  grid-column: 1 / -1;
}

.account-dashboard-grid {
  display: grid;
  grid-template-columns: minmax(260px, 0.72fr) minmax(320px, 1.28fr);
  gap: 22px;
  align-items: start;
}

.dashboard-profile,
.dashboard-orders {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.dashboard-profile {
  display: grid;
  gap: 16px;
  padding: 22px;
}

.profile-head {
  display: grid;
  gap: 14px;
}

.dashboard-profile h3,
.dashboard-profile p {
  margin: 0;
}

.dashboard-profile h3 {
  font-size: 26px;
}

.dashboard-profile p:not(.eyebrow) {
  color: var(--muted);
  line-height: 1.55;
}

.dashboard-orders {
  display: grid;
  gap: 18px;
  padding: 22px;
}

.dashboard-metric {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.dashboard-metric span {
  color: var(--muted);
  font-weight: 800;
}

.dashboard-metric strong {
  color: var(--berry);
  font-size: 28px;
}

.dashboard-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.profile-form-section {
  display: grid;
  gap: 6px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.profile-form-section h4,
.profile-form-section p {
  margin: 0;
}

.profile-form-section h4 {
  color: var(--ink);
  font-size: 18px;
}

.profile-form-section p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.account-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.account-heading h3 {
  margin: 0;
  font-size: 24px;
}

.account-heading p:last-child {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.mini-pill {
  display: inline-flex;
  min-width: max-content;
  align-items: center;
  padding: 7px 10px;
  color: var(--olive);
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 850;
}

.auth-form h4 {
  margin: 0;
  font-size: 19px;
}

.account-popover .auth-form {
  padding: 0;
}

.auth-help {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.auth-help.small {
  font-size: 13px;
}

.switch-auth + .switch-auth {
  margin-top: -8px;
}

.account-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.switch-auth {
  justify-self: center;
  margin-top: 2px;
}

.panel h3,
.tracking-card h3 {
  margin: 0;
  font-size: 24px;
}

.panel p,
.tracking-card p,
.muted {
  color: var(--muted);
  line-height: 1.55;
}

.profile-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.profile-panel h3,
.profile-panel p {
  margin: 0;
}

.profile-panel h3 {
  font-size: 24px;
}

.profile-panel p:not(.eyebrow) {
  color: var(--muted);
  line-height: 1.55;
}

.orders-panel {
  display: grid;
  gap: 14px;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.cart-title,
.cart-line,
.cart-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.cart-title h3 {
  margin: 0;
  font-size: 24px;
}

.text-button {
  color: var(--berry);
  background: transparent;
  border: 0;
  cursor: pointer;
  font-weight: 800;
}

.cart-items {
  display: grid;
  gap: 12px;
  min-height: 108px;
  padding: 18px 0;
}

.cart-empty {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.cart-line {
  padding: 12px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.cart-line small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
}

.quantity {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.quantity button {
  width: 30px;
  height: 30px;
  color: var(--ink);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 50%;
  cursor: pointer;
  font-weight: 900;
}

.cart-total {
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-size: 20px;
}

.order-form,
.auth-form,
.profile-form,
.tracking-form {
  display: grid;
  gap: 16px;
  padding: 22px;
}

.profile-form {
  padding: 0;
}

.order-form label,
.auth-form label,
.profile-form label,
.tracking-form label,
.admin-grid label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-weight: 800;
}

.order-form input,
.order-form textarea,
.order-form select,
.auth-form input,
.profile-form input,
.profile-form textarea,
.tracking-form input,
.admin-grid input,
.admin-grid select {
  width: 100%;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 6px;
  outline: none;
  padding: 13px 14px;
}

.order-form input:focus,
.order-form textarea:focus,
.order-form select:focus,
.auth-form input:focus,
.profile-form input:focus,
.profile-form textarea:focus,
.tracking-form input:focus,
.admin-grid input:focus,
.admin-grid select:focus {
  border-color: var(--sage);
  box-shadow: 0 0 0 3px rgba(111, 125, 85, 0.18);
}

.form-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.checkbox-row {
  display: flex !important;
  grid-template-columns: none !important;
  align-items: flex-start;
  gap: 10px !important;
  color: var(--muted);
  line-height: 1.45;
}

.checkbox-row input {
  width: auto;
  margin-top: 4px;
  accent-color: var(--berry);
}

.form-alert,
.notice {
  display: none;
  padding: 12px 14px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  line-height: 1.45;
}

.form-alert:not(:empty),
.notice {
  display: block;
}

.form-alert.success,
.notice.success {
  color: #224229;
  background: #edf7ed;
  border-color: #c9e9ca;
}

.form-alert.warning,
.notice.warning {
  color: #6d4c12;
  background: #fff5d8;
  border-color: #eed58f;
}

.order-result {
  display: grid;
  gap: 12px;
}

.history-list,
.admin-orders,
.admin-items {
  display: grid;
  gap: 10px;
}

.history-card,
.admin-order,
.tracking-card {
  display: grid;
  gap: 12px;
  padding: 16px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.history-card div,
.admin-order-head,
.admin-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.history-card p,
.admin-order-head p,
.admin-address,
.admin-note {
  margin: 0;
  color: var(--muted);
}

.status-pill {
  display: inline-flex;
  width: max-content;
  align-items: center;
  padding: 6px 10px;
  color: var(--white);
  background: var(--olive);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 850;
}

.admin-panel {
  display: grid;
  gap: 18px;
}

.admin-mode .admin-panel {
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.admin-dashboard-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 22px;
  padding: 22px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.admin-dashboard-head h3,
.admin-dashboard-head p {
  margin: 0;
}

.admin-dashboard-head h3 {
  font-size: 28px;
}

.admin-dashboard-head p:not(.eyebrow) {
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.55;
}

.admin-head-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.admin-metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.admin-metric-card,
.admin-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.admin-metric-card {
  display: grid;
  gap: 8px;
  padding: 20px;
}

.admin-metric-card span {
  color: var(--muted);
  font-weight: 850;
}

.admin-metric-card strong {
  color: var(--berry);
  font-size: clamp(24px, 3vw, 34px);
}

.admin-metric-card small {
  color: var(--muted);
  line-height: 1.45;
}

.admin-report-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 18px;
}

.admin-card {
  display: grid;
  gap: 16px;
  padding: 22px;
}

.admin-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.admin-card-head h3 {
  margin: 0;
  font-size: 24px;
}

.admin-card-head span {
  color: var(--muted);
  font-weight: 750;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 560px;
}

.admin-table th,
.admin-table td {
  padding: 12px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.admin-table th {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.admin-table td {
  font-weight: 750;
}

.admin-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.invoice-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px;
  background: #edf7ed;
  border: 1px solid #c9e9ca;
  border-radius: 8px;
}

.invoice-summary small {
  color: #224229;
  font-weight: 850;
}

.invoice-summary strong {
  color: var(--ink);
  font-size: 14px;
}

.customer-profile-summary {
  display: grid;
  gap: 5px;
  padding: 12px;
  background: var(--white);
  border: 1px dashed var(--sage);
  border-radius: 8px;
}

.customer-profile-summary small {
  color: var(--olive);
  font-weight: 850;
}

.customer-profile-summary strong,
.customer-profile-summary p {
  margin: 0;
}

.customer-profile-summary p {
  color: var(--muted);
  line-height: 1.45;
}

.admin-items small {
  color: var(--muted);
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 34px clamp(18px, 4vw, 64px);
  color: rgba(255, 255, 255, 0.78);
  background: var(--ink);
}

.site-footer strong {
  color: var(--white);
}

.site-footer p {
  margin: 8px 0 0;
}

.site-footer a {
  display: block;
  text-align: right;
  color: var(--white);
  font-weight: 750;
}

@media (max-width: 980px) {
  .site-header {
    flex-wrap: wrap;
  }

  .main-nav {
    order: 3;
    width: 100%;
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .story-band,
  .checkout-layout,
  .account-dashboard-grid,
  .admin-report-grid,
  .tracking-layout {
    grid-template-columns: 1fr;
  }

  .admin-metric-grid {
    grid-template-columns: 1fr;
  }

  .admin-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .story-photo {
    min-height: 360px;
  }
}

@media (max-width: 640px) {
  .site-header {
    min-height: 72px;
    gap: 12px;
  }

  .cart-pill span {
    display: none;
  }

  .hero {
    min-height: calc(100vh - 72px);
  }

  .hero-content {
    margin-bottom: 34px;
  }

  .button {
    width: 100%;
  }

  .trust-strip,
  .product-grid {
    grid-template-columns: 1fr;
  }

  .account-heading,
  .cart-line {
    align-items: flex-start;
    flex-direction: column;
  }

  .site-footer {
    flex-direction: column;
  }

  .site-footer a {
    text-align: left;
  }

  .profile-panel,
  .history-card div,
  .admin-dashboard-head,
  .admin-card-head,
  .admin-order-head,
  .admin-actions {
    align-items: flex-start;
    flex-direction: column;
  }

  .account-actions {
    justify-content: flex-start;
  }

  .dashboard-actions {
    flex-direction: column;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .admin-head-actions {
    justify-content: flex-start;
  }

  .admin-grid {
    grid-template-columns: 1fr;
  }
}
