.storefront-tools {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) minmax(190px, 260px) auto;
  gap: 14px;
  align-items: center;
  margin: 0 auto 32px;
  padding: 20px;
  background: #fff;
  border: 1px solid #ececec;
  box-shadow: 0 8px 28px rgba(20, 20, 20, .06);
}
.storefront-tools--category { grid-template-columns: minmax(220px, 1fr) minmax(180px, 240px) 150px auto; }

.storefront-tools__field {
  position: relative;
}

.storefront-tools__input,
.storefront-tools__select {
  width: 100%;
  height: 48px;
  padding: 0 16px;
  border: 1px solid #d9d9d9;
  border-radius: 0;
  background: #fff;
  color: #252525;
  font: 500 15px/1.2 Raleway, Arial, sans-serif;
  outline: none;
  transition: border-color .2s ease, box-shadow .2s ease;
}

.storefront-tools__input { padding-right: 44px; }
.storefront-tools__input:focus,
.storefront-tools__select:focus {
  border-color: #f28c00;
  box-shadow: 0 0 0 3px rgba(242, 140, 0, .13);
}

.storefront-tools__search-icon {
  position: absolute;
  top: 50%;
  right: 15px;
  width: 18px;
  height: 18px;
  transform: translateY(-50%);
  color: #f28c00;
  pointer-events: none;
}

.storefront-tools__result {
  min-width: 118px;
  color: #696969;
  font: 500 14px/1.35 Raleway, Arial, sans-serif;
  text-align: right;
}

.storefront-brand-change {
  min-height: 48px;
  padding: 0 18px;
  border: 1px solid #f28c00;
  background: #fff;
  color: #d97800;
  cursor: pointer;
  font: 700 13px/1.2 Raleway, Arial, sans-serif;
}
.storefront-brand-change:hover { background: #fff7eb; }

.storefront-brand-dialog {
  position: fixed;
  z-index: 100000;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(20, 20, 20, .78);
  backdrop-filter: blur(5px);
}
.storefront-brand-dialog__panel {
  width: min(880px, 100%);
  max-height: calc(100vh - 48px);
  overflow: auto;
  padding: 38px;
  background: #fff;
  box-shadow: 0 24px 80px rgba(0, 0, 0, .28);
}
.storefront-brand-dialog__eyebrow {
  margin: 0 0 8px;
  color: #f28c00;
  font: 700 12px/1.2 Raleway, Arial, sans-serif;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.storefront-brand-dialog__title {
  margin: 0;
  color: #222;
  font: 800 30px/1.15 Raleway, Arial, sans-serif;
}
.storefront-brand-dialog__text {
  margin: 10px 0 28px;
  color: #707070;
  font: 500 15px/1.5 Raleway, Arial, sans-serif;
}
.storefront-brand-dialog__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}
.storefront-brand-dialog__brand {
  display: flex;
  min-height: 150px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 18px;
  border: 1px solid #e4e4e4;
  background: #fff;
  color: #282828;
  cursor: pointer;
  font: 700 15px/1.25 Raleway, Arial, sans-serif;
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}
.storefront-brand-dialog__brand:hover,
.storefront-brand-dialog__brand:focus-visible {
  border-color: #f28c00;
  box-shadow: 0 8px 24px rgba(242, 140, 0, .14);
  outline: none;
  transform: translateY(-2px);
}
.storefront-brand-dialog__brand img { width: 100%; height: 68px; object-fit: contain; }
body.storefront-dialog-open { overflow: hidden; }

.storefront-brand-group { margin: 0 0 44px; }
.storefront-brand-group__title {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 20px;
  color: #242424;
  font: 700 25px/1.15 Raleway, Arial, sans-serif;
}
.storefront-brand-group__title::after {
  content: "";
  flex: 1;
  height: 2px;
  background: #f28c00;
}
.storefront-brand-group__count {
  color: #929292;
  font-size: 13px;
  font-weight: 500;
}
.storefront-brand-group__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}
.storefront-brand-group__grid .catalog__card { width: 100% !important; margin: 0 !important; }

.storefront-empty {
  grid-column: 1 / -1;
  padding: 48px 20px;
  border: 1px dashed #d6d6d6;
  color: #666;
  font: 500 16px/1.5 Raleway, Arial, sans-serif;
  text-align: center;
}

.storefront-add {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: 100%;
  min-height: 46px;
  margin-top: 18px;
  border: 0;
  background: #f28c00;
  color: #fff;
  cursor: pointer;
  font: 700 14px/1 Raleway, Arial, sans-serif;
  transition: background .2s ease, transform .2s ease;
}
.storefront-add:hover { background: #d97800; }
.storefront-add:active { transform: translateY(1px); }
.storefront-add:focus-visible { outline: 3px solid rgba(242, 140, 0, .32); outline-offset: 2px; }
.storefront-add.is-added { background: #2b8a3e; }
.storefront-add svg { width: 20px; height: 20px; fill: currentColor; }

.storefront-toast {
  position: fixed;
  z-index: 99999;
  right: 24px;
  bottom: 24px;
  max-width: min(380px, calc(100vw - 32px));
  padding: 15px 20px;
  background: #232323;
  color: #fff;
  box-shadow: 0 12px 35px rgba(0, 0, 0, .22);
  font: 600 14px/1.4 Raleway, Arial, sans-serif;
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
}
.storefront-toast.is-visible { opacity: 1; transform: translateY(0); }

.storefront-cart { padding-top: 8px; padding-bottom: 56px; }
.storefront-cart__list { display: grid; gap: 14px; }
.storefront-cart__item {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr) auto auto;
  gap: 22px;
  align-items: center;
  padding: 18px;
  border: 1px solid #e7e7e7;
  background: #fff;
}
.storefront-cart__image { width: 112px; height: 96px; object-fit: contain; }
.storefront-cart__article { margin-bottom: 7px; color: #969696; font-size: 12px; }
.storefront-cart__name { color: #252525; font: 700 16px/1.35 Raleway, Arial, sans-serif; }
.storefront-cart__price { margin-top: 8px; color: #f28c00; font-weight: 700; }
.storefront-cart__quantity { display: flex; align-items: center; border: 1px solid #ddd; }
.storefront-cart__quantity button { width: 38px; height: 40px; border: 0; background: #f6f6f6; cursor: pointer; font-size: 20px; }
.storefront-cart__quantity span { min-width: 42px; text-align: center; font-weight: 700; }
.storefront-cart__remove { border: 0; background: transparent; color: #858585; cursor: pointer; text-decoration: underline; }
.storefront-cart__summary {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  margin-top: 24px;
  padding: 22px;
  background: #f4f4f4;
}
.storefront-cart__total { font: 700 20px/1.3 Raleway, Arial, sans-serif; }
.storefront-cart__order { padding: 15px 26px; border: 0; background: #f28c00; color: #fff; cursor: pointer; font-weight: 700; }
.storefront-cart__empty { padding: 54px 20px; border: 1px solid #e7e7e7; text-align: center; }
.storefront-cart__empty p { margin: 0 0 20px; color: #666; }
.storefront-cart__empty a { display: inline-block; padding: 14px 22px; background: #f28c00; color: #fff; text-decoration: none; font-weight: 700; }

@media (max-width: 1100px) {
  .storefront-brand-group__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 800px) {
  .storefront-tools { grid-template-columns: 1fr; }
  .storefront-tools--category { grid-template-columns: 1fr; }
  .storefront-tools__result { text-align: left; }
  .storefront-brand-group__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .storefront-cart__item { grid-template-columns: 86px minmax(0, 1fr); gap: 14px; }
  .storefront-cart__image { width: 86px; height: 76px; }
  .storefront-cart__quantity, .storefront-cart__remove { grid-column: 2; justify-self: start; }
  .storefront-brand-dialog__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 520px) {
  .storefront-tools { margin-bottom: 22px; padding: 14px; }
  .storefront-brand-group__grid { grid-template-columns: 1fr; }
  .storefront-brand-group__title { font-size: 21px; }
  .storefront-cart__summary { align-items: stretch; flex-direction: column; }
  .storefront-brand-dialog { padding: 12px; }
  .storefront-brand-dialog__panel { padding: 24px 18px; }
  .storefront-brand-dialog__title { font-size: 24px; }
  .storefront-brand-dialog__grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .storefront-brand-dialog__brand { min-height: 118px; padding: 12px 8px; font-size: 12px; }
  .storefront-brand-dialog__brand img { height: 50px; }
}

@media (prefers-reduced-motion: reduce) {
  .storefront-add, .storefront-toast, .storefront-tools__input, .storefront-tools__select { transition: none; }
}
