@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
    --primary: #0ea5e9; /* Bright Sky Blue */
    --secondary: #0369a1; /* Deep Sky Blue */
    --accent: #fbbf24; /* Sun Yellow */
    --bg: #f8fafc;
    --white: #ffffff;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --radius: 12px;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

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

body {
    background-color: var(--bg);
    font-family: 'Inter', sans-serif;
    color: var(--text-main);
    line-height: 1.5;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    /* Removed padding to ensure absolute alignment of children edges */
}

/* Header - Top Bar */
.top-header {
    background-color: var(--primary);
    color: var(--white);
    padding: 15px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 30px;
}

/* Logo Section */
.brand h1 {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.025em;
    color: #fff;
}

.brand h1 span { color: var(--accent); }

.brand-icon {
    background-color: var(--accent);
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: var(--text-main);
}

/* Center: Search Box */
.header-center {
    flex: 1;
    max-width: 500px;
}

.search-box {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 5px 15px;
    display: flex;
    align-items: center;
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: 0.3s;
}

.search-box:focus-within {
    background: #fff;
    border-color: #fff;
}

.search-box form { display: flex; width: 100%; align-items: center; }

.search-box input {
    border: none;
    background: transparent;
    outline: none;
    width: 100%;
    font-size: 14px;
    padding: 8px;
    color: #fff;
    font-weight: 500;
}

.search-box:focus-within input { color: var(--text-main); }

.search-box input::placeholder { color: rgba(255, 255, 255, 0.8); }
.search-box:focus-within input::placeholder { color: var(--text-muted); }

.search-box button {
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    font-size: 16px;
    padding: 5px;
}

.search-box:focus-within button { color: var(--primary); }

/* Right: Utilities */
.header-right-utility {
    display: flex;
    align-items: center;
    gap: 15px;
}

.icon-link {
    width: 42px;
    height: 42px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 18px;
    text-decoration: none;
    position: relative;
    transition: 0.3s;
}

.icon-link:hover { background: #fff; color: var(--primary); }

.badge-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--accent);
    color: var(--text-main);
    font-size: 10px;
    font-weight: 800;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--primary);
}

.auth-box { display: flex; align-items: center; gap: 10px; }

.user-pill {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #fff;
    color: var(--primary);
    padding: 8px 15px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 700;
    font-size: 13px;
    transition: 0.3s;
}

.user-pill:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,0.1); }

.auth-btn {
    padding: 10px 18px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    transition: 0.3s;
}

.auth-btn.login { background: #fff; color: var(--primary); }
.auth-btn.register { background: var(--accent); color: var(--text-main); }
.auth-btn:hover { transform: translateY(-2px); opacity: 0.9; }

/* Main Navigation */
.main-nav {
    background-color: var(--white);
    border-bottom: 1px solid var(--border);
    padding: 15px 0;
}

.main-nav ul {
    display: flex;
    gap: 40px;
    list-style: none;
}

.main-nav a {
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 15px;
    transition: color 0.2s;
}

.main-nav a:hover, .main-nav a.active {
    color: var(--accent);
}

/* Hero Section - The Banner */
.hero {
    margin: 30px 0;
}

.banner-promosi {
    background: url('../img/banner_second_hand.png') center/cover no-repeat;
    border-radius: 12px;
    height: 450px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--white);
    border: 1px solid var(--border);
    width: 100%;
    position: relative;
    box-shadow: var(--shadow);
}

.banner-promosi::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4); /* Overlay to make text readable */
    border-radius: 12px;
}

.banner-promosi h2, .banner-promosi p {
    position: relative;
    z-index: 1;
}

.banner-promosi h2 {
    font-size: 48px;
    font-weight: 800;
    margin-bottom: 20px;
    letter-spacing: -0.05em;
    text-transform: uppercase;
}

.banner-promosi p {
    font-size: 20px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9); /* White text for visibility on image */
}

/* Featured Section Header */
.section-title {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 60px 0 30px;
}

.section-title span {
    width: 5px;
    height: 30px;
    background-color: var(--accent);
    border-radius: 4px;
}

.section-title h2 {
    font-size: 26px;
    font-weight: 800;
}

.section-title i {
    color: #f97316; /* Orange flame */
}

/* Product Cards Grid */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
    gap: 32px;
    margin-bottom: 80px;
}

.product-card {
    background-color: var(--white);
    border-radius: 16px;
    padding: 16px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    transition: all 0.3s ease;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow);
}

.product-image {
    background-color: #f8fafc;
    height: 240px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}

.product-image i {
    font-size: 60px;
    color: #e2e8f0;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
}

.product-category {
    font-size: 12px;
    font-weight: 700;
    color: var(--accent);
    text-transform: uppercase;
    margin-bottom: 8px;
}

.product-name {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text-main);
}

.product-price {
    font-size: 22px;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 20px;
}

.product-footer {
    display: flex;
    gap: 12px;
}

.btn {
    padding: 12px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    border: none;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: 0.2s;
}

.btn-order {
    background-color: var(--white);
    border: 2px solid var(--primary);
    color: var(--primary);
}

.btn-order:hover {
    background-color: var(--primary);
    color: var(--white);
}

.btn-detail {
    background-color: var(--primary);
    color: var(--white);
}

.btn-detail:hover {
    background-color: var(--accent);
}

/* Admin Dashboard Styles */
.admin-wrapper {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 260px;
    background-color: var(--primary);
    color: var(--white);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}

.sidebar-header {
    padding: 30px 20px;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-header h2 {
    font-size: 20px;
    font-weight: 800;
}

.sidebar-header p {
    font-size: 12px;
    opacity: 0.7;
}

.sidebar-menu {
    flex: 1;
    padding: 20px 0;
    list-style: none;
}

.sidebar-menu li {
    padding: 5px 20px;
}

.sidebar-menu li a {
    text-decoration: none;
    color: rgba(255, 255, 255, 0.7);
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    transition: 0.3s;
}

.sidebar-menu li a:hover, .sidebar-menu li a.active {
    background-color: var(--secondary);
    color: var(--white);
}

.sidebar-menu li a i {
    width: 20px;
    text-align: center;
}

.submenu {
    list-style: none;
    padding-left: 35px;
    margin-top: 5px;
}

.submenu li a {
    padding: 8px 10px;
    font-size: 13px;
    opacity: 0.8;
}

.sidebar-footer {
    padding: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    background: var(--accent);
    color: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
}

.user-info-sidebar h4 {
    font-size: 14px;
    margin: 0;
}

.user-info-sidebar p {
    font-size: 11px;
    opacity: 0.6;
    margin: 0;
}

.admin-main {
    flex: 1;
    background-color: #f8fafc;
    display: flex;
    flex-direction: column;
}

.admin-header {
    background-color: var(--white);
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border);
}

.admin-header-center {
    text-align: center;
}

.admin-header-center h3 {
    font-size: 18px;
    margin: 0;
    font-weight: 800;
    color: var(--primary);
}

.admin-header-center p {
    font-size: 12px;
    color: var(--text-muted);
    margin: 0;
}

.admin-user-nav {
    display: flex;
    align-items: center;
    gap: 15px;
}

.btn-admin-nav {
    padding: 8px 15px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: 0.3s;
}

.btn-profile {
    background-color: #f1f5f9;
    color: var(--text-main);
}

.btn-logout {
    background-color: #ef4444;
    color: var(--white);
}

.admin-content {
    padding: 30px;
}

.breadcrumb-admin {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.breadcrumb-admin h2 {
    font-size: 22px;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 10px;
}

.admin-date {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 500;
}

.alert-admin {
    background-color: #fffbeb;
    border-left: 4px solid var(--accent);
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 30px;
    font-size: 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow-sm);
}

.alert-admin a {
    color: var(--secondary);
    font-weight: 700;
    text-decoration: underline;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
    margin-bottom: 30px;
}

.stat-card {
    background: var(--white);
    padding: 25px;
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    text-align: center;
}

.stat-card h4 {
    font-size: 13px;
    color: var(--text-muted);
    text-transform: uppercase;
    margin-bottom: 10px;
    font-weight: 700;
}

.stat-card .stat-value {
    font-size: 28px;
    font-weight: 800;
    color: var(--primary);
}

.stat-card .stat-sub {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 5px;
}

.dashboard-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

.admin-card {
    background: var(--white);
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    overflow: hidden;
}

.admin-card-header {
    background-color: var(--primary);
    color: var(--white);
    padding: 15px 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 15px;
}

.admin-card-content {
    padding: 20px;
}

.chart-placeholder {
    height: 300px;
    background: #f8fafc;
    border: 1px dashed var(--border);
    border-radius: 8px;
    display: flex;
    align-items: flex-end;
    justify-content: space-around;
    padding: 20px;
}

.chart-bar {
    width: 30px;
    background-color: var(--secondary);
    border-radius: 4px 4px 0 0;
    position: relative;
}

.chart-label {
    position: absolute;
    bottom: -25px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 11px;
    color: var(--text-muted);
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table th {
    background-color: #f1f5f9;
    padding: 12px 15px;
    text-align: left;
    font-size: 13px;
    font-weight: 700;
    color: var(--text-muted);
    border-bottom: 2px solid var(--border);
}

.admin-table td {
    padding: 12px 15px;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
}

.badge {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}

.badge-success {
    background-color: #dcfce7;
    color: #166534;
}

.badge-danger {
    background-color: #fee2e2;
    color: #991b1b;
}

/* Standardized Admin UI Components */
.admin-card-header.bg-primary {
    background-color: var(--primary) !important;
    color: var(--white) !important;
}

.btn-primary-admin {
    background-color: var(--primary);
    color: var(--white);
    border: none;
    padding: 10px 25px;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    transition: 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.btn-primary-admin:hover {
    background-color: var(--secondary);
    transform: translateY(-2px);
}

.btn-outline-admin {
    background-color: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
    padding: 8px 25px;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    transition: 0.3s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-outline-admin:hover {
    background-color: var(--primary);
    color: var(--white);
}

/* Form Styles */
.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-main);
    text-transform: uppercase;
}

.admin-input {
    width: 100%;
    height: 48px;
    padding: 12px 15px;
    border: 2px solid var(--border);
    border-radius: 10px;
    font-size: 14px;
    transition: 0.2s;
    outline: none;
    box-sizing: border-box;
}

.admin-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.1);
}

/* Footer */
footer {
    border-top: 1px solid var(--border);
    padding: 50px 0;
    text-align: center;
    color: var(--text-muted);
    font-size: 14px;
}