:root {
    --primary: #0f172a;
    --primary-light: #1e293b;
    --accent: #f97316;
    --accent-hover: #ea580c;
    --accent-light: #fff7ed;
    --accent-dark: #c2410c;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --bg: #f8fafc;
    --bg-alt: #f1f5f9;
    --card: #ffffff;
    --text: #0f172a;
    --text-light: #64748b;
    --text-muted: #94a3b8;
    --border: #e2e8f0;
    --shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
    --shadow-hover: 0 10px 25px rgba(0,0,0,0.08), 0 4px 10px rgba(0,0,0,0.05);
    --shadow-lg: 0 20px 40px rgba(0,0,0,0.1);
    --radius: 8px;
    --radius-sm: 6px;
    --radius-xl: 12px;
    --transition: 0.2s ease;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

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

/* ===== NAVBAR ===== */
.navbar {
    background: var(--card);
    border-bottom: 1px solid var(--border);
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 64px;
}

.logo {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.logo i { color: var(--accent); font-size: 1.2rem; }
.logo span { color: var(--accent); }

.nav-toggle { display: none; color: var(--text); font-size: 1.3rem; cursor: pointer; }

.nav-links { display: flex; gap: 0.25rem; align-items: center; }

.nav-links a {
    color: var(--text-light);
    padding: 0.4rem 0.9rem;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 500;
    transition: all var(--transition);
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.nav-links a:hover {
    color: var(--text);
    background: var(--bg-alt);
}

.nav-links a.nav-admin {
    background: var(--accent);
    color: white;
    font-weight: 600;
}
.nav-links a.nav-admin:hover {
    background: var(--accent-hover);
}

/* ===== MAIN ===== */
main {
    flex: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    width: 100%;
}

/* ===== HERO ===== */
.hero {
    display: flex;
    align-items: center;
    gap: 4rem;
    padding: 3rem 0;
    margin-bottom: 1.5rem;
}

.hero-content { flex: 1; }

.hero-content h1 {
    font-size: 2.75rem;
    color: var(--text);
    margin-bottom: 1rem;
    line-height: 1.15;
    letter-spacing: -0.02em;
}

.hero-content h1 .highlight {
    color: var(--accent);
}

.hero-content p {
    color: var(--text-light);
    font-size: 1.1rem;
    margin-bottom: 2rem;
    max-width: 480px;
    line-height: 1.7;
}

.hero-buttons { display: flex; gap: 0.75rem; }

.hero-image {
    flex: 0 0 260px;
    height: 260px;
    background: linear-gradient(135deg, var(--accent-light), #bfdbfe);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
}

.hero-icon { font-size: 5rem; color: var(--accent); opacity: 0.8; }

/* ===== BUTTONS ===== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.65rem 1.25rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.875rem;
    border: none;
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
    line-height: 1;
}

.btn-primary {
    background: var(--accent);
    color: white;
}
.btn-primary:hover { background: var(--accent-hover); box-shadow: 0 4px 12px rgba(249,115,22,0.3); }

.btn-secondary {
    background: var(--card);
    color: var(--text);
    border: 1px solid var(--border);
}
.btn-secondary:hover { border-color: var(--text-muted); background: var(--bg); }

.btn-sm { padding: 0.35rem 0.7rem; font-size: 0.8rem; }
.btn-lg { padding: 0.8rem 1.75rem; font-size: 0.95rem; }
.btn-block { width: 100%; justify-content: center; }

.btn-logout {
    background: var(--danger);
    color: white;
}
.btn-logout:hover { background: #dc2626; }

/* ===== FEATURES ===== */
.features {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1px;
    background: var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 3rem;
    border: 1px solid var(--border);
}

.feature-card {
    background: var(--card);
    padding: 1.5rem 1rem;
    text-align: center;
}

.feature-card i {
    font-size: 1.5rem;
    color: var(--accent);
    margin-bottom: 0.5rem;
}

.feature-card h3 { font-size: 0.9rem; font-weight: 600; margin-bottom: 0.15rem; }
.feature-card p { font-size: 0.8rem; color: var(--text-light); }

/* ===== SECTION HEADER ===== */
.section-header {
    text-align: center;
    margin-bottom: 2rem;
}
.section-header h2 { font-size: 1.6rem; color: var(--text); margin-bottom: 0.25rem; }
.section-header h2 i { color: var(--accent); }
.section-header p { color: var(--text-light); font-size: 0.9rem; }

.page-header {
    text-align: center;
    padding: 1rem 0 2rem;
}
.page-header h1 { font-size: 1.6rem; color: var(--text); margin-bottom: 0.25rem; }
.page-header h1 i { color: var(--accent); margin-right: 0.4rem; }
.page-header p { color: var(--text-light); font-size: 0.95rem; }
.page-header span { color: var(--accent); }

/* ===== PRODUCTS GRID ===== */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.25rem;
}

.product-card {
    background: var(--card);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all var(--transition);
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border);
}
.product-card:hover { box-shadow: var(--shadow-hover); border-color: transparent; }

.product-image {
    height: 200px;
    overflow: hidden;
    position: relative;
    display: block;
    background: var(--bg-alt);
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}
.product-card:hover .product-image img { transform: scale(1.05); }

.product-overlay {
    position: absolute;
    inset: 0;
    background: rgba(15,23,42,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 500;
    font-size: 0.85rem;
    gap: 0.4rem;
    opacity: 0;
    transition: opacity var(--transition);
}
.product-card:hover .product-overlay { opacity: 1; }

.product-info { padding: 1rem 1.25rem 1.25rem; flex: 1; display: flex; flex-direction: column; }

.product-info h3 {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 0.35rem;
}
.product-info h3 a { color: var(--text); }
.product-info h3 a:hover { color: var(--accent); }

.product-info p {
    font-size: 0.8rem;
    color: var(--text-light);
    flex: 1;
    margin-bottom: 0.75rem;
    line-height: 1.5;
}

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

.price {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text);
}

/* ===== PRODUCT DETAIL ===== */
.product-detail {
    max-width: 900px;
    margin: 0 auto;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--text-light);
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
}
.back-link:hover { color: var(--accent); }

.product-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
    background: var(--card);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

.product-detail-image {
    height: 400px;
    background: var(--bg-alt);
}

.product-detail-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-detail-info { padding: 2rem 2rem 2rem 0; }

.product-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    background: var(--accent-light);
    color: var(--accent-dark);
    padding: 0.25rem 0.7rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.product-detail-info h1 {
    font-size: 1.6rem;
    margin-bottom: 0.5rem;
    letter-spacing: -0.01em;
}

.product-rating {
    color: #f59e0b;
    margin-bottom: 0.75rem;
    font-size: 0.85rem;
}
.product-rating span { color: var(--text-light); margin-left: 0.25rem; }

.product-detail-price {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 1rem;
}

.product-detail-desc {
    color: var(--text-light);
    margin-bottom: 1.5rem;
    line-height: 1.7;
    font-size: 0.95rem;
}

.product-actions {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.product-meta {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}
.product-meta p {
    font-size: 0.85rem;
    color: var(--text-light);
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

/* ===== FORMS ===== */
.form-container {
    max-width: 420px;
    margin: 2rem auto;
    background: var(--card);
    padding: 2.5rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

.form-container h2 {
    text-align: center;
    margin-bottom: 1.5rem;
    color: var(--text);
    font-size: 1.4rem;
}
.form-container h2 span { color: var(--accent); }
.form-container h2 i { color: var(--accent); margin-right: 0.4rem; }

.form-hint {
    text-align: center;
    color: var(--text-light);
    font-size: 0.85rem;
    margin-bottom: 1.5rem;
}

.form-group {
    margin-bottom: 1.15rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.35rem;
    color: var(--text);
    font-weight: 500;
    font-size: 0.85rem;
}
.form-group label i { color: var(--accent); margin-right: 0.35rem; width: 16px; }

.form-group input, .form-group select, .form-row input {
    width: 100%;
    padding: 0.7rem 0.9rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    transition: border-color var(--transition);
    outline: none;
    background: white;
}

.form-group input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(249,115,22,0.1);
}

/* ===== ALERTS ===== */
.alert {
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    margin-bottom: 1rem;
    font-weight: 500;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.alert-error {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

.alert-success {
    background: #f0fdf4;
    color: #166534;
    border: 1px solid #bbf7d0;
}

/* ===== DASHBOARD ===== */
.dashboard {
    background: var(--card);
    border-radius: var(--radius);
    padding: 2rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}
.dashboard-header h2 { color: var(--text); font-size: 1.3rem; }
.dashboard-header h2 i { color: var(--accent); margin-right: 0.4rem; }

.welcome-box {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
    padding: 1.5rem;
    border-radius: var(--radius-sm);
    margin-bottom: 1.5rem;
}

.welcome-box h3 {
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
}
.welcome-box h3 i { margin-right: 0.4rem; }

.welcome-box p {
    opacity: 0.8;
    font-size: 0.85rem;
}

.flag-box {
    background: var(--accent-light);
    border: 2px dashed var(--accent);
    padding: 1.5rem;
    border-radius: var(--radius-sm);
    text-align: center;
    margin-bottom: 1.5rem;
}

.flag-box code {
    font-size: 1rem;
    color: var(--accent-dark);
    background: rgba(0,0,0,0.04);
    padding: 0.3rem 0.8rem;
    border-radius: 4px;
    font-weight: 700;
    word-break: break-all;
}

.flag-box i { font-size: 1.3rem; color: var(--accent); }

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

.stat-card {
    background: var(--bg);
    padding: 1rem 1.25rem;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border: 1px solid var(--border);
}

.stat-card i {
    font-size: 1.5rem;
    color: var(--accent);
    opacity: 0.8;
}

.stat-card h3 { font-size: 1.3rem; color: var(--text); }
.stat-card p { font-size: 0.8rem; color: var(--text-light); }

/* ===== SEARCH ===== */
.search-container { max-width: 750px; margin: 0 auto; }

.search-box form {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    background: var(--card);
    padding: 0.4rem 0.4rem 0.4rem 1.1rem;
    border-radius: 50px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    transition: border-color var(--transition);
}
.search-box form:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(249,115,22,0.1); }

.search-icon { color: var(--text-muted); font-size: 0.9rem; }

.search-box input {
    flex: 1;
    border: none;
    padding: 0.5rem;
    font-size: 0.9rem;
    outline: none;
    background: transparent;
}

.search-box button {
    padding: 0.55rem 1.25rem;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all var(--transition);
    white-space: nowrap;
}
.search-box button:hover { background: var(--accent-hover); }

.search-results { margin-top: 2rem; }

.search-query-display {
    background: var(--card);
    padding: 0.9rem 1.25rem;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow);
    margin-bottom: 1.25rem;
    border: 1px solid var(--border);
}
.search-query-display h3 { font-size: 0.95rem; color: var(--text); font-weight: 600; }
.search-query-display h3 i { color: var(--accent); margin-right: 0.4rem; }

.no-results {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-light);
}
.no-results i { font-size: 2.5rem; color: var(--text-muted); margin-bottom: 0.75rem; }
.no-results h3 { margin-bottom: 0.25rem; font-size: 1.1rem; }

/* ===== ABOUT ===== */
.about-content {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-top: 0.5rem;
}

.about-section {
    background: var(--card);
    padding: 2rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    text-align: center;
    border: 1px solid var(--border);
}

.about-icon {
    font-size: 2rem;
    color: var(--accent);
    margin-bottom: 0.75rem;
}

.about-section h2 { margin-bottom: 0.6rem; font-size: 1.1rem; }
.about-section p { color: var(--text-light); font-size: 0.85rem; line-height: 1.7; }

/* ===== CONTACT ===== */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 1.5rem;
    margin-top: 0.5rem;
}

.contact-info { display: flex; flex-direction: column; gap: 0.75rem; }

.contact-card {
    background: var(--card);
    padding: 1.25rem;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow);
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    border: 1px solid var(--border);
}

.contact-card i {
    font-size: 1.25rem;
    color: var(--accent);
    margin-top: 0.15rem;
}

.contact-card h3 { font-size: 0.9rem; margin-bottom: 0.2rem; }
.contact-card p { font-size: 0.8rem; color: var(--text-light); line-height: 1.5; }

.contact-form {
    background: var(--card);
    padding: 2rem;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

.contact-form h2 { margin-bottom: 1.2rem; font-size: 1.1rem; }

.contact-form input,
.contact-form textarea,
.form-row input {
    width: 100%;
    padding: 0.7rem 0.9rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    margin-bottom: 0.9rem;
    outline: none;
    transition: border-color var(--transition);
    font-family: inherit;
}

.contact-form input:focus,
.contact-form textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(249,115,22,0.1); }

.form-row { display: flex; gap: 0.9rem; }
.form-row input { margin-bottom: 0; }

/* ===== EMPTY CART ===== */
.empty-cart {
    text-align: center;
    padding: 4rem 2rem;
}
.empty-cart i { font-size: 3rem; color: var(--text-muted); margin-bottom: 0.75rem; }
.empty-cart h2 { margin-bottom: 0.4rem; }
.empty-cart p { color: var(--text-light); margin-bottom: 1.25rem; }

/* ===== NEWSLETTER ===== */
.newsletter {
    background: var(--primary);
    border-radius: var(--radius);
    padding: 2.5rem;
    margin-top: 3rem;
    text-align: center;
    color: white;
}

.newsletter h2 { font-size: 1.3rem; margin-bottom: 0.4rem; font-weight: 600; }
.newsletter h2 i { color: var(--accent); margin-right: 0.4rem; }
.newsletter p { opacity: 0.7; font-size: 0.9rem; margin-bottom: 1.25rem; }

.newsletter-form {
    display: flex;
    max-width: 420px;
    margin: 0 auto;
    gap: 0.5rem;
}

.newsletter-form input {
    flex: 1;
    padding: 0.65rem 1rem;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    outline: none;
}

.newsletter-form button {
    padding: 0.65rem 1.25rem;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: background var(--transition);
    white-space: nowrap;
}
.newsletter-form button:hover { background: var(--accent-hover); }

/* ===== FOOTER ===== */
.footer {
    background: var(--primary);
    color: rgba(255,255,255,0.7);
    padding: 3rem 0 0;
    margin-top: 3rem;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
}

.footer-section h3, .footer-section h4 {
    color: white;
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
}
.footer-section h3 i { color: var(--accent); margin-right: 0.4rem; }

.footer-section p {
    font-size: 0.8rem;
    line-height: 1.7;
    margin-bottom: 0.4rem;
}

.footer-section a {
    display: block;
    color: rgba(255,255,255,0.5);
    font-size: 0.8rem;
    margin-bottom: 0.4rem;
    transition: color var(--transition);
}
.footer-section a:hover { color: var(--accent); }

.social-links { display: flex; gap: 0.6rem; margin-top: 0.75rem; }
.social-links a {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255,255,255,0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.85rem;
    transition: background var(--transition);
    margin-bottom: 0;
}
.social-links a:hover { background: var(--accent); }

.footer-bottom {
    text-align: center;
    padding: 1.25rem;
    margin-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.06);
    font-size: 0.75rem;
    color: rgba(255,255,255,0.4);
}
.footer-bottom i { color: var(--accent); }

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
    .hero { flex-direction: column; text-align: center; gap: 2rem; }
    .hero-content p { max-width: 100%; }
    .hero-buttons { justify-content: center; }
    .hero-image { flex: 0 0 200px; height: 200px; }
    .hero-icon { font-size: 3.5rem; }
    .hero-content h1 { font-size: 2rem; }

    .features { grid-template-columns: repeat(2, 1fr); }
    .about-content { grid-template-columns: 1fr; }
    .contact-grid { grid-template-columns: 1fr; }
    .footer-container { grid-template-columns: repeat(2, 1fr); }
    .product-detail-grid { grid-template-columns: 1fr; }
    .product-detail-image { height: 280px; }
    .product-detail-info { padding: 1.5rem; }
    .form-row { flex-direction: column; gap: 0; }
}

@media (max-width: 768px) {
    .nav-container { padding: 0 1rem; }
    .nav-toggle { display: block; }
    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 64px;
        left: 0;
        right: 0;
        background: var(--card);
        padding: 0.5rem 1rem 1rem;
        gap: 0.15rem;
        box-shadow: 0 10px 30px rgba(0,0,0,0.1);
        border-bottom: 1px solid var(--border);
    }
    .nav-links.active { display: flex; }
    main { padding: 1rem; }
    .hero-content h1 { font-size: 1.7rem; }
    .products-grid { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 0.75rem; }
    .product-image { height: 160px; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-container { grid-template-columns: 1fr; }
}
