/**
 * SHOP MMO / DIGITAL MARKETPLACE - MAIN STYLESHEET
 * Modern SaaS UI, Clean, Responsive, Dark Mode Ready
 */

:root {
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --primary-light: #eff6ff;
    --secondary: #64748b;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --dark: #0f172a;
    --light: #f8fafc;
    --card-bg: #ffffff;
    --border-color: #e2e8f0;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --radius-card: 12px;
}

[data-bs-theme="dark"] {
    --light: #0b0f19;
    --card-bg: #111827;
    --border-color: #1f2937;
    --text-main: #f3f4f6;
    --text-muted: #9ca3af;
    --primary-light: #1e293b;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.3);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.4);
}

body {
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: var(--light);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.15s ease-in-out;
}

a:hover {
    color: var(--primary-hover);
}

/* CARDS */
.card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
    box-shadow: var(--shadow-md);
}

.card-product {
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.card-product:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.card-product .product-thumb-wrapper {
    position: relative;
    padding-top: 56.25%; /* 16:9 Aspect Ratio */
    background: #f1f5f9;
    overflow: hidden;
}

.card-product .product-thumb-wrapper img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.card-product:hover .product-thumb-wrapper img {
    transform: scale(1.05);
}

.card-product .badge-floating {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 2;
}

.card-product .badge-sale {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 2;
}

/* BUTTONS */
.btn-primary {
    background-color: var(--primary);
    border-color: var(--primary);
    font-weight: 500;
    border-radius: 8px;
    padding: 8px 16px;
}

.btn-primary:hover, .btn-primary:focus {
    background-color: var(--primary-hover);
    border-color: var(--primary-hover);
}

.btn-outline-primary {
    color: var(--primary);
    border-color: var(--primary);
    border-radius: 8px;
    font-weight: 500;
}

.btn-outline-primary:hover {
    background-color: var(--primary);
    color: #ffffff;
}

/* HERO SECTION */
.hero-section {
    background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 50%, #3b82f6 100%);
    color: #ffffff;
    border-radius: 16px;
    padding: 48px 32px;
    margin-bottom: 32px;
    position: relative;
    overflow: hidden;
}

.hero-section::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 400px;
    height: 400px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 50%;
    pointer-events: none;
}

/* NAVBAR */
.navbar-main {
    background-color: var(--card-bg);
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1020;
}

.search-input-group .form-control {
    border-radius: 8px 0 0 8px;
    border-right: none;
}

.search-input-group .btn {
    border-radius: 0 8px 8px 0;
}

/* BADGES */
.badge-soft-primary {
    background-color: var(--primary-light);
    color: var(--primary);
    font-weight: 600;
}

.badge-soft-success {
    background-color: #d1fae5;
    color: #065f46;
}

.badge-soft-danger {
    background-color: #fee2e2;
    color: #991b1b;
}

.badge-soft-warning {
    background-color: #fef3c7;
    color: #92400e;
}

/* AUTOCOMPLETE SEARCH RESULTS */
#search-autocomplete-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 1050;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: var(--shadow-lg);
    max-height: 380px;
    overflow-y: auto;
    display: none;
}

.search-result-item {
    display: flex;
    align-items: center;
    padding: 10px 14px;
    border-bottom: 1px solid var(--border-color);
    text-decoration: none;
    color: var(--text-main);
    transition: background-color 0.15s;
}

.search-result-item:hover {
    background-color: var(--primary-light);
}

.search-result-thumb {
    width: 44px;
    height: 44px;
    object-fit: cover;
    border-radius: 6px;
    margin-right: 12px;
}

/* MOBILE BOTTOM NAVIGATION */
.mobile-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: var(--card-bg);
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-around;
    padding: 8px 0;
    z-index: 1030;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
}

.mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--text-muted);
    font-size: 11px;
    text-decoration: none;
    position: relative;
}

.mobile-nav-item i {
    font-size: 18px;
    margin-bottom: 2px;
}

.mobile-nav-item.active, .mobile-nav-item:hover {
    color: var(--primary);
}

.mobile-badge {
    position: absolute;
    top: -2px;
    right: -6px;
    padding: 2px 5px;
    font-size: 9px;
    border-radius: 10px;
}

@media (min-width: 992px) {
    .mobile-bottom-nav {
        display: none !important;
    }
}

@media (max-width: 991.98px) {
    body {
        padding-bottom: 65px;
    }
}

/* VIETQR CARD */
.vietqr-box {
    background: #ffffff;
    border: 2px dashed #2563eb;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    color: #1e293b;
}

.vietqr-img {
    max-width: 260px;
    height: auto;
    border-radius: 8px;
    box-shadow: var(--shadow-md);
}

/* COPY BUTTON HOVER */
.copy-btn {
    cursor: pointer;
    transition: background 0.15s;
}

.copy-btn:hover {
    filter: brightness(0.9);
}

/* FOOTER */
.footer-main {
    background-color: #0f172a;
    color: #94a3b8;
    padding-top: 48px;
    padding-bottom: 24px;
    margin-top: auto;
}

.footer-main h5 {
    color: #ffffff;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 16px;
}

.footer-main a {
    color: #94a3b8;
    text-decoration: none;
    transition: color 0.15s;
}

.footer-main a:hover {
    color: #38bdf8;
}

.footer-bottom {
    border-top: 1px solid #1e293b;
    padding-top: 20px;
    margin-top: 32px;
    font-size: 13px;
}
