/* ═══════════════════════════════════════════════
   Souqna سوقنا - Multi-Vendor Marketplace
   Luxury Dark Theme with Gold Accents
   ═══════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;500;600;700;800;900&display=swap');

:root {
    --gold: #c9a84c;
    --gold-light: #e8d5a3;
    --gold-dark: #a0852e;
    --dark: #1a1a2e;
    --darker: #0f0f1a;
    --dark-card: #24243e;
    --dark-border: rgba(201,168,76,0.15);
    --text-light: #f0f0f5;
    --text-muted: #8a8a9e;
    --success: #28a745;
    --danger: #dc3545;
    --warning: #ffc107;
    --white: #ffffff;
    --shadow: 0 4px 20px rgba(0,0,0,0.3);
    --shadow-gold: 0 4px 20px rgba(201,168,76,0.2);
    --radius: 16px;
    --radius-sm: 10px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    font-family: 'Cairo', sans-serif;
    background: linear-gradient(135deg, var(--darker) 0%, var(--dark) 50%, #16213e 100%);
    background-attachment: fixed;
    color: var(--text-light);
    line-height: 1.7;
    overflow-x: hidden;
    min-height: 100vh;
}

to { opacity: 1; }
}

/* ═══════════════════════════════════════════════
   MOBILE TOP NAV - Sonbol Style
   ═══════════════════════════════════════════════ */
.mobile-nav {
    background: linear-gradient(135deg, var(--dark-card) 0%, rgba(36,36,62,0.95) 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--dark-border);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 8px 0;
}

.mobile-nav .nav-brand {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--gold);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
}
.mobile-nav .nav-brand { min-width: 0; max-width: calc(100% - 150px); flex-shrink: 1; }
.mobile-nav .nav-brand img { max-width: 100%; }
.mobile-nav .nav-brand i {
    font-size: 1.1rem;
}

.mobile-nav .nav-icon {
    color: var(--text-light);
    font-size: 1.2rem;
    text-decoration: none;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(201,168,76,0.08);
    border: 1px solid var(--dark-border);
    transition: var(--transition);
}
.mobile-nav .nav-icon:hover {
    background: rgba(201,168,76,0.2);
    color: var(--gold);
    transform: translateY(-2px);
}

/* ═══════════════════════════════════════════════
   SONBOL SEARCH HEADER
   ═══════════════════════════════════════════════ */
.sonbol-header-banner {
    background: linear-gradient(135deg, var(--dark-card) 0%, rgba(26,26,46,0.9) 100%);
    padding: 20px 0;
    border-bottom: 1px solid var(--dark-border);
}

.sonbol-search-wrapper {
    max-width: 600px;
    margin: 0 auto;
}

.sonbol-search-box {
    position: relative;
    display: flex;
    align-items: center;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--dark-border);
    border-radius: 50px;
    overflow: hidden;
    transition: var(--transition);
}
.sonbol-search-box:focus-within {
    border-color: var(--gold);
    box-shadow: 0 0 20px rgba(201,168,76,0.15);
    background: rgba(255,255,255,0.08);
}

.sonbol-search-box input {
    flex: 1;
    background: transparent;
    border: none;
    padding: 14px 20px;
    color: var(--text-light);
    font-size: 0.95rem;
    font-family: 'Cairo', sans-serif;
    outline: none;
}
.sonbol-search-box input::placeholder {
    color: var(--text-muted);
}

.sonbol-search-box button {
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
    border: none;
    color: var(--dark);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    margin: 4px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}
.sonbol-search-box button:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(201,168,76,0.4);
}

/* ═══════════════════════════════════════════════
   STORE HEADER - Luxury Style
   ═══════════════════════════════════════════════ */
.store-header-sonbol {
    position: relative;
    padding: 30px 0 60px;
    overflow: hidden;
}
.store-header-sonbol::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(180deg, rgba(15,15,26,0.3) 0%, var(--darker) 100%);
    z-index: 1;
}
.store-header-sonbol .container {
    position: relative;
    z-index: 2;
}

.store-header-sonbol img {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    border: 3px solid var(--gold);
    object-fit: cover;
    box-shadow: var(--shadow-gold);
}

.store-header-sonbol h2 {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--text-light);
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.store-header-sonbol p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.store-status-bar {
    background: rgba(36,36,62,0.9);
    backdrop-filter: blur(10px);
    border-radius: var(--radius);
    padding: 15px 20px;
    margin-top: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border: 1px solid var(--dark-border);
}

.badge-gold {
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
    color: var(--dark);
    font-weight: 700;
    padding: 6px 16px;
    border-radius: 50px;
    font-size: 0.85rem;
}

.badge-closed {
    background: linear-gradient(135deg, #dc3545 0%, #a71d2a 100%);
    color: white;
    font-weight: 700;
    padding: 6px 16px;
    border-radius: 50px;
    font-size: 0.85rem;
}

/* ═══════════════════════════════════════════════
   CATEGORY TABS
   ═══════════════════════════════════════════════ */
.cat-tabs-wrapper {
    background: var(--dark-card);
    border-bottom: 1px solid var(--dark-border);
    position: sticky;
    top: 56px;
    z-index: 100;
    padding: 12px 0;
}

.cat-tabs {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding-bottom: 4px;
}
.cat-tabs::-webkit-scrollbar { display: none; }

.cat-tab {
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--dark-border);
    color: var(--text-muted);
    padding: 8px 20px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
    transition: var(--transition);
    font-family: 'Cairo', sans-serif;
}
.cat-tab:hover {
    background: rgba(201,168,76,0.1);
    border-color: var(--gold);
    color: var(--gold-light);
}
.cat-tab.active {
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
    color: var(--dark);
    border-color: var(--gold);
    box-shadow: var(--shadow-gold);
}

/* ═══════════════════════════════════════════════
   SONBOL PRODUCT ITEM - Luxury Cards
   ═══════════════════════════════════════════════ */
.sonbol-product-item {
    background: var(--dark-card);
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 15px;
    border: 1px solid var(--dark-border);
    transition: var(--transition);
}
.sonbol-product-item:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-gold);
    border-color: rgba(201,168,76,0.3);
}

.sp-img-wrap {
    position: relative;
    height: 140px;
    overflow: hidden;
}
.sp-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}
.sonbol-product-item:hover .sp-img-wrap img {
    transform: scale(1.08);
}

.sp-fav-btn {
    position: absolute;
    top: 10px;
    left: 10px;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(15,15,26,0.7);
    backdrop-filter: blur(10px);
    border: 1px solid var(--dark-border);
    color: var(--text-light);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.9rem;
}
.sp-fav-btn:hover, .sp-fav-btn.active {
    background: rgba(220,53,69,0.9);
    border-color: #dc3545;
    color: white;
}

.sp-unavailable {
    position: absolute;
    inset: 0;
    background: rgba(15,15,26,0.75);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
}
.sp-unavailable span {
    background: rgba(220,53,69,0.9);
    color: white;
    padding: 6px 16px;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 700;
}

.sp-details {
    padding: 12px 15px;
}
.sp-details h5 {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-light);
    margin-bottom: 4px;
}
.sp-details .desc {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 10px;
    line-height: 1.5;
}

.sp-price-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.sp-price {
    font-size: 1rem;
    font-weight: 800;
    color: var(--gold);
}
.sp-price del {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 400;
    margin-left: 6px;
}

.sp-add-btn {
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
    color: var(--dark);
    border: none;
    padding: 8px 16px;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    font-family: 'Cairo', sans-serif;
    display: flex;
    align-items: center;
    gap: 4px;
}
.sp-add-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(201,168,76,0.4);
}
.sp-add-btn.success {
    background: linear-gradient(135deg, #28a745 0%, #1e7e34 100%);
    color: white;
}

.sp-locked {
    background: rgba(108,117,125,0.2);
    color: var(--text-muted);
    padding: 8px 16px;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* ═══════════════════════════════════════════════
   VENDOR CARDS - Homepage
   ═══════════════════════════════════════════════ */
.vendor-card-sonbol {
    background: var(--dark-card);
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--dark-border);
    transition: var(--transition);
    height: 100%;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
}
.vendor-card-sonbol:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-gold);
    border-color: rgba(201,168,76,0.3);
}

.vc-banner {
    height: 120px;
    position: relative;
    overflow: hidden;
}
.vc-banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}
.vendor-card-sonbol:hover .vc-banner img {
    transform: scale(1.1);
}

.vc-status {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 4px 12px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 5px;
    backdrop-filter: blur(10px);
}
.vc-status.open {
    background: rgba(40,167,69,0.9);
    color: white;
}
.vc-status.closed {
    background: rgba(220,53,69,0.9);
    color: white;
}

.vc-rating {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(15,15,26,0.8);
    backdrop-filter: blur(10px);
    padding: 4px 10px;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--gold);
    display: flex;
    align-items: center;
    gap: 4px;
}

.vc-body {
    padding: 15px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.vc-logo-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}
.vc-logo {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--gold);
    box-shadow: var(--shadow-gold);
}
.vc-name {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-light);
}
.vc-category {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.vc-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid var(--dark-border);
}
.vc-meta-item {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.8rem;
    color: var(--text-muted);
}
.vc-meta-item i {
    color: var(--gold);
    font-size: 0.75rem;
}

.vc-next-open {
    background: rgba(220,53,69,0.1);
    color: #dc3545;
    padding: 6px 12px;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    text-align: center;
    margin-top: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

/* ═══════════════════════════════════════════════
   BOTTOM NAV - Fixed & Beautiful
   ═══════════════════════════════════════════════ */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(36,36,62,0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid var(--dark-border);
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 8px 0 calc(8px + env(safe-area-inset-bottom));
    z-index: 9999;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.2);
}

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 12px;
    transition: var(--transition);
    position: relative;
    min-width: 60px;
}
.bottom-nav-item i {
    font-size: 1.2rem;
    transition: var(--transition);
}
.bottom-nav-item:hover,
.bottom-nav-item.active {
    color: var(--gold);
}
.bottom-nav-item.active {
    background: rgba(201,168,76,0.1);
}
.bottom-nav-item.active i {
    transform: translateY(-2px);
}

.bottom-nav-badge {
    position: absolute;
    top: 2px;
    right: 8px;
    background: linear-gradient(135deg, #dc3545 0%, #a71d2a 100%);
    color: white;
    font-size: 0.6rem;
    font-weight: 700;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-avatar {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
    color: var(--dark);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.75rem;
}

/* ═══════════════════════════════════════════════
   WHATSAPP FLOAT
   ═══════════════════════════════════════════════ */
.whatsapp-float {
    position: fixed;
    bottom: 85px;
    left: 20px;
    width: 55px;
    height: 55px;
    background: linear-gradient(135deg, #25d366 0%, #128c7e 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    box-shadow: 0 4px 15px rgba(37,211,102,0.4);
    z-index: 9998;
    text-decoration: none;
    transition: var(--transition);
    animation: whatsappPulse 2s infinite;
}
.whatsapp-float:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(37,211,102,0.6);
    color: white;
}
@keyframes whatsappPulse {
    0%, 100% { box-shadow: 0 4px 15px rgba(37,211,102,0.4); }
    50% { box-shadow: 0 4px 25px rgba(37,211,102,0.7); }
}

/* ═══════════════════════════════════════════════
   ALERTS & NOTIFICATIONS
   ═══════════════════════════════════════════════ */
.alert {
    border: none;
    border-radius: var(--radius-sm);
    font-weight: 500;
}
.alert-danger {
    background: rgba(220,53,69,0.15);
    color: #ff6b7a;
    border: 1px solid rgba(220,53,69,0.3);
}
.alert-success {
    background: rgba(40,167,69,0.15);
    color: #5dd879;
    border: 1px solid rgba(40,167,69,0.3);
}
.alert-warning {
    background: rgba(255,193,7,0.15);
    color: #ffd54f;
    border: 1px solid rgba(255,193,7,0.3);
}

/* ═══════════════════════════════════════════════
   SECTION HEADERS
   ═══════════════════════════════════════════════ */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding: 0 5px;
}
.section-header h3 {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--text-light);
    display: flex;
    align-items: center;
    gap: 8px;
}
.section-header h3::before {
    content: '';
    width: 4px;
    height: 20px;
    background: linear-gradient(180deg, var(--gold) 0%, var(--gold-dark) 100%);
    border-radius: 2px;
}
.section-header a {
    color: var(--gold);
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
}
.section-header a:hover {
    color: var(--gold-light);
}

/* ═══════════════════════════════════════════════
   PRODUCT DETAIL PAGE
   ═══════════════════════════════════════════════ */
.product-detail-img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    border-radius: 0 0 var(--radius) var(--radius);
}

.pd-info {
    background: var(--dark-card);
    border-radius: var(--radius);
    padding: 20px;
    margin-top: -30px;
    position: relative;
    z-index: 2;
    border: 1px solid var(--dark-border);
}

.pd-price {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--gold);
}
.pd-price del {
    font-size: 1rem;
    color: var(--text-muted);
    font-weight: 400;
    margin-right: 10px;
}

.qty-selector {
    display: flex;
    align-items: center;
    gap: 0;
    background: rgba(255,255,255,0.05);
    border-radius: 50px;
    overflow: hidden;
    border: 1px solid var(--dark-border);
}
.qty-selector button {
    background: transparent;
    border: none;
    color: var(--gold);
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
    cursor: pointer;
    transition: var(--transition);
}
.qty-selector button:hover {
    background: rgba(201,168,76,0.1);
}
.qty-selector input {
    background: transparent;
    border: none;
    color: var(--text-light);
    width: 50px;
    text-align: center;
    font-weight: 700;
    font-size: 1rem;
    outline: none;
}

.btn-gold {
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
    color: var(--dark);
    border: none;
    padding: 14px 30px;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    font-family: 'Cairo', sans-serif;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
}
.btn-gold:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(201,168,76,0.3);
}

/* ═══════════════════════════════════════════════
   CART PAGE
   ═══════════════════════════════════════════════ */
.cart-item {
    background: var(--dark-card);
    border-radius: var(--radius);
    padding: 15px;
    margin-bottom: 12px;
    border: 1px solid var(--dark-border);
    display: flex;
    gap: 15px;
    align-items: center;
}
.cart-item img {
    width: 80px;
    height: 80px;
    border-radius: var(--radius-sm);
    object-fit: cover;
}
.cart-item-info {
    flex: 1;
}
.cart-item-info h5 {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-light);
    margin-bottom: 4px;
}
.cart-item-info .price {
    color: var(--gold);
    font-weight: 700;
    font-size: 0.95rem;
}

.cart-summary {
    background: var(--dark-card);
    border-radius: var(--radius);
    padding: 20px;
    border: 1px solid var(--dark-border);
    position: sticky;
    bottom: 80px;
}

/* ═══════════════════════════════════════════════
   AUTH MODAL
   ═══════════════════════════════════════════════ */
.modal-content {
    background: var(--dark-card);
    border: 1px solid var(--dark-border);
    border-radius: var(--radius);
    color: var(--text-light);
}
.modal-header {
    border-bottom: 1px solid var(--dark-border);
}
.modal-footer {
    border-top: 1px solid var(--dark-border);
}
.btn-close {
    filter: invert(1);
}

.form-control, .form-select {
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--dark-border);
    color: var(--text-light);
    border-radius: var(--radius-sm);
    padding: 12px 15px;
    font-family: 'Cairo', sans-serif;
}
.form-control:focus, .form-select:focus {
    background: rgba(255,255,255,0.08);
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(201,168,76,0.15);
    color: var(--text-light);
}
.form-control::placeholder {
    color: var(--text-muted);
}
.form-label {
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 600;
}

/* ═══════════════════════════════════════════════
   ANIMATIONS
   ═══════════════════════════════════════════════ */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-in {
    animation: fadeInUp 0.5s ease forwards;
}

/* ═══════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════ */
@media (max-width: 576px) {
    .store-header-sonbol {
        padding: 20px 0 50px;
    }
    .store-header-sonbol h2 {
        font-size: 1.3rem;
    }
    .sonbol-product-item {
        margin-bottom: 12px;
    }
    .sp-img-wrap {
        height: 120px;
    }
    .bottom-nav-item {
        min-width: 50px;
        padding: 6px 8px;
    }
    .bottom-nav-item span {
        font-size: 0.65rem;
    }
}

/* Hide desktop elements on mobile */
@media (max-width: 991px) {
    .desktop-only { display: none !important; }
}

/* Hide mobile elements on desktop */
@media (min-width: 992px) {
    .mobile-only { display: none !important; }
}

/* ═══════════════════════════════════════════════
   SCROLLBAR
   ═══════════════════════════════════════════════ */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: var(--darker);
}
::-webkit-scrollbar-thumb {
    background: var(--gold-dark);
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--gold);
}
