

/* Host for the shared Flutter UI; legal page styling remains independent. */
#turkopt-app { position: fixed; inset: 0; width: 100%; height: 100dvh; max-width: 1100px; margin: auto; overflow: hidden; }

:root {
  color-scheme: dark;
  --bg: #151816;
  --surface: #1d211e;
  --surface-2: #252a26;
  --border: #3b413c;
  --text: #f5f5f5;
  --muted: #b6bbb7;
  --dim: #7f8680;
  --green: #20a65a;
  --green-dark: #0e6b3a;
  --danger: #e57373;
}

* { box-sizing: border-box; }
html { background: var(--bg); scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: Arial, Helvetica, sans-serif; letter-spacing: 0; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
img { max-width: 100%; }

.site-header { position: sticky; top: 0; z-index: 30; background: rgba(21, 24, 22, .96); border-bottom: 1px solid var(--border); backdrop-filter: blur(8px); }
.header-inner { width: min(1320px, 100%); min-height: 72px; margin: auto; padding: 10px 22px; display: flex; align-items: center; gap: 28px; }
.brand { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.brand img { width: 50px; height: 50px; border-radius: 10px; object-fit: cover; }
.brand strong, .brand span { display: block; }
.brand strong { font-size: 21px; }
.brand span { color: var(--muted); font-size: 12px; margin-top: 2px; }
.nav { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.nav a { min-height: 42px; padding: 0 11px; border-radius: 6px; display: flex; align-items: center; gap: 7px; color: var(--muted); white-space: nowrap; }
.nav a:hover { color: var(--text); background: var(--surface-2); }
.cart-link { position: relative; }
.cart-link b, .admin-tabs b { min-width: 19px; height: 19px; padding: 0 5px; border-radius: 50px; display: inline-grid; place-items: center; background: var(--danger); color: #fff; font-size: 11px; }
.header-actions { display: flex; align-items: center; gap: 8px; }
.language-select { width: auto; min-width: 132px; height: 42px; padding: 0 12px; display: flex; align-items: center; gap: 8px; flex-shrink: 0; white-space: nowrap; border: 1px solid var(--border); border-radius: 6px; }
.language-select select { width: auto; min-width: 86px; padding: 0 20px 0 0; flex-shrink: 0; white-space: nowrap; border: 0; outline: 0; background: transparent; color: var(--text); }
.language-select option { background: var(--surface); }
.icon-button { width: 42px; height: 42px; border: 1px solid var(--border); border-radius: 6px; background: transparent; display: inline-grid; place-items: center; cursor: pointer; }
.menu-button { display: none; }

.catalog-page, .page-shell { width: min(1320px, 100%); margin: auto; padding: 28px 22px 70px; min-height: calc(100vh - 170px); }
.page-shell { width: min(1120px, 100%); }
.catalog-toolbar { display: flex; justify-content: space-between; align-items: end; gap: 20px; }
.catalog-toolbar h1 { margin: 0; font-size: 34px; }
.catalog-toolbar p { margin: 5px 0 0; color: var(--muted); }
.page-title { margin: 8px 0 25px; font-size: 30px; }
.search-box { width: 100%; height: 54px; margin-top: 24px; padding: 0 16px; border: 1px solid var(--border); border-radius: 7px; background: var(--surface); display: flex; align-items: center; gap: 12px; color: var(--muted); }
.search-box input { flex: 1; border: 0; outline: 0; background: transparent; color: var(--text); min-width: 0; }
.categories { display: flex; gap: 9px; padding: 18px 0 22px; overflow-x: auto; scrollbar-width: thin; }
.categories button { min-height: 39px; padding: 0 15px; border: 1px solid var(--border); border-radius: 20px; background: var(--surface); white-space: nowrap; cursor: pointer; }
.categories button.active { border-color: var(--green); background: var(--green); color: #fff; }
.product-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.product-card { min-width: 0; overflow: hidden; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); transition: transform .16s, border-color .16s; }
.product-card:hover { transform: translateY(-2px); border-color: #5b635c; }
.product-image { position: relative; aspect-ratio: 1 / 1.12; display: grid; place-items: center; overflow: hidden; background: var(--surface-2); color: var(--dim); }
.product-image > img { width: 100%; height: 100%; object-fit: cover; }
.save-float { position: absolute; top: 10px; right: 10px; width: 39px; height: 39px; border: 1px solid rgba(255,255,255,.25); border-radius: 50%; background: rgba(21,24,22,.82); display: grid; place-items: center; cursor: pointer; }
.product-card-body { min-height: 66px; padding: 13px; }
.product-card-body p { margin: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; color: var(--muted); }
.product-card-body strong, .price { color: var(--green); }
.skeleton-card { min-height: 320px; overflow: hidden; border-radius: 8px; background: var(--surface); animation: pulse 1.4s ease-in-out infinite; }
.skeleton-card div { height: 260px; background: var(--surface-2); }
.skeleton-card span { display: block; width: 75%; height: 16px; margin: 18px; background: var(--surface-2); }
@keyframes pulse { 50% { opacity: .55; } }

.primary-button, .secondary-button, .whatsapp-button, .danger-outline { min-height: 48px; padding: 0 20px; border-radius: 7px; display: inline-flex; align-items: center; justify-content: center; gap: 9px; font-weight: 700; cursor: pointer; }
.primary-button { border: 1px solid var(--green); background: var(--green); color: #fff; }
.primary-button:hover { background: var(--green-dark); }
.primary-button.compact { min-height: 44px; }
.primary-button:disabled { opacity: .55; cursor: wait; }
.secondary-button { border: 1px solid var(--border); background: var(--surface); }
.whatsapp-button { width: 100%; margin-top: 18px; border: 1px solid #2cbd69; background: transparent; }
.danger-outline { border: 1px solid var(--danger); background: transparent; color: var(--danger); }
.text-button { padding: 10px 0; border: 0; background: none; color: #68d38f; cursor: pointer; }
.notice, .form-message { margin: 0 0 18px; padding: 13px 15px; border: 1px solid var(--border); border-radius: 7px; background: var(--surface); }
.notice.error { border-color: var(--danger); color: #ffb6b6; }
.muted { color: var(--muted); }
.empty-state { min-height: 330px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; color: var(--muted); }
.empty-state h2 { margin: 16px 0 5px; color: var(--text); }
.empty-state p { max-width: 460px; }
.back-link { margin-bottom: 16px; display: inline-flex; align-items: center; gap: 5px; color: var(--muted); }

.product-layout { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(360px, .8fr); gap: 32px; align-items: start; }
.gallery { display: grid; gap: 12px; }
.gallery img, .image-placeholder { width: 100%; max-height: 720px; aspect-ratio: 1 / 1; border-radius: 8px; object-fit: cover; background: var(--surface-2); }
.image-placeholder { display: grid; place-items: center; color: var(--dim); }
.product-summary { min-width: 0; }
.product-summary h1 { margin: 6px 0 12px; font-size: clamp(28px, 4vw, 42px); line-height: 1.12; overflow-wrap: anywhere; }
.eyebrow { margin: 0; color: var(--muted); }
.price { display: block; font-size: 29px; }
.action-row { display: flex; gap: 8px; margin-top: 20px; flex-wrap: wrap; }
.icon-action { min-width: 95px; padding: 10px; border: 1px solid var(--border); border-radius: 7px; background: var(--surface); display: grid; justify-items: center; gap: 5px; cursor: pointer; color: var(--muted); }
.icon-action span { font-size: 12px; }
.product-summary > .primary-button { width: 100%; margin-top: 10px; }
.detail-sections { margin-top: 28px; }
.detail-sections > section { padding: 24px 0; border-top: 1px solid var(--border); }
.detail-sections h2 { margin: 0 0 13px; font-size: 21px; }
.detail-sections p { line-height: 1.55; overflow-wrap: anywhere; }
dl { margin: 0; }
dl > div { padding: 9px 0; display: flex; justify-content: space-between; gap: 15px; }
dt { color: var(--muted); }
dd { margin: 0; text-align: right; }
.seller-panel > div { display: flex; align-items: center; gap: 12px; }
.seller-panel > div > svg { width: 48px; height: 48px; padding: 11px; border-radius: 50%; background: var(--surface-2); color: var(--green); }
.seller-panel p { margin: 3px 0; color: var(--muted); }
.verified { margin-left: auto; display: inline-flex; align-items: center; gap: 4px; color: #6dd596; font-size: 13px; }
.review { padding: 14px; border: 1px solid var(--border); border-radius: 7px; background: var(--surface); }
.review strong { color: #ffb74d; }
.trust-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.trust-actions button { padding: 10px 15px; border: 1px solid var(--border); border-radius: 7px; background: transparent; color: var(--muted); cursor: pointer; }

.auth-card, .listing-form { width: min(680px, 100%); margin: auto; padding: 24px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); }
.listing-form { position: relative; padding-top: 76px; }
.listing-close { position: absolute; top: 18px; right: 18px; width: 40px; height: 40px; display: grid; place-items: center; border: 1px solid var(--border); border-radius: 50%; background: var(--surface-2); color: var(--muted); transition: color .2s, border-color .2s, background .2s; }
.listing-close:hover, .listing-close:focus-visible { border-color: var(--green); background: var(--surface); color: var(--text); outline: none; }
.image-preview-grid { margin: -4px 0 18px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.image-preview { position: relative; aspect-ratio: 1; overflow: hidden; border: 1px solid var(--border); border-radius: 7px; background: var(--surface-2); }
.image-preview img { width: 100%; height: 100%; object-fit: cover; }
.image-preview button { position: absolute; top: 6px; right: 6px; width: 32px; height: 32px; padding: 0; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.65); border-radius: 50%; background: rgba(15,18,16,.85); color: #fff; cursor: pointer; }
.image-preview button:hover, .image-preview button:focus-visible { border-color: var(--danger); background: var(--danger); outline: none; }
.segmented { margin-bottom: 20px; display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--border); border-radius: 7px; overflow: hidden; }
.segmented button { min-height: 45px; border: 0; background: transparent; cursor: pointer; }
.segmented button.active { background: var(--green); }
form label { display: block; margin-bottom: 17px; color: var(--muted); }
input, select, textarea { width: 100%; margin-top: 7px; padding: 13px; border: 1px solid var(--border); border-radius: 6px; outline: none; background: var(--surface-2); color: var(--text); }
input:focus, select:focus, textarea:focus { border-color: var(--green); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-grid.thirds { grid-template-columns: repeat(3, 1fr); }
.checkbox { display: flex; align-items: flex-start; gap: 9px; line-height: 1.4; }
.checkbox input { width: 20px; height: 20px; margin: 0; flex: 0 0 auto; accent-color: var(--green); }
fieldset { margin: 0 0 17px; padding: 15px; border: 1px solid var(--border); border-radius: 7px; }
.auth-card .primary-button, .listing-form .primary-button { width: 100%; }

.profile-card { padding: 22px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); display: flex; align-items: center; gap: 16px; }
.profile-card h2, .profile-card p { margin: 3px 0; }
.profile-card p { color: var(--muted); }
.profile-card .danger-outline { margin-left: auto; }
.avatar { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); color: var(--green); }
.profile-actions { margin: 18px 0 28px; display: flex; gap: 12px; }
.status-line { margin: 8px 0 0; color: var(--muted); }

.cart-list { display: grid; gap: 12px; }
.cart-item { padding: 15px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); display: grid; grid-template-columns: 100px 1fr auto; gap: 16px; align-items: center; }
.cart-item > img { width: 100px; height: 100px; object-fit: cover; border-radius: 6px; }
.cart-item > div { min-width: 0; }
.cart-item a { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cart-item strong { display: block; margin: 8px 0; color: var(--green); }
.stepper { width: fit-content; display: grid; grid-template-columns: 38px 45px 38px; border: 1px solid var(--border); border-radius: 6px; overflow: hidden; }
.stepper button, .stepper span { height: 35px; border: 0; display: grid; place-items: center; background: var(--surface-2); }
.stepper button { cursor: pointer; }
.cart-total { max-width: 440px; margin: 22px 0 0 auto; padding: 20px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); }
.cart-total > span, .cart-total > strong { display: block; }
.cart-total > strong { margin: 8px 0 18px; font-size: 24px; color: var(--green); }
.cart-total .primary-button { width: 100%; }

.admin-tabs { display: flex; gap: 8px; padding-bottom: 18px; overflow-x: auto; }
.admin-tabs button { min-height: 43px; padding: 0 15px; border: 1px solid var(--border); border-radius: 7px; background: var(--surface); white-space: nowrap; cursor: pointer; display: flex; align-items: center; gap: 8px; }
.admin-tabs button.active { border-color: var(--green); color: #6dd596; }
.admin-list { display: grid; gap: 12px; }
.admin-card { padding: 18px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); }
.admin-card h3, .admin-card p { margin: 0 0 10px; }
.admin-card p { color: var(--muted); }
.button-wrap { display: flex; gap: 9px; flex-wrap: wrap; }
.button-wrap button, .button-wrap a { min-height: 40px; padding: 0 14px; border: 1px solid var(--green); border-radius: 6px; background: transparent; display: inline-flex; align-items: center; cursor: pointer; }

.footer { padding: 28px max(22px, calc((100vw - 1276px)/2)); border-top: 1px solid var(--border); background: #111412; display: flex; justify-content: space-between; gap: 24px; color: var(--muted); }
.footer strong, .footer span { display: block; }
.footer strong { color: var(--text); font-size: 19px; margin-bottom: 5px; }
.footer nav { display: flex; flex-wrap: wrap; gap: 10px 18px; justify-content: flex-end; }
.footer a:hover { color: var(--text); }

@media (max-width: 1000px) {
  .header-inner { flex-wrap: wrap; gap: 8px 14px; }
  .nav {
    order: 3;
    width: 100%;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 4px;
  }
  .nav a {
    min-width: 0;
    min-height: 52px;
    padding: 5px 3px;
    justify-content: center;
    flex-direction: column;
    gap: 3px;
    text-align: center;
    font-size: 12px;
    line-height: 1.1;
  }
  .nav a svg { flex: 0 0 auto; }
  .menu-button { display: none; }
  .header-actions { margin-left: auto; }
  .product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .header-inner, .catalog-page, .page-shell { padding-left: 14px; padding-right: 14px; }
  .brand span { display: none; }
  .language-select select { width: auto; }
  .image-preview-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .product-layout { grid-template-columns: 1fr; }
  .gallery { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; }
  .gallery img, .image-placeholder { flex: 0 0 100%; scroll-snap-align: start; }
  .form-grid, .form-grid.thirds { grid-template-columns: 1fr; gap: 0; }
  .profile-card { align-items: flex-start; flex-wrap: wrap; }
  .profile-card .danger-outline { width: 100%; margin-left: 0; }
  .cart-item { grid-template-columns: 80px 1fr auto; gap: 10px; }
  .cart-item > img { width: 80px; height: 80px; }
  .footer { flex-direction: column; }
  .footer nav { justify-content: flex-start; }
}
@media (max-width: 420px) {
  .brand div { display: none; }
  .language-select { padding: 0 10px; }
  .nav a { font-size: 10px; }
  .catalog-toolbar { align-items: center; }
  .catalog-toolbar h1 { font-size: 28px; }
  .catalog-toolbar p { font-size: 13px; }
  .catalog-toolbar .primary-button { padding: 0 12px; }
  .product-card-body { min-height: 58px; padding: 10px; font-size: 14px; }
  .product-summary h1 { font-size: 29px; }
  .auth-card, .listing-form { padding: 17px; }
  .cart-item { grid-template-columns: 64px 1fr auto; }
  .cart-item > img { width: 64px; height: 64px; }
}

/* Shared web administration */
.admin-toolbar { display:flex; align-items:center; gap:12px; margin-bottom:18px; }
.admin-tabs { display:flex; flex:1; gap:6px; overflow-x:auto; padding:2px 2px 8px; scrollbar-width:thin; }
.admin-tabs button { position:relative; flex:0 0 auto; min-height:44px; border:1px solid var(--border); border-radius:8px; background:var(--surface); color:var(--muted); padding:0 15px; font:inherit; font-weight:700; cursor:pointer; }
.admin-tabs button.active { border-color:var(--green); background:color-mix(in srgb, var(--green) 14%, var(--surface)); color:var(--text); }
.admin-unread-dot { position:absolute; width:8px; height:8px; top:5px; right:5px; border-radius:50%; background:#e57373; box-shadow:0 0 0 2px var(--surface); }
.admin-refresh { min-height:44px; display:inline-flex; align-items:center; justify-content:center; gap:8px; border:1px solid var(--border); border-radius:8px; background:var(--surface); color:var(--text); padding:0 14px; font:inherit; cursor:pointer; }
.admin-refresh:disabled { color:var(--muted); cursor:wait; }
.admin-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
.admin-card { min-width:0; border:1px solid var(--border); border-radius:8px; background:var(--surface); padding:16px; }
.admin-card h3,.admin-card p { overflow-wrap:anywhere; }
.admin-card h3 { margin:0; font-size:18px; }
.admin-card p { margin:8px 0; color:var(--muted); line-height:1.45; }
.admin-card-title { display:flex; align-items:flex-start; justify-content:space-between; gap:12px; margin-bottom:10px; }
.admin-card-title>div { min-width:0; }
.admin-card-title span:not(.status-pill) { color:var(--muted); }
.admin-card a,.button-wrap button,.button-wrap a { display:inline-flex; align-items:center; justify-content:center; gap:7px; }
.admin-card>a,.button-wrap a { min-height:38px; border:1px solid var(--green); border-radius:7px; color:var(--text); padding:0 12px; text-decoration:none; }
.button-wrap { display:flex; flex-wrap:wrap; gap:8px; margin-top:14px; }
.button-wrap button { min-height:38px; border:1px solid var(--green); border-radius:7px; background:transparent; color:var(--text); padding:0 12px; font:inherit; cursor:pointer; }
.button-wrap .danger-outline { border-color:#e57373; color:#ff9b9b; }
.status-pill { flex:0 0 auto; max-width:190px; border:1px solid var(--border); border-radius:999px; color:var(--muted); padding:5px 9px; font-size:12px; line-height:1.2; text-align:center; white-space:normal; }
.status-approved,.status-active,.status-completed,.status-resolved { border-color:var(--green); color:#68d99a; }
.status-rejected,.status-blocked,.status-suspended,.status-deleted,.status-disputed { border-color:#e57373; color:#ff9b9b; }
.status-pending,.status-pending_approval,.status-pending_deletion,.status-reviewing,.status-shipped { border-color:#ffb74d; color:#ffd08a; }
.admin-party { display:flex!important; flex-direction:column; align-items:flex-start!important; gap:3px!important; margin:10px 0; border:1px solid var(--border)!important; border-radius:7px; background:var(--surface-2); color:var(--text)!important; padding:10px 12px!important; text-decoration:none; }
.admin-party span { color:var(--muted); overflow-wrap:anywhere; }
.admin-search { display:block; margin-bottom:14px; }
.admin-search input,.admin-field select,.admin-rates-form input { width:100%; border:1px solid var(--border); border-radius:7px; background:var(--surface-2); color:var(--text); padding:12px 13px; font:inherit; }
.admin-field { display:grid; gap:7px; margin-top:14px; color:var(--muted); }
.admin-order-items { margin:12px 0; padding-left:20px; color:var(--text); }
.admin-order-items li+li { margin-top:5px; }
.admin-json { max-height:260px; overflow:auto; border-radius:7px; background:#111412; color:var(--muted); padding:12px; white-space:pre-wrap; overflow-wrap:anywhere; }
.admin-rates-form,.admin-user-profile { border:1px solid var(--border); border-radius:8px; background:var(--surface); padding:18px; }
.admin-rates-form label { display:grid; gap:7px; color:var(--muted); }
.admin-rates-form .primary-button { margin-top:18px; }
.admin-user-profile { margin:14px 0 24px; }
.admin-user-profile p { color:var(--muted); }
.admin-section-title { font-size:20px; margin:20px 0 12px; }
.admin-loading { min-height:280px; display:grid; place-items:center; color:var(--green); }
.admin-empty { min-height:280px; }
.spin { animation:admin-spin .8s linear infinite; }
@keyframes admin-spin { to { transform:rotate(360deg); } }

@media (max-width:760px) {
  .admin-toolbar { align-items:stretch; flex-direction:column; }
  .admin-grid { grid-template-columns:1fr; }
  .admin-refresh { align-self:flex-end; }
}
@media (max-width:430px) {
  .admin-card { padding:13px; }
  .admin-card-title { flex-direction:column; }
  .button-wrap { display:grid; grid-template-columns:1fr; }
  .button-wrap button,.button-wrap a { width:100%; }
}
.legal-page { max-width: 900px; font-size: 1rem; line-height: 1.65; }
.legal-page .brand img { width: 56px; height: 56px; object-fit: contain; }
.legal-page h1 { overflow-wrap: anywhere; }
.legal-page .admin-card { overflow-wrap: anywhere; }
.legal-page .admin-card h2 { font-size: 1.2rem; }
.legal-page .admin-card p { white-space: normal; margin-bottom: 0; }
.legal-languages, .legal-documents { display: flex; flex-wrap: wrap; gap: 12px; margin: 20px 0; }
.legal-languages a { padding: 8px 14px; border: 1px solid #168052; border-radius: 12px; color: var(--text); }
.legal-page .brand span { font-size: 0.875rem; }
.legal-languages a[aria-current="page"] { color: white; background: #126e46; }
.legal-documents h2 { flex-basis: 100%; font-size: 1.2rem; }
.legal-page a:focus-visible { outline: 3px solid #126e46; outline-offset: 3px; }
