/* =========================================
   GLOBAL TRAY (BOTTOM FIXED BAR)
========================================= */

.byob-tray {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: #f4f4f4;
  padding: 15px 20px;
  z-index: 9999;
  box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
}

/* =========================================
   MAIN TRAY ROW
========================================= */

.budel-cart-wrap {
  display: flex;
  align-items: center;
  gap: 20px;
  width: 100%;
}

/* =========================================
   SELECTED PRODUCTS (LEFT SIDE)
========================================= */

.byob-tray-items {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  overflow-y: hidden;
  flex: 1;
  scrollbar-width: thin;
}

.byob-selected-item {
  flex: 0 0 auto;
  background: #fff;
  padding: 10px 36px 10px 12px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
  position: relative;
  white-space: nowrap;
  box-shadow: 0 2px 6px rgba(0,0,0,0.06);
}

.byob-selected-item span:first-child {
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 220px;
}

.byob-selected-item span:nth-child(2) {
  font-size: 13px;
  opacity: 0.8;
}

.byob-selected-item button {
  background: #f5b400;
  border: none;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: 6px;
}

/* =========================================
   SUMMARY (RIGHT SIDE)
========================================= */

.byob-tray-summary {
  display: flex;
  align-items: center;
  gap: 15px;
  white-space: nowrap;
  flex-shrink: 0;
}

.byob-tray-summary p {
  margin: 0;
}

.byob-tray-summary br {
  display: none;
}

.byob-total-wrapper {
  display: flex;
  align-items: center;
  gap: 6px;
}

#byob-old-total {
  color: #D32F2F;
  text-decoration: line-through;
}

#byob-save-label {
  color: #2E7D32;
  font-weight: 600;
}

#byob-add-to-cart {
  padding: 10px 22px;
  border-radius: 8px;
  background: #f5b301;
  border: none;
  font-weight: 600;
  cursor: pointer;
}

/* =========================================
   DISCOUNT PROGRESS
========================================= */

.byob-discount-progress {
  width: 100%;
  margin-top: 10px;
}

.progress-bar {
  position: relative;
  width: 100%;
  height: 12px;
  background: #e5e5e5;
  border-radius: 6px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 0%;
  background: #4CAF50;
  transition: width .35s ease;
  border-radius: 6px;
}

.progress-labels,
.progress-steps {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  margin-top: 6px;
}

.progress-steps span {
  opacity: .4;
  transition: .25s;
}

.progress-steps span.active {
  opacity: 1;
  font-weight: 700;
  color: #2E7D32;
}

/* =========================================
   FILTER AREA
========================================= */

.filter-wrapper {
  display: flex;
  justify-content: end;
  gap: 16px;
  margin: 24px 0;
}

.filter-in {
  display: flex;
  align-items: center;
  gap: 8px;
}

.filter-in select {
  min-width: 200px;
}

/* =========================================
   PRODUCT GRID
========================================= */

#byob-product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 24px;
}

.byob-item {
  background: #fff;
  border-radius: 14px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  box-shadow: 0 6px 20px rgba(0,0,0,0.06);
  transition: transform .2s ease, box-shadow .2s ease;
}

.byob-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 28px rgba(0,0,0,0.1);
}

.byob-item h4 {
  font-size: 18px;
  margin: 8px 0 12px;
}

.byob-variable-wrapper {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: auto;
}

.byob-attr-select {
  width: 100%;
  padding: 10px 40px 10px 12px;
  border-radius: 8px;
  border: 1px solid #ddd;
  appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg fill='%23333' height='20' viewBox='0 0 24 24' width='20' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/></svg>");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px;
  cursor: pointer;
}

.byob-add-variation {
  padding: 12px;
  border-radius: 8px;
  background: #f5b301;
  color: #fff;
  font-weight: 600;
  border: none;
  cursor: pointer;
}

.byob-add-variation:hover {
  background: #e2a700;
}
/* Prevent label from breaking */
.filter-in label {
  white-space: nowrap;
  margin: 0;
}


/* =========================================
   MOBILE OPTIMIZATION
========================================= */

@media (max-width: 768px) {

  .budel-cart-wrap {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .byob-tray-items {
    overflow-x: auto;
  }

  .byob-selected-item {
    min-width: 160px;
  }

  .byob-tray-summary {
    justify-content: space-between;
  }

  .filter-wrapper {
    flex-direction: column;
  }

  .byob-total-wrapper {
    display: flex;
    align-items: center;
    gap: 2px;
}
.byob-tray-summary {
    display: flex;
    align-items: center;
    gap: 10px;
    white-space: nowrap;
    flex-shrink: 0;
}
#byob-add-to-cart {
    padding: 10px 10px;
    border-radius: 8px;
    background: #f5b301;
    border: none;
    font-weight: 600;
    cursor: pointer;
}

}

div#byob-tray h6 {
    text-align: center;
    font-weight: 600;
    padding-bottom: 10px;
}
.byob-selected-item button {
    background: #A9A9A9;
}

.byob-qty-wrap input.byob-qty, .byob-field-inline input.byob-qty {
    padding: 9px 10px 8px 20px !important;
    width: 63%;
}
/* INLINE FIELD */
.byob-field-inline {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 220px;
}

/* LABEL */
.byob-label {
  font-size: 14px;
  font-weight: 600;
  min-width: 40px;
}

/* DROPDOWN */
.byob-attr-select {
  width: 140px;
  height: 45px;
  border-radius: 8px;
  border: 1px solid #d7dce2;
  padding: 0 10px;
}

/* QTY INPUT */
.byob-qty {
  width: 80px;
  height: 38px;
  border-radius: 8px;
  border: 1px solid #d7dce2;
  padding: 0 10px;
}