/* Premium Design System */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&family=Plus+Jakarta+Sans:wght@400;500;600;700&display=swap');

:root {
    /* Modern Color Palette */
    --primary-gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #d946ef 100%);
    --primary-color: #6366f1;
    --secondary-color: #0f172a;
    --accent-color: #f43f5e;
    
    /* Backgrounds */
    --bg-color: #f8fafc;
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.5);
    --card-bg: #ffffff;
    
    /* Text */
    --text-main: #0f172a;
    --text-muted: #64748b;
    --text-light: #94a3b8;
    
    /* Effects */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-glow: 0 0 20px rgba(99, 102, 241, 0.3);
    
    --radius-sm: 0.5rem;
    --radius-md: 0.75rem;
    --radius-lg: 1rem;
    --radius-xl: 1.5rem;
    
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-main);
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Header & Navigation */
.site-header {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--glass-border);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: var(--transition);
}

.site-header.scrolled {
    padding: 0.75rem 0;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: var(--shadow-md);
}

.site-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: 'Outfit', sans-serif;
    font-size: 1.75rem;
    font-weight: 800;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.02em;
}

.main-nav {
    display: flex;
    gap: 0.5rem;
}

.main-nav a {
    font-weight: 600;
    color: var(--text-muted);
    padding: 0.6rem 1.2rem;
    border-radius: var(--radius-md);
}

.main-nav a:hover {
    color: var(--primary-color);
    background: rgba(99, 102, 241, 0.05);
}

.main-nav a.btn-nav {
    background: var(--text-main);
    color: white;
}

.main-nav a.btn-nav:hover {
    background: var(--primary-color);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

/* Hero Section */
.hero-section {
    position: relative;
    padding: 6rem 0 4rem;
    background: url('../images/hero-bg.png') no-repeat center center/cover;
    margin-bottom: 3rem;
    border-radius: 0 0 3rem 3rem;
    overflow: hidden;
    color: white;
    text-align: center;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(15, 23, 42, 0.3), rgba(15, 23, 42, 0.7));
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    margin: 0 auto;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    text-shadow: 0 2px 10px rgba(0,0,0,0.2);
    letter-spacing: -0.03em;
}

.hero-subtitle {
    font-size: 1.25rem;
    opacity: 0.9;
    margin-bottom: 2.5rem;
    font-weight: 400;
}

/* Main Content */
.main-content {
    flex: 1;
    padding: 2rem 0 4rem;
}

/* Cards */
.card {
    background: var(--card-bg);
    border-radius: var(--radius-xl);
    border: 1px solid rgba(226, 232, 240, 0.6);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: var(--transition);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
    border-color: rgba(99, 102, 241, 0.2);
}

.card-image-link {
    display: block;
    position: relative;
    overflow: hidden;
    padding-top: 60%; /* Aspect Ratio */
}

.card-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.card:hover .card-image {
    transform: scale(1.1);
}

.card-body {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.card-title {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    font-weight: 700;
}

.card-title a {
    color: var(--text-main);
    background: linear-gradient(to right, var(--primary-color), var(--primary-color)) 0 100% no-repeat;
    background-size: 0% 2px;
    transition: background-size 0.3s;
}

.card-title a:hover {
    color: var(--primary-color);
    background-size: 100% 2px;
}

.card-text {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-footer {
    padding-top: 1rem;
    border-top: 1px solid #f1f5f9;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-meta {
    font-size: 0.85rem;
    color: var(--text-light);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Store Grid */
.store-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 1rem;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: var(--primary-gradient);
    color: white;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.4);
}

.btn-secondary {
    background: white;
    color: var(--text-main);
    border: 1px solid #e2e8f0;
}

.btn-secondary:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    transform: translateY(-1px);
}

/* Featured Section */
.featured-section {
    margin-bottom: 4rem;
}

.section-title {
    font-size: 2rem;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.section-title::after {
    content: '';
    flex: 1;
    height: 2px;
    background: linear-gradient(to right, #e2e8f0, transparent);
}

.featured-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.featured-card {
    height: 240px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    position: relative;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

.featured-card:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: var(--shadow-xl);
}

.featured-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.featured-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 1.5rem;
    color: white;
}

.featured-overlay h3 {
    color: white;
    font-size: 1.25rem;
    margin-bottom: 0.25rem;
}

/* Badges */
.card-badges {
    position: absolute;
    top: 1rem;
    left: 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    z-index: 10;
}

.card-badge {
    padding: 0.35rem 0.75rem;
    border-radius: 2rem;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: white;
    backdrop-filter: blur(4px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.card-badge.featured { background: linear-gradient(135deg, #f59e0b, #d97706); }
.card-badge.hot { background: linear-gradient(135deg, #ef4444, #be123c); }
.card-badge.recommended { background: linear-gradient(135deg, #10b981, #059669); }

/* Search & Filter */
.search-filter-section {
    background: white;
    padding: 2rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    margin-top: -3rem; /* Overlap hero */
    margin-bottom: 3rem;
    position: relative;
    z-index: 10;
    border: 1px solid rgba(226, 232, 240, 0.8);
}

.search-form {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 1rem;
}

.search-box {
    display: flex;
    gap: 1rem;
    flex: 1;
}

.form-control {
    width: 100%;
    padding: 0.875rem 1.25rem;
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-family: inherit;
    transition: var(--transition);
    background: #f8fafc;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    background: white;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.filter-row {
    display: flex;
    gap: 1rem;
}

/* Back Link */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: white;
    color: var(--text-main);
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.back-link:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: translateX(-5px);
    box-shadow: var(--shadow-md);
}

/* Store Detail */
.store-detail {
    background: white;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    margin-bottom: 3rem;
}

.store-image-large {
    width: 100%;
    height: 400px;
    object-fit: cover;
}

.store-info {
    padding: 3rem;
}

.store-name {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    background: linear-gradient(to right, var(--text-main), #475569);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.store-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    padding: 1.5rem;
    background: #f8fafc;
    border-radius: var(--radius-lg);
    margin: 2rem 0;
    border: 1px solid #e2e8f0;
}

.store-meta-item strong {
    display: block;
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--text-light);
    margin-bottom: 0.25rem;
}

.store-meta-item span, .store-meta-item a {
    font-weight: 600;
    color: var(--text-main);
}

/* Social Share */
.social-share {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: center;
}

.social-btn {
    padding: 0.6rem 1.2rem;
    border-radius: 2rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: white;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: transform 0.2s;
}

.social-btn:hover {
    transform: translateY(-3px);
}

.social-btn.facebook { background: #1877f2; }
.social-btn.twitter { background: #000000; }
.social-btn.youtube { background: #ff0000; }
.social-btn.xiaohongshu { background: linear-gradient(135deg, #fe2c55, #ff6a88); }
.social-btn.tiktok { background: linear-gradient(135deg, #000000, #333333); }

/* Comments */
.comments-section {
    max-width: 900px;
    margin: 0 auto;
}

.comment-form {
    background: white;
    padding: 2rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    margin-bottom: 2rem;
}

.comment-item {
    background: white;
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid #f1f5f9;
    transition: var(--transition);
}

.comment-item:hover {
    box-shadow: var(--shadow-md);
    transform: translateX(5px);
}

.comment-author {
    font-weight: 700;
    color: var(--text-main);
}

/* Footer */
.site-footer {
    background: white;
    padding: 3rem 0;
    border-top: 1px solid #e2e8f0;
    margin-top: auto;
    text-align: center;
    color: var(--text-muted);
}

/* Responsive */
@media (max-width: 768px) {
    .hero-title { font-size: 2.5rem; }
    .search-form { grid-template-columns: 1fr; }
    .search-box { flex-direction: column; }
    .filter-row { flex-direction: column; }
    .store-info { padding: 1.5rem; }
    .store-image-large { height: 250px; }
}

/* Star Rating Display */
.store-rating {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    padding: 10px 20px;
    background: linear-gradient(135deg, #fffbeb, #fef3c7);
    border: 1px solid #fde68a;
    border-radius: var(--radius-full, 50px);
}

.star-rating-display {
    display: flex;
    gap: 2px;
}

.star {
    font-size: 1.2rem;
}

.star.filled {
    color: #f59e0b;
    text-shadow: 0 1px 2px rgba(245, 158, 11, 0.3);
}

.star.empty {
    color: #e5e7eb;
}

.rating-text {
    font-size: 0.95rem;
    color: #92400e;
    font-weight: 600;
}

/* Star Rating Input */
.star-rating-input {
    display: flex;
    flex-direction: row-reverse;
    justify-content: flex-end;
    gap: 5px;
}

.star-rating-input input {
    display: none;
}

.star-rating-input label {
    cursor: pointer;
    font-size: 2rem;
    color: #e5e7eb;
    transition: color 0.2s;
}

.star-rating-input label:hover,
.star-rating-input label:hover ~ label,
.star-rating-input input:checked ~ label {
    color: #f59e0b;
}

/* No Image Placeholder */
.no-image {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    font-size: 3rem;
}

/* Alert Animations */
@keyframes slideDown {
    from { transform: translateY(-20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.alert {
    animation: slideDown 0.5s ease-out forwards;
    box-shadow: var(--shadow-md);
    border: none;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert-success {
    background: linear-gradient(to right, #dcfce7, #bbf7d0);
    color: #166534;
    border-left: 4px solid #16a34a;
}

.alert-error {
    background: linear-gradient(to right, #fee2e2, #fecaca);
    color: #991b1b;
    border-left: 4px solid #dc2626;
}

/* Mini Rating in Cards */
.store-rating-mini .star {
    color: #cbd5e1;
}
.store-rating-mini .star.filled {
    color: #f59e0b;
}


/* Alert Animations */
@keyframes slideDown {
    from { transform: translateY(-20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.alert {
    animation: slideDown 0.5s ease-out forwards;
    box-shadow: var(--shadow-md);
    border: none;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert-success {
    background: linear-gradient(to right, #dcfce7, #bbf7d0);
    color: #166534;
    border-left: 4px solid #16a34a;
}

.alert-error {
    background: linear-gradient(to right, #fee2e2, #fecaca);
    color: #991b1b;
    border-left: 4px solid #dc2626;
}

/* Mini Rating in Cards */
.store-rating-mini .star {
    color: #cbd5e1;
}
.store-rating-mini .star.filled {
    color: #f59e0b;
}


/* Toast Modal */
.toast-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.toast-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
}

.toast-content {
    position: relative;
    background: white;
    padding: 2.5rem;
    border-radius: var(--radius-xl);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    text-align: center;
    max-width: 400px;
    width: 90%;
    animation: scaleIn 0.3s ease;
}

.toast-icon {
    margin-bottom: 1.25rem;
}

.toast-success .toast-icon {
    color: #10b981;
}

.toast-error .toast-icon {
    color: #ef4444;
}

.toast-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-main);
}

.toast-message {
    color: var(--text-muted);
    font-size: 1rem;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.toast-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 2.5rem;
    background: var(--primary-gradient);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.toast-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.4);
}

.toast-error .toast-btn {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.toast-error .toast-btn:hover {
    box-shadow: 0 8px 20px rgba(239, 68, 68, 0.4);
}

.toast-modal.closing {
    animation: fadeOut 0.2s ease forwards;
}

.toast-modal.closing .toast-content {
    animation: scaleOut 0.2s ease forwards;
}

@keyframes scaleOut {
    from { 
        opacity: 1;
        transform: scale(1);
    }
    to { 
        opacity: 0;
        transform: scale(0.9);
    }
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.pagination-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 0.75rem;
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    color: var(--text-main);
    font-weight: 500;
    font-size: 0.9rem;
    transition: var(--transition);
    text-decoration: none;
}

.pagination-btn:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.pagination-btn.active {
    background: var(--primary-gradient);
    color: white;
    border-color: transparent;
    box-shadow: var(--shadow-glow);
}
