
/* STRICT COPY FROM SHOP_FIXED.PHP */
@keyframes pulse {
    0% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(1.05); }
    100% { opacity: 1; transform: scale(1); }
}
html { background:#ffffff !important; background-color:#ffffff !important; }
body { margin:0 !important; padding:0 !important; font-family: Arial,sans-serif; background:#ffffff !important; background-color:#ffffff !important; }
.main-content { background:#ffffff !important; background-color:#ffffff !important; margin:0 !important; padding:0 !important; }
* { box-sizing: border-box; }

/* ===== Main content full width ===== */
.main-content {
    padding: 0 !important;
    padding-top: 0 !important;
    margin: 0 !important;
    margin-top: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    background: #ffffff !important;
}

main, .content { margin-top: 0; padding-top: 0; }
body { margin: 0; padding: 0; }
main { padding-top: 0; margin: 0; }

/* ===== Auction Container (matches Sales Container) ===== */
.auction-container {
    max-width: 100%;
    margin: 0 !important;
    padding: 0 !important;
    width: 100%;
    background: #ffffff !important;
}
.page {
    margin: 0 !important;
    padding: 0 !important;
    background: #ffffff !important;
}

/* ===== Auction Row (eBay-style: 4 visible columns, horizontal scroll for more) ===== */
/* ===== Auction Row (Shop Fixed Style Matches) ===== */
.auction-row-wrapper { 
  position:relative; 
  margin-bottom:20px; 
  overflow: visible; 
  display: flex;
  justify-content: center;
  width: 100%;
  max-width: 100%; /* Ensure it fits in parent column */
}
/* ===== Row Arrows (Capsule Style COPIED EXACTLY FROM SHOP_FIXED.PHP) ===== */
.row-arrow {
    position: absolute !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    width: 10px !important; /* Increased from 6px for better visibility */
    height: 50px !important; /* Increased from 40px for better visibility */
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: linear-gradient(135deg, rgba(255,255,255,0.95), rgba(240,240,240,0.9)) !important;
    color: #000 !important;
    font-size: 10px !important; /* Increased from 8px */
    font-weight: bold !important;
    cursor: pointer !important;
    z-index: 100 !important;
    opacity: 0 !important;
    transition: opacity 0.3s ease, all 0.3s ease !important;
    border: none !important;
    border-radius: 4px !important; /* Slightly increased from 3px */
    box-shadow: 0 2px 6px rgba(0,0,0,0.25) !important;
    padding: 0 !important;
}
.auction-row-wrapper:hover .row-arrow { opacity: 1 !important; }
.row-arrow:hover { background: linear-gradient(135deg, rgba(0,123,255,0.9), rgba(0,86,179,0.85)) !important; color: #fff !important; }

/* ARROW POSITIONING */
.row-arrow.left { left: 0 !important; }
.row-arrow.right { right: 0 !important; }

/* Mobile Hiding */
@media(max-width:768px){ .row-arrow { display:none !important; } }
.auction-row {
  display: flex !important; 
  gap: 15px !important; 
  overflow-x: auto !important; 
  overflow-y: hidden !important;
  scroll-behavior: smooth !important;
  -webkit-overflow-scrolling: touch !important;
  scroll-snap-type: x mandatory; 
  width: 100%;
  max-width: 1400px; /* MATCH SHOP FIXED */
  margin: 0 auto;
  padding: 0 10px; /* MATCH SHOP FIXED */
  box-sizing: border-box !important;
  flex-wrap: nowrap !important;
}
/* Hide scrollbar completely - only arrows visible for scrolling */
.auction-row::-webkit-scrollbar { 
    height: 0 !important; 
    width: 0 !important; 
    background: transparent !important; 
    display: none !important;
}
.auction-row { 
    scrollbar-width: none !important; /* Firefox */
    -ms-overflow-style: none !important; /* IE/Edge */
}

.auction-item {
    /* (100% - 3 gaps of 15px) / 4 items */
    flex: 0 0 calc((100% - 45px) / 4) !important; 
    width: calc((100% - 45px) / 4) !important; 
    max-width: calc((100% - 45px) / 4) !important;
    scroll-snap-align: start; /* Snap items to the start of the container */ 
    height: 100%; 
    min-height: auto; 
    background: #ffffff !important;
    border: 1px solid #d1d5db !important; /* Slightly stronger hair-thin border */
    border-radius: 8px; /* Slightly sharper like bids.com */
    box-shadow: 0 2px 4px rgba(0,0,0,0.05); /* Slight lift */
    padding: 8px;
    text-align: center;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
    box-sizing: border-box;
    z-index: 1;
}
.auction-item:hover {
    transform: scale(1.05) translateY(-5px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    border-color: #3b82f6;
    z-index: 10;
}

/* PLATINUM PAGINATION (Floating Island) */
.pagination-island {
    display: flex; justify-content: center; align-items: center; 
    gap: 10px; margin: 60px auto 30px;
    background: rgba(255,255,255,0.95); padding: 12px 24px; border-radius: 50px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.08); width: fit-content;
    border: 1px solid rgba(0,0,0,0.03);
    backdrop-filter: blur(10px);
}

.page-btn {
    min-width: 42px; height: 42px; border-radius: 50%; border: none;
    background: transparent; color: #64748b; font-weight: 700; font-size: 14px;
    cursor: pointer; transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1); 
    display: flex; align-items: center; justify-content: center;
}

.page-btn.active {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
    box-shadow: 0 6px 15px rgba(59, 130, 246, 0.3);
    transform: scale(1.1);
}

.page-btn:hover:not(.active) {
    background: #f1f5f9;
    color: #3b82f6;
    transform: translateY(-2px);
}

.pagination-island .page-jump {
    display: flex; align-items: center; gap: 8px; 
    margin-left: 15px; border-left: 2px solid #f1f5f9; padding-left: 15px;
}
.pagination-island .page-jump input {
    width: 55px; height: 32px; padding: 0 8px; 
    border: 1px solid #e2e8f0; border-radius: 8px; 
    text-align: center; font-size: 13px; font-weight: 600;
    outline: none; transition: 0.2s;
}
.pagination-island .page-jump input:focus { border-color: #3b82f6; box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1); }
.pagination-island .page-jump button {
    background: #334155; color: white; border: none; 
    padding: 0 14px; height: 32px; border-radius: 8px; 
    cursor: pointer; font-size: 12px; font-weight: 700; transition: 0.2s;
}
.pagination-island .page-jump button:hover { background: #1e293b; transform: translateY(-1px); }
.auction-item .wishlist-btn {
    position: absolute;
    top: 12px; /* Not touching top edge */
    right: 12px; /* Not touching right edge */
    background: transparent; /* No circle background */
    border: none; /* No circle border */
    border-radius: 0; /* No circle */
    width: auto; /* No fixed width */
    height: auto; /* No fixed height */
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: color 0.3s ease;
    z-index: 10;
    box-shadow: none; /* No shadow */
    font-size: 20px;
    color: #333; /* Default color */
    padding: 6px; /* Increased for better clickable area and spacing */
}
.auction-item .wishlist-btn:hover {
    background: transparent; /* Keep transparent */
    color: #dc3545; /* Heart turns red on hover */
    transform: none; /* No scale */
}
.auction-item .wishlist-btn.in-wishlist {
    background: transparent; /* No circle */
    color: #dc3545; /* Red when in wishlist */
}
.auction-item .wishlist-btn.in-wishlist i {
    animation: heartBeat 0.3s ease;
}
@keyframes heartBeat {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.3); }
}
.auction-item img.auction-card-photo { width:100%; height:135px; object-fit:cover; border-radius:8px; margin-bottom:5px; flex-shrink: 0; }
.auction-item a { min-width: 0; max-width: 100%; }
.auction-item h3 { font-size:0.86em; color:#004080; margin:0 0 4px; font-weight:600; line-height:1.2; min-width:0; max-width:100%; overflow:hidden; overflow-wrap:anywhere; word-break:break-word; white-space:normal; text-overflow:ellipsis; display:-webkit-box; -webkit-line-clamp:3; line-clamp:3; -webkit-box-orient:vertical; }

/* ===== Badges (Condition, Verified, Shipping) ===== */
.auction-badges { 
    display:flex; 
    flex-wrap:nowrap; /* Force badges to stay on ONE line */
    gap:3px; /* Reduced gap to fit better */
    margin-bottom:4px; 
    justify-content:center;
    overflow:hidden; /* Hide overflow if too long */
}
.auction-badge { 
    font-size:7.5px; /* Slightly smaller to fit better */
    padding:2px 4px; /* Slightly smaller padding */
    border-radius:3px; 
    font-weight:600; 
    text-transform:uppercase;
    white-space:nowrap; /* Prevent text wrapping */
    flex-shrink:1; /* Allow badges to shrink if needed */
}
.badge-condition { background:#e8f5e9; color:#2e7d32; }
.badge-verified { background:#fff3e0; color:#e65100; }
.badge-shipping { background:#e3f2fd; color:#1565c0; }
.badge-watchers { background:#f3e5f5; color:#7b1fa2; }

/* ===== Current Bid Display ===== */
.auction-price { margin:3px 0; }
.current-bid { font-size:1.1em; font-weight:700; color:#dc3545; margin-bottom:1px; }
.bid-count { font-size:0.7em; color:#666; }

/* ===== Enhanced Timer ===== */
.auction-item .timer { 
    font-size:0.75em; 
    color:#dc3545; 
    font-weight:700; 
    margin-bottom:5px;
    display:inline-block;
}
.auction-item .timer.ending-soon { 
    color:#721c24;
}
.auction-item .timer.ended,
.auction-item .auction-timer-ended {
    color: #64748b !important;
    opacity: 1 !important;
    font-weight: 700 !important;
    letter-spacing: 0.02em;
}
.auction-item .auction-ended-panel {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 10px;
    width: 100%;
}
.auction-item .auction-status-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    flex-wrap: wrap;
}
.auction-item .auction-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    line-height: 1.2;
}
.auction-item .auction-pill-sold {
    background: linear-gradient(135deg, #059669, #047857);
    color: #fff;
    box-shadow: 0 2px 8px rgba(5, 150, 105, 0.28);
}
.auction-item .auction-pill-ended {
    background: linear-gradient(135deg, #64748b, #475569);
    color: #fff;
}
.auction-item .auction-pill-completed {
    background: #ecfdf5;
    color: #047857;
    border: 1px solid #a7f3d0;
}
.auction-item .auction-winner-card {
    background: linear-gradient(135deg, #fffbeb, #fef3c7);
    border: 1px solid #fcd34d;
    padding: 7px 10px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
    box-shadow: 0 1px 2px rgba(251, 191, 36, 0.15);
}
.auction-item .auction-winner-card.is-unsold {
    background: linear-gradient(135deg, #f8fafc, #f1f5f9);
    border-color: #e2e8f0;
    box-shadow: none;
}
.auction-item .auction-view-results-btn {
    width: 100%;
    background: linear-gradient(135deg, #0ea5e9, #2563eb);
    color: #fff;
    border: none;
    padding: 8px;
    border-radius: 6px;
    font-weight: 700;
    cursor: pointer;
    transition: 0.2s;
    margin-bottom: 4px;
}
.auction-item .auction-view-results-btn:hover {
    filter: brightness(1.05);
}

/* ===== Modern Small Buttons ===== */
.auction-actions { 
    display:flex; 
    gap:4px; 
    margin:auto 0 6px; 
    justify-content:center; 
}
/* Single button (only Bid) - same size as individual button in two-button layout, centered */
.auction-actions.single-button {
    justify-content: center;
}
.auction-actions.single-button .bid-btn {
    flex: 0 0 calc(50% - 2px); /* Same width as individual button (50% minus half gap) */
    max-width: calc(50% - 2px); /* Match the width of one button when there are two */
    margin: 0 auto; /* Center it */
}
.auction-item .bid-btn, .auction-item .buy-now-btn { 
    flex:1;
    background:linear-gradient(135deg, #007bff, #0056b3); 
    color:#fff; 
    border:none; 
    border-radius:6px; 
    padding:5px 7px; /* Slightly smaller padding */
    cursor:pointer; 
    font-weight:600; 
    font-size:0.8em; /* Slightly smaller font */
    transition:all 0.2s ease;
    box-shadow:0 2px 4px rgba(0,123,255,0.2);
    display:flex;
    align-items:center;
    justify-content:center;
    gap:3px; /* Slightly smaller gap */
}
.auction-item .bid-btn:hover { 
    background:linear-gradient(135deg, #0056b3, #004085);
    transform:translateY(-1px);
    box-shadow:0 3px 6px rgba(0,123,255,0.3);
}
.auction-item .buy-now-btn {
    background:linear-gradient(135deg, #28a745, #20893a);
    box-shadow:0 2px 4px rgba(40,167,69,0.2);
}
.auction-item .buy-now-btn:hover {
    background:linear-gradient(135deg, #20893a, #1e7e34);
    transform:translateY(-1px);
    box-shadow:0 3px 6px rgba(40,167,69,0.3);
}
.auction-item .bid-btn i, .auction-item .buy-now-btn i {
    font-size:0.9em;
}

/* ===== Watchers & Seller Info ===== */
.auction-item .winning { font-size:0.72em; color:#555; display:flex; align-items:center; justify-content:center; gap:3px; margin-bottom:3px; }
.auction-item .winning img { width:14px; height:14px; border-radius:50%; object-fit:cover; }
.auction-item .watchers-count { font-size:0.68em; color:#888; margin-bottom:3px; display:flex; align-items:center; justify-content:center; gap:3px; }
.auction-item .retail, .auction-item .vendor { font-size:0.68em; color:#777; margin-bottom:2px; }
.auction-item .vendor img.flag { width:12px; height:9px; border-radius:2px; object-fit:cover; margin-left:3px; }
.auction-item .card-meta-avatar,
.auction-item .card-meta-avatar img,
.auction-item img.leading-bidder-photo,
.auction-item img.winning-user-photo {
    width: 14px !important;
    height: 14px !important;
    min-width: 14px !important;
    min-height: 14px !important;
    max-width: 14px !important;
    max-height: 14px !important;
    margin: 0 !important;
    padding: 0 !important;
    border-radius: 50% !important;
    object-fit: cover !important;
    display: inline-block !important;
    flex: 0 0 14px !important;
    box-sizing: border-box !important;
}
.auction-item img.leading-bidder-flag,
.auction-item img.winning-flag,
.auction-item img.vendor-country-flag,
.auction-item .vendor img.flag {
    width: 12px !important;
    height: 9px !important;
    min-width: 12px !important;
    min-height: 9px !important;
    max-width: 12px !important;
    max-height: 9px !important;
    margin-bottom: 0 !important;
    border-radius: 2px !important;
    object-fit: cover !important;
    display: inline-block !important;
    flex: 0 0 12px !important;
    box-sizing: border-box !important;
}

/* ===== Row Arrows (Capsule Style - Same as Fundraising/Sales/Gallery) ===== */
.row-arrow {
    position: absolute !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    width: 6px !important;
    height: 40px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: linear-gradient(135deg, rgba(255,255,255,0.95), rgba(240,240,240,0.9)) !important;
    color: #000 !important;
    font-size: 8px !important;
    font-weight: bold !important;
    cursor: pointer !important;
    z-index: 100 !important;
    opacity: 0 !important;
    transition: opacity 0.3s ease, all 0.3s ease !important;
    border: none !important;
    border-radius: 3px !important; /* Capsule style */
    box-shadow: 0 2px 6px rgba(0,0,0,0.25) !important;
    backdrop-filter: blur(10px) !important;
    line-height: 1 !important;
    text-align: center !important;
    padding: 0 !important;
    margin: 0 !important;
}
.auction-row-wrapper:hover .row-arrow {
    opacity: 1 !important;
}
/* Wrapper controls the max-width and gutters for arrows */
.auction-row-wrapper { 
  position:relative; 
  overflow: visible; 
  display: flex;
  justify-content: center;
  width: 100%;
  max-width: 1400px; /* Constrain the entire block */
  margin: 0 auto 20px auto; /* 20px bottom spacing between rows */
  padding: 0 40px; /* Reserve 40px space on each side for arrows */
}

/* Arrows sit inside the wrapper padding */
.row-arrow.left { 
    left: 5px !important; /* Inside the 40px padding */
}
.row-arrow.right { 
    right: 5px !important; /* Inside the 40px padding */
}

/* Fallback for mobile */
@media (max-width: 768px) {
    .auction-row-wrapper { padding: 0 !important; }
    .auction-row { padding: 0 10px !important; }
    .row-arrow { display: none !important; }
}

.auction-row {
  display: flex !important; 
  gap: 15px !important; 
  overflow-x: auto !important; 
  overflow-y: hidden !important;
  scroll-behavior: smooth !important;
  -webkit-overflow-scrolling: touch !important;
  scroll-snap-type: x mandatory; 
  width: 100%; /* Fill the space inside the wrapper (1400 - 80 = 1320px) */
  max-width: 100%; 
  margin: 0;
  padding: 0 5px; /* Minimal internal padding */
  box-sizing: border-box !important;
  flex-wrap: nowrap !important;
}

/* ===== Pagination ===== */
/* Pagination (Modern Minimal - Google/Amazon Style) */
.pagination{display:flex;flex-wrap:wrap;justify-content:center;align-items:center;margin:25px 0;gap:4px;}
.pagination a,.pagination button,.pagination span{margin:0;padding:6px 10px;min-width:32px;height:32px;display:inline-flex;align-items:center;justify-content:center;background:transparent;color:#111;cursor:pointer;border:none;border-radius:4px;font-size:14px;font-weight:400;transition:all 0.2s ease;text-decoration:none;}
.pagination a:hover,.pagination button:hover{background:#f0f0f0;color:#007bff;}
.pagination a.active,.pagination button.active{background:#007bff;color:#fff;font-weight:500;}
.pagination .page-arrow{color:#666;font-size:18px;padding:6px 8px;}
.pagination .page-arrow:hover{color:#007bff;background:#f5f5f5;}
.pagination .page-arrow.disabled{opacity:0.3;cursor:not-allowed;pointer-events:none;}
.pagination .ellipsis{cursor:default;pointer-events:none;color:#999;}
.pagination .page-jump{display:flex;align-items:center;gap:4px;margin-left:8px;padding:4px 8px;background:#f8f8f8;border-radius:6px;}
.pagination .page-jump input{width:50px;padding:4px 6px;border:1px solid #ddd;border-radius:4px;text-align:center;font-size:13px;outline:none;}
.pagination .page-jump input:focus{border-color:#007bff;}
.pagination .page-jump button{padding:4px 10px;background:#007bff;color:#fff;font-size:12px;min-width:auto;height:28px;}
.pagination .page-jump button:hover{background:#0056b3;}

/* Responsive (eBay-style: 4→3→2 visible columns, still scrollable) */
@media(max-width:1024px){ 
    .auction-item {
        /* On Tablet/Small Desktop, keep 4 items but shrink */
        /* If we want 3 items: flex: 0 0 calc(33.333% - 13.33px) !important; */
        /* But user requested 4 shrank to fit, so we rely on main CSS or ensure it here */
        /* Let's strictly enforce 4 here too as per "desktop" request likely including 1024px */
        flex: 0 0 calc(25% - 15px) !important;
        width: calc(25% - 15px) !important;
        max-width: calc(25% - 15px) !important;
    }
    .auction-item img.auction-card-photo{height:130px;} 
}
@media(max-width:768px){ 
    .auction-item {
        /* Mobile: 2 items per row with 10px gap */
        /* (100% - 10px) / 2 */
        flex: 0 0 calc((100% - 10px) / 2) !important;
        width: calc((100% - 10px) / 2) !important;
        max-width: calc((100% - 10px) / 2) !important;
    }
    .auction-item img.auction-card-photo{height:110px;} 
    /* Hide arrows on mobile, rely on swipe */
    .row-arrow { display: none !important; } 
    .auction-row { gap: 10px !important; } /* Match calc logic */
    .auction-row-wrapper { gap: 0; display: block; } 
}


/* ===== Auction Container (matches Sales Container) ===== */
.auction-container {
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
    background: #ffffff !important;
}
.page {
    margin: 0 !important;
    padding: 0 !important;
    background: #ffffff !important;
}
/* Make sure content starts right below the fixed header */
.page-container {
  margin: 0;
  padding: 0;
  width: 100%;
  max-width: 100%;
}

/* Ensure no gap between header and content */
body {
  margin: 0;
  padding: 0;
}

header {
  margin: 0 !important;
  padding: 0 !important;
  display: block;
}

/* No padding-top needed - header is in normal flow */
.main-content {
  margin: 0 !important;
  margin-top: 0 !important;
  padding: 0 !important;
  padding-top: 0 !important;
  width: 100%;
  max-width: 100%;
}
/* Optional styling for the filter button */
#filterBtn {
  padding: 6px 12px;
  border-radius: 6px;
  background: #004080;
  color: #fff;
  border: none;
  cursor: pointer;
  margin: 0 0 10px 0;
}

