/* Linglin Store - Main Stylesheet */
/* Preloader Styles */
/* Page Fade Overlay */
#page-fade {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #000;
    z-index: 9999;
    opacity: 1;
    pointer-events: all;
    transition: opacity 1s;
}
#page-fade.hide {
    opacity: 0;
    pointer-events: none;
    transition: opacity 1s;
}

/* Font declarations */
@font-face {
    font-family: 'Daemon';
    src: url('/static/fonts/Daemon%20Full%20Working.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'Zcool';
    src: url('/static/fonts/ZCool.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

:root {
    --primary: #ff0019;
    --primary-dark: #a02830;
    --secondary: #001f3f;
    --success: #28a745;
    --danger: #dc3545;
    --warning: #ffc107;
    --info: #0066cc;
    --light: #f0f0f0;
    --dark: #000000;
    --black: #000000;
    --red: #dc3545;
    --blue: #0066cc;
}

* {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

body {
    background-color: #fff;
    color: #333;
    line-height: 1.6;
}

/* Language-specific fonts */
html[lang="en"],
html[lang="en"] * {
    font-family: 'Zcool', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
}

html[lang="daemon"],
html[lang="daemon"] * {
    font-family: 'Daemon', sans-serif !important;
}

html[lang="zh"],
html[lang="zh"] * {
    font-family: 'Zcool', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
}

html[lang="ja"],
html[lang="ja"] * {
    font-family: 'Zcool', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
}

/* Font exceptions for language dropdown */
.dropdown-menu .lang-english {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif !important;
}

.dropdown-menu .lang-daemon {
    font-family: 'Daemon', sans-serif !important;
}

/* Navigation */
.navbar {
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    border-bottom: 3px solid var(--primary);
}

.navbar-brand {
    font-size: 1.3rem;
    color: var(--primary) !important;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.nav-link {
    color: var(--dark) !important;
    transition: color 0.3s;
}

.nav-link:hover {
    color: var(--primary) !important;
}

/* Hero Section */
.hero {
    color: white;
    padding: 60px 0;
    text-align: center;
    min-height: 500px;
    display: flex;
    align-items: center;
}

.hero h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

/* Cards */
.card {
    border: none;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    border-top: 3px solid var(--primary);
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 16px rgba(220, 53, 69, 0.2);
}

.card-img-top {
    height: 250px;
    object-fit: cover;
    border-radius: 8px 8px 0 0;
}

/* Buttons */
.btn {
    border-radius: 6px;
    font-weight: 500;
    padding: 0.6rem 1.5rem;
    transition: all 0.3s;
}

.btn-primary {
    background-color: var(--primary);
    border-color: var(--primary);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
}

.btn-primary:disabled {
    opacity: 0.6;
}

/* Products Grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
    padding: 40px 0;
}

.product-card {
    display: flex;
    flex-direction: column;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: all 0.3s;
    border-top: 3px solid var(--primary);
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 24px rgba(220, 53, 69, 0.2);
}

.product-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
    background-color: var(--light);
}

.product-info {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.product-name {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--dark);
}

.product-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 12px;
}

.product-description {
    color: var(--secondary);
    font-size: 0.9rem;
    margin-bottom: 16px;
    flex-grow: 1;
}

.product-footer {
    display: flex;
    gap: 8px;
    padding-top: 12px;
    border-top: 1px solid #eee;
}

/* Forms */
.form-control, .form-select {
    border-radius: 6px;
    border: 1px solid #ddd;
    padding: 0.75rem 1rem;
    font-size: 1rem;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

.form-label {
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--dark);
}

/* Alerts */
.alert {
    border: none;
    border-radius: 6px;
    padding: 12px 16px;
    font-size: 0.95rem;
    border-left: 4px solid;
}

.alert-success {
    background-color: #d4edda;
    border-left-color: var(--success);
    color: #155724;
}

.alert-danger {
    background-color: #f8d7da;
    border-left-color: var(--danger);
    color: #721c24;
}

.alert-warning {
    background-color: #fff3cd;
    border-left-color: var(--warning);
    color: #856404;
}

.alert-info {
    background-color: #d1ecf1;
    border-left-color: var(--info);
    color: #0c5460;
}

/* Badges */
.badge {
    border-radius: 20px;
    padding: 4px 10px;
}

/* Tables */
.table {
    border-radius: 8px;
    overflow: hidden;
}

.table thead {
    background: linear-gradient(90deg, #000000 0%, #1a1a1a 100%);
    color: white;
}

.table th {
    font-weight: 600;
    border-bottom: 2px solid var(--primary);
    color: white;
}

/* Footer */
footer {
    margin-top: auto;
}

footer a {
    color: var(--secondary);
}

footer a:hover {
    color: var(--primary);
}

/* Responsive */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2rem;
    }
    
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 16px;
    }
}

/* Loading state */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Feather icon sizing */
[data-feather] {
    stroke-width: 2;
}

/* Product detail */
.product-detail-image {
    max-width: 100%;
    border-radius: 8px;
}

/* Cart */
.cart-item {
    display: flex;
    align-items: center;
    padding: 16px;
    border-bottom: 1px solid #eee;
}

.cart-item-image {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 6px;
    margin-right: 16px;
}

.cart-item-info {
    flex-grow: 1;
}

.cart-item-price {
    font-weight: 600;
    color: var(--primary);
    margin-left: auto;
}

/* Checkout */
.checkout-section {
    background: var(--light);
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

/* Category Cards */
.category-card {
    border-radius: 8px;
    padding: 30px 20px;
    color: white;
    text-align: center;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
    border: none;
    text-decoration: none;
}

.category-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.2);
    color: white;
    text-decoration: none;
}

.category-gradient-1 {
    background: linear-gradient(135deg, #dc3545 0%, #a02830 100%);
}

.category-gradient-2 {
    background: linear-gradient(135deg, #0066cc 0%, #001f3f 100%);
}

.category-gradient-3 {
    background: linear-gradient(135deg, #1a1a1a 0%, #000000 100%);
    border: 2px solid #dc3545;
}

/* Blog */
.blog-post {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    transition: all 0.3s;
    border-left: 4px solid var(--primary);
}

.blog-post:hover {
    box-shadow: 0 4px 16px rgba(220, 53, 69, 0.2);
}

.blog-featured-image {
    width: 100%;
    height: 300px;
    object-fit: cover;
}

.blog-content {
    padding: 24px;
}

.blog-meta {
    color: var(--secondary);
    font-size: 0.9rem;
    margin-bottom: 12px;
}

.blog-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--dark);
}

.blog-excerpt {
    color: var(--secondary);
    margin-bottom: 16px;
}

/* Admin panel */
.admin-sidebar {
    background: linear-gradient(180deg, #000000 0%, #1a1a1a 100%);
    color: white;
    min-height: 100vh;
    padding: 20px 0;
    border-right: 3px solid #dc3545;
}

.admin-sidebar a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    padding: 12px 20px;
    display: block;
    transition: all 0.3s;
}

.admin-sidebar a:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
}

.admin-sidebar a.active {
    background-color: var(--primary);
    color: white;
}

/* 2FA setup */
.qr-code-container {
    text-align: center;
    padding: 30px;
    background: var(--light);
    border-radius: 8px;
}

.qr-code-container img {
    max-width: 300px;
}

/* Pagination */
.pagination {
    gap: 4px;
}

.page-link {
    border-radius: 4px;
    border: 1px solid #ddd;
    color: var(--primary);
}

.page-link:hover {
    background-color: var(--primary);
    border-color: var(--primary);
    color: white;
}

.page-item.active .page-link {
    background-color: var(--primary);
    border-color: var(--primary);
}

/* Utility classes */
.text-muted {
    color: var(--secondary) !important;
}

.border-top {
    border-top: 1px solid #eee !important;
}

.bg-light {
    background-color: var(--light) !important;
}
