/**
 * BuyNiger AI - Multi-Vendor E-Commerce Platform
 * Written by Shuaibu Abdulmumin (08122598372, 07049906420)
 * 
 * Shop CSS - Premium Public Marketplace Styles
 */

/* =====================================================
   CSS RESET & BASE
   ===================================================== */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

ul,
ol {
    list-style: none;
}

a {
    text-decoration: none;
    color: inherit;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

/* =====================================================
   LAYOUT
   ===================================================== */
.shop-body {
    background: linear-gradient(180deg, #f8fafc 0%, #eef2f7 100%);
    color: var(--secondary-900);
    padding-top: 80px;
    min-height: 100vh;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
}

/* =====================================================
   NAVBAR - Premium Fixed Header
   ===================================================== */
.shop-navbar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05), 0 4px 12px rgba(0, 0, 0, 0.03);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    height: 80px;
    display: flex;
    align-items: center;
}

.navbar-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
    width: 100%;
}

.shop-logo {
    display: flex;
    align-items: center;
    height: 100%;
}

.logo-img {
    height: 45px;
    width: auto;
    object-fit: contain;
}

.logo-img-footer {
    height: 50px;
    width: auto;
    object-fit: contain;
    margin-bottom: 20px;
}

/* Search bar - Premium */
.search-bar {
    flex: 1;
    max-width: 560px;
}

.search-bar form {
    display: flex;
    background: white;
    border-radius: 50px;
    padding: 6px;
    border: 2px solid var(--secondary-100);
    transition: all 0.2s ease;
}

.search-bar form:focus-within {
    border-color: var(--primary-400);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

.search-bar input {
    flex: 1;
    background: transparent;
    border: none;
    padding: 12px 20px;
    font-size: 15px;
    outline: none;
    color: var(--secondary-900);
}

.search-bar input::placeholder {
    color: var(--secondary-400);
}

.search-bar button {
    background: linear-gradient(135deg, var(--primary-500) 0%, var(--primary-600) 100%);
    color: white;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s, box-shadow 0.2s;
}

.search-bar button:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

/* Navbar Nav Links */
.navbar-nav-links {
    display: flex;
    align-items: center;
    gap: 4px;
}

.navbar-nav-links a {
    color: var(--secondary-600);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    padding: 8px 14px;
    border-radius: 10px;
    transition: all 0.2s;
}

.navbar-nav-links a:hover {
    color: var(--primary-600);
    background: var(--primary-50);
}

/* Navbar Actions */
.navbar-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.nav-icon-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--secondary-600);
    font-weight: 600;
    font-size: 14px;
    padding: 8px 12px;
    border-radius: 12px;
    transition: all 0.2s;
}

.nav-icon-btn:hover {
    background: var(--secondary-50);
    color: var(--secondary-900);
}

.nav-icon-btn i {
    font-size: 20px;
}

.cart-btn {
    position: relative;
    background: var(--primary-50);
    color: var(--primary-600);
    padding: 12px;
    border-radius: 50%;
}

.cart-btn:hover {
    background: var(--primary-100);
}

.cart-btn .badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: var(--danger);
    color: white;
    font-size: 11px;
    min-width: 20px;
    height: 20px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    border: 2px solid white;
}

/* User Dropdown */
.user-dropdown {
    position: relative;
}

.dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    min-width: 200px;
    padding: 8px;
    margin-top: 8px;
    z-index: 1001;
}

.user-dropdown:hover .dropdown-content {
    display: block;
}

.dropdown-content a,
.dropdown-content button {
    display: block;
    width: 100%;
    padding: 12px 16px;
    text-align: left;
    border-radius: 10px;
    color: var(--secondary-700);
    font-size: 14px;
    font-weight: 500;
    transition: background 0.15s;
}

.dropdown-content a:hover,
.dropdown-content button:hover {
    background: var(--secondary-50);
    color: var(--secondary-900);
}

/* =====================================================
   HERO SECTION - Premium Gradient
   ===================================================== */
.hero-section {
    background: linear-gradient(135deg, #1e3a5f 0%, #0f172a 50%, #1e40af 100%);
    padding: 80px 40px;
    border-radius: 32px;
    color: white;
    text-align: center;
    margin: 24px 0 48px;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 30% 70%, rgba(59, 130, 246, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 70% 30%, rgba(139, 92, 246, 0.1) 0%, transparent 50%);
    animation: heroGlow 15s ease-in-out infinite alternate;
}

@keyframes heroGlow {
    0% {
        transform: translate(0, 0) rotate(0deg);
    }

    100% {
        transform: translate(5%, 5%) rotate(5deg);
    }
}

.hero-content {
    max-width: 700px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 800;
    margin-bottom: 16px;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.hero-subtitle {
    font-size: clamp(1rem, 2vw, 1.25rem);
    opacity: 0.85;
    margin-bottom: 32px;
    line-height: 1.6;
}

.hero-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

/* =====================================================
   SECTION HEADERS
   ===================================================== */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
    flex-wrap: wrap;
    gap: 16px;
}

.section-title {
    font-family: var(--font-display);
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 800;
    color: var(--secondary-900);
}

.text-link {
    color: var(--primary-600);
    font-weight: 600;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: gap 0.2s;
}

.text-link:hover {
    gap: 10px;
}

.text-link::after {
    content: '→';
}

/* =====================================================
   CATEGORY CARDS
   ===================================================== */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 20px;
    margin-bottom: 48px;
}

.category-card {
    background: white;
    padding: 28px 20px;
    border-radius: 20px;
    text-align: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid var(--secondary-100);
    cursor: pointer;
}

.category-card:hover {
    transform: translateY(-8px);
    border-color: var(--primary-200);
    box-shadow: 0 20px 40px -12px rgba(0, 0, 0, 0.12);
}

.category-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--primary-50) 0%, var(--primary-100) 100%);
    color: var(--primary-600);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin: 0 auto 16px;
    transition: transform 0.3s;
}

.category-card:hover .category-icon {
    transform: scale(1.1) rotate(5deg);
}

.category-card h3 {
    font-size: 14px;
    font-weight: 700;
    color: var(--secondary-800);
}

/* =====================================================
   PRODUCT CARDS - Premium Design
   ===================================================== */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 24px;
    margin-bottom: 48px;
}

.product-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid var(--secondary-100);
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
    border-color: transparent;
}

.product-image-wrapper {
    position: relative;
    padding-top: 100%;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
}

.product-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s;
}

.product-card:hover .product-image {
    transform: scale(1.05);
}

.product-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-new {
    background: linear-gradient(135deg, var(--primary-500) 0%, var(--primary-600) 100%);
    color: white;
}

.badge-sale {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
}

.product-info {
    padding: 20px;
}

.product-cat {
    font-size: 11px;
    color: var(--secondary-400);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 8px;
    font-weight: 600;
}

.product-name {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--secondary-900);
    display: block;
    line-height: 1.4;
    transition: color 0.2s;
}

.product-name:hover {
    color: var(--primary-600);
}

.product-price-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}

.product-price {
    font-size: 20px;
    font-weight: 800;
    color: var(--primary-600);
}

.product-old-price {
    font-size: 14px;
    color: var(--secondary-400);
    text-decoration: line-through;
}

.product-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 16px;
    border-top: 1px solid var(--secondary-100);
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #fbbf24;
    font-size: 13px;
}

.product-rating span {
    color: var(--secondary-500);
    font-weight: 600;
}

.add-to-cart-btn {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary-500) 0%, var(--primary-600) 100%);
    color: white;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: all 0.2s;
}

.add-to-cart-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
}

/* =====================================================
   FOOTER - Clean Professional
   ===================================================== */
.shop-footer {
    background: white;
    padding: 80px 0 40px;
    margin-top: 80px;
    border-top: 1px solid var(--secondary-100);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr repeat(3, 1fr);
    gap: 48px;
    margin-bottom: 48px;
}

.footer-brand .shop-logo {
    margin-bottom: 16px;
    display: inline-block;
}

.footer-brand p {
    color: var(--secondary-500);
    max-width: 280px;
    line-height: 1.7;
    font-size: 14px;
}

.footer-links h4 {
    font-weight: 700;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 20px;
    color: var(--secondary-900);
}

.footer-links ul {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-links li a {
    color: var(--secondary-500);
    font-size: 14px;
    transition: color 0.2s, padding-left 0.2s;
    display: inline-block;
}

.footer-links li a:hover {
    color: var(--primary-600);
    padding-left: 4px;
}

.footer-bottom {
    border-top: 1px solid var(--secondary-100);
    padding-top: 32px;
    text-align: center;
    color: var(--secondary-400);
    font-size: 13px;
}

/* =====================================================
   BUTTONS - Premium
   ===================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    font-size: 15px;
    font-weight: 600;
    border-radius: 14px;
    transition: all 0.2s;
    white-space: nowrap;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-500) 0%, var(--primary-600) 100%);
    color: white;
    box-shadow: 0 4px 14px rgba(59, 130, 246, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.4);
}

.btn-outline-white {
    border: 2px solid rgba(255, 255, 255, 0.5);
    color: white;
    background: rgba(255, 255, 255, 0.1);
}

.btn-outline-white:hover {
    background: white;
    color: var(--primary-900);
    border-color: white;
}

.btn-lg {
    padding: 18px 36px;
    font-size: 16px;
}

.btn-sm {
    padding: 10px 18px;
    font-size: 13px;
}

/* =====================================================
   MOBILE RESPONSIVE
   ===================================================== */
@media (max-width: 1024px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 40px;
    }

    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    }
}

@media (max-width: 768px) {
    .shop-body {
        padding-top: 70px;
    }

    .shop-navbar {
        height: 70px;
    }

    .navbar-wrapper {
        gap: 12px;
    }

    .shop-logo {
        font-size: 1.5rem;
    }

    .search-bar {
        display: none;
    }

    .nav-icon-btn span {
        display: none;
    }

    .hero-section {
        padding: 48px 24px;
        border-radius: 20px;
        margin: 16px 0 32px;
    }

    .hero-actions {
        flex-direction: column;
        gap: 12px;
    }

    .hero-actions .btn {
        width: 100%;
    }

    .section-header {
        margin-bottom: 20px;
    }

    .category-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
    }

    .category-card {
        padding: 20px 12px;
        border-radius: 16px;
    }

    .category-icon {
        width: 48px;
        height: 48px;
        font-size: 1.25rem;
        border-radius: 14px;
        margin-bottom: 12px;
    }

    .category-card h3 {
        font-size: 12px;
    }

    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .product-card {
        border-radius: 16px;
    }

    .product-info {
        padding: 14px;
    }

    .product-name {
        font-size: 14px;
    }

    .product-price {
        font-size: 16px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 32px;
        text-align: center;
    }

    .footer-brand {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .footer-brand p {
        max-width: 100%;
    }

    .shop-footer {
        padding: 48px 0 32px;
    }

    .container {
        padding: 0 16px;
    }
}

@media (max-width: 480px) {
    .category-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .product-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .btn {
        padding: 12px 20px;
        font-size: 14px;
    }
}

/* =====================================================
   CUSTOMER SIDEBAR STYLES
   ===================================================== */
.nav-section {
    margin-bottom: 16px;
}

.nav-section-title {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--secondary-400);
    margin-bottom: 8px;
    padding: 0 12px;
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    color: var(--secondary-600);
    border-radius: 10px;
    margin-bottom: 2px;
    transition: all 0.2s;
    font-weight: 500;
    font-size: 14px;
}

.nav-link i {
    width: 24px;
    font-size: 16px;
    margin-right: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-link:hover {
    background: var(--secondary-50);
    color: var(--secondary-900);
}

.nav-link.active {
    background: var(--primary-50);
    color: var(--primary-600);
    font-weight: 600;
}

/* =====================================================
   UTILITY CLASSES
   ===================================================== */
.mt-3 {
    margin-top: 12px;
}

.mt-4 {
    margin-top: 16px;
}

.mt-5 {
    margin-top: 24px;
}

.mb-5 {
    margin-bottom: 24px;
}

.py-5 {
    padding-top: 40px;
    padding-bottom: 40px;
}

.ml-3 {
    margin-left: 12px;
}

.mr-2 {
    margin-right: 8px;
}

.flex-1 {
    flex: 1;
}

/* =====================================================
   MOBILE MENU BUTTON
   ===================================================== */
.mobile-menu-btn {
    display: none;
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: var(--secondary-700);
    border-radius: 10px;
    transition: background 0.2s;
}

.mobile-menu-btn:hover {
    background: var(--secondary-100);
}

/* =====================================================
   MOBILE SEARCH OVERLAY
   ===================================================== */
.mobile-search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 2000;
    display: none;
    align-items: flex-start;
    padding: 20px;
    padding-top: 100px;
}

.mobile-search-overlay.active {
    display: flex;
}

.mobile-search-container {
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
    display: flex;
    gap: 12px;
}

.mobile-search-container form {
    flex: 1;
    display: flex;
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.mobile-search-container input {
    flex: 1;
    padding: 16px 20px;
    border: none;
    font-size: 16px;
    outline: none;
}

.mobile-search-container button {
    padding: 16px 20px;
    background: var(--primary-600);
    color: white;
    font-size: 16px;
}

.close-search {
    width: 50px;
    height: 50px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: var(--secondary-600);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* =====================================================
   MOBILE DRAWER
   ===================================================== */
.mobile-drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.mobile-drawer-overlay.active {
    opacity: 1;
    visibility: visible;
}

.mobile-drawer {
    position: fixed;
    top: 0;
    left: 0;
    width: 280px;
    height: 100%;
    background: white;
    z-index: 2000;
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    box-shadow: 4px 0 30px rgba(0, 0, 0, 0.15);
}

.mobile-drawer.open {
    transform: translateX(0);
}

.drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid var(--secondary-100);
}

.drawer-header button {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--secondary-500);
}

.drawer-content {
    flex: 1;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.drawer-link {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border-radius: 12px;
    color: var(--secondary-700);
    font-weight: 600;
    font-size: 15px;
    transition: all 0.2s;
    width: 100%;
    text-align: left;
}

.drawer-link i {
    width: 20px;
    text-align: center;
    color: var(--secondary-400);
}

.drawer-link:hover {
    background: var(--secondary-50);
    color: var(--primary-600);
}

/* =====================================================
   SCROLL TO TOP
   ===================================================== */
.scroll-to-top {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--primary-500) 0%, var(--primary-600) 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    box-shadow: 0 4px 20px rgba(59, 130, 246, 0.4);
    z-index: 1000;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s;
}

.scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.scroll-to-top:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(59, 130, 246, 0.5);
}

/* =====================================================
   VISIBILITY UTILITIES
   ===================================================== */
.desktop-only {
    display: flex;
}

.mobile-only {
    display: none;
}

@media (max-width: 768px) {
    .desktop-only {
        display: none !important;
    }

    .mobile-only {
        display: flex !important;
    }

    .mobile-menu-btn {
        display: flex;
    }

    .scroll-to-top {
        bottom: 16px;
        right: 16px;
        width: 44px;
        height: 44px;
    }
}