/* =========================================================
   DWO Couture — Sepet, Ödeme, Favoriler, Hesabım
   (loaded after style.css on those four pages only)
   ========================================================= */

[hidden] { display: none !important; }

.cm { padding: 0 0 clamp(80px, 9vw, 144px); }
/* empty cart / wishlist / checkout: the message sits in a calm band, the footer stays low */
.cm .empty {
  display: grid; align-content: center; justify-items: center;
  min-height: clamp(280px, 36vh, 400px); padding: clamp(24px, 4vw, 56px) 0;
}
.cm .empty p { font-size: 15px; }

/* every product grid here shows all of its cards (style.css hides n+7 on the homepage) */
.products .product:nth-child(n+7) { display: block; }

/* inputs: 16px on touch screens so iOS does not zoom into the field */
@media (max-width: 900px) {
  .cm .input, .cm .select, .cm .textarea, .cm .qty input { font-size: 16px; }
}

/* small uppercase labels shared by the panels */
.sum__title, .osum__title, .co-sec__title, .login__title, .wl-count {
  margin: 0; font-size: 12px; font-weight: 400; line-height: 1.5; letter-spacing: .18em; text-transform: uppercase; color: var(--ink);
}

/* totals list (cart + checkout) */
.sums { margin: 0; }
.sums > div { display: flex; justify-content: space-between; align-items: baseline; gap: 20px; padding: 9px 0; font-size: 14px; }
.sums dt { color: var(--ink-muted); }
.sums dd { margin: 0; text-align: right; font-weight: 400; letter-spacing: .03em; font-variant-numeric: tabular-nums; }
.sums__count { font-size: 12.5px; }
.sums .sums__note { font-weight: 300; font-size: 13px; letter-spacing: 0; color: var(--ink-muted); }
.sums .sums__total { margin-top: 12px; padding-top: 20px; border-top: 1px solid var(--line-light); align-items: center; }
.sums__total dt { color: var(--ink); font-size: 12px; font-weight: 400; letter-spacing: .18em; text-transform: uppercase; }
.sums__total dd { font-size: 18px; }

/* payment logos: monochrome like the footer, but never inverted on light backgrounds */
.secure img, .pay-opt__body img { display: block; height: 20px; width: auto; max-width: 100%; mix-blend-mode: multiply; filter: grayscale(1); opacity: .75; }

/* =========================================================
   Sepet
   ========================================================= */
.cart { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: clamp(40px, 5vw, 96px); align-items: start; }

.cart__cols, .cline { display: grid; grid-template-columns: 120px minmax(0, 1fr) 112px 136px 112px; column-gap: clamp(16px, 2vw, 28px); }
.cart__cols {
  padding-bottom: 14px; border-bottom: 1px solid var(--line-light);
  font-size: 10.5px; font-weight: 400; letter-spacing: .18em; text-transform: uppercase; color: var(--ink-muted);
}
.cart__cols span:first-child { grid-column: 1 / 3; }
.cart__cols span:nth-child(2), .cart__cols span:nth-child(4) { text-align: right; }
.cart__cols span:nth-child(3) { text-align: center; }

.clines { list-style: none; margin: 0; padding: 0; }
.cline {
  grid-template-areas: "img info price qty total" "img rm . . .";
  grid-template-rows: auto 1fr;
  padding: 28px 0; border-bottom: 1px solid var(--line-light);
}
.cline__img { grid-area: img; display: block; aspect-ratio: 3 / 4; overflow: hidden; background: var(--bone); }
.cline__img img { width: 100%; height: 100%; object-fit: cover; transition: opacity .3s var(--ease); }
.cline__img:hover img { opacity: .88; }
.cline__info { grid-area: info; min-width: 0; }
.cline__name {
  margin: 0; min-height: 44px; display: flex; align-items: center;
  font-size: 12.5px; font-weight: 400; line-height: 1.5; letter-spacing: .14em; text-transform: uppercase;
}
.cline__name a { transition: color .3s; }
.cline__name a:hover { color: var(--gold-deep); }
.cline__var { margin: 0; font-size: 13px; line-height: 1.7; color: var(--ink-muted); }
.cline__var span + span::before { content: "·"; margin: 0 9px; }
.cline__unit { display: none; margin: 2px 0 0; font-size: 12.5px; color: var(--ink-muted); font-variant-numeric: tabular-nums; }
/* top-aligned 44px cells: price, quantity and total share one line with the product name */
.cline__price, .cline__total {
  align-self: start; margin: 0; min-height: 44px; display: flex; align-items: center; justify-content: flex-end;
  font-size: 14px; font-weight: 400; letter-spacing: .03em; font-variant-numeric: tabular-nums; white-space: nowrap;
}
.cline__price { grid-area: price; color: var(--ink-muted); font-weight: 300; }
.cline__total { grid-area: total; }
.cline__qty { grid-area: qty; justify-self: center; }
.cline__rm {
  grid-area: rm; align-self: end; justify-self: start; min-height: 44px; margin-bottom: -12px;
  font-size: 11px; font-weight: 400; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-muted);
  text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 6px; text-decoration-color: var(--line-light);
  transition: color .3s, text-decoration-color .3s;
}
.cline__rm:hover { color: var(--ink); text-decoration-color: var(--gold); }

/* quantity stepper: full 44px touch targets inside the 1px border */
.cm .qty { height: 46px; background: var(--white); }
.cm .qty button { width: 44px; }
.cm .qty button svg { fill: none; }
.cm .qty button[aria-disabled="true"] { color: var(--ink-muted); opacity: .35; cursor: default; }
.cm .qty input { width: 44px; font-variant-numeric: tabular-nums; }

/* summary panel */
.cart__aside { position: sticky; top: calc(58px + var(--nav-h) + 28px); }
.sum { background: var(--paper); padding: clamp(28px, 3vw, 40px); }
.sum__title { margin-bottom: 18px; }
.sum .btn { margin-top: 28px; }
.sum__back { display: flex; justify-content: center; margin: 18px 0 0; }
.secure { margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--line-light); display: grid; justify-items: center; gap: 12px; }
.secure p { margin: 0; font-size: 12.5px; color: var(--ink-muted); }

/* =========================================================
   Ödeme
   ========================================================= */
.checkout { display: grid; grid-template-columns: minmax(0, 1fr) 420px; gap: clamp(40px, 6vw, 112px); align-items: start; }
.co { grid-column: 1; grid-row: 1; min-width: 0; }

.co-sec + .co-sec { margin-top: 44px; padding-top: 40px; border-top: 1px solid var(--line-light); }
.co-sec__title { margin-bottom: 26px; }
.co-grid { display: grid; grid-template-columns: 1fr 1fr; column-gap: 16px; }
.co-grid .field--full { grid-column: 1 / -1; }
/* a message under one field must not push its neighbour's input down */
.cm .field { align-content: start; }
.co .textarea { min-height: 96px; }
.field .opt { margin-left: 4px; font-size: 11.5px; letter-spacing: .02em; text-transform: none; color: var(--ink-muted); }

.co-fs { margin: 0; padding: 0; border: 0; min-width: 0; }
.co-fs:disabled { opacity: 1; }
.co-sub {
  float: left; width: 100%; padding: 0; margin: 0 0 22px;
  font-size: 11px; font-weight: 400; letter-spacing: .18em; text-transform: uppercase; color: var(--ink);
}
.co-sub + * { clear: both; }
.co-bill { margin-top: 28px; padding-top: 28px; border-top: 1px solid var(--line-light); }
.co-note { margin: 28px 0 0; }

/* checkboxes: whole row is the touch target */
.cm .check { min-height: 44px; align-items: center; padding: 6px 0; }
.cm .check input { margin: 0; }
.co-same { margin-top: 4px; }
.co-terms { display: grid; gap: 2px; margin: 28px 0 30px; }
.co-terms .check { align-items: flex-start; padding: 10px 0; }
.co-terms .check input { margin-top: 4px; }
.co-terms a, .login__note a {
  color: var(--ink); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px;
  text-decoration-color: var(--line-light); transition: color .3s, text-decoration-color .3s;
}
.co-terms a:hover, .login__note a:hover { color: var(--gold-deep); text-decoration-color: var(--gold); }

/* the single payment option */
.pay-opt { border: 1px solid var(--ink); }
.pay-opt__head {
  display: flex; align-items: center; gap: 14px; min-height: 58px; padding: 0 20px; cursor: pointer;
  font-size: 12px; font-weight: 400; letter-spacing: .14em; text-transform: uppercase;
}
.pay-opt__head input { width: 18px; height: 18px; margin: 0; flex: none; accent-color: var(--ink); }
.pay-opt__body { display: grid; gap: 16px; padding: 20px; border-top: 1px solid var(--line-light); background: var(--paper); }
.pay-opt__body p { margin: 0; font-size: 13.5px; line-height: 1.75; color: var(--ink-muted); max-width: 58ch; }

.co-total { display: none; }
.co-submit { height: 56px; }

/* "İl seçin" reads as a placeholder, like the grey hints in the other fields */
.cm .select:invalid { color: #a9a49b; }
.cm .select option { color: var(--ink); }

/* validation (commerce.js): a quiet red line plus a message under the field,
   only after the customer tried to submit or left a field invalid */
.cm .input[aria-invalid="true"], .cm .select[aria-invalid="true"], .cm .textarea[aria-invalid="true"] { border-color: #9b3a30; }
.cm .check input[aria-invalid="true"]:not(:focus-visible) { outline: 1px solid #9b3a30; outline-offset: 2px; }
.field__err { margin: 0; font-size: 12px; line-height: 1.5; letter-spacing: .01em; color: #9b3a30; }
.check + .field__err { margin: -4px 0 8px 28px; }

/* focus: a 2px ink frame, also over the red error line, so the current field is always clear */
.cm .input:focus, .cm .select:focus, .cm .textarea:focus { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }

/* the first invalid field scrolls in with its label clear of the sticky header */
.cm .field, .cm .check { scroll-margin-top: 16px; }

/* order summary */
.osum { grid-column: 2; grid-row: 1; position: sticky; top: calc(58px + var(--nav-h) + 28px); background: var(--paper); padding: clamp(28px, 3vw, 40px); }
.osum__toggle { display: none; }
.osum__title { margin-bottom: 20px; }
.olines { list-style: none; margin: 0 0 12px; padding: 0; }
.oline { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 18px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line-light); }
.oline:first-child { padding-top: 0; }
.oline__img { display: block; aspect-ratio: 3 / 4; overflow: hidden; background: var(--bone); }
.oline__img img { width: 100%; height: 100%; object-fit: cover; }
.oline__name { margin: 0 0 2px; font-size: 12px; font-weight: 400; line-height: 1.5; letter-spacing: .14em; text-transform: uppercase; }
.oline__var { margin: 0; font-size: 12.5px; line-height: 1.65; color: var(--ink-muted); }
.oline__var span + span::before { content: "·"; margin: 0 7px; }
.oline__price { font-size: 13.5px; font-weight: 400; letter-spacing: .03em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.osum__edit { display: flex; justify-content: center; margin: 22px 0 0; }

/* =========================================================
   Favoriler
   ========================================================= */
.wl-count { text-align: center; margin: 0 0 clamp(32px, 4vw, 52px); font-size: 11px; letter-spacing: .2em; color: var(--ink-muted); }
.wl .products { display: flex; flex-wrap: wrap; justify-content: center; }
.wl .products .product { width: calc((100% - 3 * 18px) / 4); }


/* =========================================================
   Hesabım
   ========================================================= */
.login { max-width: 460px; margin: 0 auto; }
.login__box { border: 1px solid var(--line-light); padding: clamp(28px, 4vw, 48px); }
.login__title { text-align: center; margin-bottom: 30px; }
.login__row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 4px 16px; margin: 0 0 22px; }
.login__lost {
  min-height: 44px; font-size: 13px; color: var(--ink-muted);
  text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; text-decoration-color: var(--line-light);
  transition: color .3s, text-decoration-color .3s;
}
.login__lost:hover { color: var(--ink); text-decoration-color: var(--gold); }
.login__note { margin: 28px 0 0; text-align: center; font-size: 13.5px; color: var(--ink-muted); }

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 1180px) {
  .wl .products .product { width: calc((100% - 2 * 18px) / 3); }
  .cart { grid-template-columns: minmax(0, 1fr) 340px; }
  /* no separate price column: the product name keeps room, the unit price shows under it from 2 pieces (as on phones) */
  .cart__cols, .cline { grid-template-columns: 96px minmax(0, 1fr) 136px 100px; }
  .cline { grid-template-areas: "img info qty total" "img rm . ."; }
  .cart__cols span:nth-child(2), .cline__price { display: none; }
  .cline__unit { display: block; }
  .checkout { grid-template-columns: minmax(0, 1fr) 380px; }
}

@media (max-width: 999px) {
  .cart { grid-template-columns: 1fr; gap: 44px; }
  .cart__aside { position: static; width: 100%; max-width: 520px; justify-self: end; }

  .checkout { grid-template-columns: 1fr; gap: 0; }
  .co { grid-row: 2; }
  .osum { grid-column: 1; position: static; padding: 0; background: none; margin-bottom: 40px; border-top: 1px solid var(--line-light); border-bottom: 1px solid var(--line-light); }
  .osum__toggle {
    display: flex; align-items: center; gap: 14px; min-height: 60px; cursor: pointer; list-style: none;
    font-size: 11.5px; font-weight: 400; letter-spacing: .16em; text-transform: uppercase;
  }
  .osum__toggle::-webkit-details-marker { display: none; }
  .osum__toggle svg { width: 14px; height: 14px; flex: none; fill: none; order: 3; transition: transform .3s var(--ease); }
  .osum[open] .osum__toggle svg { transform: rotate(45deg); }
  .osum__toggle-total { margin-left: auto; font-size: 14px; letter-spacing: .03em; text-transform: none; font-variant-numeric: tabular-nums; }
  .osum__title { display: none; }
  .osum__body { padding: 8px 0 28px; }
  .co-total {
    display: flex; justify-content: space-between; align-items: baseline; margin: 0 0 16px;
    font-size: 12px; letter-spacing: .18em; text-transform: uppercase;
  }
  .co-total span + span { font-size: 17px; letter-spacing: .03em; font-weight: 400; font-variant-numeric: tabular-nums; }

  /* the floating WhatsApp button would sit on the form, the total and "Siparişi Onayla";
     WhatsApp stays in the footer and the announcement bar */
  .page--checkout .wa { display: none; }
}

@media (max-width: 900px) {
  .wl .products { gap: 36px 10px; justify-content: flex-start; }
  .wl .products .product { width: calc((100% - 10px) / 2); }
}

@media (max-width: 700px) {
  .cart__cols { display: none; }
  .clines { border-top: 1px solid var(--line-light); }
  .cline {
    grid-template-columns: 92px minmax(0, 1fr) auto;
    grid-template-areas: "img info total" "img qty rm";
    grid-template-rows: 1fr auto;
    column-gap: 16px; row-gap: 10px; padding: 22px 0;
  }
  .cline__name { min-height: 0; display: block; margin-bottom: 4px; font-size: 12px; letter-spacing: .12em; }
  .cline__var span { display: block; }
  .cline__var span + span::before { content: none; }
  .cline__unit { display: block; }
  .cline__unit[hidden] { display: none !important; }
  .cline__price { display: none; }
  .cline__total { min-height: 0; align-items: flex-start; align-self: start; font-size: 13.5px; line-height: 1.5; }
  .cline__qty { justify-self: start; align-self: end; }
  .cline__rm { align-self: end; justify-self: end; margin-bottom: 0; display: inline-flex; align-items: center; }

  .co-grid { grid-template-columns: 1fr; }
  .co-sec + .co-sec { margin-top: 36px; padding-top: 32px; }

  .login__box { border: 0; padding: 0; }
}
