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

/* Define a more futuristic color palette */
:root {
    --primary-color: #00e0ff; /* Electric blue */
    --adminsettings: rgba(0,224,255,0.4);
    --primary-hover: #00c2e0;
    --dark-color: #1a1a1a;
    --light-gray: #0f0f0f;
    --medium-gray: #333;
    --text-color: #f0f0f0;
    --secondary-text-color: #aaaaaa;
    --card-bg: #222222;
    --success-color: #28a745;
    --danger-color: #ff4d4d;
    --warning-color: #ffb700;
    --info-color: #17a2b8;
    --border-radius: 12px;
    --shadow: 0 5px 20px rgba(0, 0, 0, 0.5);
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--dark-color);
    color: var(--text-color);
    line-height: 1.6;
    margin: 0;
    padding-top: 70px;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.container {
    width: 95%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    box-sizing: border-box;
}

.main-content-area {
    padding-top: 20px;
    flex: 1;
    animation: fadeInAnimation ease 0.5s;
    animation-iteration-count: 1;
    animation-fill-mode: forwards;
}

@keyframes fadeInAnimation {
    0% { opacity: 0; transform: translateY(10px); }
    100% { opacity: 1; transform: translateY(0); }
}

h2 {
    color: var(--primary-color);
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 10px;
    margin-bottom: 20px;
    text-shadow: 0 0 5px rgba(0,224,255,0.5);
}

/* --- MODERN HEADER STYLES --- */
header.modern-header {
    background: var(--card-bg);
    color: var(--text-color);
    padding: 0;
    border-bottom: 1px solid var(--medium-gray);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 2000;
    box-shadow: var(--shadow);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.header-left, .header-center, .header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.header-center {
    flex-grow: 1;
    justify-content: center;
}

header #branding h1 {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
    letter-spacing: 1px;
}
header #branding a {
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.3s ease;
}
header #branding a:hover {
    color: var(--primary-color);
}

/* Search Container in Header */
.search-container {
    width: 100%;
    max-width: 500px;
}
.main-search {
    position: relative;
    display: flex;
}
.search-container input[type="text"] {
    width: 100%;
    padding: 10px 15px 10px 40px;
    font-size: 14px;
    border: 1px solid var(--medium-gray);
    border-radius: 20px;
    background-color: var(--medium-gray);
    color: white;
    box-sizing: border-box;
    transition: all 0.3s ease;
}
.search-container input[type="text"]::placeholder {
    color: #ccc;
}
.search-container input[type="text"]:focus {
    background-color: #444;
    border-color: var(--primary-color);
    box-shadow: 0 0 8px rgba(0,224,255,0.5);
    outline: none;
}
.search-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-color);
}
.search-container button.btn {
    display: none;
}

/* Main Navigation & User Profile */
.main-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 20px;
}
.main-nav a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: color 0.2s ease;
    display: flex;
    align-items: center;
}
.main-nav a:hover {
    color: var(--primary-color);
}
.main-nav .btn {
    padding: 8px 16px;
    font-size: 14px;
    color: white;
    border: none;
    border-radius: 20px;
    box-shadow: 0 0 10px rgba(0,224,255,0.4);
    transition: all 0.3s ease;
    text-decoration: none; /* Add this to remove the underline */
    display: inline-block; /* Add this to enable padding and other box-model properties */
}
.main-nav .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,224,255,0.6);
}

.profile-btn {
    gap: 8px;
    color: var(--text-color);
}
.nav-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary-color);
}

/* Header Dropdowns */
.header-right .dropdown, .category-nav .dropdown {
    position: relative;
}
.header-right .dropdown-content, .category-nav .dropdown-content {
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
    position: absolute;
    background-color: var(--card-bg);
    min-width: 200px;
    box-shadow: var(--shadow);
    z-index: 2001;
    border-radius: var(--border-radius);
    overflow: hidden;
    border: 1px solid var(--medium-gray);
}

.header-right .dropdown:hover .dropdown-content,
.category-nav .dropdown:hover .dropdown-content {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.header-right .dropdown-content {
    right: 0;
    top: 120%;
}
.header-right .dropdown-content a, .header-right .dropdown-content button {
    color: var(--text-color);
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    background: none;
    border: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
    transition: background-color 0.2s ease;
}
.header-right .dropdown-content a:hover, .header-right .dropdown-content button:hover {
    background-color: #333;
    color: var(--primary-color);
}

.category-nav .dropdown-btn {
    padding: 8px 16px;
    font-size: 14px;
    color: white;
    border: none;
    border-radius: 20px;
    box-shadow: 0 0 10px rgba(0,224,255,0.4);
    transition: all 0.3s ease;
    text-decoration: none; /* Add this to remove the underline */
    display: inline-block; /* Add this to enable padding and other box-model properties */
background-color: #2c2f33;
}
.category-nav .dropdown-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,224,255,0.6);
}
.category-nav .dropdown-btn i {
    margin-right: 8px;

}
.category-nav .dropdown-content {
    left: 0;
    top: 120%;
}


/* Mobile Responsive Header */
@media (max-width: 992px) {
    .header-center { display: none; }
}
@media (max-width: 768px) {
    body { padding-top: 60px; }
    .header-container { height: 60px; }
    #branding h1 { font-size: 20px; }
    .header-right { display: none; }
}

/* --- PAGE-SPECIFIC FIXES --- */
.profile-avatar {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--primary-color);
    margin-right: 20px;
}

.seller-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 5px;
    vertical-align: middle;
}
.message-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    padding: 2px 6px;
    border-radius: 50%;
    background-color: var(--danger-color);
    color: white;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    text-align: center;
}

/* Auction Page Image Gallery */
.auction-details-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    background: var(--card-bg);
    padding: 30px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    margin-top: 20px;
}
.main-image-container {
    width: 100%;
    background-color: #f9f9f9;
    border: 1px solid #eee;
    border-radius: 5px;
    aspect-ratio: 4 / 5;
    display: flex;
    align-items: center;
    justify-content: center;
}
#main-auction-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    cursor: pointer;
    transition: transform 0.2s ease;
}
#main-auction-image:hover {
    transform: scale(1.05);
}
.thumbnail-container {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}
.thumbnail-image {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: var(--border-radius);
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color 0.2s ease;
}
.thumbnail-image.active,
.thumbnail-image:hover {
    border-color: var(--primary-color);
    transform: scale(1.05);
}

/* --- AUCTION CARD & BANNERS --- */
.auction-grid, .card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 25px;
    margin-top: 20px;
}

.auction-card {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    position: relative;
    border: 1px solid transparent;
}

.auction-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.2), 0 0 15px var(--primary-color);
    border-color: var(--primary-color);
}

.auction-card a {
    text-decoration: none;
    color: inherit;
}

.card-image-container {
    width: 100%;
    padding-top: 100%;
    position: relative;
    overflow: hidden;
    background-color: #1a1a1a;
}

.card-image-container img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 5px;
}

.card-info {
    padding: 20px;
}

.card-info h3 {
    margin: 0 0 10px 0;
    font-size: 18px;
    font-weight: 600;
    color: var(--text-color);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card-bid {
    display: flex;
    align-items: center;
    margin-bottom: 5px;
    color: var(--secondary-text-color);
}
.card-bid span {
    font-weight: 700;
    color: var(--success-color);
    font-size: 18px;
}

.card-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--secondary-text-color);
    margin-bottom: 5px;
}
.card-meta i {
    color: var(--primary-color);
}


.card-countdown {
    font-size: 14px;
    font-weight: 500;
    color: var(--danger-color);
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px dashed var(--medium-gray);
}

/* --- Badge Styles --- */
.card-badge {
    position: absolute;
    top: 10px;
    left: -8px;
    padding: 5px 15px 5px 20px;
    color: white;
    font-weight: 600;
    font-size: 12px;
    box-shadow: 2px 2px 5px rgba(0,0,0,0.2);
    clip-path: polygon(0% 0%, 100% 0%, 90% 50%, 100% 100%, 0% 100%);
    text-transform: uppercase;
}

.badge-new {
    background-color: var(--primary-color);
}

.badge-hot {
    background-color: var(--danger-color);
}

.badge-ending-soon {
    background-color: var(--warning-color);
    color: #333;
}

.bidding-box .current-bid {
    font-size: 28px;
    font-weight: 700;
    color: var(--success-color);
}

.bidding-box .countdown {
    font-weight: 700;
    color: var(--danger-color);
    font-size: 18px;
}

/* --- Advanced Mega Menu Styles --- */
.mega-menu {
    padding: 20px;
    display: flex;
    gap: 25px;
    width: max-content;
    max-width: 90vw;
    border-top: 3px solid var(--primary-color);
}
.hot-deals-container {
    flex-shrink: 0;
    width: 220px;
    border-right: 1px solid #ddd;
    padding-right: 25px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}
.hot-deals-container .menu-group-title {
    margin: 0;
    padding-bottom: 5px;
    border-bottom: 2px solid var(--primary-color);
}

.hot-deals-wrapper {
    display: flex;
    gap: 15px;
    flex-direction: column;
}

.hot-deals-container:not(.stacked) {
    width: 450px;
}
.hot-deals-container:not(.stacked) .hot-deals-wrapper {
    flex-direction: row;
}

.hot-deal-card {
    display: block;
    text-decoration: none;
    flex: 1;
    background-color: #2a2a2a;
    border: 1px solid #444;
    border-radius: var(--border-radius);
    padding: 10px;
    transition: all 0.3s ease;
}
.hot-deal-card:hover {
    border-color: var(--primary-color);
    box-shadow: 0 0 10px rgba(0,224,255,0.5);
}
.hot-deal-card img {
    width: 100%;
    max-width: 200px;
    height: 150px;
    object-fit: contain;
    border-radius: var(--border-radius);
    margin-bottom: 10px;
    background-color: #fff;
    padding: 5px;
}
.hot-deal-card .deal-info h5 {
    color: var(--text-color);
    margin: 0 0 5px 0;
    font-size: 14px;
}
.hot-deal-card .deal-info p {
    margin: 0;
    font-size: 12px;
    color: var(--secondary-text-color);
}
.hot-deal-card .deal-info span {
    font-weight: bold;
    color: var(--success-color);
}
.menu-grid {
    display: grid;
    gap: 25px;
    grid-template-columns: repeat(var(--columns, 3), 1fr);
}
.menu-group {
    break-inside: avoid;
    width: 180px;
}
.menu-group-title {
    margin: 0 0 10px 0;
    padding-bottom: 5px;
    border-bottom: 2px solid var(--primary-color);
    font-size: 16px;
    color: var(--text-color);
}
.menu-item-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    border-radius: 5px;
    text-decoration: none;
    color: var(--secondary-text-color);
    transition: background-color 0.2s ease;
}
.menu-item-link:hover {
    background-color: #333;
    color: var(--primary-color);
}
.menu-item-thumbnail {
    width: 30px;
    height: 30px;
    object-fit: contain;
    border-radius: 4px;
    background-color: #f9f9f9;
}
/* --- Admin Settings Page Styles --- */
.subtitle {
    font-size: 1rem;
    color: var(--secondary-text-color);
    margin-top: -10px;
    margin-bottom: 30px;
}
.card {
    background-color: var(--card-bg);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--medium-gray);
}
.card-body {
    padding: 30px;
padding-top: 0px;
}
/* Form Elements */
.form-group {
    margin-bottom: 20px;
}
label {
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 8px;
}
.form-control, .form-check-input, .form-check-label {
    font-size: 1rem;
}
.form-check {
    display: flex;
    align-items: center;
    margin-top: 10px;
}
.form-check-input {
    width: 1.25rem;
    height: 1.25rem;
    margin-right: 10px;
}
.form-check-label {
    margin-bottom: 0;
    color: var(--text-color);
}
/* Collapsible Sections */
.collapsible-container {
    border: 1px solid var(--medium-gray);
    border-radius: var(--border-radius);
    margin-bottom: 25px;
    overflow: hidden;
}
.collapsible-header {
    width: 100%;
    background-color: var(--medium-gray);
    border: none;
    padding: 18px 25px;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-color);
    text-align: left;
    cursor: pointer;
    transition: background-color 0.2s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.collapsible-header:hover {
    background-color: #555;
}
.collapsible-header.active {
    background-color: #555;
    border-bottom: 1px solid #666;
}
.icon-toggle::before {
    content: '+';
    font-size: 1.5rem;
    font-weight: 400;
    line-height: 1;
    transition: transform 0.3s ease;
}
.collapsible-header.active .icon-toggle::before {
    content: '-';
    transform: rotate(180deg);
}
.collapsible-content {
    background-color: var(--card-bg);
    padding: 0 25px;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.4s ease-in-out, padding 0.4s ease-in-out, opacity 0.4s ease-in-out;
}
.collapsible-content.active {
    max-height: 2000px;
    padding: 25px;
    opacity: 1;
}
/* Category Grid */
.category-settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}
.category-setting-item {
    background-color: #2a2a2a;
    border: 1px solid var(--medium-gray);
    border-radius: var(--border-radius);
    padding: 15px;
    transition: border-color 0.2s ease;
}
.category-setting-item:hover {
    border-color: var(--adminsettings);
}
.category-setting-item .main-select {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}
.category-setting-item .main-select input[type="checkbox"] {
    margin-right: 10px;
}
.sub-options {
    padding-left: 20px;
    border-left: 2px solid var(--medium-gray);
}
.sub-options .radio-group-label {
    font-weight: 500;
    margin-top: 10px;
    margin-bottom: 5px;
    color: var(--text-color);
}
.radio-item, .checkbox-item-secondary {
    display: flex;
    align-items: center;
    margin-bottom: 5px;
}
.radio-item input[type="radio"], .checkbox-item-secondary input[type="checkbox"] {
    margin-right: 8px;
}
a.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}
/* --- Menu Manager Styles --- */
.menu-editor-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.menu-item {
    background-color: var(--card-bg);
    border: 1px solid var(--medium-gray);
    border-radius: var(--border-radius);
    padding: 15px;
    margin-bottom: 10px;
    cursor: move;
    transition: box-shadow 0.2s ease, background-color 0.2s ease;
}
.menu-item:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    background-color: #333;
}
.menu-item .item-content {
    display: flex;
    align-items: center;
    gap: 15px;
}
.menu-item .drag-handle {
    font-size: 1.5rem;
    color: var(--text-color);
    cursor: grab;
}
.menu-item .input-group {
    flex-grow: 1;
    display: flex;
    gap: 10px;
}
.menu-item .form-control {
    flex: 1;
}
.menu-item .remove-item {
    background-color: var(--danger-color);
    color: white;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    font-size: 1.2rem;
    line-height: 1;
    cursor: pointer;
    transition: background-color 0.2s ease;
    flex-shrink: 0;
}
.menu-item .remove-item:hover {
    background-color: #c82333;
}
/* --- Menu Manager Specific Styles --- */
.subtitle {
    font-size: 1rem;
    color: var(--secondary-text-color);
    margin-top: -10px;
    margin-bottom: 30px;
}
.card-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 1rem;
}
.menu-editor-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 20px;
}
.available-items .list-group {
    height: 400px;
    overflow-y: auto;
    border: 1px solid var(--medium-gray);
    border-radius: var(--border-radius);
    padding: 10px;
}
.available-items .menu-item {
    cursor: grab;
    background-color: #2a2a2a;
    border: 1px solid #444;
}
.menu-groups-container {
    border: 1px dashed var(--medium-gray);
    border-radius: var(--border-radius);
    padding: 15px;
    min-height: 400px;
}
.menu-group-card {
    background: #2a2a2a;
    border: 1px solid #444;
    border-radius: var(--border-radius);
    padding: 15px;
    margin-bottom: 10px;
    transition: all 0.2s ease;
}
.menu-group-card:hover {
    border-color: var(--primary-color);
}
.group-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    cursor: grab;
}
.group-header .drag-handle {
    font-size: 1.5rem;
    color: var(--text-color);
}
.group-header .group-title {
    flex-grow: 1;
    font-size: 1.1rem;
    font-weight: 600;
    border: none;
    background: transparent;
    padding: 0;
    color: var(--text-color);
}
.menu-item-list {
    list-style: none;
    padding: 0;
    margin: 0;
    min-height: 20px;
}
.menu-item {
    padding: 8px;
    border: 1px solid #444;
    border-radius: 5px;
    margin-bottom: 8px;
    cursor: move;
    background-color: #333;
    display: flex;
    align-items: center;
}
.menu-item .drag-handle {
    margin-right: 10px;
    cursor: grab;
    color: var(--text-color);
}
.deal-selectors {
    display: flex;
    gap: 1rem;
}
.deal-selector-group {
    flex: 1;
}
.form-check-input {
    width: 1.25em;
    height: 1.25em;
    margin-top: 0.25em;
}
.form-check-label {
    margin-bottom: 0;
    color: var(--text-color);
}
/* TomSelect overrides for better visual integration */
.ts-wrapper.form-select, .ts-control {
    border-color: #444;
    border-radius: var(--border-radius);
    background-color: var(--dark-color);
    padding: 8px 12px;
    color: var(--text-color);
}
.ts-dropdown {
    background-color: #2a2a2a;
    border: 1px solid #444;
}
.ts-dropdown .option, .ts-dropdown .option-content {
    color: var(--text-color);
}
.ts-dropdown .option-content, .ts-control .item-content {
    display: flex;
    align-items: center;
    gap: 10px;
}
.ts-dropdown .option-content img, .ts-control .item-content img {
    width: 30px;
    height: 30px;
    object-fit: contain;
    border-radius: 4px;
    background-color: #f9f9f9;
}
/* User Management Page Styles */
.table {
    width: 100%;
    margin-bottom: 1rem;
    color: var(--text-color);
    vertical-align: middle;
    border-collapse: collapse;
}
.table th, .table td {
    padding: 12px 15px;
    border: 1px solid var(--medium-gray);
    text-align: left;
}
.table thead th {
    background-color: #333;
    border-bottom-width: 2px;
}
.table tbody tr:nth-of-type(odd) {
    background-color: #2a2a2a;
}
.status-badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.85rem;
    color: white;
}
.status-admin {
    background-color: var(--primary-color);
}
.status-banned {
    background-color: var(--danger-color);
}
.status-active {
    background-color: var(--success-color);
}
.search-form {
    display: flex;
    gap: 10px;
    align-items: center;
}
.search-form .form-control {
    max-width: 300px;
}
.pagination-container {
    display: flex;
    gap: 5px;
}
.btn-pagination {
    padding: 8px 12px;
    background-color: var(--medium-gray);
    border: 1px solid var(--medium-gray);
    color: var(--text-color);
    text-decoration: none;
    transition: background-color 0.2s ease;
}
.btn-pagination:hover, .btn-pagination.active {
    background-color: var(--primary-color);
    color: var(--dark-color);
    border-color: var(--primary-color);
}
/* Admin Dashboard Styles */
.admin-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}
.stat-card {
    background-color: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 25px;
    box-shadow: var(--shadow);
    text-align: center;
    transition: transform 0.3s ease;
}
.stat-card:hover {
    transform: translateY(-5px);
}
.stat-title {
    font-size: 1rem;
    color: var(--secondary-text-color);
    margin: 0 0 10px 0;
}
.stat-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin: 0;
}
.mt-4 {
    margin-top: 2rem !important;
}
/* Auction Management Page Styles */
.table {
    width: 100%;
    margin-bottom: 1rem;
    color: var(--text-color);
    vertical-align: middle;
    border-collapse: collapse;
}
.table th, .table td {
    padding: 12px 15px;
    border: 1px solid var(--medium-gray);
    text-align: left;
}
.table thead th {
    background-color: #333;
    border-bottom-width: 2px;
}
.table tbody tr:nth-of-type(odd) {
    background-color: #2a2a2a;
}
.btn-group {
    display: flex;
}
.btn-group .btn {
    border-radius: 0;
}
.btn-group .btn:first-child {
    border-top-left-radius: var(--border-radius);
    border-bottom-left-radius: var(--border-radius);
}
.btn-group .btn:last-child {
    border-top-right-radius: var(--border-radius);
    border-bottom-right-radius: var(--border-radius);
}
.btn-group .btn.active {
    background-color: #3e4247;
    color: white;
}

/* General button styling */
.btn {
    padding: 8px 16px;
    font-size: 14px;
    color: white;
    border: none;
    border-radius: 20px;
    box-shadow: 0 0 10px rgba(0,224,255,0.4);
    transition: all 0.3s ease;
    text-decoration: none; /* Add this to remove the underline */
    display: inline-block; /* Add this to enable padding and other box-model properties */
background-color: #2c2f33;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,224,255,0.6);
}

/* Primary button variant */
.btn-primary {
    background-color: var(--primary-color);
}

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

/* Update Profile Navigation Styling */
.profile-nav {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.profile-nav-item a {
    display: block;
    padding: 12px 15px;
    background-color: var(--card-bg); /* Use the card background color for the button */
    color: var(--text-color);
    text-decoration: none;
    border-radius: var(--border-radius); /* Rounded corners */
    transition: all 0.3s ease;
    text-align: left;
    border: 1px solid var(--medium-gray); /* Add a border */
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3); /* Add a subtle shadow */
}
.profile-nav-item a:hover {
    background-color: var(--medium-gray); /* Darker on hover */
    color: var(--primary-color);
    box-shadow: 0 4px 15px rgba(0,224,255,0.4); /* Add the glowing effect on hover */
}
.profile-nav-item a.active {
    background-color: var(--primary-color);
    color: #fff;
    box-shadow: 0 4px 10px rgba(0,224,255,0.3);
}
/* --- Show/Hide functionality for categories --- */
.category-item.hidden {
    display: none;
}
/* New Pagination Style */
.btn-group-pagination {
    display: flex;
    gap: 5px;
}

.btn-group-pagination .btn {
    border-radius: var(--border-radius);
    padding: 8px 16px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    background-color: var(--card-bg);
    color: var(--text-color);
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
}

.btn-group-pagination .btn:hover {
    background-color: var(--medium-gray);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,224,255,0.6);
}

.btn-group-pagination .btn.btn-primary {
    background-color: var(--primary-color);
    color: var(--dark-color);
    font-weight: 600;
}

.btn-group-pagination .btn.disabled {
    background-color: var(--medium-gray);
    color: var(--secondary-text-color);
    cursor: not-allowed;
    opacity: 0.6;
    transform: none;
    box-shadow: none;
}
/* ADDED FOR TIMER AND BORDER */
.card-countdown {
    font-size: 12px; /* A bit smaller for the timer */
    font-weight: 500;
    color: var(--danger-color);
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px dashed var(--medium-gray);
}

.auction-card.has-bid {
    border: 2px solid #00ff73; /* A bright, neon green border */
    box-shadow: 0 12px 24px rgba(0,0,0,0.2), 0 0 15px #00ff73;
}

.auction-card.has-bid:hover {
    box-shadow: 0 12px 24px rgba(0,0,0,0.2), 0 0 20px #00ff73;
}
/* NEW STYLES FOR HOT BIDS SECTION */
.hot-bids-section {
    background-color: var(--card-bg);
    padding: 25px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    margin-bottom: 30px;
    border: 1px solid var(--medium-gray);
}
.hot-bids-grid {
    display: flex;
    gap: 15px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 20px;
    scrollbar-width: none;
}
.hot-bids-grid::-webkit-scrollbar {
    display: none;
}
.hot-bid-item {
    position: relative;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    width: 120px;
    height: 145px;
    text-decoration: none;
    color: inherit;
    border-radius: var(--border-radius);
    background-color: var(--card-bg);
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid var(--medium-gray);
    overflow: hidden;
}
.hot-bid-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,224,255,0.6);
}
.hot-bid-image-container {
    width: 100%;
    padding-top: 100%;
    position: relative;
    overflow: hidden;
    background-color: #1a1a1a;
}
.hot-bid-item img {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    max-width: 150%;
    max-height: 150%;
    object-fit: cover;
    transform: translate(-50%, -50%);
    transition: transform 0.3s ease;
}
.hot-bid-info {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    font-size: 12px;
    font-weight: 600;
    padding: 5px 0;
    text-align: center;
}

/* --- INFINITE CATEGORIES SCROLLER STYLES --- */
.categories-section {
    padding: 15px 0;
    margin-bottom: 30px;
    /* Optional: add a background if it's not inside another container */
    /* background-color: var(--card-bg); */
    /* border-bottom: 1px solid var(--medium-gray); */
}

.categories-wrapper {
    position: relative; /* Needed for positioning the nav buttons */
    display: flex;
    align-items: center;
    margin: 0 auto;
    max-width: 1400px;
}

.categories-scroller {
    display: flex;
    gap: 15px;
    overflow-x: auto;
    padding: 10px 0;
    scroll-behavior: smooth; /* Makes button clicks smooth */

    /* Hide the scrollbar for a clean look */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none;  /* IE and Edge */
}

.categories-scroller::-webkit-scrollbar {
    display: none; /* Chrome, Safari, and Opera */
}

.category-item {
    flex-shrink: 0;
    padding: 10px 25px;
    background-color: var(--medium-gray);
    color: var(--text-color);
    border: 1px solid #444;
    border-radius: 20px;
    text-decoration: none;
    font-weight: 500;
    font-size: 15px;
    white-space: nowrap;
    transition: all 0.3s ease;
}

.category-item:hover {
    background-color: var(--primary-color);
    color: var(--dark-color);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,224,255,0.6);
}

/* Navigation Buttons */


#categoryPrevBtn {
    left: -20px; /* Position outside the main container flow */
}

#categoryNextBtn {
    right: -20px; /* Position outside the main container flow */
}

/* --- CATEGORY AUCTION CAROUSEL STYLES --- */
.featured-section h2 a {
    color: inherit; /* Make the linked title look the same */
    text-decoration: none;
    transition: color 0.3s ease;
}

.featured-section h2 a:hover {
    color: var(--secondary-text-color);
}

.category-auctions-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    /* Add some horizontal margin to make space for buttons */
    margin: 0 40px; 
}

.category-auctions-scroller {
    display: flex;
    gap: 25px; /* Matches your auction-grid gap */
    overflow-x: auto;
    padding: 20px 10px; /* Add some padding for shadows */
    margin: -20px -10px; /* Counteract padding to maintain alignment */
    scroll-behavior: smooth;
    
    /* Hide scrollbar */
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.category-auctions-scroller::-webkit-scrollbar {
    display: none;
}

/* --- MODIFICATION TO EXISTING .auction-card --- */
/* Add these two properties to your existing .auction-card CSS rule */
.auction-card {
    /* ... your existing styles like background, border-radius, etc. ... */
    width: 240px;      /* ADD THIS: A fixed width is needed for scrollers */
    flex-shrink: 0;   /* ADD THIS: Prevents cards from shrinking */
}


/* Add this to your existing CSS file */
.hot-bid-item {
    flex-shrink: 0; /* Prevents items from shrinking in the carousel */
}

/* --- Carousel Button Positioning --- */
.categories-wrapper .btn,
.category-auctions-wrapper .btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
}

/* For the main categories bar */
.categories-wrapper .btn:first-of-type {
    left: -25px;
}
.categories-wrapper .btn:last-of-type {
    right: -25px;
}

/* For the auction and hot item carousels */
.category-auctions-wrapper .btn:first-of-type {
    left: -25px;
}
.category-auctions-wrapper .btn:last-of-type {
    right: -25px;
}
/* --- UPDATED CATEGORY ITEM STYLES --- */

/* Modify the existing .category-item rule */
.category-item {
    flex-shrink: 0;
    padding: 12px 25px; /* Adjusted padding for more height */
    background-color: var(--medium-gray);
    color: var(--text-color);
    border: 1px solid #444;
    border-radius: 20px;
    text-decoration: none;
    white-space: nowrap;
    transition: all 0.3s ease;
    
    /* New properties for vertical layout */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    line-height: 1.2;
    min-width: 150px; /* Give it a minimum width */
}

.category-item:hover {
    background-color: var(--primary-color);
    color: var(--dark-color);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,224,255,0.6);
}

/* Style for the category name (top line) */
.category-item-name {
    font-size: 16px;
    font-weight: 600;
}

/* Style for the auction count (bottom line) */
.category-item-count {
    font-size: 12px;
    font-weight: 400;
    margin-top: 4px;
    color: var(--secondary-text-color);
    transition: color 0.3s ease;
}

/* Make the count text dark on hover to match */
.category-item:hover .category-item-count {
    color: var(--dark-color);
}