* {
  box-sizing: border-box;
}

:root {
  --background: #E9E9EB;
  --surface: #F8F6F5;
  --secondary: #F0EFF1;
  --pink: #F6DDE3;
  --peach: #F6DCCB;
  --text: #171717;
  --muted: #66646A;

  --shadow:
    10px 12px 25px rgba(75,70,80,.13),
    -7px -7px 18px rgba(255,255,255,.9);
}

body {
  margin: 0;
  min-height: 100vh;
  padding: 20px;
  background:
    radial-gradient(ellipse at 12% 15%, rgba(246,220,203,.5), transparent 35%),
    radial-gradient(ellipse at 90% 70%, rgba(246,221,227,.6), transparent 38%),
    var(--background);

  color: var(--text);
  font-family: Inter, Manrope, Arial, sans-serif;
}

button,
input,
select {
  font: inherit;
}

.app {
  width: 100%;
  max-width: 1450px;
  margin: auto;
}

/* HEADER */

.site-header {
  margin-bottom: 22px;
}

.header-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 13px;
}

.logo {
  font-size: 38px;
}

h1 {
  font-size: 27px;
  margin: 0 0 5px;
}

header p {
  color: var(--muted);
  margin: 0;
  font-size: 14px;
}

#favorites-link {
  display: inline-block;
  padding: 12px 18px;
  border-radius: 12px;
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
  box-shadow: var(--shadow);
  white-space: nowrap;
}

.header-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 12px 16px;
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.mode-selector {
  display: flex;
  gap: 10px;
}

.mode-selector button,
#next-button,
.filter-buttons button,
.advanced-toggle {
  border: none;
  cursor: pointer;
  font-weight: 700;
  transition: .2s ease;
}

.mode-selector button {
  padding: 11px 20px;
  border-radius: 12px;
  background: var(--surface);
  color: var(--muted);
  box-shadow:
    5px 5px 10px #d8d7da,
    -5px -5px 10px #ffffff;
}

.mode-selector button.mode-active {
  background: var(--peach);
  color: var(--text);
  box-shadow: none;
}

.marketplace-selector {
  display: flex;
  align-items: center;
  gap: 12px;
}

.marketplace-selector label {
  color: var(--muted);
  font-weight: 600;
}

/* MAIN TWO-COLUMN LAYOUT */

.workspace {
  display: grid;
  grid-template-columns: minmax(290px, 350px) minmax(0, 1fr);
  align-items: start;
  gap: 22px;
}

/* FILTERS LEFT */

.search-filters {
  background: var(--surface);
  padding: 22px;
  border-radius: 20px;
  text-align: left;
  box-shadow: var(--shadow);
}

.search-filters h3 {
  text-align: left;
  margin: 0 0 20px;
  font-size: 19px;
}

.search-filters > label:not(.shipping-option) {
  display: block;
  margin: 14px 0 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

select,
input[type="text"],
input[type="number"] {
  width: 100%;
  min-width: 0;
  padding: 12px 13px;
  border: none;
  border-radius: 11px;
  outline: none;
  background: var(--surface);
  color: var(--text);
  font-size: 14px;
  box-shadow:
    inset 3px 3px 7px rgba(75,70,80,.07),
    inset -3px -3px 7px rgba(255,255,255,.9);
}

.price-filters {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.advanced-toggle {
  display: block;
  width: 100%;
  margin: 17px 0;
  padding: 12px;
  border-radius: 11px;
  background: var(--secondary);
  color: var(--muted);
  box-shadow:
    4px 4px 9px #dedde0,
    -4px -4px 9px #ffffff;
}

.advanced-filters {
  display: grid;
  grid-template-columns: 1fr;
  gap: 13px;
  padding: 5px 0 10px;
}

.hidden {
  display: none !important;
}

.filter-group label {
  display: block;
  margin-bottom: 7px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}

.shipping-option {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
}

.shipping-option input {
  width: 17px;
  height: 17px;
  accent-color: #d99eaa;
}

#active-filters {
  margin-top: 16px;
  padding: 10px;
  text-align: center;
  border-radius: 10px;
  background: var(--secondary);
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.filter-buttons {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 15px;
}

.filter-buttons button {
  width: 100%;
  padding: 13px;
  border-radius: 11px;
  background: var(--pink);
  color: var(--text);
  box-shadow:
    5px 5px 10px #dedade,
    -5px -5px 10px #ffffff;
}

.filter-buttons button:last-child {
  background: var(--secondary);
  color: var(--muted);
}

/* PRODUCT RIGHT */

.product-column {
  min-width: 0;
}

.auction-card {
  overflow: hidden;
  background: var(--surface);
  border-radius: 22px;
  box-shadow: var(--shadow);
}

#status {
  padding: 12px 15px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  border-bottom: 1px solid rgba(0,0,0,.04);
}

.product-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, .9fr);
  align-items: stretch;
}

.image-container {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 400px;
  padding: 20px;
  background: #fff;
}

#product-image {
  display: block;
  width: 100%;
  height: 360px;
  object-fit: contain;
}

.details {
  padding: 25px;
  min-width: 0;
}

.category {
  display: inline-block;
  padding: 7px 13px;
  border-radius: 20px;
  background: var(--pink);
  font-size: 12px;
  color: var(--muted);
}

h2 {
  font-size: 21px;
  line-height: 1.4;
  margin: 13px 0 18px;
  overflow-wrap: anywhere;
}

.price-area {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 16px;
  border-radius: 14px;
  background: var(--secondary);
}

.price-area small {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
}

.price {
  font-size: 25px;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.bid-info {
  text-align: right;
}

.bid-info strong {
  font-size: 22px;
}

#favorite-button {
  width: 100%;
  margin-top: 15px;
  padding: 12px;
  border: none;
  border-radius: 11px;
  background: var(--pink);
  color: var(--text);
  font-weight: 700;
  cursor: pointer;
}

.info {
  margin: 17px 0 5px;
  color: var(--muted);
  font-size: 13px;
  overflow-wrap: anywhere;
}

.info p {
  margin: 10px 0;
}

.info strong {
  color: var(--text);
}

/* PRODUCT ACTIONS */

.product-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 13px;
  margin-top: 17px;
}

#next-button,
#ebay-link {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 54px;
  padding: 14px;
  border-radius: 13px;
  background: var(--pink);
  color: var(--text);
  text-align: center;
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
  box-shadow: var(--shadow);
}

#ebay-link {
  background: var(--peach);
}

button:disabled {
  opacity: .6;
  cursor: wait;
}

button:hover:not(:disabled),
#ebay-link:hover,
#favorites-link:hover {
  transform: translateY(-2px);
}

footer {
  padding: 20px;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

/* TABLET */

@media (max-width: 950px) {
  .workspace {
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 15px;
  }

  .product-layout {
    grid-template-columns: 1fr;
  }

  .image-container {
    min-height: 280px;
  }

  #product-image {
    height: 260px;
  }

  .details {
    padding: 20px;
  }
}

/* MOBILE */

@media (max-width: 700px) {
  body {
    padding: 14px 11px;
  }

  .header-main {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }

  .logo {
    font-size: 32px;
  }

  h1 {
    font-size: 22px;
  }

  header p {
    font-size: 13px;
  }

  #favorites-link {
    width: 100%;
    text-align: center;
  }

  .header-controls {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
  }

  .mode-selector {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .mode-selector button {
    padding: 12px 7px;
    font-size: 12px;
  }

  .marketplace-selector {
    flex-direction: column;
    align-items: stretch;
    gap: 7px;
  }

  .workspace {
    grid-template-columns: 1fr;
    gap: 17px;
  }

  .search-filters {
    padding: 18px;
  }

  .search-filters h3 {
    text-align: center;
  }

  .advanced-filters {
    grid-template-columns: 1fr;
  }

  .filter-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .product-layout {
    grid-template-columns: 1fr;
  }

  .image-container {
    min-height: 240px;
    padding: 12px;
  }

  #product-image {
    height: 240px;
  }

  .details {
    padding: 18px;
  }

  h2 {
    font-size: 18px;
  }

  .price {
    font-size: 22px;
  }

  .product-actions {
    grid-template-columns: 1fr;
    gap: 11px;
  }

  #next-button,
  #ebay-link {
    width: 100%;
    min-height: 52px;
  }
}

/* SMALL PHONES */

@media (max-width: 360px) {
  .filter-buttons {
    grid-template-columns: 1fr;
  }

  .price-filters {
    grid-template-columns: 1fr;
  }
}