/* ============================================
   NIGS WAREHOUSE - MAIN STYLESHEET
   ============================================ */

:root {
    --primary: #1a237e;
    --secondary: #ff6f00;
    --success: #2e7d32;
    --danger: #c62828;
    --warning: #f9a825;
    --info: #0277bd;
    --light: #f5f5f5;
    --dark: #212121;
    --gray: #757575;
    --border: #e0e0e0;
    --shadow: 0 2px 8px rgba(0,0,0,0.1);
    --shadow-hover: 0 4px 16px rgba(0,0,0,0.15);
    --whatsapp: #25D366;
    --whatsapp-dark: #128C7E;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #fafafa;
    color: var(--dark);
    overflow-x: hidden;
    line-height: 1.6;
}

/* ============================================
   NAVIGATION
   ============================================ */
.navbar {
    background: white;
    padding: 15px 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
    gap: 15px;
    flex-wrap: wrap;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.3em;
    font-weight: bold;
    color: var(--primary);
    text-decoration: none;
}

.nav-brand img {
    width: 45px;
    height: 45px;
    object-fit: contain;
    border-radius: 50%;
}

.nav-search {
    display: flex;
    gap: 10px;
    flex: 1;
    max-width: 500px;
    min-width: 250px;
}

.nav-search input {
    flex: 1;
    padding: 12px 20px;
    border: 2px solid var(--border);
    border-radius: 25px;
    font-size: 0.95em;
    font-family: inherit;
    transition: all 0.3s;
}

.nav-search input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(26, 35, 126, 0.1);
}

.search-btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 0.95em;
    transition: all 0.3s;
}

.search-btn:hover {
    background: #283593;
}

.nav-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9em;
    font-weight: 600;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    font-family: inherit;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn:disabled {
    background: #bdbdbd;
    cursor: not-allowed;
    transform: none;
}

.btn-primary {
    background: var(--secondary);
    color: white;
}

.btn-primary:hover {
    background: #e65100;
    box-shadow: 0 5px 15px rgba(255, 111, 0, 0.3);
}

.btn-outline {
    background: white;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: white;
}

.btn-success {
    background: var(--success);
    color: white;
}

.btn-success:hover {
    background: #1b5e20;
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-danger:hover {
    background: #b71c1c;
}

.btn-warning {
    background: var(--warning);
    color: var(--dark);
}

.btn-info {
    background: var(--info);
    color: white;
}

.btn-whatsapp {
    background: var(--whatsapp);
    color: white;
}

.btn-whatsapp:hover {
    background: var(--whatsapp-dark);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.8em;
}

.btn-lg {
    padding: 15px 30px;
    font-size: 1.1em;
}

/* ============================================
   SCROLLING ADS BANNER
   ============================================ */
.ads-banner-container {
    position: relative;
    width: 100%;
    max-height: 120px;
    overflow: hidden;
    background: #1a237e;
    z-index: 500;
}

.ads-banner {
    width: 100%;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.ad-slide {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: adFadeIn 0.5s ease;
}

.ad-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    max-width: 100%;
}

@keyframes adFadeIn {
    from { opacity: 0; transform: translateX(20px); }
    to { opacity: 1; transform: translateX(0); }
}

.ads-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.5);
    color: white;
    border: none;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2em;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    z-index: 10;
}

.ads-nav:hover {
    background: rgba(0,0,0,0.8);
}

.ads-prev {
    left: 10px;
}

.ads-next {
    right: 10px;
}

/* ============================================
   PRODUCT CARDS
   ============================================ */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
    padding: 30px;
}

.product-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s;
    cursor: pointer;
    position: relative;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.product-card.shuffling {
    animation: shuffleAnimation 0.5s ease;
}

@keyframes shuffleAnimation {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(0.95); opacity: 0.5; }
    100% { transform: scale(1); opacity: 1; }
}

.product-image-container {
    position: relative;
    flex-shrink: 0;
}

.product-image {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
}

.boosted-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #e3f2fd;
    color: var(--info);
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 0.75em;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 5px;
    z-index: 5;
}

.condition-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 0.75em;
    font-weight: bold;
    z-index: 5;
}

.condition-new {
    background: #e8f5e9;
    color: var(--success);
}

.condition-nigerian-used {
    background: #fff3e0;
    color: var(--secondary);
}

.condition-foreign-used {
    background: #e3f2fd;
    color: var(--info);
}

.price-tag {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: var(--secondary);
    color: white;
    padding: 6px 14px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 0.9em;
    z-index: 5;
}

.product-details {
    padding: 15px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-title {
    font-size: 1em;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--dark);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-meta {
    font-size: 0.85em;
    color: var(--gray);
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.seller-info {
    margin-top: auto;
    padding-top: 10px;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.seller-name {
    font-size: 0.85em;
    font-weight: 600;
    color: var(--primary);
}

/* ============================================
   CARD CONTACT BUTTONS
   ============================================ */
.card-contact-buttons {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}

.card-whatsapp-btn,
.card-call-btn {
    flex: 1;
    padding: 8px 10px;
    border-radius: 8px;
    font-size: 0.8em;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    transition: all 0.3s;
    border: none;
}

.card-whatsapp-btn {
    background: var(--whatsapp);
    color: white;
}

.card-whatsapp-btn:hover {
    background: var(--whatsapp-dark);
}

.card-call-btn {
    background: var(--info);
    color: white;
}

.card-call-btn:hover {
    background: #01579b;
}

/* ============================================
   WISHLIST HEART
   ============================================ */
.wishlist-heart {
    position: absolute;
    top: 40px;
    left: 10px;
    background: rgba(255,255,255,0.9);
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 14px;
    color: #ccc;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 6;
}

.wishlist-heart:hover {
    transform: scale(1.1);
}

.wishlist-heart.active {
    color: var(--danger);
    animation: heartPop 0.3s ease;
}

@keyframes heartPop {
    0% { transform: scale(1); }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); }
}

.wishlist-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--danger);
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 0.6em;
    display: none;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

/* ============================================
   COMPARE CHECKBOX
   ============================================ */
.compare-check {
    position: absolute;
    top: 80px;
    left: 10px;
    z-index: 6;
}

.compare-checkbox {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

/* ============================================
   SHARE BUTTON
   ============================================ */
.share-btn {
    position: absolute;
    top: 120px;
    left: 10px;
    background: rgba(255,255,255,0.9);
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 14px;
    color: var(--info);
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 6;
}

.share-btn:hover {
    transform: scale(1.1);
    background: var(--info);
    color: white;
}

/* ============================================
   MODALS
   ============================================ */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    animation: fadeIn 0.3s;
}

.modal-content {
    background: white;
    margin: 3% auto;
    padding: 30px;
    border-radius: 12px;
    width: 90%;
    max-width: 700px;
    max-height: 85vh;
    overflow-y: auto;
    position: relative;
    animation: slideUp 0.3s;
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 1.5em;
    cursor: pointer;
    color: var(--gray);
    background: none;
    border: none;
}

.modal-close:hover {
    color: var(--dark);
}

/* ============================================
   FORMS
   ============================================ */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--dark);
    font-size: 0.9em;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-size: 0.95em;
    font-family: inherit;
    transition: all 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(26, 35, 126, 0.1);
}

.form-group textarea {
    min-height: 100px;
    resize: vertical;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.required {
    color: var(--danger);
}

/* ============================================
   BADGES
   ============================================ */
.badge {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.8em;
    font-weight: 500;
    display: inline-block;
}

.badge-pending {
    background: #fff3e0;
    color: var(--secondary);
}

.badge-approved {
    background: #e8f5e9;
    color: var(--success);
}

.badge-rejected {
    background: #ffebee;
    color: var(--danger);
}

.badge-removed {
    background: #f5f5f5;
    color: #9e9e9e;
}

.badge-active {
    background: #e8f5e9;
    color: var(--success);
}

.badge-suspended {
    background: #ffebee;
    color: var(--danger);
}

.badge-boosted {
    background: #e3f2fd;
    color: var(--info);
}

.badge-ghosted {
    background: #f3e5f5;
    color: #6a1b9a;
}

.badge-resolved {
    background: #e8f5e9;
    color: #2e7d32;
}

/* ============================================
   DISCLAIMER BOX
   ============================================ */
.disclaimer-box {
    background: #ffebee;
    border: 2px solid var(--danger);
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.disclaimer-box h4 {
    color: var(--danger);
    margin-bottom: 10px;
    font-size: 1em;
}

.disclaimer-box ul {
    margin-left: 20px;
    color: #424242;
    font-size: 0.9em;
    line-height: 1.6;
}

.disclaimer-banner {
    background: #fff3e0;
    color: #e65100;
    padding: 12px 30px;
    text-align: center;
    font-size: 0.9em;
    border-bottom: 2px solid var(--secondary);
}

.disclaimer-banner i {
    margin-right: 8px;
}

/* ============================================
   PRODUCT REQUESTS (GHOSTED)
   ============================================ */
.requests-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    padding: 20px 30px;
}

.request-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: var(--shadow);
    transition: all 0.3s;
    border-left: 4px solid #6a1b9a;
    display: flex;
    flex-direction: column;
}

.request-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
}

.request-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 10px;
}

.request-header h3 {
    font-size: 1em;
    color: var(--dark);
    flex: 1;
    margin-right: 10px;
}

.request-description {
    font-size: 0.9em;
    color: var(--gray);
    margin-bottom: 15px;
    flex: 1;
}

.request-meta {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-bottom: 15px;
    font-size: 0.85em;
    color: var(--gray);
}

.request-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.request-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
    border-top: 1px solid var(--border);
}

.request-date {
    font-size: 0.8em;
    color: var(--gray);
}

/* ============================================
   CONTACT REVEAL
   ============================================ */
.contact-revealed {
    background: #e8f5e9;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 15px;
}

.contact-revealed p {
    margin-bottom: 10px;
    font-size: 1.1em;
}

.contact-revealed strong {
    color: var(--primary);
}

.reveals-remaining {
    background: #fff3e0;
    padding: 10px 15px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: var(--secondary);
}

/* ============================================
   WISHLIST ITEMS
   ============================================ */
.wishlist-item-card {
    display: flex;
    gap: 15px;
    padding: 15px;
    border: 1px solid var(--border);
    border-radius: 8px;
    margin-bottom: 10px;
    background: white;
}

.wishlist-item-card img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
}

.wishlist-item-details {
    flex: 1;
}

.wishlist-item-details h4 {
    margin-bottom: 5px;
    font-size: 0.95em;
}

.wishlist-item-details p {
    color: var(--secondary);
    font-weight: 600;
    margin-bottom: 10px;
}

/* ============================================
   COMPARISON TABLE
   ============================================ */
.comparison-table {
    width: 100%;
    border-collapse: collapse;
}

.comparison-table th {
    background: var(--primary);
    color: white;
    padding: 12px;
    text-align: left;
    font-size: 0.9em;
}

.comparison-table td {
    padding: 12px;
    border-bottom: 1px solid var(--border);
    font-size: 0.9em;
}

.comparison-table tr:hover {
    background: #f5f5f5;
}

/* ============================================
   COMPARE BAR
   ============================================ */
.compare-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--primary);
    color: white;
    padding: 12px 25px;
    display: none;
    align-items: center;
    justify-content: center;
    gap: 20px;
    z-index: 3000;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.2);
}

.compare-go-btn {
    background: var(--secondary);
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
}

.compare-clear-btn {
    background: transparent;
    color: white;
    border: 1px solid white;
    padding: 8px 20px;
    border-radius: 5px;
    cursor: pointer;
}

/* ============================================
   TOAST NOTIFICATIONS
   ============================================ */
.toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: var(--dark);
    color: white;
    padding: 15px 25px;
    border-radius: 8px;
    z-index: 3000;
    animation: slideIn 0.3s;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.toast-success {
    background: var(--success);
}

.toast-error {
    background: var(--danger);
}

.toast-warning {
    background: var(--warning);
    color: var(--dark);
}

/* ============================================
   EMPTY STATES
   ============================================ */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--gray);
}

.empty-state i {
    font-size: 4em;
    display: block;
    margin-bottom: 20px;
}

.empty-state h3 {
    margin-bottom: 10px;
    color: var(--dark);
}

.empty-state p {
    font-size: 0.9em;
}

/* ============================================
   LOADING STATES
   ============================================ */
.loading {
    text-align: center;
    padding: 40px;
}

.spinner {
    border: 4px solid var(--border);
    border-top: 4px solid var(--primary);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

@keyframes heartPop {
    0% { transform: scale(1); }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); }
}

@keyframes shuffleAnimation {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(0.95); opacity: 0.5; }
    100% { transform: scale(1); opacity: 1; }
}

@keyframes adFadeIn {
    from { opacity: 0; transform: translateX(20px); }
    to { opacity: 1; transform: translateX(0); }
}

/* ============================================
   SECTION HEADERS
   ============================================ */
.section-header {
    padding: 20px 30px 0;
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: space-between;
    flex-wrap: wrap;
}

.section-header h2 {
    font-size: 1.3em;
    color: var(--dark);
}

.section-header .boosted-icon {
    color: #0277bd;
}

/* ============================================
   FILTER BAR
   ============================================ */
.filter-bar {
    background: white;
    padding: 10px 30px;
    display: flex;
    gap: 10px;
    align-items: center;
    border-bottom: 1px solid var(--border);
    flex-wrap: wrap;
}

.filter-select {
    padding: 8px 15px;
    border: 2px solid var(--border);
    border-radius: 20px;
    font-size: 0.85em;
    cursor: pointer;
    font-family: inherit;
    background: white;
}

.price-input {
    width: 100px;
    padding: 8px 12px;
    border: 2px solid var(--border);
    border-radius: 20px;
    font-size: 0.85em;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */
@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        padding: 10px;
    }
    
    .nav-search {
        width: 100%;
        max-width: none;
    }
    
    .nav-actions {
        width: 100%;
        justify-content: center;
    }
    
    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 10px;
        padding: 15px;
    }
    
    .product-image {
        height: 150px;
    }
    
    .requests-grid {
        grid-template-columns: 1fr;
        padding: 15px;
    }
    
    .modal-content {
        width: 95%;
        margin: 2% auto;
        padding: 20px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .wishlist-item-card {
        flex-direction: column;
    }
    
    .wishlist-item-card img {
        width: 100%;
        height: 150px;
    }
    
    .compare-bar {
        flex-direction: column;
        gap: 10px;
        padding: 10px;
    }
    
    .card-contact-buttons {
        flex-direction: column;
    }
    
    .ads-banner-container {
        max-height: 80px;
    }
    
    .ads-banner {
        height: 80px;
    }
}

@media (max-width: 480px) {
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .btn {
        padding: 8px 15px;
        font-size: 0.8em;
    }
    
    .section-header {
        padding: 15px;
    }
    
    .filter-bar {
        padding: 10px;
    }
}