/* Sıcak Fırsatlar. Ground and type from tasteskill's deal for a shop (flour off-white, Albert Sans);
   the accent pushed from terracotta to a hot red-orange, so it reads as a deals site. */

@font-face { font-family: "Albert Sans"; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url(/fonts/albert-sans-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Albert Sans"; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url(/fonts/albert-sans-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --bg: #f6f1e7; --card: #fffdf9; --photo: #ffffff;
  --ink: #2b241e; --muted: #6a5f54; --line: rgba(43, 36, 30, .12); --line-strong: rgba(43, 36, 30, .24);
  --head: #1d1915; --head-ink: #f6f1e7; --head-muted: #a89f95;
  --hot: #d63a1d; --hot-dark: #c4331a; --hot-soft: #fbe4dc;
  --ship: #1f7a3d; --ship-soft: #e3f3e7;
  --font: "Albert Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --r-lg: 16px; --r-md: 12px; --r-sm: 8px; --r-btn: 10px;
  --gut: 24px; --nav: 68px; --btn-h: 44px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  color-scheme: light;
}
@media (max-width: 639px) { :root { --gut: 14px; --nav: 60px; } }

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--nav) + 16px); }
body { background: var(--bg); color: var(--ink); font: 400 16px/1.55 var(--font); -webkit-font-smoothing: antialiased; min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1; padding-top: var(--nav); }
main.has-cats { padding-top: 0; }
img { display: block; max-width: 100%; }
h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -0.02em; line-height: 1.15; text-wrap: balance; }
h1 { font-size: clamp(26px, 1.2vw + 18px, 36px); letter-spacing: -0.03em; }
h2 { font-size: 22px; }
p { margin: 0; }
a { color: inherit; }
.wrap { width: 100%; max-width: 1360px; margin: 0 auto; padding-inline: var(--gut); }
.narrow { max-width: 640px; }
.muted { color: var(--muted); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--hot); outline-offset: 2px; border-radius: 4px; }
.icon { width: 24px; height: 24px; flex: none; }
.icon--sm { width: 16px; height: 16px; }

.skip-link { position: absolute; left: var(--gut); top: -100px; z-index: 20; background: var(--hot); color: #fff; padding: 10px 16px; border-radius: var(--r-sm); text-decoration: none; }
.skip-link:focus { top: 12px; }

/* ---- Links and buttons. */
.link { color: var(--hot-dark); text-decoration: none; background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat; transition: background-size .25s var(--ease); font: inherit; border: 0; padding: 0; cursor: pointer; }
.link:hover { background-size: 100% 1px; }
button.link { background-color: transparent; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: var(--btn-h); padding: 0 20px; border-radius: var(--r-btn);
  font: 600 16px/1 var(--font); text-decoration: none; cursor: pointer; border: 1px solid transparent; white-space: nowrap;
  transition: transform .18s var(--ease), background-color .18s, border-color .18s; }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(1px) scale(.98); }
.btn--primary { background: var(--hot); color: #fff; }
.btn--primary:hover { background: var(--hot-dark); }
.btn--secondary { background: var(--card); color: var(--ink); border-color: var(--line-strong); }
.btn--secondary:hover { border-color: var(--ink); }
.btn--sm { --btn-h: 36px; padding: 0 14px; font-size: 14px; gap: 6px; }
.btn--lg { --btn-h: 52px; padding: 0 26px; font-size: 17px; }
.btn--danger { color: #9b2c1c; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---- Header: dark, fixed, the search in the middle. */
.top { position: fixed; inset: 0 0 auto; z-index: 10; height: var(--nav); background: var(--head); color: var(--head-ink); }
.top__row { height: 100%; display: flex; align-items: center; gap: 24px; }
.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: inherit; flex: none; }
.logo__mark { width: 34px; height: 34px; color: var(--hot); }
.logo__name { font-size: 21px; font-weight: 500; letter-spacing: -0.03em; }
.logo__name b { font-weight: 700; color: #ff7a52; }
.search { position: relative; flex: 1; max-width: 560px; margin: 0 auto; }
.search__icon { position: absolute; left: 14px; top: 50%; width: 20px; height: 20px; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.search input[type="search"] { display: block; width: 100%; height: 44px; margin: 0; padding: 0 16px 0 44px; border: 0; border-radius: 999px; background: #fff; color: var(--ink);
  font: 400 16px/44px var(--font); -webkit-appearance: none; appearance: none; }
.search input[type="search"]::placeholder { color: #8a8077; }
.search input[type="search"]::-webkit-search-cancel-button { -webkit-appearance: none; }
.search input[type="search"]:focus { outline: 3px solid #ff7a52; outline-offset: 0; }
.top__nav { display: flex; align-items: center; gap: 16px; flex: none; }
.top__link { text-decoration: none; font-weight: 500; color: var(--head-ink); }
@media (max-width: 639px) {
  .logo__name { display: none; }
  .top__row { gap: 12px; }
  .top__link { display: none; }
}
.is-admin .top__nav { margin-left: auto; }

/* ---- Category strip: icon over label, scrolls sideways on a phone. */
.cats { margin-top: var(--nav); background: var(--card); border-bottom: 1px solid var(--line); }
.cats__row { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.cats__row::-webkit-scrollbar { display: none; }
.cats__item { flex: 1 0 auto; min-width: 84px; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px 10px 12px;
  text-decoration: none; font-size: 13px; font-weight: 500; color: var(--muted); border-bottom: 3px solid transparent; white-space: nowrap;
  transition: color .18s, border-color .18s; }
.cats__item .icon { width: 26px; height: 26px; transition: transform .2s var(--ease); }
.cats__item:hover { color: var(--ink); }
.cats__item:hover .icon { transform: translateY(-2px); }
.cats__item[aria-current] { color: var(--hot-dark); border-bottom-color: var(--hot); }
@media (max-width: 639px) { .cats__item { min-width: 76px; padding: 10px 6px 9px; } .cats__item .icon { width: 22px; height: 22px; } }

/* ---- Feed. */
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 232px; gap: 40px; padding-top: 28px; padding-bottom: 72px; }
@media (max-width: 1099px) { .layout { grid-template-columns: minmax(0, 1fr); gap: 32px; } }
.intro { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 16px 24px; margin-bottom: 20px; }
.intro__sub { margin-top: 8px; color: var(--muted); max-width: 62ch; }
.intro__sub strong { color: var(--ink); font-weight: 600; }
.sort { display: inline-flex; padding: 4px; gap: 2px; background: #ebe3d4; border-radius: 999px; }
.sort__item { padding: 8px 14px; border-radius: 999px; text-decoration: none; font-size: 14px; font-weight: 500; color: var(--muted); white-space: nowrap; transition: color .18s, background-color .18s; }
.sort__item:hover { color: var(--ink); }
.sort__item[aria-current] { background: var(--card); color: var(--ink); box-shadow: 0 1px 2px rgba(43, 36, 30, .15); }
@media (max-width: 639px) { .sort { width: 100%; } .sort__item { flex: 1; text-align: center; padding: 8px 6px; font-size: 13px; } }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 20px; }

.deal { position: relative; display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden;
  transition: transform .22s var(--ease), box-shadow .22s var(--ease), border-color .22s; }
.deal:hover { transform: translateY(-2px); border-color: var(--line-strong); box-shadow: 0 12px 28px -18px rgba(43, 36, 30, .45); }
.deal__img { position: relative; aspect-ratio: 4 / 3; background: var(--photo); overflow: hidden; }
.deal__img img { width: 100%; height: 100%; object-fit: contain; padding: 14px; transition: transform .35s var(--ease); }
.deal:hover .deal__img img { transform: scale(1.03); }
.deal__noimg { display: grid; place-items: center; height: 100%; font-size: 22px; color: var(--muted); }
.badge { position: absolute; left: 10px; top: 10px; display: inline-flex; align-items: center; gap: 3px; padding: 4px 9px; border-radius: 8px;
  background: var(--ink); color: #fff; font-size: 14px; font-weight: 700; letter-spacing: -0.01em; }
.badge--hot { background: var(--hot); }
.badge--ended { background: #6a5f54; font-weight: 600; }
.deal__body { display: flex; flex-direction: column; gap: 6px; padding: 12px 14px 12px; flex: 1; border-top: 1px solid var(--line); }
.deal__meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 13px; color: var(--muted); }
.deal__store { font-weight: 600; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.deal__time { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.deal__title { font-size: 16px; font-weight: 500; letter-spacing: -0.01em; line-height: 1.35; min-height: 2.7em;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.deal__title a { text-decoration: none; }
.deal__title a::after { content: ""; position: absolute; inset: 0; } /* the whole card opens the deal */
.deal__tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { display: inline-flex; align-items: center; gap: 4px; max-width: 100%; padding: 3px 8px; border-radius: 6px; font-size: 13px; font-weight: 500; line-height: 1.3; }
.tag--ship { background: var(--ship-soft); color: var(--ship); }
.tag--code { border: 1px dashed var(--line-strong); color: var(--ink); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; letter-spacing: .02em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.deal__foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 14px; border-top: 1px solid var(--line); }
.who { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); min-width: 0; }
.avatar { flex: none; display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--ink); color: var(--bg); font-size: 12px; font-weight: 600; }
.deal__go { position: relative; z-index: 1; } /* above the card's own link */
.deal.is-ended .deal__img img { filter: grayscale(1); opacity: .5; }
.deal.is-ended .price__now { color: var(--muted); }
.deal.is-ended .deal__go { background: var(--card); color: var(--ink); border-color: var(--line-strong); }

.price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; margin-top: auto; }
.price__now { font-size: 22px; font-weight: 700; letter-spacing: -0.02em; color: var(--hot-dark); }
.price__now--none { font-size: 16px; font-weight: 600; color: var(--ink); }
.price__was { color: var(--muted); font-size: 15px; }
.price__pct { font-size: 14px; font-weight: 700; color: var(--hot-dark); background: var(--hot-soft); padding: 3px 10px; border-radius: 999px; }
.price--big .price__now { font-size: 40px; }
.price--big .price__was { font-size: 19px; }

/* Phones: rows instead of tiles, so more deals fit a thumb-scroll. */
@media (max-width: 639px) {
  .grid { grid-template-columns: 1fr; gap: 10px; }
  .deal { display: grid; grid-template-columns: 108px minmax(0, 1fr); border-radius: var(--r-md); }
  .deal__img { grid-row: span 2; aspect-ratio: auto; min-height: 100%; border-right: 1px solid var(--line); }
  .deal__img img { position: absolute; inset: 0; padding: 8px; }
  .badge { left: 6px; top: 6px; font-size: 12px; padding: 3px 6px; border-radius: 6px; }
  .badge .icon--sm { width: 12px; height: 12px; }
  .deal__body { border-top: 0; padding: 10px 12px 6px; gap: 4px; }
  .deal__title { font-size: 15px; min-height: 0; }
  .price__now { font-size: 19px; }
  .price__was { font-size: 14px; }
  .deal__foot { border-top: 0; padding: 4px 12px 10px; }
  .who { display: none; }
  .deal__go { margin-left: auto; }
}

.side__title { font-size: 16px; margin-bottom: 10px; }
.side__list { list-style: none; margin: 0; padding: 0; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; }
.side__list li + li { border-top: 1px solid var(--line); }
.side__list a { display: flex; justify-content: space-between; align-items: center; min-height: 44px; padding: 0 14px; text-decoration: none; font-size: 15px; transition: background-color .18s, padding .18s var(--ease); }
.side__list a:hover { background: #f8f3ea; padding-left: 18px; }
.side__list a[aria-current] { font-weight: 600; color: var(--hot-dark); }
.side__count { color: var(--muted); font-size: 13px; background: #f1eadf; border-radius: 999px; padding: 1px 8px; }
@media (max-width: 1099px) {
  .side__list { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
  .side__list li + li { border-top: 0; }
  .side__list li { border-bottom: 1px solid var(--line); }
}

.more { margin-top: 32px; text-align: center; }
.empty { padding: 48px 0; display: grid; gap: 12px; justify-items: start; }

/* ---- One deal. */
.detail { padding-top: 20px; padding-bottom: 72px; }
.crumbs { font-size: 14px; color: var(--muted); margin-bottom: 20px; }
.detail__grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 48px; align-items: start; }
@media (max-width: 899px) { .detail__grid { grid-template-columns: 1fr; gap: 24px; } }
.gallery__main { position: relative; margin: 0; aspect-ratio: 1; background: var(--photo); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; display: grid; place-items: center; }
.gallery__main img { width: 100%; height: 100%; object-fit: contain; padding: 32px; }
.gallery__main .badge { left: 16px; top: 16px; font-size: 18px; padding: 6px 12px; }
.gallery__main--empty { font-size: 28px; color: var(--muted); }
.gallery__thumbs { display: flex; gap: 8px; margin-top: 12px; overflow-x: auto; }
.thumb { flex: none; width: 72px; height: 72px; padding: 4px; background: var(--photo); border: 1px solid var(--line); border-radius: var(--r-sm); cursor: pointer; transition: border-color .18s; }
.thumb img { width: 100%; height: 100%; object-fit: contain; }
.thumb:hover, .thumb[aria-current] { border-color: var(--hot); }
.detail__info { display: grid; gap: 16px; }
.detail__info .deal__meta { justify-content: flex-start; gap: 12px; font-size: 14px; }
.detail__title { font-size: clamp(26px, 1.2vw + 18px, 34px); }
.detail__by { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; color: var(--muted); font-size: 14px; }
.detail__by strong { color: var(--ink); font-weight: 600; }
.detail__text { display: grid; gap: 12px; max-width: 62ch; padding-top: 16px; border-top: 1px solid var(--line); }
.coupon { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 12px 12px 12px 16px; border: 2px dashed var(--hot); border-radius: var(--r-md); background: var(--hot-soft); }
.coupon__label { font-size: 13px; color: var(--hot-dark); font-weight: 500; width: 100%; }
.coupon__code { font: 700 22px/1.2 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .05em; margin-right: auto; }
.check { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border: 1px solid var(--line-strong); border-radius: var(--r-md); background: var(--card); text-decoration: none;
  transition: border-color .18s, transform .18s var(--ease); }
.check:hover { border-color: var(--ink); transform: translateY(-1px); }
.check > span { display: grid; gap: 2px; flex: 1; font-size: 14px; }
.check strong { font-size: 16px; font-weight: 600; }
.check > .icon:first-child { color: var(--hot); width: 28px; height: 28px; }
.related { margin-top: 64px; }
.related h2 { margin-bottom: 20px; }
@media (max-width: 639px) {
  .gallery__main { aspect-ratio: 4 / 3; }
  .gallery__main img { padding: 16px; }
  .gallery__main .badge { left: 10px; top: 10px; font-size: 15px; padding: 4px 9px; }
  .detail .btn-row .btn { flex: 1 1 100%; }
  .price--big .price__now { font-size: 32px; }
}

.foot { border-top: 1px solid var(--line); padding: 32px 0 40px; font-size: 14px; color: var(--muted); }
.foot__row { display: grid; gap: 8px; }
.foot strong { color: var(--ink); font-weight: 600; }
.foot__small { font-size: 13px; }

/* ---- Admin. */
.tabs { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 20px; padding: 24px 0 0; margin-bottom: 28px; border-bottom: 1px solid var(--line); }
.tabs__item { text-decoration: none; font-weight: 500; padding: 8px 0 12px; border-bottom: 3px solid transparent; }
.tabs__item[aria-current] { border-color: var(--hot); }
.tabs__out { margin-left: auto; padding-bottom: 12px; }
.is-admin main > section { padding-bottom: 72px; }
.is-admin h1 { margin-bottom: 24px; }
.is-admin h2 { margin: 40px 0 16px; }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 24px; }
.panel-head h1 { margin: 0; }
.notice { padding: 12px 16px; border-radius: var(--r-md); background: var(--ship-soft); color: #23401c; margin-bottom: 24px; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--card); }
.table { width: 100%; border-collapse: collapse; font-size: 15px; }
.table th { text-align: left; font-size: 13px; font-weight: 500; color: var(--muted); padding: 12px 16px; border-bottom: 1px solid var(--line); }
.table td { padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table tr:last-child td { border-bottom: 0; }
.table tr.is-ended td { opacity: .6; }
.table__actions { white-space: nowrap; text-align: right; }
.table__actions form { display: inline; }
.table__actions .btn { margin-left: 4px; }

.form { display: grid; gap: 20px; max-width: 720px; }
.form--deal { grid-template-columns: 1fr 1fr; max-width: 880px; }
.form--inline { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); align-items: end; max-width: 880px; }
.field { display: grid; gap: 6px; min-width: 0; border: 0; margin: 0; padding: 0; }
.field--wide { grid-column: 1 / -1; }
@media (max-width: 639px) { .form--deal { grid-template-columns: 1fr; } }
.field label, .field legend { font-size: 14px; font-weight: 500; }
.field input:not([type=checkbox]):not([type=file]), .field select, .field textarea {
  width: 100%; min-height: 48px; padding: 10px 14px; border: 1px solid var(--line-strong); border-radius: var(--r-sm); background: #fff; color: var(--ink); font: 400 16px/1.4 var(--font); }
.field textarea { resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--hot); outline-offset: 0; border-color: var(--hot); }
.field__hint { font-size: 13px; color: var(--muted); }
.form__error { color: #9b2c1c; background: #f6dfd8; padding: 12px 16px; border-radius: var(--r-md); grid-column: 1 / -1; }
.form__status { min-height: 1.6em; color: var(--muted); }

.fetch { max-width: 880px; padding: 20px; margin-bottom: 32px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--card); display: grid; gap: 12px; }
.fetch__row { display: flex; gap: 12px; }
.fetch__row input { flex: 1; }
@media (max-width: 639px) { .fetch__row { flex-direction: column; } }
.notes { margin: 0; padding-left: 20px; color: #7a4a12; }
.notes:empty { display: none; }
.source-note { font-size: 14px; color: var(--muted); }
.source-note summary { cursor: pointer; font-weight: 500; color: var(--ink); }
.source-note p { margin-top: 8px; white-space: pre-line; }

.photos__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 12px; margin: 8px 0 12px; }
.photos__grid:empty { display: none; }
.photo { position: relative; display: grid; gap: 6px; padding: 8px; border: 1px solid var(--line-strong); border-radius: var(--r-md); background: var(--photo); cursor: pointer; font-weight: 400; font-size: 13px; }
.photo img { width: 100%; aspect-ratio: 1; object-fit: contain; }
.photo input { position: absolute; top: 10px; left: 10px; width: 20px; height: 20px; accent-color: var(--hot); }
.photo:has(input:not(:checked)) img { opacity: .3; }
.photos__upload { display: block; margin-bottom: 6px; }
.steps { padding-left: 20px; display: grid; gap: 6px; margin: 0 0 16px; }
.code { width: 100%; font: 13px/1.5 ui-monospace, Menlo, monospace; padding: 10px; border: 1px solid var(--line-strong); border-radius: var(--r-sm); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
