/* Ocean Theme Color Palette */
:root {
    --ocean-darkest: #03045e;
    --ocean-dark: #023e8a;
    --ocean-medium: #0077b6;
    --ocean-light: #0096c7;
    --ocean-lighter: #00b4d8;
    --ocean-pale: #48cae4;
    --ocean-foam: #90e0ef;
    --ocean-mist: #ade8f4;
    --ocean-cloud: #caf0f8;
    --sand: #f8f9fa;
    --coral: #ff6b6b;
    --seaweed: #20c997;
}

/* Base Styles */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--sand);
    color: #333;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

/* Navbar */
.navbar {
    background: linear-gradient(135deg, var(--ocean-dark) 0%, var(--ocean-medium) 100%);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
    color: white !important;
}

.navbar-brand span {
    color: var(--ocean-foam);
}

.navbar .nav-link {
    color: rgba(255, 255, 255, 0.9) !important;
    font-weight: 500;
    transition: color 0.2s;
}

.navbar .nav-link:hover {
    color: var(--ocean-cloud) !important;
}

.navbar .nav-link.active {
    color: white !important;
    border-bottom: 2px solid var(--ocean-foam);
}

/* Buttons */
.btn-ocean {
    background: linear-gradient(135deg, var(--ocean-medium) 0%, var(--ocean-light) 100%);
    border: none;
    color: white;
    font-weight: 500;
    padding: 0.5rem 1.5rem;
    transition: all 0.3s;
}

.btn-ocean:hover {
    background: linear-gradient(135deg, var(--ocean-dark) 0%, var(--ocean-medium) 100%);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 119, 182, 0.3);
}

.btn-ocean-outline {
    border: 2px solid var(--ocean-medium);
    color: var(--ocean-medium);
    background: transparent;
    font-weight: 500;
    padding: 0.5rem 1.5rem;
    transition: all 0.3s;
}

.btn-ocean-outline:hover {
    background: var(--ocean-medium);
    color: white;
}

.btn-coral {
    background: var(--coral);
    border: none;
    color: white;
}

.btn-coral:hover {
    background: #ee5a5a;
    color: white;
}

.btn-seaweed {
    background: var(--seaweed);
    border: none;
    color: white;
}

.btn-seaweed:hover {
    background: #1aa883;
    color: white;
}

/* Cards */
.card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s;
}

.card:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
}

.card-header {
    background: linear-gradient(135deg, var(--ocean-dark) 0%, var(--ocean-medium) 100%);
    color: white;
    border-radius: 12px 12px 0 0 !important;
    font-weight: 600;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--ocean-darkest) 0%, var(--ocean-dark) 50%, var(--ocean-medium) 100%);
    color: white;
    padding: 80px 0;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 320'%3E%3Cpath fill='%23ffffff' fill-opacity='0.05' d='M0,96L48,112C96,128,192,160,288,160C384,160,480,128,576,122.7C672,117,768,139,864,154.7C960,171,1056,181,1152,165.3C1248,149,1344,107,1392,85.3L1440,64L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z'%3E%3C/path%3E%3C/svg%3E") no-repeat bottom;
    background-size: cover;
}

.hero h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.25rem;
    opacity: 0.9;
}

/* Product Cards */
.product-card {
    border-radius: 12px;
    overflow: hidden;
}

.product-card .card-img-top {
    height: 200px;
    object-fit: cover;
}

.product-card .price {
    color: var(--ocean-medium);
    font-size: 1.25rem;
    font-weight: 700;
}

.product-card .compare-price {
    text-decoration: line-through;
    color: #999;
    font-size: 0.9rem;
}

.product-card .badge-condition {
    position: absolute;
    top: 10px;
    right: 10px;
}

/* Category Cards */
.category-card {
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    height: 150px;
    background: linear-gradient(135deg, var(--ocean-medium) 0%, var(--ocean-lighter) 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.3s;
}

.category-card:hover {
    transform: scale(1.02);
    color: white;
}

.category-card h5 {
    font-weight: 600;
    margin: 0;
}

/* Forms */
.form-control:focus,
.form-select:focus {
    border-color: var(--ocean-light);
    box-shadow: 0 0 0 0.2rem rgba(0, 150, 199, 0.25);
}

.form-label {
    font-weight: 500;
    color: var(--ocean-dark);
}

/* Auth Pages */
.auth-container {
    max-width: 450px;
    margin: 60px auto;
}

.auth-card {
    border-radius: 16px;
    overflow: hidden;
}

.auth-card .card-header {
    padding: 2rem;
    text-align: center;
}

.auth-card .card-header h2 {
    margin: 0;
    font-weight: 700;
}

.auth-card .card-body {
    padding: 2rem;
}

/* Dashboard Sidebar */
.dashboard-sidebar {
    background: linear-gradient(180deg, var(--ocean-darkest) 0%, var(--ocean-dark) 100%);
    min-height: calc(100vh - 56px);
    padding: 1.5rem 0;
}

.dashboard-sidebar .nav-link {
    color: rgba(255, 255, 255, 0.8);
    padding: 0.75rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: all 0.2s;
}

.dashboard-sidebar .nav-link:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.dashboard-sidebar .nav-link.active {
    background: var(--ocean-medium);
    color: white;
}

.dashboard-sidebar .nav-link i {
    width: 20px;
    text-align: center;
}

/* Stats Cards */
.stat-card {
    border-radius: 12px;
    padding: 1.5rem;
    color: white;
    position: relative;
    overflow: hidden;
}

.stat-card::after {
    content: '';
    position: absolute;
    top: -20px;
    right: -20px;
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
}

.stat-card.blue { background: linear-gradient(135deg, var(--ocean-medium) 0%, var(--ocean-light) 100%); }
.stat-card.teal { background: linear-gradient(135deg, var(--seaweed) 0%, #3dd5a8 100%); }
.stat-card.coral { background: linear-gradient(135deg, var(--coral) 0%, #ff8787 100%); }
.stat-card.dark { background: linear-gradient(135deg, var(--ocean-darkest) 0%, var(--ocean-dark) 100%); }

.stat-card h3 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.stat-card p {
    margin: 0;
    opacity: 0.9;
}

/* Tables */
.table-ocean thead {
    background: linear-gradient(135deg, var(--ocean-dark) 0%, var(--ocean-medium) 100%);
    color: white;
}

.table-ocean thead th {
    border: none;
    font-weight: 600;
    padding: 1rem;
}

.table-ocean tbody td {
    padding: 1rem;
    vertical-align: middle;
}

/* Badges */
.badge-ocean { background-color: var(--ocean-medium); }
.badge-pending { background-color: #ffc107; color: #333; }
.badge-approved { background-color: var(--seaweed); }
.badge-rejected { background-color: var(--coral); }

/* Footer */
.footer {
    background: linear-gradient(135deg, var(--ocean-darkest) 0%, var(--ocean-dark) 100%);
    color: white;
    padding: 3rem 0 1.5rem;
}

.footer h5 {
    color: var(--ocean-foam);
    font-weight: 600;
    margin-bottom: 1rem;
}

.footer a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.2s;
}

.footer a:hover {
    color: var(--ocean-foam);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 2rem;
    padding-top: 1.5rem;
    text-align: center;
    opacity: 0.8;
}

/* Loading Spinner */
.spinner-ocean {
    color: var(--ocean-medium);
}

/* Alerts */
.alert-ocean {
    background-color: var(--ocean-cloud);
    border-color: var(--ocean-light);
    color: var(--ocean-dark);
}

/* Cart Badge */
.cart-badge {
    position: absolute;
    top: -5px;
    right: -10px;
    background: var(--coral);
    color: white;
    font-size: 0.7rem;
    padding: 0.2rem 0.5rem;
    border-radius: 10px;
}

/* Search Dropdown */
.search-results-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    max-height: 400px;
    overflow-y: auto;
    z-index: 1050;
}

.search-result-item {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    transition: background 0.2s;
}

.search-result-item:hover {
    background: var(--ocean-cloud);
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 4px;
    margin-right: 12px;
}

.search-result-info {
    flex: 1;
}

.search-result-info h6 {
    margin: 0 0 4px 0;
    font-size: 0.9rem;
    color: var(--ocean-dark);
}

.search-result-info small {
    color: #666;
}

.search-result-price {
    font-weight: 600;
    color: var(--ocean-medium);
}

.search-no-results {
    padding: 20px;
    text-align: center;
    color: #666;
}

.search-view-all {
    display: block;
    padding: 12px;
    text-align: center;
    background: var(--ocean-cloud);
    color: var(--ocean-dark);
    text-decoration: none;
    font-weight: 500;
    border-radius: 0 0 8px 8px;
}

.search-view-all:hover {
    background: var(--ocean-mist);
    color: var(--ocean-dark);
}

/* Responsive */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2rem;
    }

    .dashboard-sidebar {
        min-height: auto;
    }

    #searchContainer {
        display: none;
    }
}
