:root {
    --primary-color: #4FC3F7;
    /* Sky Blue */
    --secondary-color: #03A9F4;
    /* Light Blue */
    --accent-color: #E1F5FE;
    /* Pale Blue */
    --text-dark: #263238;
    /* Dark Blue-Grey */
    --text-light: #546E7A;
    /* Muted Blue-Grey */
    --white: #ffffff;
    --background: #F0F9FF;
    /* Very Light Blue Background */
    --card-shadow: 0 10px 25px rgba(3, 169, 244, 0.08);
    --hover-shadow: 0 15px 35px rgba(3, 169, 244, 0.15);
    --transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    --border-radius: 25px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Kanit', sans-serif;
}

body {
    background-color: var(--background);
    color: var(--text-dark);
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navbar */
.navbar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    height: 80px;
    display: flex;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.nav-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo {
    font-size: 1.8rem;
    font-weight: 800;
    color: #03A9F4;
    /* Sky Blue */
    text-shadow:
        -2px -2px 0 #263238,
        2px -2px 0 #263238,
        -2px 2px 0 #263238,
        2px 2px 0 #263238,
        0 5px 10px rgba(0, 0, 0, 0.2);
    letter-spacing: 1px;
}

.logo .dot {
    color: var(--secondary-color);
    text-shadow: none;
}

.nav-menu {
    display: flex;
    gap: 30px;
}

.nav-link {
    font-weight: 500;
    color: var(--text-dark);
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 4px;
    background: var(--secondary-color);
    border-radius: 10px;
    transition: var(--transition);
}

.nav-link:hover {
    color: var(--secondary-color);
    transform: translateY(-2px);
}

.nav-link:hover::after {
    width: 100%;
}

/* User Profile Widget */
.user-profile-widget {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--white);
    padding: 6px 15px 6px 6px;
    border-radius: 50px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--accent-color);
    cursor: pointer;
    position: relative;
    transition: var(--transition);
}

.user-profile-widget:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
    border-color: var(--secondary-color);
}

.profile-avatar {
    width: 38px;
    height: 38px;
    background: var(--secondary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    overflow: hidden;
}

.profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.profile-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-dark);
}

.profile-balance {
    font-size: 0.75rem;
    color: var(--secondary-color);
    font-weight: 700;
}

/* Profile Dropdown */
.profile-dropdown {
    position: absolute;
    top: calc(100% + 15px);
    right: 0;
    width: 220px;
    background: var(--white);
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    padding: 10px;
    display: none;
    z-index: 2000;
    animation: dropdownFade 0.3s ease;
}

/* Invisible bridge to keep hover active */
.profile-dropdown::before {
    content: '';
    position: absolute;
    top: -15px;
    left: 0;
    width: 100%;
    height: 15px;
}

.user-profile-widget:hover .profile-dropdown {
    display: block;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    color: var(--text-dark);
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: 10px;
    transition: var(--transition);
}

.dropdown-item:hover {
    background: var(--accent-color);
    color: var(--secondary-color);
}

.dropdown-item i {
    width: 20px;
    color: var(--secondary-color);
    opacity: 0.7;
}

/* Page Header */
.page-header {
    background: linear-gradient(135deg, var(--accent-color) 0%, var(--white) 100%);
    padding: 60px 0;
    text-align: center;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.page-header h1 {
    font-size: 2.5rem;
    color: var(--text-dark);
    margin-bottom: 10px;
}

.page-header h1 i {
    color: var(--secondary-color);
    margin-right: 15px;
}

.page-header p {
    color: var(--text-light);
    font-size: 1.1rem;
}

.page-content {
    padding: 50px 0 100px;
}

/* History Card & Table */
.history-card {
    background: var(--white);
    border-radius: 30px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.05);
    padding: 30px;
    border: 1px solid rgba(0, 0, 0, 0.03);
}

.table-responsive {
    overflow-x: auto;
}

.history-table {
    width: 100%;
    border-collapse: collapse;
}

.history-table th {
    text-align: left;
    padding: 20px;
    background: var(--accent-color);
    color: var(--secondary-color);
    font-weight: 600;
    font-size: 0.95rem;
}

.history-table th:first-child {
    border-radius: 15px 0 0 15px;
}

.history-table th:last-child {
    border-radius: 0 15px 15px 0;
}

.history-table td {
    padding: 20px;
    border-bottom: 1px solid #f5f5f5;
    vertical-align: middle;
}

.history-table tr:last-child td {
    border-bottom: none;
}

.order-id {
    font-family: monospace;
    font-weight: bold;
    color: var(--text-light);
    background: #f0f0f0;
    padding: 4px 8px;
    border-radius: 6px;
}

.product-cell {
    display: flex;
    align-items: center;
    gap: 12px;
}

.product-cell i {
    color: var(--secondary-color);
    font-size: 1.1rem;
    opacity: 0.7;
}

.history-table .price {
    font-weight: 700;
    color: var(--secondary-color);
}

.status-success {
    background: #e8f5e9;
    color: #4caf50;
    padding: 6px 15px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
}

/* Mobile Menu */
.menu-toggle {
    display: none;
    cursor: pointer;
}

.bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    background-color: var(--text-dark);
    transition: var(--transition);
}

/* Hero Section */
.hero {
    padding: 30px 0;
    /* Some spacing from nav */
    background: transparent;
    text-align: center;
    position: relative;
    overflow: hidden;
    transition: var(--transition);
}

.hero-content {
    width: 100%;
    position: relative;
    z-index: 2;
}

#hero-banner-img {
    border-radius: 25px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: var(--transition);
}

.hero::before {
    content: '';
    position: absolute;
    top: -100px;
    right: -100px;
    width: 400px;
    height: 400px;
    background: rgba(255, 140, 0, 0.1);
    border-radius: 50%;
    filter: blur(80px);
}

#hero-banner-img:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(255, 140, 0, 0.2);
}

.hero-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
}

/* Helper class for full banner mode */
.hero.full-banner {
    aspect-ratio: 2200 / 590;
    min-height: auto;
}

.hero.full-banner .hero-content {
    display: block;
    height: 100%;
    padding: 0;
}

.hero.full-banner #default-hero-content {
    display: none;
}

.btn {
    padding: 12px 30px;
    border-radius: 50px;
    /* Fully pill-shaped */
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 10px;
    border: none;
    font-size: 1rem;
    box-shadow: var(--btn-shadow);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: var(--white);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.btn-primary:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 25px rgba(255, 140, 0, 0.3);
    filter: brightness(1.1);
}

.btn-secondary {
    background: var(--white);
    color: var(--secondary-color);
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background: var(--accent-color);
    transform: translateY(-3px) scale(1.05);
}

/* Navbar Login Button */
.btn-login {
    background: #FFD700;
    color: #4A3B28;
    padding: 10px 25px;
    border-radius: 50px;
    font-weight: 700;
    box-shadow: 0 4px 10px rgba(255, 215, 0, 0.3);
}

.btn-login:hover {
    background: #FFC107;
    transform: scale(1.05);
}

/* Stats Section */
.stats {
    padding: 40px 0;
    background: var(--white);
    margin-top: -60px;
    border-radius: 40px;
    /* More bubbly */
    box-shadow: 0 15px 40px rgba(255, 140, 0, 0.1);
    position: relative;
    z-index: 10;
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
    border: 3px solid var(--accent-color);
}

.stats-container {
    display: flex;
    justify-content: space-around;
    text-align: center;
}

.stat-item i {
    font-size: 2rem;
    color: var(--secondary-color);
    margin-bottom: 10px;
}

.stat-item h3 {
    font-size: 1.5rem;
    color: var(--text-dark);
}

.stat-item p {
    color: var(--text-light);
}

/* Section Titles */
.section-title {
    text-align: center;
    font-size: 2rem;
    margin: 60px 0 40px;
    position: relative;
    color: var(--text-dark);
    font-weight: 800;
}

.section-title::after {
    content: '';
    display: block;
    width: 80px;
    height: 5px;
    background: linear-gradient(90deg, #4FC3F7, #03A9F4);
    margin: 15px auto 0;
    border-radius: 10px;
}

/* Categories */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    /* Wider cards */
    gap: 20px;
}

.category-card {
    background: var(--white);
    padding: 0;
    border-radius: var(--border-radius);
    text-align: center;
    box-shadow: var(--card-shadow);
    transition: var(--transition);
    cursor: pointer;
    overflow: hidden;
    border: 4px solid var(--white);
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--hover-shadow);
}

.category-card img {
    width: 100%;
    height: auto;
    aspect-ratio: 2200 / 590;
    object-fit: cover;
    display: block;
}

.category-card h3 {
    padding: 5px;
    /* Further reduced */
    font-size: 1.1rem;
    color: var(--text-dark);
}

/* Products */
/* Products Redesign */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    padding: 15px 0;
}

.product-card {
    background: var(--white);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
    border: none;
    position: relative;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.1);
}

.product-image-container {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: #f0f0f0;
}

.product-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.product-card:hover .product-image-container img {
    transform: scale(1.1);
}

/* Badge Top Left */
.badge-app-premium {
    position: absolute;
    top: 8px;
    left: 8px;
    background: #FF2E2E;
    color: white;
    padding: 1px 8px;
    border-radius: 4px;
    font-size: 0.65rem;
    font-weight: 600;
    z-index: 5;
}

/* Ribbon Top Right */
.corner-ribbon {
    position: absolute;
    top: 0;
    right: 0;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 0 30px 30px 0;
    border-color: transparent #FF0000 transparent transparent;
    z-index: 5;
}

/* Image Bottom Overlay */
.image-overlay-bottom {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.95), rgba(0, 0, 0, 0));
    color: white;
    padding: 8px 5px 4px;
    text-align: center;
    font-size: 0.8rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.product-info {
    padding: 15px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.product-info h3 {
    font-size: 1rem;
    color: #000;
    margin-bottom: 12px;
    font-weight: 700;
    line-height: 1.3;
}

.price-stock-row {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-bottom: 15px;
}

.price-badge {
    background: #FFCC80;
    color: white;
    padding: 6px 18px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.95rem;
    box-shadow: 0 4px 8px rgba(255, 204, 128, 0.3);
}

.btn-buy {
    width: 100%;
    padding: 12px;
    border-radius: 12px;
    border: none;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    transition: var(--transition);
    margin-bottom: 12px;
}

.btn-buy.out-of-stock {
    background: #FFE0B2;
    color: white;
    cursor: not-allowed;
}

.stock-info {
    text-align: center;
    color: #333;
    font-size: 0.85rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.stock-info i {
    font-size: 0.95rem;
}


/* Services */
.services {
    margin-bottom: 60px;
}

.service-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.service-item {
    text-align: center;
    padding: 30px;
    background: var(--white);
    border-radius: var(--border-radius);
    border: 3px solid var(--accent-color);
    box-shadow: var(--card-shadow);
    transition: var(--transition);
}

.service-item:hover {
    transform: translateY(-5px);
    border-color: var(--primary-color);
}

.service-item i {
    font-size: 2.5rem;
    color: var(--secondary-color);
    margin-bottom: 20px;
}

/* Footer */
.footer {
    background: var(--white);
    padding: 60px 0 0;
    margin-top: 50px;
    border-top: 2px solid var(--accent-color);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1.5fr;
    gap: 40px;
    padding-bottom: 40px;
}

.footer-col h3.footer-title {
    font-size: 1.1rem;
    color: var(--secondary-color);
    margin-bottom: 25px;
    border-bottom: 2px solid var(--accent-color);
    padding-bottom: 10px;
    display: inline-block;
}

.footer-col h3.footer-title i {
    margin-right: 8px;
}

.footer-brand {
    text-align: center;
    margin-bottom: 20px;
}

.brand-ovsm {
    font-size: 2.5rem;
    font-weight: 900;
    color: var(--secondary-color);
    letter-spacing: -1px;
    display: block;
    line-height: 1;
}

.brand-title {
    font-size: 1.2rem;
    color: var(--text-dark);
    margin-top: 10px;
}

.footer-desc ul {
    list-style: none;
}

.footer-desc ul li {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-desc ul li i {
    font-size: 0.7rem;
    opacity: 0.5;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 15px;
}

.footer-links a {
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 15px;
    border-radius: 10px;
    transition: var(--transition);
}

.footer-links a i {
    width: 20px;
    color: var(--primary-color);
    opacity: 0.6;
}

.footer-links a:hover {
    background: var(--accent-color);
    color: var(--secondary-color);
    transform: translateX(5px);
}

.footer-links a:hover i {
    color: var(--secondary-color);
    opacity: 1;
}

/* Facebook Widget Card */
.fb-widget-card {
    background: var(--white);
    border: 1px solid #eee;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.fb-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px;
}

.fb-logo-placeholder {
    width: 45px;
    height: 45px;
    background: var(--secondary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.8rem;
    border-radius: 4px;
}

.fb-info strong {
    display: block;
    font-size: 0.95rem;
    color: var(--secondary-color);
}

.fb-info span {
    font-size: 0.8rem;
    color: #888;
}

.fb-actions {
    display: flex;
    background: #f5f6f7;
    padding: 8px;
    gap: 8px;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
}

.fb-actions button {
    flex: 1;
    padding: 6px;
    border: 1px solid #ddd;
    background: white;
    border-radius: 4px;
    font-size: 0.8rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    color: #4b4f56;
}

.fb-banner-placeholder {
    height: 80px;
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('https://via.placeholder.com/400x150');
    background-size: cover;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 0.9rem;
}

/* Bottom Bar */
.footer-bottom-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 0;
    border-top: 1px solid #eee;
    font-size: 0.85rem;
    color: var(--text-light);
}

.bottom-right i,
.bottom-left i {
    color: var(--primary-color);
    margin-right: 5px;
}

.bottom-right a {
    color: var(--text-light);
    border-bottom: 1px dotted var(--text-light);
}

.bottom-right a:hover {
    color: var(--secondary-color);
}

/* Responsive */
@media (max-width: 992px) {
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .footer-bottom-bar {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
}

/* Responsive */
@media (min-width: 1200px) {
    .category-banner {
        height: 140px;
        /* Increased slightly from 120px */
    }
}

.category-banner {
    height: 140px;
    /* Increased from 120px */
    overflow: hidden;
    position: relative;
    border-radius: 15px 15px 0 0;
}

.category-placeholder {
    height: 140px;
    /* Increased from 120px */
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-color);
    color: var(--secondary-color);
    font-size: 1.5rem;
    font-weight: bold;
}

/* ==================== CATEGORY PAGE STYLES ==================== */
.category-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    padding: 40px 20px;
    /* Shortened */
    text-align: center;
    color: white;
    margin-top: 20px;
    /* Moved down */
    margin-bottom: 40px;
    position: relative;
    border-radius: 20px;
    /* Rounded corners for better look */
    margin-left: 20px;
    margin-right: 20px;
}

.category-header .container {
    padding-top: 20px;
}

.category-header .btn-back {
    position: absolute;
    top: 20px;
    left: 20px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid white;
    backdrop-filter: blur(10px);
    padding: 10px 20px;
    font-size: 1rem;
}

.category-header .btn-back:hover {
    background: white;
    color: var(--secondary-color);
    transform: translateX(-5px);
}

.category-header h1 {
    font-size: 1.8rem;
    /* Reduced from 2.5rem */
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.category-header p {
    font-size: 1.1rem;
    opacity: 0.9;
}

@media (max-width: 768px) {
    .category-header {
        padding: 70px 20px 25px;
    }

    .category-header .btn-back {
        position: static;
        margin-bottom: 20px;
        display: inline-block;
    }

    .category-header h1 {
        font-size: 1.8rem;
    }
}

/* Product Detail Page */
.product-detail-container {
    max-width: 1000px;
    margin: 0 auto;
}

.product-detail-card {
    background: var(--white);
    border-radius: 40px;
    padding: 40px;
    box-shadow: var(--card-shadow);
    border: 1px solid rgba(0, 0, 0, 0.03);
}

.product-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: start;
}

.product-detail-image img {
    width: 100%;
    border-radius: 30px;
    transition: transform 0.5s ease;
}

.product-detail-info h2 {
    font-size: 1.5rem;
    color: var(--text-dark);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.product-detail-info h2 i {
    color: var(--secondary-color);
}

.info-section {
    margin-bottom: 35px;
    padding-bottom: 25px;
    border-bottom: 1px solid #f5f5f5;
}

.info-section:last-child {
    border-bottom: none;
}

.warranty-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--accent-color);
    color: var(--secondary-color);
    padding: 10px 20px;
    border-radius: 50px;
    font-weight: 500;
}

.price-box {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fcfcfc;
    padding: 25px;
    border-radius: 25px;
    border: 1px solid #f0f0f0;
}

.price-info .label {
    display: block;
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 5px;
}

.price-info h2 {
    font-size: 2.5rem;
    color: var(--secondary-color);
    margin: 0;
}

.price-info .old-price {
    color: #bbb;
    text-decoration: line-through;
    margin-left: 10px;
    font-size: 1.1rem;
}

.buy-now-btn {
    transition: all 0.3s ease;
}

.buy-now-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

@media (max-width: 768px) {
    .product-detail-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .product-detail-card {
        padding: 25px;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: 80px;
        flex-direction: column;
        background: var(--white);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 10px rgba(0, 0, 0, 0.05);
        padding: 20px 0;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-item {
        margin: 15px 0;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .stats {
        margin-top: 0;
        box-shadow: none;
        background: transparent;
    }

    .stats-container {
        flex-direction: column;
        gap: 20px;
    }

    .stat-item {
        background: var(--white);
        padding: 20px;
        border-radius: 15px;
        box-shadow: var(--card-shadow);
    }
}

/* Auth Pages */
.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #E0F7FA 0%, #F0F8FF 100%);
}

.auth-box {
    background: var(--white);
    padding: 40px;
    border-radius: 20px;
    box-shadow: var(--card-shadow);
    width: 100%;
    max-width: 400px;
    text-align: center;
}

.auth-box h2 {
    color: var(--secondary-color);
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 20px;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: var(--text-dark);
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 10px;
    font-size: 1rem;
    transition: var(--transition);
}

.form-group input:focus {
    border-color: var(--secondary-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(135, 206, 235, 0.2);
}

.btn-full {
    width: 100%;
    margin-top: 10px;
}

.auth-link {
    margin-top: 15px;
    font-size: 0.9rem;
}

.auth-link a {
    color: var(--secondary-color);
    font-weight: 500;
}

/* Admin Dashboard */
.admin-container {
    padding: 40px 20px;
}

.admin-panel {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 30px;
}

.add-product-box,
.product-list-box {
    background: var(--white);
    padding: 30px;
    border-radius: 20px;
    box-shadow: var(--card-shadow);
}

.add-product-box h3,
.product-list-box h3 {
    margin-bottom: 20px;
    color: var(--secondary-color);
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 10px;
}

.admin-product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

.admin-product-card {
    border: 1px solid #eee;
    border-radius: 10px;
    padding: 10px;
    text-align: center;
}

.admin-product-card img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 10px;
}

.admin-product-card h4 {
    font-size: 1rem;
    margin-bottom: 5px;
}

.btn-delete {
    background: #ff6b6b;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.8rem;
    margin-top: 5px;
}

@media (max-width: 900px) {
    .admin-panel {
        grid-template-columns: 1fr;
    }
}

/* ==================== ADMIN DASHBOARD STYLES ==================== */

/* Admin Layout */
.admin-layout {
    display: flex;
    min-height: calc(100vh - 80px);
}

/* Sidebar */
.admin-sidebar {
    width: 250px;
    background: var(--white);
    border-right: 1px solid #eee;
    position: fixed;
    top: 80px;
    left: 0;
    bottom: 0;
    overflow-y: auto;
    z-index: 100;
}

.sidebar-menu {
    padding: 20px 0;
}

.sidebar-item {
    display: flex;
    align-items: center;
    padding: 15px 25px;
    color: var(--text-dark);
    transition: var(--transition);
    border-left: 3px solid transparent;
}

.sidebar-item i {
    margin-right: 12px;
    font-size: 1.1rem;
    width: 20px;
}

.sidebar-item:hover {
    background: var(--accent-color);
    color: var(--secondary-color);
}

.sidebar-item.active {
    background: var(--accent-color);
    color: var(--secondary-color);
    border-left-color: var(--secondary-color);
    font-weight: 600;
}

/* Main Content */
.admin-main {
    margin-left: 250px;
    flex: 1;
    padding: 30px;
    background: var(--background);
}

.admin-section {
    display: none;
}

.admin-section.active {
    display: block;
}

.admin-title {
    font-size: 2rem;
    color: var(--text-dark);
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 2px solid #eee;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: var(--white);
    padding: 25px;
    border-radius: 15px;
    box-shadow: var(--card-shadow);
    display: flex;
    align-items: center;
    gap: 20px;
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--hover-shadow);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 1.5rem;
}

.stat-info h3 {
    font-size: 1.8rem;
    color: var(--text-dark);
    margin-bottom: 5px;
}

.stat-info p {
    color: var(--text-light);
    font-size: 0.9rem;
}

/* Charts */
.charts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.chart-card {
    background: var(--white);
    padding: 25px;
    border-radius: 15px;
    box-shadow: var(--card-shadow);
}

.chart-card h3 {
    color: var(--text-dark);
    margin-bottom: 20px;
    font-size: 1.2rem;
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.chart-controls {
    display: flex;
    gap: 10px;
}

.btn-chart {
    padding: 5px 15px;
    border: 1px solid #ddd;
    background: var(--white);
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: var(--transition);
}

.btn-chart.active {
    background: var(--secondary-color);
    color: var(--white);
    border-color: var(--secondary-color);
}

.btn-chart:hover {
    border-color: var(--secondary-color);
}

/* Data Card */
.data-card {
    background: var(--white);
    padding: 25px;
    border-radius: 15px;
    box-shadow: var(--card-shadow);
    margin-bottom: 20px;
}

.data-card h3 {
    color: var(--text-dark);
    margin-bottom: 20px;
    font-size: 1.2rem;
    padding-bottom: 10px;
    border-bottom: 2px solid #f0f0f0;
}

/* Data Table */
.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table thead {
    background: #f9f9f9;
}

.data-table th {
    padding: 12px;
    text-align: left;
    color: var(--secondary-color);
    font-weight: 600;
    border-bottom: 2px solid #eee;
}

.data-table td {
    padding: 12px;
    border-bottom: 1px solid #eee;
    color: var(--text-dark);
}

.data-table tbody tr {
    transition: var(--transition);
}

.data-table tbody tr:hover {
    background: #f9f9f9;
}

.data-table img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 8px;
}

/* Status Badges */
.badge-status {
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

.badge-active {
    background: #e8f5e9;
    color: #4caf50;
}

.badge-locked {
    background: #ffebee;
    color: #f44336;
}

.badge-low-stock {
    background: #fff3e0;
    color: #ff9800;
}

.badge-in-stock {
    background: #e8f5e9;
    color: #4caf50;
}

.badge-warranty {
    background: #e3f2fd;
    color: #2196f3;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
}

/* Action Buttons */
.btn-action {
    padding: 6px 12px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    margin: 0 3px;
    transition: var(--transition);
}

.btn-edit {
    background: #2196f3;
    color: white;
}

.btn-edit:hover {
    background: #1976d2;
}

.btn-delete {
    background: #f44336;
    color: white;
}

.btn-delete:hover {
    background: #d32f2f;
}

.btn-lock {
    background: #ff9800;
    color: white;
}

.btn-lock:hover {
    background: #f57c00;
}

.btn-unlock {
    background: #4caf50;
    color: white;
}

.btn-unlock:hover {
    background: #388e3c;
}

.btn-view {
    background: #9c27b0;
    color: white;
}

.btn-view:hover {
    background: #7b1fa2;
}

/* Section Actions */
.section-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    gap: 15px;
}

.search-input {
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 25px;
    width: 300px;
    font-size: 0.9rem;
    transition: var(--transition);
}

.search-input:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(135, 206, 235, 0.2);
}

/* Category Grid Admin */
.category-grid-admin {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.category-card-admin {
    background: var(--white);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--card-shadow);
    transition: var(--transition);
}

.category-card-admin:hover {
    transform: translateY(-5px);
    box-shadow: var(--hover-shadow);
}

.category-card-admin img {
    width: 100%;
    height: 150px;
    object-fit: cover;
}

.category-card-admin .category-info {
    padding: 15px;
}

.category-card-admin h4 {
    margin-bottom: 10px;
    color: var(--text-dark);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: var(--white);
    border-radius: 20px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px;
    border-bottom: 2px solid #f0f0f0;
}

.modal-header h2 {
    color: var(--secondary-color);
    font-size: 1.5rem;
}

.close {
    font-size: 2rem;
    color: #999;
    cursor: pointer;
    transition: var(--transition);
}

.close:hover {
    color: var(--text-dark);
}

.modal-content form {
    padding: 25px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

/* User Detail Content */
#userDetailContent {
    padding: 25px;
}

.user-info-section {
    margin-bottom: 25px;
}

.user-info-section h3 {
    color: var(--secondary-color);
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f0f0f0;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.info-item {
    padding: 10px;
    background: #f9f9f9;
    border-radius: 8px;
}

.info-item label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-light);
    margin-bottom: 5px;
}

.info-item .value {
    font-weight: 600;
    color: var(--text-dark);
}

.purchase-history-list {
    max-height: 300px;
    overflow-y: auto;
}

.purchase-item {
    padding: 12px;
    background: #f9f9f9;
    border-radius: 8px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.purchase-item .date {
    font-size: 0.85rem;
    color: var(--text-light);
}

.purchase-item .amount {
    font-weight: 600;
    color: var(--secondary-color);
}

/* Responsive Admin */
@media (max-width: 1024px) {
    .admin-sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }

    .admin-sidebar.active {
        transform: translateX(0);
    }

    .admin-main {
        margin-left: 0;
    }

    .charts-grid {
        grid-template-columns: 1fr;
    }

    .section-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .search-input {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .data-table {
        font-size: 0.85rem;
    }

    .data-table th,
    .data-table td {
        padding: 8px;
    }

    .modal-content {
        width: 95%;
    }

    .info-grid {
        grid-template-columns: 1fr;
    }
}

/* Additional Admin Styles */
.btn-edit,
.btn-delete,
.btn-view,
.btn-warning,
.btn-success,
.btn-danger {
    padding: 6px 10px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.85rem;
    margin: 0 2px;
    transition: var(--transition);
    color: white;
}

.btn-edit {
    background: #2196f3;
}

.btn-edit:hover {
    background: #1976d2;
}

.btn-delete {
    background: #f44336;
}

.btn-delete:hover {
    background: #d32f2f;
}

.btn-view {
    background: #9c27b0;
}

.btn-view:hover {
    background: #7b1fa2;
}

.btn-warning {
    background: #ff9800;
}

.btn-warning:hover {
    background: #f57c00;
}

.btn-success {
    background: #4caf50;
}

.btn-success:hover {
    background: #388e3c;
}

.btn-danger {
    background: #f44336;
}

.btn-danger:hover {
    background: #d32f2f;
}

.badge-role {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.8rem;
    background: #e3f2fd;
    color: #2196f3;
    font-weight: 500;
}

.badge-status.active {
    background: #e8f5e9;
    color: #4caf50;
}

.badge-status.locked {
    background: #ffebee;
    color: #f44336;
}

.category-card-admin {
    padding: 15px;
    text-align: center;
}

.category-card-admin h4 {
    margin: 10px 0;
    padding: 10px 0;
}

.category-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 10px;
}

.user-detail {
    padding: 0;
}

.user-info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}

.user-info-grid .info-item {
    background: #f9f9f9;
    padding: 15px;
    border-radius: 8px;
}

.user-info-grid .info-item label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-light);
    margin-bottom: 5px;
}

.user-info-grid .info-item span {
    font-weight: 600;
    color: var(--text-dark);
}

/* Canvas Chart Container */
.chart-card canvas {
    max-height: 300px;
}

/* Top-up Page Styles */
.topup-container {
    max-width: 600px;
    margin: 100px auto;
    padding: 40px;
    background: var(--white);
    border-radius: 20px;
    box-shadow: var(--card-shadow);
}

.topup-container h2 {
    color: var(--secondary-color);
    margin-bottom: 20px;
    text-align: center;
}

/* Top-up Selection Styles */
.topup-selection {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 20px;
}

.selection-card {
    display: flex;
    align-items: center;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 15px;
    cursor: pointer;
    transition: var(--transition);
    border: 2px solid transparent;
}

.selection-card:hover {
    background: #fff;
    transform: translateY(-3px);
    box-shadow: var(--card-shadow);
    border-color: var(--secondary-color);
}

.selection-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    margin-right: 20px;
}

.selection-info {
    flex: 1;
    text-align: left;
}

.selection-info h3 {
    font-size: 1.1rem;
    color: var(--text-dark);
    margin-bottom: 5px;
}

.selection-info p {
    font-size: 0.85rem;
    color: var(--text-light);
}

.selection-arrow {
    color: #ccc;
    font-size: 1.2rem;
}

.selection-card:hover .selection-arrow {
    color: var(--secondary-color);
    transform: translateX(5px);
}

.method-view {
    display: none;
    animation: fadeIn 0.3s ease;
}

.btn-back-selection {
    background: none;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    font-weight: 500;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 0;
}

.btn-back-selection:hover {
    color: var(--secondary-color);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#status-message {
    margin-top: 15px;
    padding: 10px;
    border-radius: 8px;
    text-align: center;
    font-weight: 500;
}

/* Product Detail Page */
.product-detail-container {
    max-width: 1000px;
    margin: 50px auto;
}

.product-detail-card {
    background: var(--white);
    border-radius: 40px;
    padding: 40px;
    box-shadow: var(--card-shadow);
    border: 1px solid rgba(0, 0, 0, 0.03);
}

.product-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 50px;
    align-items: start;
}

.product-detail-image img {
    width: 100%;
    height: auto;
    border-radius: 30px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.08);
    transition: transform 0.5s ease;
}

.product-detail-info h2 {
    font-size: 1.5rem;
    color: var(--text-dark);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.product-detail-info h2 i {
    color: var(--secondary-color);
}

.info-section {
    margin-bottom: 35px;
    padding-bottom: 25px;
    border-bottom: 1px solid #f5f5f5;
}

.info-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.warranty-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--accent-color);
    color: var(--secondary-color);
    padding: 10px 20px;
    border-radius: 50px;
    font-weight: 500;
}

.price-box {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fbfbfc;
    padding: 30px;
    border-radius: 30px;
    border: 1px solid #f0f0f5;
}

.price-info .label {
    display: block;
    font-size: 0.95rem;
    color: var(--text-light);
    margin-bottom: 5px;
}

.price-info h2 {
    font-size: 2.8rem;
    color: var(--secondary-color);
    margin: 0;
    font-weight: 700;
}

.price-info .old-price {
    color: #ccc;
    text-decoration: line-through;
    margin-left: 10px;
    font-size: 1.2rem;
}

.buy-now-btn {
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    background: var(--secondary-color);
    color: white;
    border: none;
    cursor: pointer;
}

.buy-now-btn:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 15px 30px rgba(255, 107, 107, 0.3);
}

@media (max-width: 992px) {
    .product-detail-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .product-detail-container {
        margin: 20px 15px;
    }
}