:root {
  --wc-sac-bg: #121312;
  --wc-sac-card: #1b1c1a;
  --wc-sac-border: rgba(255,255,255,.14);
  --wc-sac-text: #f7f5f1;
  --wc-sac-muted: #b9b9b4;
  --wc-sac-accent: #cf4d08;
  --wc-sac-green: #25d45f;
}

.wc-sac {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 99999;
  background: var(--wc-sac-bg);
  color: var(--wc-sac-text);
  border-top: 1px solid var(--wc-sac-border);
  box-shadow: 0 -10px 30px rgba(0,0,0,.32);
  font-family: "Poppins", "Inter", "Segoe UI", Arial, sans-serif;
  transform: translateY(115%);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: transform .28s ease, opacity .22s ease, visibility .22s ease;
}

.wc-sac.is-visible {
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.wc-sac * { box-sizing: border-box; }

.wc-sac__inner {
  width: min(1320px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(240px, 1.25fr) minmax(210px, 1fr) auto auto minmax(220px, .9fr);
  gap: 18px;
  align-items: center;
  padding: 12px 0;
}

.wc-sac__product {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.wc-sac__image {
  width: 56px;
  height: 56px;
  object-fit: cover;
  border-radius: 10px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.06);
}

.wc-sac__summary { min-width: 0; }
.wc-sac__title {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.wc-sac__sku, .wc-sac__selected {
  color: var(--wc-sac-muted);
  font-size: 12px;
  line-height: 1.3;
}

.wc-sac__attributes {
  display: flex;
  gap: 10px;
  align-items: end;
  flex-wrap: wrap;
  min-width: 0;
}

.wc-sac__field { display: grid; gap: 5px; margin: 0; min-width: 0; }
.wc-sac__field-label {
  color: var(--wc-sac-muted);
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: 10px;
  font-weight: 700;
}

.wc-sac__select,
.wc-sac__qty-input {
  min-height: 46px;
  border: 1px solid var(--wc-sac-border) !important;
  border-radius: 10px;
  background: #232522 !important;
  color: var(--wc-sac-text) !important;
  padding: 0 14px;
  font-size: 14px;
  font-weight: 500;
  outline: none;
  box-shadow: none;
}

.wc-sac__select {
  min-width: 160px;
  width: 100%;
  -webkit-appearance: none;
  appearance: none;
  color-scheme: dark;
}

.wc-sac__select.is-placeholder {
  color: #d7d3cb !important;
}

.wc-sac__select option,
.wc-sac__select optgroup {
  background: #232522 !important;
  color: #f7f5f1 !important;
}

.wc-sac__select option[value=""] {
  color: #d7d3cb !important;
}

.wc-sac__select:focus,
.wc-sac__qty-input:focus {
  border-color: var(--wc-sac-accent) !important;
  box-shadow: 0 0 0 2px rgba(207,77,8,.25) !important;
}

.wc-sac__price {
  font-size: 28px;
  line-height: 1.05;
  font-weight: 800;
  letter-spacing: -.02em;
  color: #f2861e;
  white-space: nowrap;
  justify-self: center;
}
.wc-sac__price del {
  opacity: .5;
  font-size: .56em;
  font-weight: 600;
  margin-right: 6px;
}
.wc-sac__price ins {
  text-decoration: none;
  font-weight: 800;
}

.wc-sac__qty {
  display: grid;
  grid-template-columns: 44px 62px 44px;
  border: 1px solid var(--wc-sac-border);
  border-radius: 12px;
  overflow: hidden;
  background: #232522;
  min-width: 150px;
}

.wc-sac__qty-btn {
  border: 0;
  min-height: 46px;
  background: rgba(255,255,255,.04);
  color: var(--wc-sac-text);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  transition: background .2s ease, transform .15s ease;
}
.wc-sac__qty-btn:hover { background: rgba(255,255,255,.09); }
.wc-sac__qty-btn:active { transform: scale(.98); }
.wc-sac__qty-input {
  border: 0 !important;
  border-radius: 0;
  text-align: center;
  width: 62px;
  padding: 0;
  font-weight: 700;
}
.wc-sac__qty-input::-webkit-outer-spin-button,
.wc-sac__qty-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.wc-sac__button {
  min-height: 48px;
  width: 100%;
  min-width: 200px;
  border: 0;
  border-radius: 12px;
  padding: 0 24px;
  background: linear-gradient(180deg, #e66414 0%, #cf4d08 100%);
  color: #fff;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -.01em;
  cursor: pointer;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 18px rgba(207,77,8,.22);
  transition: transform .18s ease, filter .18s ease, box-shadow .18s ease;
}
.wc-sac__button:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
  box-shadow: 0 12px 22px rgba(207,77,8,.28);
}
.wc-sac__button.is-disabled {
  opacity: .7;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

body.wc-sac-active { padding-bottom: 0; }
body.wc-sac-visible { padding-bottom: 86px; }

@media (max-width: 1200px) {
  .wc-sac__inner {
    grid-template-columns: minmax(220px,1.2fr) minmax(190px,1fr) auto auto minmax(190px,.9fr);
    gap: 14px;
  }
  .wc-sac__price { font-size: 25px; }
  .wc-sac__button { min-width: 180px; }
}

@media (max-width: 980px) {
  .wc-sac__inner {
    grid-template-columns: 1fr auto;
    gap: 10px;
  }
  .wc-sac__attributes,
  .wc-sac__price,
  .wc-sac__qty,
  .wc-sac__button { grid-column: auto; }
  .wc-sac__attributes { grid-column: 1 / -1; width: 100%; }
  .wc-sac__field { flex: 1 1 150px; }
  .wc-sac__select { width: 100%; }
  .wc-sac__price {
    justify-self: start;
    font-size: 24px;
  }
}

@media (max-width: 640px) {
  .wc-sac__inner {
    width: calc(100% - 16px);
    grid-template-columns: minmax(0,1fr) auto;
    grid-template-areas:
      "price price"
      "attrs attrs"
      "qty button";
    gap: 8px 10px;
    padding: 8px 0;
    align-items: stretch;
  }
  .wc-sac__product,
  .wc-sac__field-label,
  .wc-sac__selected,
  .wc-sac__sku { display: none; }
  .wc-sac__price {
    grid-area: price;
    font-size: 22px;
    justify-self: start;
  }
  .wc-sac__attributes {
    grid-area: attrs;
    width: 100%;
    gap: 8px;
  }
  .wc-sac__field {
    width: 100%;
    flex: 1 1 100%;
  }
  .wc-sac__select {
    min-height: 40px;
    min-width: 0;
    font-size: 13px;
  }
  .wc-sac__qty {
    grid-area: qty;
    width: 100%;
    min-width: 0;
    grid-template-columns: 40px minmax(42px,1fr) 40px;
  }
  .wc-sac__qty-btn,
  .wc-sac__qty-input {
    min-height: 40px;
    font-size: 18px;
  }
  .wc-sac__button {
    grid-area: button;
    width: 100%;
    min-width: 150px;
    min-height: 40px;
    font-size: 14px;
    padding: 0 14px;
    border-radius: 10px;
  }
  body.wc-sac-visible { padding-bottom: 132px; }
}

@media (max-width: 420px) {
  .wc-sac__inner {
    width: calc(100% - 12px);
    gap: 6px 8px;
    padding: 7px 0;
  }
  .wc-sac__price { font-size: 20px; }
  .wc-sac__select,
  .wc-sac__qty-btn,
  .wc-sac__qty-input,
  .wc-sac__button { min-height: 38px; }
  .wc-sac__button {
    min-width: 132px;
    font-size: 13px;
    padding: 0 12px;
  }
  .wc-sac__qty { grid-template-columns: 38px minmax(40px,1fr) 38px; }
  body.wc-sac-visible { padding-bottom: 122px; }
}

@supports (padding: max(0px)) {
  .wc-sac__inner { padding-bottom: max(10px, env(safe-area-inset-bottom)); }
}
