/* CONCEPT C / LOCAL REFINEMENT
   One continuous-corner scale. Glass belongs only to transient UI. */
:root {
  --cc-shape-control: 12px;
  --cc-shape-icon: 13px;
  --cc-shape-media: 18px;
  --cc-shape-panel: 22px;
  --cc-shape-hero: 28px;
  --cc-shape-float: 20px;
  --cc-glass: rgba(249, 249, 247, 0.84);
  --cc-glass-strong: rgba(250, 250, 248, 0.94);
  --cc-glass-line: rgba(255, 255, 255, 0.72);
  --cc-glass-line-low: rgba(17, 17, 17, 0.10);
  --cc-info: #52616d;
  --cc-warning: #8a6429;
}

/* Native continuous corners where available, with tuned radii as fallback. */
@supports (corner-shape: squircle) {
  .m-btn,
  .at-btn,
  .m-iconbtn,
  .cc-header-action,
  .cc-menu-trigger,
  .m-input,
  .m-select,
  .m-textarea,
  .m-field input,
  .m-field select,
  .m-field textarea,
  .qty,
  .choice,
  .shop-size,
  .pdp__tile,
  .pdp__save,
  .cc-density,
  .cc-density button,
  .az-lang__menu,
  .az-lang__menu button,
  .at-search__form,
  .at-result__thumb,
  .at-card__media,
  .at-card__save,
  .pdp__frame,
  .cart-line__media,
  .summary__thumb,
  .summary-line-thumb,
  .at-bagline__thumb,
  .summary,
  .form-block,
  .auth-form,
  .auth-aside,
  .m-empty,
  .at-modal,
  .shop-aside,
  #bagPanel,
  .at-toast,
  .at-toast__thumb,
  .at-toast__mark,
  .at-toast__close,
  .at-toast__action,
  .at-wa,
  .cc-hero,
  .cc-edit,
  .cc-departments__image,
  .cc-departments__type,
  .cc-campaign,
  .cc-drop-product__image,
  .cc-objects__rail article a,
  .cc-lookbook__look img {
    corner-shape: squircle;
  }
}

/* Controls: compact, soft-sided, never inflated into pills. */
.m-btn,
.at-btn {
  border-radius: var(--cc-shape-control);
}

.m-iconbtn,
.cc-header-action,
.cc-menu-trigger,
.pdp__save,
.at-card__save {
  border-radius: var(--cc-shape-icon);
}

.m-iconbtn,
.cc-header-action,
.cc-menu-trigger {
  transition: color var(--cc-fast), background var(--cc-fast),
              transform var(--cc-fast) var(--cc-ease);
}

.m-iconbtn:active,
.cc-header-action:active,
.cc-menu-trigger:active,
.at-card__save:active,
.pdp__save:active {
  transform: scale(.96);
}

.m-input,
.m-select,
.m-textarea,
.m-field input,
.m-field select,
.m-field textarea {
  min-height: 50px;
  padding-inline: 15px;
  color: var(--cc-ink);
  background: rgba(255, 255, 255, .58);
  border: 1px solid var(--cc-line);
  border-radius: var(--cc-shape-control);
  box-shadow: none;
  transition: border-color var(--cc-fast), background var(--cc-fast),
              box-shadow var(--cc-fast);
}

.m-input:focus,
.m-select:focus,
.m-textarea:focus,
.m-field input:focus,
.m-field select:focus,
.m-field textarea:focus {
  background: rgba(255, 255, 255, .9);
  border-color: var(--cc-burgundy);
  box-shadow: 0 0 0 3px rgba(101, 30, 42, .12);
}

.qty,
.choice,
.shop-size,
.pdp__tile,
.pdp__save,
.cc-density {
  border-radius: var(--cc-shape-control);
  overflow: hidden;
}

.cc-density {
  padding: 2px;
  gap: 2px;
  border: 1px solid var(--cc-line);
}

.cc-density button {
  width: 38px;
  height: 38px;
  border-radius: 10px;
}

.shop-sort .m-select {
  padding-inline: 13px 34px;
  border: 1px solid var(--cc-line);
}

/* Large media keeps the editorial layout while gaining one coherent edge. */
.cc-hero {
  width: calc(100% - 20px);
  margin-inline: 10px;
  min-height: calc(100dvh - 36px);
  border-radius: var(--cc-shape-hero);
  overflow: hidden;
}

.cc-edit,
.cc-campaign {
  margin-inline: 10px;
  border-radius: var(--cc-shape-hero);
  overflow: hidden;
}

.cc-drop-product__image,
.cc-departments__image,
.cc-departments__type,
.cc-objects__rail article a,
.cc-lookbook__look img,
.at-card__media,
.pdp__frame {
  border-radius: var(--cc-shape-media);
}

.cc-drop-product__image,
.cc-departments__image,
.cc-departments__type,
.cc-objects__rail article a,
.cc-lookbook__look img {
  overflow: hidden;
}

.cc-departments__image,
.cc-departments__type {
  border-radius: var(--cc-shape-panel);
}

.at-card__save {
  top: 10px;
  inset-inline-end: 10px;
  background: rgba(250, 250, 248, .72);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .62);
  -webkit-backdrop-filter: blur(12px) saturate(1.15);
  backdrop-filter: blur(12px) saturate(1.15);
}

.at-card__quick {
  inset: auto 6px 6px;
  border: 0;
  border-radius: var(--cc-shape-control);
  background: rgba(17, 17, 17, .84);
  -webkit-backdrop-filter: blur(14px) saturate(1.08);
  backdrop-filter: blur(14px) saturate(1.08);
}

.cart-line__media,
.summary__thumb,
.summary-line-thumb,
.at-bagline__thumb,
.at-result__thumb {
  border-radius: var(--cc-shape-control);
  overflow: hidden;
}

/* Menus, drawers, modals and checkout surfaces share the panel tier. */
.az-lang__menu,
.at-search__form {
  border-radius: var(--cc-shape-panel);
}

.az-lang__menu button {
  border-radius: var(--cc-shape-control);
}

.at-search__bar {
  padding-inline: 10px;
}

.at-search__form {
  padding-inline: clamp(16px, 3vw, 34px);
  background: rgba(255, 255, 255, .52);
  border: 0;
}

/* The site-wide keyboard focus ring (body.cc-site :focus-visible) outranks
   the plain .at-search__input:focus-visible reset in atelier-base.css, so the
   search field kept the burgundy outline even after the pill's own border was
   removed above. Match its specificity here instead of relying on source
   order. */
body.cc-site .at-search__input:focus-visible {
  outline: none;
}

#bagPanel {
  border-radius: var(--cc-shape-hero) 0 0 var(--cc-shape-hero);
  box-shadow: -8px 0 8px rgba(17, 17, 17, .08);
}

html[dir="rtl"] #bagPanel {
  border-radius: 0 var(--cc-shape-hero) var(--cc-shape-hero) 0;
  box-shadow: 8px 0 8px rgba(17, 17, 17, .08);
}

.shop-aside {
  border-radius: 0 var(--cc-shape-hero) var(--cc-shape-hero) 0;
  box-shadow: 8px 0 8px rgba(17, 17, 17, .08);
}

html[dir="rtl"] .shop-aside {
  border-radius: var(--cc-shape-hero) 0 0 var(--cc-shape-hero);
  box-shadow: -8px 0 8px rgba(17, 17, 17, .08);
}

.at-modal,
.summary,
.form-block,
.auth-form,
.auth-aside,
.m-empty,
.done-facts,
.hairline-facts {
  border-radius: var(--cc-shape-panel);
}

.summary,
.form-block,
.auth-form,
.m-empty {
  background: rgba(255, 255, 255, .32);
}

.choice {
  background: rgba(255, 255, 255, .44);
}

.at-buybar {
  margin: 0 8px max(8px, env(safe-area-inset-bottom));
  border: 1px solid rgba(17, 17, 17, .11);
  border-radius: var(--cc-shape-panel);
  background: rgba(249, 249, 247, .9);
  box-shadow: 0 6px 8px rgba(17, 17, 17, .10);
}

.at-wa {
  border-radius: var(--cc-shape-float);
  box-shadow: 0 6px 8px rgba(17, 17, 17, .16);
}

/* The only deliberate glass layer: compact, readable notifications. */
.at-toasts {
  width: min(380px, calc(100vw - 32px));
  gap: 10px;
}

.at-toast {
  isolation: isolate;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 76px;
  padding: 12px;
  color: var(--cc-ink);
  background: var(--cc-glass);
  border: 1px solid var(--cc-glass-line);
  border-radius: var(--cc-shape-float);
  box-shadow: 0 6px 8px rgba(17, 17, 17, .16),
              inset 0 1px 0 rgba(255, 255, 255, .72);
  -webkit-backdrop-filter: blur(24px) saturate(1.28);
  backdrop-filter: blur(24px) saturate(1.28);
  animation: cc-toast-enter 360ms var(--cc-ease) both;
}

.at-toast::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 1px 1px auto;
  height: 44%;
  border-radius: calc(var(--cc-shape-float) - 2px) calc(var(--cc-shape-float) - 2px) 50% 50%;
  background: linear-gradient(180deg, rgba(255, 255, 255, .34), transparent);
  pointer-events: none;
}

@keyframes cc-toast-enter {
  from {
    opacity: 0;
    transform: translateY(10px) scale(.98);
    filter: blur(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

.at-toast[data-out="true"] {
  animation: cc-toast-exit 220ms var(--cc-ease-io) forwards;
}

@keyframes cc-toast-exit {
  to {
    opacity: 0;
    transform: translateY(7px) scale(.985);
    filter: blur(2px);
  }
}

.at-toast__mark {
  width: 36px;
  height: 36px;
  color: var(--cc-info);
  background: rgba(82, 97, 109, .10);
  border: 1px solid rgba(82, 97, 109, .16);
  border-radius: 12px;
}

.at-toast--ok .at-toast__mark {
  color: var(--cc-success);
  background: rgba(36, 77, 53, .10);
  border-color: rgba(36, 77, 53, .16);
}

.at-toast--bad .at-toast__mark {
  color: var(--cc-error);
  background: rgba(138, 31, 43, .10);
  border-color: rgba(138, 31, 43, .16);
}

.at-toast__thumb {
  width: 50px;
  aspect-ratio: 4 / 5;
  border-radius: 14px;
  background: rgba(17, 17, 17, .06);
  box-shadow: inset 0 0 0 1px rgba(17, 17, 17, .06);
}

.at-toast__body {
  gap: 3px;
}

.at-toast__title {
  color: var(--cc-ink);
  font: 600 13px/1.25 var(--cc-ui);
  letter-spacing: 0;
  text-transform: none;
}

.at-toast__text {
  color: #55534f;
  font-size: 12px;
  line-height: 1.4;
  white-space: nowrap;
}

.at-toast__action {
  width: max-content;
  min-height: 30px;
  margin-top: 4px;
  padding-inline: 10px;
  display: inline-flex;
  align-items: center;
  color: var(--cc-ink);
  background: rgba(17, 17, 17, .07);
  border: 0;
  border-radius: 10px;
  font-size: 10px;
  letter-spacing: .06em;
  transition: background var(--cc-fast), transform var(--cc-fast) var(--cc-ease);
}

.at-toast__action:hover {
  background: rgba(17, 17, 17, .12);
}

.at-toast__action:active {
  transform: scale(.97);
}

.at-toast__close {
  width: 32px;
  height: 32px;
  color: #625f59;
  border-radius: 11px;
}

.at-toast__close:hover {
  color: var(--cc-ink);
  background: rgba(17, 17, 17, .07);
}

.at-toast__life {
  inset-inline: 12px;
  bottom: 5px;
  height: 2px;
  border-radius: 999px;
  color: var(--cc-info);
  background: currentColor;
  opacity: .24;
}

.at-toast--ok .at-toast__life { color: var(--cc-success); }
.at-toast--bad .at-toast__life { color: var(--cc-error); }

@media (prefers-reduced-transparency: reduce) {
  .at-toast {
    background: var(--cc-glass-strong);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
}

/* A quiet count response, tied to the add-to-bag action. */
@keyframes at-bump {
  0% { transform: scale(1); }
  42% { transform: translateY(-1px) scale(1.16); }
  100% { transform: scale(1); }
}

@media (max-width: 719px) {
  :root {
    --cc-shape-media: 15px;
    --cc-shape-panel: 18px;
    --cc-shape-hero: 22px;
    --cc-shape-float: 18px;
  }

  .cc-hero {
    width: calc(100% - 12px);
    margin-inline: 6px;
    min-height: calc(100svh - 32px);
  }

  .cc-edit,
  .cc-campaign {
    margin-inline: 6px;
  }

  .at-toasts {
    inset-inline: 10px;
    width: auto;
    bottom: calc(70px + env(safe-area-inset-bottom));
  }

  body[data-layer-open="true"] .at-toasts {
    inset-inline: 10px;
  }

  .at-toast {
    min-height: 72px;
    padding: 10px;
  }

  .at-toast__thumb { width: 46px; }
  .at-toast__text { max-width: 46vw; }

  #bagPanel,
  html[dir="rtl"] #bagPanel,
  .shop-aside,
  html[dir="rtl"] .shop-aside {
    width: calc(100vw - 8px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .at-toast,
  .at-toast[data-out="true"],
  .m-count[data-bump="true"] {
    animation-duration: 1ms !important;
    filter: none !important;
  }
}
