/* =========================================================
   shop.css — BOB FIGURES shop page
   Design system: clr-black / clr-yellow / clr-cream
   ========================================================= */

/* ---- Promo strip ---------------------------------------- */
.promo-section {
  background: var(--clr-black);
  color: var(--clr-cream);
  padding: 28px 32px;
  border-radius: var(--radius-card);
  margin-bottom: 32px;
}

.promo-section h5,
.promo-section h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--clr-yellow);
  margin-bottom: 4px;
}

.promo-input-group {
  display: flex;
  gap: 10px;
  max-width: 520px;
  margin: 14px auto 10px;
}

.promo-input {
  flex: 1;
  padding: 12px 18px;
  border: 1.5px solid rgba(255,255,255,.18);
  border-radius: var(--radius-pill);
  font-size: .95rem;
  font-family: var(--font-body);
  text-transform: uppercase;
  letter-spacing: .06em;
  background: rgba(255,255,255,.06);
  color: var(--clr-cream);
  transition: border-color .2s;
}

.promo-input:focus {
  outline: none;
  border-color: var(--clr-yellow);
}

.promo-input::placeholder { color: rgba(255,255,255,.35); }

.promo-btn {
  padding: 12px 26px;
  background: var(--clr-yellow);
  color: #000;
  border: none;
  border-radius: var(--radius-pill);
  font-weight: 700;
  font-family: var(--font-body);
  font-size: .9rem;
  cursor: pointer;
  transition: opacity .2s, transform .15s;
  white-space: nowrap;
}

.promo-btn:hover { opacity: .85; transform: translateY(-1px); }

.promo-message {
  margin-top: 10px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  display: none;
  font-size: .88rem;
}

.promo-message.success {
  background: rgba(39,174,96,.15);
  color: #27ae60;
  border: 1px solid rgba(39,174,96,.3);
}

.promo-message.error {
  background: rgba(220,53,69,.12);
  color: #dc3545;
  border: 1px solid rgba(220,53,69,.25);
}

.active-promo-codes {
  text-align: center;
  font-size: .88rem;
  margin-top: 14px;
}

.promo-code-tag {
  display: inline-block;
  background: var(--clr-yellow);
  color: #000;
  border: none;
  font-weight: 700;
  font-family: var(--font-body);
  font-size: .78rem;
  letter-spacing: .04em;
  text-transform: uppercase;
  padding: 5px 14px;
  border-radius: var(--radius-pill);
  margin: 4px;
  cursor: pointer;
  transition: opacity .2s;
}

.promo-code-tag:hover { opacity: .75; }

/* ---- Membership benefits bar ---------------------------- */
.membership-benefits-bar {
  background: var(--clr-yellow);
  color: #000;
  padding: 14px 20px;
  margin-bottom: 32px;
  border-radius: var(--radius-card);
  text-align: center;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: .92rem;
}

.membership-selector { display: inline-block; margin: 0 10px; }

.membership-selector select {
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  border: 2px solid #000;
  background: #000;
  color: var(--clr-yellow);
  font-weight: 700;
  font-family: var(--font-body);
  cursor: pointer;
}

.shop-layout {
  margin-bottom: 2.5rem;
}

/* ---- Cart sidebar --------------------------------------- */
.cart-summary {
  background: var(--clr-cream);
  padding: 22px 20px;
  border-radius: var(--radius-card);
  border: 1.5px solid var(--clr-border);
  margin-bottom: 28px;
  position: sticky;
  top: 88px;
}

.cart-items-list {
  background: #fff;
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-sm);
  padding: 10px;
  margin-bottom: 14px;
  max-height: 200px;
  overflow-y: auto;
}

.cart-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--clr-border);
  font-size: .9rem;
  gap: 8px;
}

.cart-item:last-child { border-bottom: none; }
.cart-item-name { flex: 1; font-weight: 600; }

.cart-item-qty {
  background: var(--clr-black);
  color: var(--clr-yellow);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: .78rem;
  font-weight: 700;
  min-width: 28px;
  text-align: center;
}

.cart-item-price {
  font-weight: 700;
  min-width: 68px;
  text-align: right;
  margin-right: 12px;
}

.cart-item-controls {
  display: flex;
  gap: 0;
  margin-left: 8px;
  align-items: center;
}

.qty-btn {
  background: var(--clr-grey-light);
  border: 1px solid var(--clr-border);
  padding: 2px 8px;
  border-radius: 0;
  cursor: pointer;
  font-size: .85rem;
  font-weight: 700;
  transition: background .15s;
  min-width: auto;
}

.qty-btn:first-child { border-radius: 6px 0 0 6px; }
.qty-btn:last-child  { border-radius: 0 6px 6px 0; }

.qty-btn:hover {
  background: var(--clr-black);
  color: var(--clr-yellow);
  border-color: var(--clr-black);
}

.qty-input {
  background: #fff;
  border: 1px solid var(--clr-border);
  border-left: none;
  border-right: none;
  padding: 3px 6px;
  font-size: .85rem;
  width: 44px;
  text-align: center;
  font-weight: 700;
  color: var(--clr-text);
  font-family: var(--font-body);
}

.qty-input::-webkit-outer-spin-button,
.qty-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.qty-input[type="number"] { -moz-appearance: textfield; }
.qty-input:focus { outline: none; border-color: var(--clr-black); }

.remove-btn {
  background: transparent;
  color: #dc3545;
  border: none;
  padding: 2px 6px;
  border-radius: 4px;
  cursor: pointer;
  font-size: .78rem;
  font-weight: 700;
  transition: background .15s;
}

.remove-btn:hover { background: rgba(220,53,69,.1); }

.cart-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 9px 0;
  border-bottom: 1px solid var(--clr-border);
  font-size: .9rem;
}

.cart-line:last-child {
  border-bottom: none;
  font-weight: 800;
  font-size: 1.15rem;
  margin-top: 8px;
  padding-top: 14px;
  border-top: 2px solid var(--clr-black);
}

.discount-line { color: #27ae60; font-weight: 600; }

.promo-line-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.promo-clear-btn {
  border: none;
  border-radius: 20px;
  background: var(--clr-black);
  color: var(--clr-yellow);
  font-size: .7rem;
  font-weight: 700;
  line-height: 1;
  padding: 4px 9px;
  cursor: pointer;
  transition: opacity .2s;
}

.promo-clear-btn:hover { opacity: .7; }

.cart-empty {
  text-align: center;
  color: var(--clr-text-muted);
  padding: 18px 10px;
  font-style: italic;
  font-size: .9rem;
}

/* ---- Filters sidebar ------------------------------------ */
.filters-section,
.shop-sidebar {
  background: var(--clr-cream);
  padding: 22px 20px;
  border-radius: var(--radius-card);
  border: 1.5px solid var(--clr-border);
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
}

.filters-section h5,
.filters-section h6,
.shop-sidebar .fw-bold {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: .85rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--clr-text-muted);
  margin-bottom: 12px;
}

.filter-group { margin-bottom: 18px; }
.filter-group label { display: block; margin-bottom: 6px; font-weight: 600; font-size: .88rem; }

.shop-sidebar .btn {
  border-radius: 999px;
}

.filter-group select,
.search-bar input {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--clr-border);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: .92rem;
  color: var(--clr-text);
  background: #fff;
  transition: border-color .2s;
  appearance: none;
  -webkit-appearance: none;
}

.filter-group select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23666' d='M6 8L0 0h12z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 36px; }

.filter-group select:focus,
.search-bar input:focus {
  outline: none;
  border-color: var(--clr-black);
  box-shadow: 0 0 0 3px rgba(10,10,10,.08);
}

.search-bar { margin-bottom: 20px; }

.browse-listing-actions { margin: 20px 0; }

.shop-sidebar .form-control,
.shop-sidebar .form-select {
  border: 1.5px solid var(--clr-border);
}

.shop-sidebar .form-control:focus,
.shop-sidebar .form-select:focus {
  border-color: var(--clr-black);
  box-shadow: 0 0 0 3px rgba(10,10,10,.08);
}

/* ---- Product grid --------------------------------------- */
#productsContainer { animation: fadeIn .2s ease-in; }

@keyframes fadeIn {
  from { opacity: .9; }
  to   { opacity: 1; }
}

.product-card {
  border: 1.5px solid var(--clr-border);
  border-radius: var(--radius-card);
  transition: transform .28s ease, box-shadow .28s ease, border-color .28s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
  background: #fff;
  text-decoration: none;
  color: inherit;
  overflow: hidden;
  position: relative;
}

.product-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(10,10,10,.18);
}

/* slide-up add-to-cart overlay on hover */
.product-card .add-to-cart-btn-small {
  position: relative;
  transition: background .2s, transform .2s;
}

.product-image {
  width: 100%;
  height: 240px;
  object-fit: contain;
  background: var(--clr-grey-light);
  transition: transform .4s ease;
}

.product-card:hover .product-image { transform: scale(1.04); }

.product-info {
  padding: 16px 18px 18px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.product-name {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 6px;
  color: var(--clr-text);
  line-height: 1.3;
}

.product-category {
  display: inline-block;
  background: var(--clr-black);
  color: var(--clr-yellow);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: .68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 6px;
  margin-right: 4px;
}

/* Rarity badges */
.product-category.rarity-secret {
  background: linear-gradient(135deg,#6a0dad,#c850c0);
  color: #fff;
  box-shadow: 0 0 8px rgba(200,80,192,.45);
}

.product-category.rarity-rare {
  background: linear-gradient(135deg,#0066cc,#00aaff);
  color: #fff;
}

.product-price {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--clr-text);
  margin-bottom: 10px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.discount-percent-badge {
  background: #dc3545;
  color: #fff;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: .62rem;
  font-weight: 800;
  white-space: nowrap;
}

.discounted-price-value { color: #dc3545; }

.listing-condition {
  font-size: .85rem;
  color: var(--clr-text-muted);
  margin-bottom: 10px;
  font-weight: 500;
}

.product-rating { color: #b8860b; font-size: .88rem; margin-bottom: 14px; }

.add-to-cart-btn-small {
  background: var(--clr-black);
  color: var(--clr-yellow);
  border: none;
  padding: 10px 22px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  font-weight: 700;
  font-family: var(--font-heading);
  font-size: .85rem;
  letter-spacing: .04em;
  transition: background .2s, transform .15s;
  margin-top: auto;
  width: 100%;
}

.add-to-cart-btn-small:hover {
  background: var(--clr-yellow);
  color: #000;
  transform: translateY(-1px);
}

.no-products {
  text-align: center;
  padding: 48px 20px;
  color: var(--clr-text-muted);
}

/* ---- Review section within card ------------------------ */
.review-section {
  margin-top: 14px;
  padding: 12px 14px;
  background: var(--clr-grey-light);
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--clr-yellow);
  font-size: .88rem;
}

.review-item { padding: 7px 0; border-bottom: 1px solid var(--clr-border); margin-bottom: 7px; }
.review-item:last-child { border-bottom: none; margin-bottom: 0; }
.review-author { font-weight: 700; }
.review-rating { color: #b8860b; font-size: .82rem; }
.review-text { color: var(--clr-text-muted); margin-top: 3px; font-size: .88rem; }

/* ---- Listing-specific ---------------------------------- */
.listing-details-btn { padding: 10px 20px; font-size: .9rem; }

.listing-like-btn {
  border: none;
  background: transparent;
  padding: 0;
  margin-bottom: 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #d63384;
  font-weight: 600;
  cursor: pointer;
  font-size: .9rem;
}

.listing-like-btn:hover { color: #b02a67; }
.listing-like-btn.liked { color: #a61e5e; }
.listing-like-heart { font-size: 1em; line-height: 1; }
.listing-like-count { line-height: 1; }

/* ---- Sidebar columns ----------------------------------- */
@media (min-width: 992px) {
  .shop-sidebar-col  { flex: 0 0 22.5%; max-width: 22.5%; }
  .shop-products-col { flex: 0 0 77.5%; max-width: 77.5%; }
}

@media (max-width: 991px) {
  .membership-benefits-bar {
    text-align: left;
  }

  .membership-selector {
    display: block;
    margin: 10px 0 0;
  }

  .shop-sidebar {
    position: static;
  }
}
