/* ==================================================
   1. MAIN CONTAINER
================================================== */
#byob-app { margin-top: 40px; margin-bottom: 120px; }
.byob-header-text { text-align: center; margin-bottom: 30px; }
.byob-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }

.byob-item {
  border: 1px solid #eee;
  padding: 15px;
  text-align: center;
  border-radius: 6px;
  background: #fff;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
}
.byob-item:hover { box-shadow: 0 5px 15px rgba(0,0,0,0.05); }
.byob-item.active { border-color: var(--byob-primary, #000); background: #fdfdfd; }

.byob-img-wrapper { margin-bottom: 12px; position: relative; padding-bottom: 100%; height: 0; overflow: hidden; }
.byob-thumb-main { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: contain; }
.byob-item-details h4 { font-size: 15px; margin: 0 0 5px 0; font-weight: 600; line-height: 1.3; }

.byob-view-notes {
    background: none; border: none; color: #888; font-size: 12px; cursor: pointer;
    margin-bottom: 15px; text-decoration: underline; display: inline-block; padding: 5px;
}
.byob-view-notes:hover { color: var(--byob-primary, #000); }

.byob-add {
    width: 100%; padding: 10px; font-size: 13px; border-radius: 4px;
    background: var(--byob-primary, #000);
    color: #fff; border: 1px solid var(--byob-primary, #000);
    cursor: pointer; text-transform: uppercase; font-weight: 500; margin-top: auto;
}
.byob-add:hover { opacity: 0.9; }
.byob-add.is-remove { background: #fff; color: #d32f2f; border-color: #d32f2f; }
.byob-add.is-remove:hover { background: #d32f2f; color: #fff; }

/* ==================================================
   2. CART DRAWER
================================================== */
#byob-cart-overlay { display: none; }
#byob-cart-overlay.show { display: block; position: fixed; inset: 0; background: rgba(0,0,0,0.45); z-index: 99998; }
#byob-cart { position: fixed; top: 0; right: -420px; width: 420px; max-width: 100%; height: 100vh; background: #fff; z-index: 99999; display: flex; flex-direction: column; transition: right 0.35s ease; box-shadow: -5px 0 30px rgba(0,0,0,0.1); }
#byob-cart.open { right: 0; }
.byob-cart-header { padding: 16px; border-bottom: 1px solid #eee; display: flex; justify-content: space-between; align-items: center; background: #fff; }
.byob-cart-header h3 { margin: 0; font-size: 18px; }
#byob-cart-close { background: #f5f5f5; border: none; font-size: 24px; cursor: pointer; width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center; line-height: 1; color: #333; }
#byob-cart-content { flex: 1; overflow-y: auto; padding: 0; }
.byob-cart-item { display: flex; gap: 15px; padding: 15px 20px; border-bottom: 1px solid #f1f1f1; align-items: center; }
.byob-cart-item img { width: 60px; height: 60px; object-fit: cover; border-radius: 4px; flex-shrink: 0; }
.byob-cart-item-info { display: flex; flex-direction: column; justify-content: center; flex: 1; }
.byob-cart-item-info strong { font-size: 14px; margin-bottom: 4px; display: block; }
.byob-included { margin-top: 5px; }
.byob-included span { display: block; font-size: 12px; color: #666; line-height: 1.4; }
.byob-cart-item .price { font-size: 14px; font-weight: 600; margin-top: 5px; }
.byob-cart-footer { padding: 20px; border-top: 1px solid #eee; margin-top: auto; background: #f9f9f9; }
.byob-cart-total { display: flex; justify-content: space-between; font-size: 18px; font-weight: 700; margin-bottom: 15px; }
.byob-checkout { display: block; width: 100%; padding: 14px; background: var(--byob-primary, #000); color: #fff; text-align: center; text-decoration: none; border-radius: 4px; font-weight: 600; text-transform: uppercase; }
#byob-cart-fab { position: fixed; right: 30px; bottom: 30px; width: 60px; height: 60px; border-radius: 50%; background: var(--byob-primary, #000); color: #fff; border: none; cursor: pointer; z-index: 99990; display: flex; align-items: center; justify-content: center; font-size: 24px; box-shadow: 0 5px 20px rgba(0,0,0,0.2); }
#byob-cart-count { position: absolute; top: -5px; right: -5px; background: #d32f2f; color: #fff; font-size: 12px; font-weight: bold; height: 22px; min-width: 22px; padding: 0 5px; border-radius: 11px; display: flex; align-items: center; justify-content: center; border: 2px solid #fff; }

/* ==================================================
   3. MODAL POPUP
================================================== */
.byob-modal { display: none; position: fixed; z-index: 100000; inset: 0; align-items: center; justify-content: center; padding: 20px; }
.byob-modal.open { display: flex; width:100%; }
.byob-modal-overlay { position: absolute; inset: 0; background: rgba(0,0,0,0.7); backdrop-filter: blur(4px); }
.byob-modal-content { background: #fff; width: 100%; max-width: 800px; border-radius: 8px; position: relative; z-index: 2; padding: 0; max-height: 66vh; overflow-y: auto; box-shadow: 0 20px 60px rgba(0,0,0,0.3); animation: byobPopUp 0.3s ease; }
@keyframes byobPopUp { from { transform: scale(0.9); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.byob-modal-close { position: absolute; top: 15px; right: 15px; background: #fff; border: none; font-size: 28px; line-height: 1; cursor: pointer; color: #333; z-index: 10; width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; box-shadow: 0 2px 10px rgba(0,0,0,0.1); }
#byob-modal-body { padding: 30px; }
.byob-popup-split { display: flex; gap: 30px; }
.byob-popup-img { flex: 0 0 40%; background: #fcfcfc; border-radius: 6px; display: flex; align-items: center; justify-content: center; }
.byob-popup-img img { width: 100%; height: auto; object-fit: contain; mix-blend-mode: multiply; }
.byob-popup-info { flex: 1; }
.byob-popup-info h3 { margin-top: 0; font-size: 24px; margin-bottom: 15px; }
.byob-popup-desc { font-size: 14px; line-height: 1.6; color: #555; margin-bottom: 25px; }
.byob-popup-section h5 { font-size: 13px; text-transform: uppercase; letter-spacing: 1px; color: #000; border-bottom: 2px solid #eee; padding-bottom: 8px; margin: 20px 0 15px 0; font-weight: 700; }
.byob-notes-visual-grid { display: flex; flex-wrap: wrap; gap: 20px; margin-bottom: 10px; }
.byob-note-visual-item { text-align: center; width: 70px; display: flex; flex-direction: column; align-items: center; }
.byob-note-visual-item img { width: 60px; height: 60px; object-fit: cover; border-radius: 50%; margin-bottom: 8px; border: 1px solid #f0f0f0; }
.byob-note-visual-item span { display: block; font-size: 11px; color: #444; line-height: 1.2; }
.byob-popup-attrs { background: #fdfdfd; padding: 0; }
.byob-attr-row { margin-bottom: 12px; font-size: 13px; line-height: 1.5; display: flex; flex-direction: column; }
.byob-attr-row strong { font-size: 11px; text-transform: uppercase; color: #888; margin-bottom: 2px; }

/* ==================================================
   4. LOYALTY (PREMIUM GOLD)
================================================== */
.byob-loyalty-dashboard-wrapper { max-width: 800px; margin: 0 auto 40px; }
.byob-loyalty-card-gold { background: linear-gradient(135deg, #FFFDF5 0%, #FFFFFF 100%); border: 1px solid var(--byob-accent, #D4AF37); border-radius: 12px; padding: 30px; box-shadow: 0 8px 25px rgba(212, 175, 55, 0.15); margin-bottom: 40px; position: relative; overflow: hidden; }
.byob-loyalty-card-gold::before { content: ''; position: absolute; top: -50px; right: -50px; width: 150px; height: 150px; background: radial-gradient(circle, rgba(212,175,55,0.2) 0%, rgba(255,255,255,0) 70%); z-index: 0; }
.byob-gold-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 25px; position: relative; z-index: 1; }
.byob-gold-title { display: flex; align-items: center; gap: 15px; }
.byob-gold-title .dashicons { font-size: 32px; width: 32px; height: 32px; color: var(--byob-accent, #D4AF37); }
.byob-gold-title h2 { margin: 0; font-size: 22px; color: #333; text-transform: uppercase; letter-spacing: 1px; }
.byob-gold-big-balance { font-size: 42px; font-weight: 800; color: var(--byob-accent, #D4AF37); line-height: 1; }
.byob-gold-big-balance span { font-size: 14px; font-weight: 600; color: #999; vertical-align: middle; }
.byob-gold-stats { display: flex; gap: 40px; margin-bottom: 30px; border-top: 1px solid #f0f0f0; padding-top: 20px; position: relative; z-index: 1;}
.byob-gold-stats .stat small { display: block; font-size: 11px; text-transform: uppercase; color: #999; letter-spacing: 0.5px; margin-bottom: 4px; }
.byob-gold-stats .stat strong { font-size: 18px; color: #333; }
.byob-gold-progress { position: relative; z-index: 1; }
.byob-gold-progress .bar-info { display: flex; justify-content: space-between; font-size: 12px; color: #666; margin-bottom: 8px; }
.byob-gold-progress .bar-track { height: 8px; background: #f0f0f0; border-radius: 4px; overflow: hidden; }
.byob-gold-progress .bar-fill { height: 100%; background: linear-gradient(90deg, var(--byob-accent, #D4AF37), #F2D06B); border-radius: 4px; transition: width 0.5s ease; }
.byob-history-title { font-size: 18px; margin-bottom: 15px; border-left: 4px solid var(--byob-accent, #D4AF37); padding-left: 15px; }
.byob-history-table { width: 100%; background: #fff; border-radius: 8px; border: 1px solid #eee; font-size: 14px; }
.byob-history-table th { background: #f9f9f9; padding: 12px 15px; text-align: left; font-weight: 600; color: #555; }
.byob-history-table td { padding: 12px 15px; border-top: 1px solid #eee; }
.pts-green { color: #2e7d32; font-weight: 600; }
.pts-red { color: #c62828; font-weight: 600; }

.byob-earning-msg { font-size: 14px; color: #2c7a2c; }
.byob-tooltip-container { position: relative; display: inline-block; cursor: pointer; }
.byob-tooltip-container .dashicons { font-size: 16px; color: #999; vertical-align: middle; }
.byob-tooltip-text { visibility: hidden; width: 200px; background-color: #333; color: #fff; text-align: center; border-radius: 4px; padding: 8px; position: absolute; z-index: 100; bottom: 125%; left: 50%; margin-left: -100px; opacity: 0; transition: opacity 0.3s; font-size: 12px; line-height: 1.4; box-shadow: 0 4px 10px rgba(0,0,0,0.2); }
.byob-tooltip-text::after { content: ""; position: absolute; top: 100%; left: 50%; margin-left: -5px; border-width: 5px; border-style: solid; border-color: #333 transparent transparent transparent; }
.byob-tooltip-container:hover .byob-tooltip-text { visibility: visible; opacity: 1; }

.byob-loyalty-checkout-box { background: #fff; border: 1px solid #e0e0e0; padding: 20px; border-radius: 6px; margin-top: 20px; display: flex; justify-content: space-between; align-items: center; box-shadow: 0 2px 8px rgba(0,0,0,0.03); }
.byob-loyalty-checkout-box.active { border-color: var(--byob-accent, #D4AF37); background: #fffdf5; }
.byob-loyalty-checkout-box .byob-header { font-weight: 700; color: #333; display: flex; align-items: center; gap: 8px; font-size: 15px; }
.byob-loyalty-checkout-box .byob-header .dashicons { color: var(--byob-accent, #D4AF37); }
.byob-loyalty-checkout-box .byob-body { flex: 1; margin: 0 20px; font-size: 13px; color: #666; }
.discount-applied { color: #2e7d32; font-weight: 700; }
.byob-redeem-locked { font-size: 14px; color: #444; margin: 10px 0; font-style: italic; }

/* ==================================================
   5. SAMPLE BOX & BOTTOM BAR
================================================== */
.byob-samples-container { background: #fff; border: 1px solid #d3ced2; padding: 20px; border-radius: 4px; margin-bottom: 30px; box-shadow: 0 1px 3px rgba(0,0,0,0.02); transition: opacity 0.2s; }
.byob-samples-container h3 { margin: 0 0 5px 0; font-size: 1.25em; font-weight: 700; }
.byob-samples-desc { font-size: 13px; color: #666; margin-bottom: 20px; }
.byob-select-group { margin-bottom: 15px; }
.byob-select-group label { display: block; font-size: 12px; font-weight: 700; margin-bottom: 5px; color: #444; text-transform: uppercase; letter-spacing: 0.5px; }
.byob-sample-select { width: 100%; padding: 10px; border: 1px solid #ccc; border-radius: 4px; height: 42px; font-size: 14px; background-color: #fff; }

#byob-fixed-bar { position: fixed; bottom: 0; left: 0; right:0; width: 100vw; background: #fff; border-top: 1px solid #e5e5e5; padding: 12px 0; z-index: 999; box-shadow: 0 -2px 10px rgba(0,0,0,0.05); }
.byob-bar-inner { display: flex; justify-content: space-between; align-items: center; max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.byob-slots-container { display: flex; gap: 12px; }
.byob-slot { width: 50px; height: 50px; border-radius: 50%; background: #f5f5f5; border: 1px solid #ddd; overflow: hidden; position: relative; display: flex; align-items: center; justify-content: center; }
.byob-slot.filled { cursor: pointer; border-color: var(--byob-primary, #000); }
.byob-slot img { width: 100%; height: 100%; object-fit: cover; }
.byob-bar-actions { display: flex; align-items: center; gap: 20px; }


/* ==================================================
   6. RESPONSIVE
================================================== */
@media (max-width: 992px) { .byob-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 768px) {
    .byob-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .byob-item { padding: 10px; }
    #byob-cart { width: 100%; right: -100%; }
    #byob-cart.open { right: 0; }
    #byob-cart-fab { right: 16px; bottom: 130px; }
    .byob-popup-split { flex-direction: column; gap: 15px; }
    .byob-popup-img { display: none; }
    #byob-modal-body { padding: 25px 20px; }
    #byob-fixed-bar { padding: 10px 0; margin:0; }
    .byob-bar-inner { flex-direction: column; gap: 12px; }
    .byob-slot { width: 40px; height: 40px; }
    .byob-bar-actions { width: 100%; justify-content: space-between; }
    .byob-loyalty-card-gold { flex-direction: column; text-align: center; padding: 20px; }
    .byob-gold-stats { flex-direction: column; gap: 15px; }
    .byob-loyalty-checkout-box { flex-direction: column; align-items: flex-start; gap: 15px; }
    .byob-loyalty-checkout-box .byob-body { margin: 0; }
    .byob-loyalty-checkout-box button { width: 100%; }
}

/* TOAST NOTIFICATION */
.byob-toast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: #333;
    color: #fff;
    padding: 12px 24px;
    border-radius: 50px;
    font-size: 14px;
    z-index: 999999;
    opacity: 0;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}
.byob-toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}
.byob-toast.byob-error {
    background: #d32f2f;
}
.byob-toast.byob-success {
    background: #2e7d32;
}