
/* EXACT CSS FROM SALES.PHP */
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) ===== */
.sales-row-wrapper { 
    position: relative; 
    margin-bottom: 20px; 
    overflow: visible; 
    display: flex;
    justify-content: center;
    width: 100%;
}
.sales-row { 
    display: flex !important; 
    gap: 15px !important; /* Slightly tighter than 20px for 4 items */
    overflow-x: auto !important; 
    overflow-y: hidden !important;
    scroll-behavior: smooth !important;
    -webkit-overflow-scrolling: touch !important;
    width: 100%;
    max-width: 1400px; /* Increased to allow 4 items */
    margin: 0 auto; 
    padding: 0 10px; 
    box-sizing: border-box !important;
    flex-wrap: nowrap !important; 
}
.sales-row::-webkit-scrollbar { display: none !important; }
.sales-row { scrollbar-width: none !important; -ms-overflow-style: none !important; }

/* ADJUST CARD SIZE FOR EXACTLY 4 ITEMS - MODERN DESIGN */
.sales-item {
    /* (100% - 3 * 15px gap) / 4 items */
    flex: 0 0 calc((100% - 45px) / 4) !important; 
    width: calc((100% - 45px) / 4) !important; 
    height: auto; 
    min-height: 380px; 
    display:flex;
    flex-direction: column;
    background:#ffffff !important;
    border:1px solid #f0f0f0 !important;
    border-radius:16px;
    box-shadow:0 2px 8px rgba(0,0,0,0.06);
    padding:14px;
    text-align:center;
    cursor:pointer;
    transition:all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}
.sales-item:hover {
    transform:translateY(-6px);
    box-shadow:0 12px 32px rgba(0,0,0,0.12);
    border-color:#e0e0e0;
}
.sales-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    opacity: 0;
    transition: opacity 0.35s ease;
}
.sales-item:hover::before {
    opacity: 1;
}
.sales-item img { 
    width:100%; 
    height:160px; 
    object-fit:cover; 
    border-radius:12px; 
    margin-bottom:10px; 
    flex-shrink: 0; 
    opacity: 1 !important;
    transition: transform 0.35s ease;
}
.sales-item:hover img {
    transform: scale(1.03);
}
.sales-item h3 { 
    font-size:0.92em; 
    color:#1a1a1a; 
    margin-bottom:8px; 
    font-weight:600; 
    line-height:1.35; 
    overflow:hidden; 
    text-overflow:ellipsis; 
    display:-webkit-box; 
    -webkit-line-clamp:2; 
    line-clamp:2; 
    -webkit-box-orient:vertical;
    letter-spacing: -0.01em;
}

/* ===== Badges (Discount, Condition, Shipping) - MODERN ===== */
.sales-badges { 
    display:flex; 
    flex-wrap:wrap; 
    gap:4px; 
    margin-bottom:8px; 
    justify-content:center;
    overflow:hidden; 
}
.sales-badge { 
    font-size:9px; 
    padding:3px 7px; 
    border-radius:6px; 
    font-weight:700; 
    text-transform:uppercase;
    white-space:nowrap; 
    flex-shrink:1;
    letter-spacing: 0.3px;
}
.badge-discount { background:#fff3cd; color:#856404; }
.badge-condition { background:#e8f5f5; color:#00695c; }
.badge-shipping { background:#e3f2fd; color:#1565c0; }
.badge-verified { background:#fff3e0; color:#e65100; }

/* ===== Price Display - MODERN ===== */
.sales-price { margin:8px 0; }
.current-price { 
    font-size:1.35em; 
    font-weight:800; 
    color:#dc3545; 
    margin-bottom:3px;
    letter-spacing: -0.02em;
}
.original-price { 
    font-size:0.85em; 
    color:#999; 
    text-decoration:line-through; 
    margin-left:6px; 
}
.discount-percent { 
    font-size:0.75em; 
    color:#28a745; 
    font-weight:700; 
}

/* ===== MODERN SINGLE ACTION BUTTON ===== */
.sales-actions { 
    display:flex; 
    gap:0; 
    margin:10px 0 8px; 
    justify-content:center; 
}
.sales-item .add-to-cart-btn { 
    width: 100%;
    background:linear-gradient(135deg, #667eea 0%, #764ba2 100%); 
    color:#fff; 
    border:none; 
    border-radius:12px; 
    padding:11px 16px; 
    cursor:pointer; 
    font-weight:700; 
    font-size:0.88em; 
    transition:all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow:0 4px 12px rgba(102, 126, 234, 0.3);
    display:flex;
    align-items:center;
    justify-content:center;
    gap:6px;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}
.sales-item .add-to-cart-btn:hover { 
    background:linear-gradient(135deg, #764ba2 0%, #667eea 100%);
    transform:translateY(-2px);
    box-shadow:0 6px 20px rgba(102, 126, 234, 0.4);
}

/* ===== MINIMAL CAPSULE ARROWS (Auction Style) ===== */
.row-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.95);
    color: #1f2937;
    font-size: 14px;
    border: 1px solid rgba(0,0,0,0.1);
    border-radius: 30px; /* Thin capsule */
    cursor: pointer;
    z-index: 20;
    opacity: 0;
    transition: opacity 0.3s ease, background 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.sales-row-wrapper:hover .row-arrow { opacity: 1; }
.row-arrow:hover {
    background: #007bff !important; /* Solid vibrant blue */
    color: white !important;
}
/* Position at edges for maximum slide room */
.row-arrow.left { left: 5px; }
.row-arrow.right { right: 5px; }

.sales-item .add-to-cart-btn:active {
    transform:translateY(0);
    box-shadow:0 2px 8px rgba(102, 126, 234, 0.3);
}

/* Shipping Info */
.sales-item .retail, .sales-item .vendor { font-size:0.68em; color:#777; margin-bottom:2px; display:flex; align-items:center; justify-content:center; gap:3px; }
.sales-item .vendor .flag { height:11px; width:auto; vertical-align:middle; opacity:0.8; }
.shipping-info { font-size:0.68em; color:#28a745; margin-bottom:3px; display:flex; align-items:center; justify-content:center; gap:3px; }

/* Wishlist Button */
.sales-item .wishlist-btn {
    position: absolute;
    top: 12px; 
    right: 12px; 
    background: transparent; 
    border: none; 
    border-radius: 0; 
    width: auto; 
    height: auto; 
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    box-shadow: none; 
    font-size: 20px;
    color: #333; 
    padding: 6px; 
}
.sales-item .wishlist-btn:hover, .sales-item .wishlist-btn.in-wishlist {
    background: transparent; 
    color: #dc3545; 
}

/* ===== Row Arrows (Capsule Style) ===== */
.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;
}
.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; }

/* ARROW POSITIONING */
.row-arrow.left { left: 0 !important; }
.row-arrow.right { right: 0 !important; }

/* ===== Pagination (Amazon Style) ===== */
/* ===== Pagination (Modern Floating Island) ===== */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 40px auto 30px;
    gap: 8px;
    padding: 12px 24px;
    background: #ffffff;
    border-radius: 50px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08); /* Soft floating shadow */
    width: fit-content;
    border: 1px solid rgba(0,0,0,0.03);
}

.pagination button, 
.pagination a {
    min-width: 40px;
    height: 40px;
    padding: 0 14px;
    border: none;
    background: transparent;
    color: #555;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border-radius: 20px; /* Pill shape */
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.pagination button:hover, 
.pagination a:hover {
    background: #f5f7fa;
    color: #007bff;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.05);
}

.pagination button.active, 
.pagination a.active {
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: #fff;
    box-shadow: 0 4px 12px rgba(0,123,255,0.3);
    transform: translateY(-1px);
}

.pagination button.page-arrow {
    font-size: 18px;
    color: #888;
    width: 40px; /* Circle for arrows */
    padding: 0;
}

.pagination button.page-arrow:hover {
    background: #fff0f0; /* Subtle warm tint or keep neutral */
    color: #007bff;
}

.pagination button.disabled {
    opacity: 0.3;
    pointer-events: none;
    box-shadow: none;
    transform: none;
}

/* Jump Input Modernization */
.pagination .page-jump {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: 15px;
    padding-left: 15px;
    border-left: 1px solid #eee;
}

.pagination .page-jump input {
    width: 50px;
    height: 36px;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    text-align: center;
    font-weight: 600;
    color: #333;
    transition: border 0.2s;
}

.pagination .page-jump input:focus {
    border-color: #007bff;
    outline: none;
}

.pagination .page-jump button {
    height: 36px;
    min-width: auto;
    padding: 0 15px;
    background: #333;
    color: white;
    font-size: 13px;
    border-radius: 10px;
}

.pagination .page-jump button:hover {
    background: #000;
    color: white;
}

/* Responsive */
@media(max-width:1024px){ 
    .sales-item {
        flex: 0 0 220px !important; 
        width: 220px !important;
    }
}
@media(max-width:768px){ 
    .sales-item {
        flex: 0 0 160px !important; 
        width: 160px !important;
    }
    .row-arrow { display:none !important; }
}

/* HIDE BLUE MY SITE BAR */
body > header:not(#mainHeader) { display: none !important; }

/* Pagination Container Style */
#paginationBar {
    flex-wrap: wrap;
}

.pagination-bar-container {
    max-width: 1400px;
    margin: 20px auto 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: #f8fafc;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
}

.items-per-page {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 600;
    color: #475569;
}

.items-per-page select {
    padding: 6px 12px;
    border-radius: 8px;
    border: 1px solid #cbd5e1;
    background: white;
    font-weight: 600;
    color: #1a202c;
    cursor: pointer;
    outline: none;
    transition: all 0.2s;
}

.items-per-page select:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.pagination {
    display: flex;
    gap: 5px;
    align-items: center;
}

.pag-num, .pag-btn {
    min-width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    background: white;
    font-size: 13px;
    font-weight: 700;
    color: #475569;
    cursor: pointer;
    transition: all 0.2s;
}

.pag-num.active {
    background: #007bff;
    color: white;
    border-color: #007bff;
}

.pag-num:hover:not(.active), .pag-btn:hover:not(.disabled) {
    background: #f1f5f9;
    border-color: #cbd5e1;
    color: #1a202c;
}

.pag-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

@media (max-width: 768px) {
    .pagination-bar-container {
        flex-direction: column;
        gap: 15px;
        align-items: center;
    }
}


/* Breadcrumb & Tab Styles */
.page-breadcrumbs { padding: 8px 20px; background: #f8f9fa; border-bottom: 1px solid #e0e0e0; }
.breadcrumb-container { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.breadcrumb-item a { color: #007bff; text-decoration: none; }
.breadcrumb-item.active { font-weight: 600; color: #333; }

.filter-tabs-container { padding: 8px 20px; background: #fff; border-bottom: 1px solid #e0e0e0; }
.filter-tabs { display: flex; gap: 10px; align-items: center; }
.filter-tab { padding: 5px 12px; border: 1px solid #ddd; border-radius: 4px; font-size: 12px; cursor: pointer; text-decoration: none; color: #333; }
.filter-tab.active { background: #007bff; color: white; border-color: #007bff; }

/* Sub Filter Bar */
.sub-filter-bar { width: 100%; background: #f1f5f9; border-bottom: 1px solid #e2e8f0; padding: 10px 20px; display: none; }
.sub-filter-inner { display: flex; gap: 15px; align-items: center; flex-wrap: wrap; }
.filter-dropdown { position: relative; }
.filter-dropdown-btn { background: white; border: 1px solid #cbd5e1; border-radius: 6px; padding: 6px 12px; font-size: 12px; cursor: pointer; display: flex; align-items: center; gap: 8px; }
.filter-dropdown-content { display: none; position: absolute; top: 100%; left: 0; background: white; min-width: 200px; box-shadow: 0 10px 25px rgba(0,0,0,0.1); border: 1px solid #e2e8f0; border-radius: 8px; z-index: 1001; margin-top: 8px; padding: 10px; }
.filter-dropdown.active .filter-dropdown-content { display: block; }
.filter-option { display: flex; align-items: center; gap: 10px; padding: 6px 8px; font-size: 12px; cursor: pointer; }
.filter-option:hover { background: #f1f5f9; }

/* Mobile refinements for filter button - Remove black highlighter */
@media (max-width: 768px) {
    .filter-tab[onclick*="toggleSubFilterBar"] {
        background: transparent !important;
        color: #333 !important;
        border: none !important;
        padding: 5px 4px !important;
        box-shadow: none !important;
        font-weight: 500 !important;
    }
}

