/* --- Root Variables --- */
:root {
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.15);
    --accent: #00d4ff;
    --dark-bg: #0f172a;
    --input-bg: #ffffff;
    --input-text: #000000;
    --placeholder-text: #6c757d;
}

/* --- General Styles --- */
body {
    background: radial-gradient(circle at top right, #1e293b, #0f172a);
    color: #f8fafc;
    font-family: 'Inter', sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.logo {
    display: flex;
    align-items: center;
    font-weight: bold;
    font-size: 1.2rem;
}

.logo img{
    width: 50px;
}

/* --- Input Fields (White background, Black text) --- */
input.form-control, 
select.form-select, 
textarea.form-control,
.glass-card.form-control,
#addForm input, 
#addForm select,
#adminGrid input, 
#adminGrid select {
    background-color: var(--input-bg) !important;
    color: var(--input-text) !important;
    border: 1px solid var(--glass-border) !important;
    border-radius: 8px;
    opacity: 1;
}

/* Placeholder Color */
input::placeholder, 
textarea::placeholder {
    color: var(--placeholder-text) !important;
    opacity: 1;
}

/* Select Arrow Fix for White Background */
/* --- Fix Dropdown Icons & Input Appearance --- */
.form-select {
    appearance: none; /* Removes default browser arrows */
    -webkit-appearance: none;
    -moz-appearance: none;
    background-color: var(--input-bg) !important;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e") !important;
    background-repeat: no-repeat !important;
    background-position: right 0.75rem center !important;
    background-size: 16px 12px !important;
    padding-right: 2.5rem !important; /* Prevents text from overlapping arrow */
    color: var(--input-text) !important;
}

/* --- Admin Save Button Style --- */
.btn.btn-save {
    background-color: #ffffff !important; /* White background */
    color: #000000 !important;            /* Black text */
    border: 1px solid #ced4da !important; /* Subtle grey border */
    font-weight: 600 !important;
    padding: 6px 16px !important;
    border-radius: 6px !important;
    transition: all 0.2s ease-in-out !important;
    cursor: pointer !important;
    min-width: 85px !important;
}

/* Hover State */
.btn.btn-save:hover {
    background-color: #f8fafc !important; /* Very light grey on hover */
    border-color: #00d4ff !important;    /* Cyan glow on border */
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 212, 255, 0.15);
}

/* Active/Click State */
.btn.btn-save:active {
    background-color: #e2e8f0 !important;
    transform: translateY(0);
}


/* --- Glassmorphism UI Components --- */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
}

.navbar.glass-nav {
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--glass-border);
    padding: 1rem 0;
}

/* --- Product Cards & Animations --- */
.product-card {
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
}

.product-card:hover {
    transform: translateY(-10px);
    border-color: var(--accent);
    box-shadow: 0 10px 30px rgba(0, 212, 255, 0.2);
}

.product-img {
    height: 220px;
    object-fit: cover;
    border-radius: 12px;
    transition: transform 0.5s ease;
}

.product-card:hover .product-img {
    transform: scale(1.03);
}

/* --- Status Badges --- */
.badge-status {
    position: absolute;
    top: 15px;
    right: 15px;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: bold;
    z-index: 2;
}

.available { background: #10b981; color: white; }
.sold { background: #ef4444; color: white; }

/* --- Filter Buttons --- */
.btn-glass {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: white;
    transition: 0.3s;
    border-radius: 50px;
    padding: 8px 20px;
}

.btn-glass.active, .btn-glass:hover {
    background: var(--accent);
    color: #000;
    border-color: var(--accent);
    box-shadow: 0 0 15px rgba(0, 212, 255, 0.4);
}

/* --- Admin Table Styles --- */
.table-dark {
    background: transparent !important;
    --bs-table-bg: transparent;
}

#adminGrid tr {
    border-bottom: 1px solid var(--glass-border);
}

#adminGrid input, #adminGrid select {
    padding: 4px 8px;
    font-size: 0.9rem;
}

/* --- Pagination Centering --- */
#pagination {
    display: flex;
    justify-content: center;
    list-style: none;
    padding: 0;
    gap: 5px;
}

/* --- Base Pagination Button Style --- */
.page-item .page-link {
    background-color: #f8fafc !important; /* Matches your Prev/Next gray */
    color: #333 !important;
    border: none !important;
    padding: 8px 16px;
    font-weight: 600;
    border-radius: 6px !important;
    transition: all 0.2s ease;
}

/* --- Cyan Active State (Matching your Image) --- */
.page-item.active .page-link {
    background-color: #00d4ff !important; /* Your Cyan */
    color: #000 !important;
    box-shadow: 0 0 10px rgba(0, 212, 255, 0.4);
}

/* --- Disabled State --- */
.page-item.disabled .page-link {
    opacity: 0.5;
    pointer-events: none;
    background-color: #e2e8f0 !important;
}
/* --- Footer --- */
footer {
    border-top: 1px solid var(--glass-border);
    background: rgba(15, 23, 42, 0.9);
}

.footer-link{
    color: #10b981;
}

/* --- Footer Links Style --- */
.footer-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
}

.footer-link {
    color: #f8fafc;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    font-size: 0.95rem;
}

.footer-link:hover {
    color: #10b981;
    text-decoration: underline;
}

.footer-divider {
    color: var(--glass-border);
    font-weight: 100;
    user-select: none;
}

.social-links a {
    color: white;
    font-size: 1.5rem;
    margin: 0 10px;
    transition: color 0.3s;
}

.social-links a:hover {
    color: var(--accent);
}

/* --- Scrollbar --- */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: var(--dark-bg);
}
::-webkit-scrollbar-thumb {
    background: var(--glass-border);
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--accent);
}

/* --- Modal Glass Effect --- */
.modal-content.glass-card {
    background: rgba(15, 23, 42, 0.95) !important; /* Darker for readability over content */
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border) !important;
}

.modal-header, .modal-footer {
    border-color: rgba(255, 255, 255, 0.1) !important;
}

#orderModal .modal-content {
    background: rgba(15, 23, 42, 0.9) !important;
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border) !important;
    border-radius: 20px;
}

#orderModal .btn {
    border-radius: 12px;
    transition: transform 0.2s;
}

#orderModal .btn:hover {
    transform: scale(1.05);
}

#orderModal .btn-success {
    background-color: #25d366 !important;
    border: none;
}

#orderModal .btn-info {
    background-color: #00d4ff !important;
    border: none;
}

/* Mobile Optimization */
@media (max-width: 576px) {
    .product-img {
        height: 140px; /* Shorter height for 2-column mobile view */
    }
    
    .product-card {
        padding: 10px !important;
    }

    .product-title-mobile {
        font-size: 0.9rem;
        margin-bottom: 5px;
        display: -webkit-box;
       
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .small-mobile-text {
        font-size: 0.75rem;
    }

    .x-small-mobile {
        font-size: 0.65rem;
    }

    .badge-status {
        font-size: 0.6rem;
        padding: 3px 8px;
        top: 10px;
        right: 10px;
    }

    /* Adjusting the search bar for mobile */
    #searchInput {
        width: 100% !important;
        margin-top: 10px;
    }
    
    #filterContainer {
        justify-content: center !important;
        padding-bottom: 15px;                  /* Space for a scrollbar if visible */
        gap: 8px !important;                   /* Tighter gap on mobile */
    }

    /* Hide scrollbar for a cleaner "app-like" look */
    #filterContainer::-webkit-scrollbar {
        display: none;
    }

    .btn-glass {
        padding: 5px 12px !important;          /* Significantly smaller padding */
        font-size: 0.9rem !important;          /* Smaller text for mobile */
        border-radius: 4px !important;
    }

    #pagination {
        gap: 8px;
    }

    .page-item .page-link {
        padding: 6px 10px !important; /* Smaller buttons */
        font-size: 0.75rem !important; /* Smaller text */
        min-width: 40px;
        text-align: center;
    }
}

/* Gutter adjustment for tighter mobile grid */
.g-3 {
    --bs-gutter-x: 0.75rem;
    --bs-gutter-y: 0.75rem;
}
