
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;
}

/* ===== Sales Container (full width) ===== */
.sales-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;
}

/* ===== Sales Row (Amazon-style: 4 visible columns, horizontal scroll for more) ===== */
.sales-row-wrapper { 
    position: relative; 
    margin-bottom: 20px; 
    overflow: visible; 
    display: flex;
    justify-content: center;
    width: 100%;
}
.sales-row { 
    display: flex !important; /* Flex for horizontal scrolling */
    gap: 20px !important; /* Increased gap for better spacing */
    overflow-x: auto !important; /* Enable horizontal scrolling */
    overflow-y: hidden !important;
    scroll-behavior: smooth !important;
    -webkit-overflow-scrolling: touch !important;
    width: 100%;
    max-width: 1200px; /* Center and constrain width */
    margin: 0 auto; /* Center the row */
    padding: 0 20px; /* Side padding */
    box-sizing: border-box !important;
    flex-wrap: nowrap !important; /* Prevent wrapping - keep horizontal scroll */
}
/* Hide scrollbar completely - only arrows visible for scrolling */
.sales-row::-webkit-scrollbar { 
    height: 0 !important; 
    width: 0 !important; 
    background: transparent !important; 
    display: none !important;
}
.sales-row { 
    scrollbar-width: none !important; /* Firefox */
    -ms-overflow-style: none !important; /* IE/Edge */
}
.sales-item {
    flex: 0 0 280px !important; /* Fixed width: Amazon-style 4 visible columns (280px  4 = 1120px + gaps) */
    width: 280px !important; /* Uniform width for consistent cards */
    height: auto; /* Auto height for flexible content */
    min-height: 320px; /* Optimized compact height - modern look */
    display:flex;
    flex-direction: column;
    background:#ffffff !important;
    border:1px solid #e0e0e0 !important;
    border-radius:10px;
    box-shadow:0 4px 15px rgba(0,0,0,0.1);
    padding:10px;
    text-align:center;
    cursor:pointer;
    transition:transform 0.3s;
    position: relative; /* For absolute positioning of wish button */
}
.sales-item img { width:100%; height:140px; object-fit:cover; border-radius:8px; margin-bottom:6px; flex-shrink: 0; }
.sales-item h3 { font-size:0.88em; color:#004080; margin-bottom:5px; font-weight:600; line-height:1.25; overflow:hidden; text-overflow:ellipsis; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; }

/* ===== Badges (Discount, Condition, Shipping) ===== */
.sales-badges { 
    display:flex; 
    flex-wrap:nowrap; /* Force badges to stay on ONE line */
    gap:3px; /* Reduced gap to fit better */
    margin-bottom:6px; 
    justify-content:center;
    overflow:hidden; /* Hide overflow if too long */
}
.sales-badge { 
    font-size:8px; /* Slightly smaller to fit better */
    padding:2px 5px; /* 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-discount { background:#fff3cd; color:#856404; }
.badge-condition { background:#e8f5f5; color:#00695c; }
.badge-shipping { background:#e3f2fd; color:#1565c0; }
.badge-verified { background:#fff3e0; color:#e65100; }
.badge-quantity { background:#f3e5f5; color:#7b1fa2; }

/* ===== Price Display ===== */
.sales-price { margin:5px 0; }
.current-price { font-size:1.2em; font-weight:700; color:#dc3545; margin-bottom:2px; }
.original-price { font-size:0.82em; color:#999; text-decoration:line-through; margin-left:5px; }
.discount-percent { font-size:0.72em; color:#28a745; font-weight:600; }

/* ===== Modern Small Buttons ===== */
.sales-actions { 
    display:flex; 
    gap:4px; 
    margin:6px 0; 
    justify-content:center; 
}
.sales-item .bid-btn, .sales-item .buy-now-btn, .sales-item .add-to-cart-btn { 
    flex:1;
    background:linear-gradient(135deg, #004080, #003366); 
    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,64,128,0.2);
    display:flex;
    align-items:center;
    justify-content:center;
    gap:3px; /* Slightly smaller gap */
}
.sales-item .bid-btn:hover, .sales-item .add-to-cart-btn:hover { 
    background:linear-gradient(135deg, #003366, #00264d);
    transform:translateY(-1px);
    box-shadow:0 3px 6px rgba(0,64,128,0.3);
}
.sales-item .buy-now-btn {
    background:linear-gradient(135deg, #28a745, #20893a);
    box-shadow:0 2px 4px rgba(40,167,69,0.2);
}
.sales-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);
}
.sales-item .bid-btn i, .sales-item .buy-now-btn i, .sales-item .add-to-cart-btn i {
    font-size:0.9em;
}

/* ===== Shipping & Seller Info ===== */
.sales-item .retail, .sales-item .vendor { font-size:0.68em; color:#777; margin-bottom:2px; }
.sales-item .vendor img.flag { width:12px; height:12px; border-radius:50%; object-fit:cover; margin-left:3px; }
.shipping-info { font-size:0.68em; color:#28a745; margin-bottom:3px; display:flex; align-items:center; justify-content:center; gap:3px; }
.quantity-left { font-size:0.68em; color:#888; margin-bottom:3px; }
/* Wishlist button - same style as auction */
.sales-item .wishlist-btn {
    position: absolute;
    top: 12px; /* Moved from edge (10px + 2px padding) */
    right: 12px; /* Moved from edge (10px + 2px padding) */
    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 */
}
.sales-item .wishlist-btn:hover {
    background: transparent; /* Keep transparent */
    color: #dc3545; /* Heart turns red on hover */
    transform: none; /* No scale */
}
.sales-item .wishlist-btn.in-wishlist {
    background: transparent; /* No circle */
    color: #dc3545; /* Red when in wishlist */
}
.sales-item .wishlist-btn.in-wishlist i {
    animation: heartBeat 0.3s ease;
}
@keyframes heartBeat {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.3); }
}

/* ===== Row Arrows (Capsule Style - Same as Auction/Fundraising/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;
}
.sales-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;
    box-shadow: 0 3px 8px rgba(0,123,255,0.4) !important;
}
/* Position arrows at the END of the row on either side (at row edges where cards are) */
/* Match auction page positioning exactly */
.row-arrow.left { 
    left: calc((100% - 1200px) / 2 + 5px) !important; /* 5px from left edge of row (same as auction) */
}
.row-arrow.right { 
    right: calc((100% - 1200px) / 2 + 5px - 18px) !important; /* 5px from right edge of row - 18px to move away from card edge */
}
/* Fallback for smaller screens - position at viewport edges */
@media (max-width: 1200px) {
    .row-arrow.left {
        left: 5px !important; /* Close to left edge of viewport */
    }
    .row-arrow.right {
        right: calc(5px - 18px) !important; /* Close to right edge, moved 18px away from card */
    }
}

/* ===== 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:#ffffff;}
.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 (Amazon-style: 4→3→2 visible columns, still scrollable) */
@media(max-width:1024px){ 
    .sales-item {
        flex: 0 0 240px !important; /* 3 visible columns on tablet (240px  3 = 720px + gaps) */
        width: 240px !important;
    }
    .sales-item img{height:130px;} 
}
@media(max-width:768px){ 
    .sales-item {
        flex: 0 0 200px !important; /* 2 visible columns on mobile (200px  2 = 400px + gap) */
        width: 200px !important;
    }
    .sales-item img{height:110px;} 
    .row-arrow {
        width: 6px !important;
        height: 40px !important;
        font-size: 8px !important;
        border-radius: 3px !important;
    }
    .row-arrow.left {
        left: calc(15px + 200px + 5px) !important; /* Adjacent to first card on mobile */
    }
    .row-arrow.right {
        right: calc(15px + 200px + 5px) !important; /* Adjacent to last card on mobile */
    }
}
