/* ===================================================== */
/* Lao Shop - Main Stylesheet                              */
/* Font: Noto Sans Lao Looped                              */
/* ===================================================== */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+Lao+Looped:wght@300;400;500;600;700;800&display=swap');

:root {
    --primary: #E23744;
    --primary-dark: #B01B29;
    --secondary: #1B2E4B;
    --accent: #F5A623;
    --success: #27AE60;
    --danger: #E74C3C;
    --warning: #F39C12;
    --info: #3498DB;
    --light: #F8F9FA;
    --dark: #212529;
    --gray: #6C757D;
    --border: #E5E7EB;
    --bg: #F9FAFB;
    --shadow: 0 2px 8px rgba(0,0,0,0.08);
    --shadow-lg: 0 10px 30px rgba(0,0,0,0.12);
    --radius: 10px;
}

* { box-sizing: border-box; }

body {
    font-family: 'Noto Sans Lao Looped', sans-serif;
    background: var(--bg);
    color: var(--dark);
    margin: 0;
    line-height: 1.6;
}

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); }

/* ============ Navbar ============ */
.navbar {
    background: #fff;
    box-shadow: var(--shadow);
    padding: 12px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}
.navbar-inner {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    gap: 20px;
}
.navbar-brand {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}
.navbar-search {
    flex: 1;
    max-width: 500px;
    position: relative;
}
.navbar-search input {
    width: 100%;
    padding: 10px 40px 10px 15px;
    border: 1px solid var(--border);
    border-radius: 25px;
    font-family: inherit;
    font-size: 0.95rem;
}
.navbar-search button {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--primary);
    color: #fff;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
}
.navbar-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}
.navbar-actions a {
    color: var(--dark);
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.95rem;
    position: relative;
}
.navbar-actions a:hover { color: var(--primary); }
.cart-badge {
    background: var(--primary);
    color: #fff;
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 10px;
    position: absolute;
    top: -8px;
    right: -10px;
}
.mobile-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.4rem;
    cursor: pointer;
}

/* ============ Layout ============ */
.container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 20px;
}
.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* ============ Buttons ============ */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s;
}
.btn:hover { background: var(--primary-dark); color: #fff; }
.btn-outline { background: transparent; color: var(--primary); border: 1px solid var(--primary); }
.btn-outline:hover { background: var(--primary); color: #fff; }
.btn-secondary { background: var(--secondary); }
.btn-success { background: var(--success); }
.btn-danger { background: var(--danger); }
.btn-sm { padding: 6px 12px; font-size: 0.85rem; }
.btn-block { width: 100%; justify-content: center; }

/* ============ Cards ============ */
.card {
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}
.card-body { padding: 20px; }
.card-header {
    padding: 15px 20px;
    border-bottom: 1px solid var(--border);
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* ============ Product Card ============ */
.product-card {
    background: #fff;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
}
.product-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.product-image {
    width: 100%;
    height: 220px;
    object-fit: cover;
    background: #f0f0f0;
}
.product-info { padding: 15px; flex: 1; display: flex; flex-direction: column; }
.product-title {
    font-size: 0.95rem;
    color: var(--dark);
    margin: 0 0 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.6em;
}
.product-price {
    font-size: 1.1rem;
    color: var(--primary);
    font-weight: 700;
    margin-bottom: 6px;
}
.product-old-price {
    color: var(--gray);
    text-decoration: line-through;
    font-size: 0.85rem;
    font-weight: 400;
    margin-left: 6px;
}
.product-rating { color: var(--accent); font-size: 0.85rem; margin-bottom: 10px; }
.badge-sale {
    background: var(--primary);
    color: #fff;
    font-size: 0.7rem;
    padding: 3px 8px;
    border-radius: 12px;
    position: absolute;
    top: 10px;
    left: 10px;
}
.product-card-wrap { position: relative; }

/* ============ Forms ============ */
.form-group { margin-bottom: 16px; }
.form-label { display: block; margin-bottom: 6px; font-weight: 500; font-size: 0.9rem; }
.form-control {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 0.95rem;
    transition: border-color 0.2s;
}
.form-control:focus { outline: none; border-color: var(--primary); }
textarea.form-control { min-height: 100px; resize: vertical; }

/* ============ Alerts ============ */
.alert {
    padding: 12px 18px;
    border-radius: var(--radius);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.alert-success { background: #D1FAE5; color: #065F46; }
.alert-danger { background: #FEE2E2; color: #991B1B; }
.alert-warning { background: #FEF3C7; color: #92400E; }
.alert-info { background: #DBEAFE; color: #1E40AF; }

/* ============ Tables ============ */
.table-wrap { overflow-x: auto; }
.table {
    width: 100%;
    background: #fff;
    border-collapse: collapse;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}
.table th, .table td { padding: 12px 15px; text-align: left; border-bottom: 1px solid var(--border); }
.table th { background: var(--light); font-weight: 600; font-size: 0.9rem; }
.table tr:hover { background: #FAFAFA; }
.status-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
}
.status-pending { background: #FEF3C7; color: #92400E; }
.status-processing { background: #DBEAFE; color: #1E40AF; }
.status-shipped { background: #E0E7FF; color: #3730A3; }
.status-delivered { background: #D1FAE5; color: #065F46; }
.status-cancelled { background: #FEE2E2; color: #991B1B; }

/* ============ Dashboard Layout ============ */
.dashboard { display: flex; min-height: calc(100vh - 60px); }
.sidebar {
    width: 250px;
    background: var(--secondary);
    color: #fff;
    padding: 20px 0;
    flex-shrink: 0;
    transition: transform 0.3s;
}
.sidebar-brand {
    padding: 0 20px 20px;
    font-size: 1.1rem;
    font-weight: 700;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    margin-bottom: 15px;
    color: #fff;
}
.sidebar-menu { list-style: none; padding: 0; margin: 0; }
.sidebar-menu a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: rgba(255,255,255,0.85);
    transition: background 0.2s;
}
.sidebar-menu a:hover, .sidebar-menu a.active {
    background: rgba(255,255,255,0.1);
    color: #fff;
    border-left: 3px solid var(--primary);
}
.sidebar-menu i { width: 20px; }
.main-content { flex: 1; padding: 25px; overflow-x: auto; }

/* ============ Stat cards ============ */
.stat-card {
    background: #fff;
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 15px;
}
.stat-icon {
    width: 55px;
    height: 55px;
    border-radius: 12px;
    background: var(--primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
}
.stat-icon.bg-success { background: var(--success); }
.stat-icon.bg-info { background: var(--info); }
.stat-icon.bg-warning { background: var(--warning); }
.stat-value { font-size: 1.6rem; font-weight: 700; color: var(--dark); }
.stat-label { color: var(--gray); font-size: 0.9rem; }

/* ============ Category chips ============ */
.categories-row {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 15px;
    margin: 20px 0;
}
.category-chip {
    background: #fff;
    padding: 20px 10px;
    text-align: center;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    color: var(--dark);
    transition: all 0.2s;
}
.category-chip:hover {
    transform: translateY(-3px);
    color: var(--primary);
}
.category-chip i { font-size: 1.8rem; margin-bottom: 8px; color: var(--primary); }
.category-chip div { font-size: 0.85rem; font-weight: 500; }

/* ============ Hero ============ */
.hero {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff;
    padding: 50px 30px;
    border-radius: var(--radius);
    margin-bottom: 25px;
}
.hero h1 { font-size: 2rem; margin: 0 0 10px; }
.hero p { opacity: 0.95; font-size: 1.05rem; }

/* ============ Section title ============ */
.section-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin: 25px 0 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--dark);
}
.section-title i { color: var(--primary); }

/* ============ Filter sidebar ============ */
.filter-box { background: #fff; padding: 20px; border-radius: var(--radius); box-shadow: var(--shadow); }
.filter-box h4 { margin: 0 0 12px; font-size: 1rem; }
.filter-list { list-style: none; padding: 0; margin: 0 0 15px; }
.filter-list li { padding: 6px 0; font-size: 0.9rem; }
.filter-list a { color: var(--dark); }

/* ============ Footer ============ */
.footer {
    background: var(--secondary);
    color: #fff;
    padding: 40px 20px 20px;
    margin-top: 50px;
}
.footer-inner {
    max-width: 1300px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}
.footer h4 { margin: 0 0 15px; font-size: 1rem; }
.footer a { color: rgba(255,255,255,0.75); display: block; padding: 4px 0; font-size: 0.9rem; }
.footer a:hover { color: #fff; }
.footer-bottom {
    max-width: 1300px;
    margin: 20px auto 0;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    text-align: center;
    color: rgba(255,255,255,0.6);
    font-size: 0.85rem;
}

/* ============ Auth pages ============ */
.auth-wrap {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    padding: 20px;
}
.auth-box {
    background: #fff;
    border-radius: var(--radius);
    padding: 35px;
    width: 100%;
    max-width: 420px;
    box-shadow: var(--shadow-lg);
}
.auth-box h2 { margin: 0 0 20px; text-align: center; color: var(--dark); }
.social-login { display: grid; gap: 10px; margin-top: 20px; }
.social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: #fff;
    text-decoration: none;
    color: var(--dark);
    font-weight: 500;
}
.social-btn:hover { background: var(--light); }
.social-btn.google i { color: #DB4437; }
.social-btn.facebook i { color: #1877F2; }

/* ============ Responsive ============ */
@media (max-width: 992px) {
    .grid-4 { grid-template-columns: repeat(3, 1fr); }
    .categories-row { grid-template-columns: repeat(4, 1fr); }
    .footer-inner { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
    .navbar-search { display: none; }
    .mobile-toggle { display: block; }
    .navbar-actions { gap: 12px; }
    .navbar-actions .label-txt { display: none; }
    .grid-4, .grid-3 { grid-template-columns: repeat(2, 1fr); }
    .grid-2 { grid-template-columns: 1fr; }
    .categories-row { grid-template-columns: repeat(3, 1fr); }
    .sidebar {
        position: fixed;
        top: 0; left: 0; bottom: 0;
        transform: translateX(-100%);
        z-index: 999;
    }
    .sidebar.open { transform: translateX(0); }
    .sidebar-overlay {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,0.5);
        z-index: 998;
    }
    .sidebar-overlay.show { display: block; }
    .main-content { padding: 15px; }
    .hero { padding: 30px 20px; }
    .hero h1 { font-size: 1.4rem; }
    .product-image { height: 160px; }
    .footer-inner { grid-template-columns: 1fr; }
    .container { padding: 15px; }
}
@media (max-width: 480px) {
    .categories-row { grid-template-columns: repeat(2, 1fr); }
    .grid-4, .grid-3 { grid-template-columns: repeat(2, 1fr); }
}
