/* ==========================================================================
   TMA Tema — base.css
   Temiz, minimal taban stiller. Renk/tipografi değişkenleri theme.liquid
   içinde tema ayarlarından beslenir.
   ========================================================================== */

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

:root {
  --page-width: 1200px;
  --spacing-sections: 48px;
  --border-radius: 4px;
  --font-body-size: 16px;
  --color-bg: 255, 255, 255;
  --color-text: 26, 26, 26;
  --color-accent: 26, 26, 26;
  --color-accent-text: 255, 255, 255;
  --color-border: 227, 227, 227;
  --color-sale: 192, 57, 43;
  --gutter: 24px;
}

html {
  font-size: var(--font-body-size);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-body-family, "Assistant", system-ui, sans-serif);
  font-weight: var(--font-body-weight, 400);
  font-size: 1rem;
  line-height: 1.6;
  color: rgb(var(--color-text));
  background-color: rgb(var(--color-bg));
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

main {
  flex: 1 0 auto;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading-family, "Assistant", system-ui, sans-serif);
  font-weight: var(--font-heading-weight, 600);
  line-height: 1.25;
  margin: 0 0 0.5em;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

h1 { font-size: clamp(1.75rem, 4vw, 2.5rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
h3 { font-size: 1.375rem; }
h4 { font-size: 1.125rem; }

p { margin: 0 0 1em; text-wrap: pretty; }
p:last-child { margin-bottom: 0; }

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

img, svg, video {
  display: block;
  max-width: 100%;
  height: auto;
}

/* Layout ----------------------------------------------------------------- */
.page-width {
  max-width: var(--page-width);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section {
  margin-block: var(--spacing-sections);
}

.visually-hidden {
  position: absolute !important;
  overflow: hidden;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
  clip: rect(0 0 0 0);
  word-wrap: normal !important;
}

.skip-to-content-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 1000;
  padding: 0.75rem 1.25rem;
  background: rgb(var(--color-accent));
  color: rgb(var(--color-accent-text));
}
.skip-to-content-link:focus { left: 0; }

:focus-visible {
  outline: 2px solid rgb(var(--color-accent));
  outline-offset: 2px;
}

/* Buttons ---------------------------------------------------------------- */
.button,
button.button,
.shopify-payment-button__button--unbranded {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 44px;
  padding: 0.75rem 1.5rem;
  font: inherit;
  font-weight: 600;
  line-height: 1;
  text-align: center;
  cursor: pointer;
  border: 1px solid rgb(var(--color-accent));
  border-radius: var(--border-radius);
  background: rgb(var(--color-accent));
  color: rgb(var(--color-accent-text));
  transition: opacity 0.15s ease, background 0.15s ease;
}
.button:hover { opacity: 0.85; text-decoration: none; }
.button:disabled,
.button[aria-disabled="true"] { opacity: 0.4; cursor: not-allowed; }

.button--secondary {
  background: transparent;
  color: rgb(var(--color-text));
  border-color: rgb(var(--color-border));
}
.button--full { width: 100%; }
.button--small { min-height: 36px; padding: 0.5rem 1rem; font-size: 0.875rem; }

.link {
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
  font: inherit;
}

/* Forms ------------------------------------------------------------------ */
.field { position: relative; margin-bottom: 1rem; }
.field__label { display: block; margin-bottom: 0.35rem; font-size: 0.875rem; font-weight: 600; }

input[type="text"],
input[type="email"],
input[type="password"],
input[type="search"],
input[type="tel"],
input[type="number"],
textarea,
select {
  width: 100%;
  min-height: 44px;
  padding: 0.6rem 0.85rem;
  font: inherit;
  color: rgb(var(--color-text));
  background: rgb(var(--color-bg));
  border: 1px solid rgb(var(--color-border));
  border-radius: var(--border-radius);
  appearance: none;
}
textarea { min-height: 120px; resize: vertical; }
select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23666' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.85rem center;
  padding-right: 2.25rem;
}
input:focus, textarea:focus, select:focus { border-color: rgb(var(--color-accent)); outline-offset: 0; }

/* Grid ------------------------------------------------------------------- */
.grid {
  display: grid;
  gap: var(--gutter);
  grid-template-columns: repeat(var(--cols-mobile, 2), minmax(0, 1fr));
  list-style: none;
  margin: 0;
  padding: 0;
}
@media (min-width: 750px) {
  .grid { grid-template-columns: repeat(var(--cols-desktop, 4), minmax(0, 1fr)); }
}

/* Product card ----------------------------------------------------------- */
.card {
  display: flex;
  flex-direction: column;
  height: 100%;
}
.card__media {
  position: relative;
  display: block;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: rgba(var(--color-text), 0.04);
  border-radius: var(--border-radius);
}
.card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.3s ease;
}
.card__media .card__image--secondary {
  position: absolute;
  inset: 0;
  opacity: 0;
}
.card:hover .card__image--secondary { opacity: 1; }
.card__badge {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  padding: 0.2rem 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: var(--border-radius);
  background: rgb(var(--color-accent));
  color: rgb(var(--color-accent-text));
}
.card__badge--sold-out { background: rgba(var(--color-text), 0.6); }
.card__info { padding-top: 0.65rem; }
.card__vendor { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; opacity: 0.6; }
.card__title { font-size: 0.95rem; font-weight: 500; margin: 0.15rem 0; }
.card__title a::after { content: ""; position: absolute; inset: 0; }

/* Price ------------------------------------------------------------------ */
.price { display: flex; align-items: baseline; gap: 0.5rem; flex-wrap: wrap; }
.price__regular { font-weight: 600; }
.price__sale .price-item--regular { text-decoration: line-through; opacity: 0.55; font-weight: 400; }
.price__sale .price-item--sale { color: rgb(var(--color-sale)); font-weight: 600; }
.price--on-sale .price-item--regular { text-decoration: line-through; opacity: 0.55; }
.unit-price { font-size: 0.8rem; opacity: 0.7; }

/* Header ----------------------------------------------------------------- */
.header {
  border-bottom: 1px solid rgb(var(--color-border));
  background: rgb(var(--color-bg));
}
.header--sticky { position: sticky; top: 0; z-index: 50; }
.header__inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1.5rem;
  padding-block: 1rem;
}
.header__logo { font-size: 1.25rem; font-weight: 700; letter-spacing: -0.02em; }
.header__logo img { max-height: 44px; width: auto; }
.header__nav { display: none; }
@media (min-width: 990px) {
  .header__nav { display: flex; gap: 1.5rem; justify-content: center; }
}
.header__nav a { font-size: 0.95rem; padding-block: 0.25rem; }
.header__icons { display: flex; align-items: center; gap: 0.75rem; justify-content: flex-end; }
.header__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: none;
  border: 0;
  cursor: pointer;
  color: inherit;
  position: relative;
}
.header__icon svg { width: 22px; height: 22px; }
.cart-count {
  position: absolute;
  top: 4px;
  right: 4px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  font-size: 0.7rem;
  line-height: 18px;
  text-align: center;
  border-radius: 9px;
  background: rgb(var(--color-accent));
  color: rgb(var(--color-accent-text));
}
.cart-count[hidden] { display: none; }

/* Mobile nav drawer */
.menu-drawer { display: block; }
@media (min-width: 990px) { .header__icon--menu { display: none; } }

/* Announcement bar ------------------------------------------------------- */
.announcement-bar {
  text-align: center;
  font-size: 0.85rem;
  padding: 0.6rem 1rem;
  background: rgb(var(--color-accent));
  color: rgb(var(--color-accent-text));
}
.announcement-bar a { text-decoration: underline; }

/* Drawer (cart + menu) --------------------------------------------------- */
.drawer {
  position: fixed;
  inset: 0;
  z-index: 100;
  visibility: hidden;
  pointer-events: none;
}
.drawer[open], .drawer.is-open { visibility: visible; pointer-events: auto; }
.drawer__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  opacity: 0;
  transition: opacity 0.3s ease;
}
.drawer.is-open .drawer__overlay { opacity: 1; }
.drawer__inner {
  position: absolute;
  top: 0;
  right: 0;
  width: min(420px, 100%);
  height: 100%;
  display: flex;
  flex-direction: column;
  background: rgb(var(--color-bg));
  transform: translateX(100%);
  transition: transform 0.3s ease;
}
.drawer--left .drawer__inner { right: auto; left: 0; transform: translateX(-100%); }
.drawer.is-open .drawer__inner { transform: translateX(0); }
.drawer__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem;
  border-bottom: 1px solid rgb(var(--color-border));
}
.drawer__header h2 { margin: 0; font-size: 1.1rem; }
.drawer__body { flex: 1; overflow-y: auto; padding: 1.25rem; }
.drawer__footer { padding: 1.25rem; border-top: 1px solid rgb(var(--color-border)); }
.drawer__close {
  width: 44px; height: 44px; display: inline-flex;
  align-items: center; justify-content: center;
  background: none; border: 0; cursor: pointer; color: inherit;
}

/* Cart items ------------------------------------------------------------- */
.cart-item {
  display: grid;
  grid-template-columns: 72px 1fr auto;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid rgb(var(--color-border));
}
.cart-item__image img { border-radius: var(--border-radius); }
.cart-item__name { font-weight: 500; }
.cart-item__variant { font-size: 0.85rem; opacity: 0.65; margin-top: 0.15rem; }
.cart-item__price { margin-top: 0.35rem; font-size: 0.9rem; }

.quantity {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgb(var(--color-border));
  border-radius: var(--border-radius);
  overflow: hidden;
}
.quantity__button {
  width: 36px; height: 40px; background: none; border: 0;
  font-size: 1.1rem; cursor: pointer; color: inherit;
}
.quantity__input {
  width: 44px; min-height: 40px; height: 40px; text-align: center;
  border: 0; border-inline: 1px solid rgb(var(--color-border));
  border-radius: 0; padding: 0;
}
.quantity__input::-webkit-outer-spin-button,
.quantity__input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* Cart drawer totals */
.cart-drawer__totals { display: flex; justify-content: space-between; font-size: 1.1rem; font-weight: 600; margin-bottom: 1rem; }
.cart-drawer__empty { text-align: center; padding: 3rem 1rem; }

/* Predictive search ------------------------------------------------------ */
.search-modal {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(var(--color-bg), 0.98);
  display: none;
  flex-direction: column;
}
.search-modal.is-open { display: flex; }
.search-modal__header { display: flex; gap: 1rem; padding: 1.25rem; border-bottom: 1px solid rgb(var(--color-border)); align-items: center; max-width: var(--page-width); margin-inline: auto; width: 100%; }
.search-modal__form { flex: 1; display: flex; gap: 0.5rem; }
.predictive-search {
  max-width: var(--page-width);
  margin-inline: auto;
  width: 100%;
  padding: 1.25rem;
  overflow-y: auto;
}
.predictive-search__heading { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.06em; opacity: 0.6; margin-bottom: 0.5rem; }
.predictive-search__results-list { list-style: none; margin: 0 0 1.5rem; padding: 0; display: grid; gap: 0.5rem; }
.predictive-search__item { display: flex; align-items: center; gap: 0.75rem; padding: 0.5rem; border-radius: var(--border-radius); }
.predictive-search__item:hover { background: rgba(var(--color-text), 0.05); text-decoration: none; }
.predictive-search__item img { width: 48px; height: 48px; object-fit: cover; border-radius: var(--border-radius); }
.predictive-search__item-heading { font-weight: 500; }
.predictive-search[aria-busy="true"] { opacity: 0.5; }

/* Facets / filtering ----------------------------------------------------- */
.facets-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  padding-bottom: 1.25rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid rgb(var(--color-border));
}
.facets { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; }
.facets details { position: relative; }
.facets summary {
  list-style: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 0.85rem;
  border: 1px solid rgb(var(--color-border));
  border-radius: var(--border-radius);
  font-size: 0.9rem;
  user-select: none;
}
.facets summary::-webkit-details-marker { display: none; }
.facets__panel {
  position: absolute;
  top: calc(100% + 0.4rem);
  left: 0;
  z-index: 20;
  min-width: 240px;
  max-height: 360px;
  overflow-y: auto;
  padding: 1rem;
  background: rgb(var(--color-bg));
  border: 1px solid rgb(var(--color-border));
  border-radius: var(--border-radius);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}
.facets__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.5rem; }
.facets__label { display: flex; align-items: center; gap: 0.5rem; font-size: 0.9rem; cursor: pointer; }
.facets__price { display: flex; gap: 0.75rem; align-items: center; }
.active-facets { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1.5rem; }
.active-facets__item {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.7rem;
  font-size: 0.85rem;
  border: 1px solid rgb(var(--color-border));
  border-radius: 999px;
}
.facets-sort { display: flex; align-items: center; gap: 0.5rem; }
.facets-sort select { width: auto; min-height: 40px; }
#ProductGridContainer[aria-busy="true"] { opacity: 0.4; pointer-events: none; }

/* Product page ----------------------------------------------------------- */
.product { display: grid; gap: 2.5rem; }
@media (min-width: 990px) { .product { grid-template-columns: 1fr 1fr; align-items: start; } }
.product__media-list { display: grid; gap: 0.75rem; }
.product__media-main img { width: 100%; border-radius: var(--border-radius); }
.product__media-thumbs { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.product__media-thumbs button { width: 64px; height: 64px; padding: 0; border: 1px solid rgb(var(--color-border)); border-radius: var(--border-radius); overflow: hidden; cursor: pointer; background: none; }
.product__media-thumbs img { width: 100%; height: 100%; object-fit: cover; }
.product__info > * + * { margin-top: 1.25rem; }
.product__title { margin: 0; }
.product__price { font-size: 1.35rem; }

.variant-picker { display: grid; gap: 1.25rem; }
.variant-option__label { font-weight: 600; font-size: 0.9rem; margin-bottom: 0.5rem; display: block; }
.variant-option__values { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.variant-option input { position: absolute; opacity: 0; pointer-events: none; }
.variant-option label.swatch {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 44px; min-height: 44px; padding: 0 0.85rem;
  border: 1px solid rgb(var(--color-border)); border-radius: var(--border-radius);
  cursor: pointer; font-size: 0.9rem;
}
.variant-option input:checked + label.swatch { border-color: rgb(var(--color-accent)); background: rgb(var(--color-accent)); color: rgb(var(--color-accent-text)); }
.variant-option input:disabled + label.swatch { opacity: 0.35; text-decoration: line-through; cursor: not-allowed; }

/* Loading spinner -------------------------------------------------------- */
.loading__spinner { display: none; }
.loading .loading__spinner { display: inline-flex; }
.loading .button__text { visibility: hidden; }
.spinner { width: 18px; height: 18px; border: 2px solid currentColor; border-top-color: transparent; border-radius: 50%; animation: spin 0.6s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Utilities -------------------------------------------------------------- */
.text-center { text-align: center; }
.rte > * + * { margin-top: 1rem; }
.rte img { border-radius: var(--border-radius); }
.section-heading { margin-bottom: 1.5rem; }
.section-heading--center { text-align: center; }

.media { overflow: hidden; border-radius: var(--border-radius); background: rgba(var(--color-text), 0.04); }
.media img { width: 100%; height: 100%; object-fit: cover; }

/* Pagination ------------------------------------------------------------- */
.pagination { display: flex; justify-content: center; gap: 0.4rem; margin-top: 2.5rem; }
.pagination a, .pagination span {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 40px; height: 40px; padding: 0 0.5rem;
  border: 1px solid rgb(var(--color-border)); border-radius: var(--border-radius);
  font-size: 0.9rem;
}
.pagination .current { background: rgb(var(--color-accent)); color: rgb(var(--color-accent-text)); border-color: rgb(var(--color-accent)); }

/* Footer ----------------------------------------------------------------- */
.footer { border-top: 1px solid rgb(var(--color-border)); margin-top: var(--spacing-sections); padding-block: 3rem 1.5rem; }
.footer__top { display: grid; gap: 2rem; grid-template-columns: 1fr; }
@media (min-width: 750px) { .footer__top { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); } }
.footer__heading { font-size: 1rem; margin-bottom: 0.75rem; }
.footer__links { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.5rem; }
.footer__links a { font-size: 0.9rem; opacity: 0.85; }
.footer__bottom { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; justify-content: space-between; margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid rgb(var(--color-border)); font-size: 0.85rem; opacity: 0.75; }
.social-list { display: flex; gap: 0.75rem; list-style: none; margin: 0; padding: 0; }
.social-list a { display: inline-flex; }
.social-list svg { width: 20px; height: 20px; }
.payment-icons { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.payment-icons svg { height: 24px; width: auto; }

.localization-form { display: flex; gap: 1rem; flex-wrap: wrap; }
.localization-form select { min-height: 40px; }

/* Blog ------------------------------------------------------------------- */
.article-card__image { aspect-ratio: 16 / 10; border-radius: var(--border-radius); overflow: hidden; margin-bottom: 0.75rem; background: rgba(var(--color-text), 0.04); }
.article-card__meta { font-size: 0.8rem; opacity: 0.6; }
.article__hero { aspect-ratio: 16 / 9; border-radius: var(--border-radius); overflow: hidden; margin-bottom: 1.5rem; }
.article__body { max-width: 720px; margin-inline: auto; }

/* Customer --------------------------------------------------------------- */
.customer { max-width: 480px; margin-inline: auto; }
.customer--wide { max-width: var(--page-width); }
.customer table { width: 100%; border-collapse: collapse; }
.customer th, .customer td { padding: 0.75rem; text-align: left; border-bottom: 1px solid rgb(var(--color-border)); font-size: 0.9rem; }
.customer th { font-weight: 600; }

/* Form status ------------------------------------------------------------ */
.form-status { padding: 0.85rem 1rem; border-radius: var(--border-radius); margin-bottom: 1rem; font-size: 0.9rem; }
.form-status--success { background: rgba(46, 160, 67, 0.12); }
.form-status--error { background: rgba(192, 57, 43, 0.12); color: rgb(var(--color-sale)); }

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