/* BB Photo Store — Frontend Styles */

.bb-photo-store { position: relative; }

/* ── Filter Bar ─────────────────────────────────────────────────────────── */
.bb-filter-bar { margin-bottom: 20px; }
.bb-filter-row {
    display: flex; gap: 10px; flex-wrap: wrap; align-items: center;
    padding: 12px 16px; background: #f9f9f9;
    border: 1px solid #e0e0e0; border-radius: 8px;
}

.bb-filter-fields-wrap{
display: flex;    
width: 100%;
gap: 12px;
flex-direction: column;
}

.bb-search, .bb-filter-event-type, .bb-filter-date-from, .bb-filter-date-to {
    padding: 8px 12px; border: 1px solid #ccc; border-radius: 6px;
    font-size: 14px; height: 45px;
}
.bb-search { flex: 1; min-width: 180px; }
.bb-btn-select-mode {
    margin-left: auto; padding: 8px 14px; background: #fff;
    border: 1px solid #ccc; border-radius: 6px; cursor: pointer;
    font-size: 13px; white-space: nowrap;
}
.bb-btn-select-mode:hover { border-color: #2271b1; color: #2271b1; }
.bb-results-meta { font-size: 13px; color: #888; margin-top: 8px; }

/* ── Photo Grid ──────────────────────────────────────────────────────────── */
.bb-photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 10px;
}

@media (max-width: 600px) {
    .bb-photo-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
}

.bb-photo-card {
    position: relative; 
    overflow: hidden;
    background: #fff; cursor: pointer;
    box-shadow: 0 1px 4px rgba(0,0,0,.1);
    transition: transform .2s, box-shadow .2s;
}
.bb-photo-card:hover { box-shadow: 0 6px 20px rgba(0,0,0,.15); }


.bb-photo-card.selected { outline: 3px solid #2271b1; }

.bb-card-img-wrap { position: relative;  overflow: hidden; background: #f0f0f0; }
.bb-card-img-wrap img { width: 100%; height: 100%; object-fit: cover; display: block; user-select: none; pointer-events: none; transition: all .2s; }
.bb-photo-placeholder { width: 100%; height: 100%; background: linear-gradient(135deg, #e8e8e8 25%, #f4f4f4 50%, #e8e8e8 75%); }


.bb-photo-card:hover > .bb-card-img-wrap img{
transform: scale(1.1);
}

.bb-card-overlay {
    position: absolute; inset: 0;
    background: rgba(0,0,0,.5);
    display: flex; flex-direction: column;
    align-items: center; justify-content: center; gap: 8px;
    opacity: 0; transition: opacity .2s;
}
.bb-photo-card:hover .bb-card-overlay { opacity: 1; }

.bb-btn-view, .bb-btn-add-cart {
    padding: 7px 16px; border-radius: 5px; border: none;
    cursor: pointer; font-size: 13px; font-weight: 500;
    transition: background .15s;
}
.bb-btn-view { background: rgba(255,255,255,.9); color: #333; }
.bb-btn-view:hover { background: #171717; }
.bb-btn-add-cart { background: #ee1023; color: #fff; }
.bb-btn-add-cart:hover { background: #171717; }
.bb-btn-add-cart:disabled { background: #4caf50; cursor: default; }

.bb-card-check { position: absolute; top: 8px; left: 8px; }
.bb-card-check input[type=checkbox] { width: 18px; height: 18px; cursor: pointer; accent-color: #2271b1; }

.bb-card-body { padding: 10px; }
.bb-card-title { font-size: 13px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bb-card-price { font-size: 14px; font-weight: 700; color: #2271b1; margin-top: 4px; }

.bb-no-photos { grid-column: 1 / -1; text-align: center; padding: 60px 20px; color: #aaa; }
.bb-error { color: #c62828; }

/* ── Loading ─────────────────────────────────────────────────────────────── */
.bb-loading-overlay {
    position: absolute; inset: 0; background: rgba(255,255,255,.8);
    display: flex; align-items: center; justify-content: center;
    opacity: 0; pointer-events: none; transition: opacity .2s;
    z-index: 10; border-radius: 8px; min-height: 200px;
}
.bb-loading-overlay.visible { opacity: 1; pointer-events: all; }
.bb-spinner {
    width: 40px; height: 40px; border: 3px solid #e0e0e0;
    border-top-color: #2271b1; border-radius: 50%;
    animation: bb-spin .7s linear infinite;
}
@keyframes bb-spin { to { transform: rotate(360deg); } }

/* ── Load More ───────────────────────────────────────────────────────────── */
.bb-load-more-wrap { text-align: center; margin: 28px 0; }
.bb-btn-secondary {
padding: 10px 28px;
  border: 2px solid #ee1013;
  border-radius: 6px;
  background: #fff;
  color: #ee1013;
  cursor: pointer;
  font-size: 15px;
  transition: all .15s;
  margin-top: 30px;
}
.bb-btn-secondary:hover { background: #171717; color: #fff; }

/* ── Selection Bar ───────────────────────────────────────────────────────── */
.bb-selection-bar {
    position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%);
    background: #1a202c; color: #fff; border-radius: 40px;
    padding: 12px 24px; display: flex; align-items: center; gap: 16px;
    box-shadow: 0 8px 32px rgba(0,0,0,.3); z-index: 9999;
    font-size: 14px;
}
.bb-btn-primary {
    padding: 8px 20px; background: #ee1013; color: #fff;
    border: none; border-radius: 20px; cursor: pointer; font-size: 14px;
}
.bb-btn-primary:hover { background: #171717; }
.bb-cancel-selection {
    background: none; border: 1px solid rgba(255,255,255,.4); color: #fff;
    border-radius: 20px; padding: 6px 16px; cursor: pointer; font-size: 13px;
}

/* ── Toast ───────────────────────────────────────────────────────────────── */
.bb-toast {
    position: fixed; bottom: 24px; right: 24px; z-index: 99999;
    background: #1a202c; color: #fff; border-radius: 8px;
    padding: 12px 20px; font-size: 14px;
    box-shadow: 0 4px 20px rgba(0,0,0,.25);
    transform: translateY(20px); opacity: 0;
    transition: all .3s;
}
.bb-toast.visible { transform: translateY(0); opacity: 1; }
.bb-toast a { color: #90cdf4; }

/* ── Lightbox ────────────────────────────────────────────────────────────── */
.bb-lightbox { position: fixed; inset: 0; z-index: 100000; }
body.bb-lightbox-open { overflow: hidden; }
.bb-lightbox-overlay { position: absolute; inset: 0; background: rgba(0,0,0,.92); }
.bb-lightbox-content {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%);
    display: flex; gap: 0; max-width: 95vw; max-height: 92vh;
    border-radius: 10px; overflow: hidden; box-shadow: 0 30px 80px rgba(0,0,0,.5);
    width: 80%;
}
.bb-lightbox-img-wrap {
    flex: 1; background: #111; display: flex; align-items: center; justify-content: center;
    min-width: 300px; max-width: 75vw; max-height: 92vh; position: relative; overflow: hidden;
}
.bb-lightbox-img { max-width: 100%; max-height: 92vh; object-fit: contain; display: block; user-select: none; pointer-events: none; }
.bb-lightbox-sidebar {
    width: 360px; background: #fff; padding: 60px 30px; display: flex; flex-direction: column;
    flex-shrink: 0;
    font-family: inter;
}
.bb-lightbox-title {
font-size: 24px;
font-weight: 700;
margin: 0 0 17px;
text-transform: none;
color: #505050;
line-height: 1.3;
font-family: inter;
border-bottom: #eaeaea thin solid;
padding-bottom: 17px;
}

.bb-lightbox-photonumber, .bb-lightbox-event{ font-size: 13px; color: #666; margin: 0 0 4px !important; display:flex; }
.bb-lightbox-location, .bb-lightbox-tags { font-size: 13px; color: #666; margin: 0 0 4px !important; text-transform:capitalize; display:flex;}
.bb-lightbox-date  { font-size: 13px; color: #666; margin: 0 0 16px;display:flex; }
.bb-lightbox-price { font-size: 24px; font-weight: 700; color: #505050; margin-top: 20px; margin-bottom: 20px; }
.bb-lightbox-add-cart { width: 100%; padding: 12px; font-size: 16px; font-weight:700; text-transform: none; }
.bb-lightbox-close {
    position: absolute; top: 12px; right: 12px; z-index: 1;
    background: rgba(0,0,0,.6); color: #fff; border: none; border-radius: 50%;
    width: 36px; height: 40px; cursor: pointer; font-size: 16px;
    display: flex; align-items: center; justify-content: center;
}

.bb-lightbox-photonumber span:first-child,
.bb-lightbox-event span:first-child,
.bb-lightbox-location span:first-child,
.bb-lightbox-date span:first-child,
.bb-lightbox-tags span:first-child{
font-weight: 500;
margin-right: 10px;
min-width: 70px;
}



.bb-lightbox-prev, .bb-lightbox-next {
position: absolute;
top: 50%;
transform: translateY(-50%);
background: rgba(0,0,0,.5);
color: #fff;
border: none;
font-size: 16px;
padding: 12px 15px;
cursor: pointer;
border-radius: 25px;
z-index: 1;
}
.bb-lightbox-prev { left: 8px; }
.bb-lightbox-next { right: 8px; }
.bb-lightbox-prev:hover, .bb-lightbox-next:hover { background: rgba(0,0,0,.8); }

@media (max-width: 680px) {
    .bb-lightbox-content { flex-direction: column; }
    .bb-lightbox-sidebar { width: 100%; max-height: 200px; overflow-y: auto; }
}

/* ── Account Downloads ───────────────────────────────────────────────────── */
.bb-account-downloads { max-width: 900px; }
.bb-no-downloads { text-align: center; padding: 60px 20px; color: #888; }
.bb-downloads-intro { color: #666; margin-bottom: 24px; }

.bb-order-group { margin-bottom: 32px; }
.bb-order-group-header {
    display: flex; align-items: center; gap: 12px;
    padding-bottom: 12px; border-bottom: 1px solid #eee; margin-bottom: 20px;
    justify-content: space-between;
}

.bb-order-number { color: #505050; font-weight: 500; }
.bb-order-date { color: #505050; font-size: 13px; }

.bb-download-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px;
}
.bb-download-card {
    background: #fff; border: 1px solid #e0e0e0; border-radius: 8px;
    overflow: hidden; transition: box-shadow .2s;
}
.bb-download-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,.1); }
.bb-download-unavailable { opacity: .6; }

.bb-download-thumb { aspect-ratio: 3/2; overflow: hidden; background: #f5f5f5; }
.bb-download-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

.bb-download-info { 
padding: 15px;
height: 170px;
position: relative;
}

.bb-download-title { 
font-size: 15px;
font-weight: 500;
display: block;
margin-bottom: 12px;
color: #505050;
line-height: 1.5;
display: -webkit-box;
-webkit-line-clamp: 1;
-moz-box-orient: vertical;
overflow: hidden;
text-overflow: ellipsis;
}


.bb-download-meta { 
display: flex;
flex-direction: column;
gap: 3px;
margin-bottom: 5px;
font-size: 13px;
color: #505050;
}

.bb-download-meta .bb-dl-count,
.bb-download-meta .bb-dl-expiry{
display: flex;    
justify-content: space-between;
}


.bb-dl-count span:last-child{ color: #289424; }
.bb-dl-expiry span:last-child{ color: #289424; }

.bb-download-unavailable .bb-dl-count span:last-child{ color: #c62828; }
.bb-download-unavailable .bb-dl-expiry span:last-child{ color: #c62828; }

.bb-download-unavailable .bb-download-info{
height: 150px;    
}

.bb-dl-count.exhausted span:last-child{ color: #c62828; }
.bb-dl-expiry.expired  span:last-child{ color: #c62828; }

.bb-download-btn { 
font-size: 14px !important;
position: absolute !important;
bottom: 20px;
left: 15px;
}

.bb-download-exhausted, .bb-download-expired { font-size: 13px; display:flex; color: #505050; justify-content:space-between; }

.bb-download-exhausted span:last-child{ color: #c62828; }
.bb-download-expired  span:last-child{ color: #c62828; }


.bb-filter-row-first,
.bb-filter-row-second{
display: flex;
justify-content: space-between;    
align-items: center;
gap: 15px;
}

.bb-filter-event{
max-width: 50%;    
}

.bb-reset-filters{
margin-top: 10px;
margin-bottom: 10px;
width: 140px;
background: #ee1023;
color: #FFF;
border-radius: 4px;
font-size: 17px;
font-weight: 500;    
}

.bb-reset-filters:hover{
background: #171717;    
border-color: #171717;
}