/* ==========================================
   MyCoinsForSale - Main Stylesheet
   Enhanced with Status Badges, Cart, Lazy Loading
   ========================================== */

/* CSS Variables */
:root {
    --primary-color: #c9a227;
    --primary-dark: #a8871e;
    --secondary-color: #2c3e50;
    --success-color: #27ae60;
    --warning-color: #f39c12;
    --danger-color: #e74c3c;
    --info-color: #3498db;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    --text-color: #333;
    --text-muted: #6c757d;
    --border-color: #dee2e6;
    --shadow: 0 2px 10px rgba(0,0,0,0.1);
    --shadow-lg: 0 5px 25px rgba(0,0,0,0.15);
    --radius: 8px;
    --radius-lg: 12px;
    --transition: all 0.3s ease;
    
    /* Status Colors */
    --status-available-bg: #d4edda;
    --status-available-color: #155724;
    --status-available-border: #28a745;
    --status-sold-bg: #f8d7da;
    --status-sold-color: #721c24;
    --status-sold-border: #dc3545;
    --status-onhold-bg: #fff3cd;
    --status-onhold-color: #856404;
    --status-onhold-border: #ffc107;
}

/* Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e8ec 100%);
    min-height: 100vh;
}

/* Container */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.main-header {
    background: linear-gradient(135deg, var(--secondary-color), #1a252f);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-lg);
}

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

.logo a {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 1.5rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo i {
    font-size: 1.8rem;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 5px;
}

.nav-links a {
    color: #fff;
    text-decoration: none;
    padding: 10px 20px;
    border-radius: var(--radius);
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
}

.nav-links a:hover,
.nav-links a.active {
    background: var(--primary-color);
    color: var(--secondary-color);
}

/* Cart Badge */
.cart-link {
    position: relative;
}

.cart-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--danger-color);
    color: #fff;
    font-size: 0.7rem;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
}

.cart-badge.hidden {
    display: none;
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
}

/* Main Content */
.main-content {
    padding: 40px 0;
    min-height: calc(100vh - 200px);
}

/* Page Header */
.page-header {
    text-align: center;
    margin-bottom: 40px;
}

.page-header h1 {
    font-size: 2.5rem;
    color: var(--secondary-color);
    margin-bottom: 10px;
}

.page-header h1 i {
    color: var(--primary-color);
}

.page-header .subtitle {
    color: var(--text-muted);
    font-size: 1.1rem;
}

/* Breadcrumbs */
.breadcrumbs {
    margin-bottom: 20px;
}

.breadcrumbs ol {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    padding: 10px 15px;
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.breadcrumbs li {
    display: flex;
    align-items: center;
}

.breadcrumbs li:not(:last-child)::after {
    content: '›';
    margin: 0 10px;
    color: var(--text-muted);
}

.breadcrumbs a {
    color: var(--primary-color);
    text-decoration: none;
}

.breadcrumbs a:hover {
    text-decoration: underline;
}

.breadcrumbs li:last-child span {
    color: var(--text-muted);
}

/* Search & Filters */
.search-filter-section {
    background: #fff;
    padding: 25px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    margin-bottom: 30px;
}

.search-box {
    position: relative;
    margin-bottom: 20px;
}

.search-box i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.search-box input {
    width: 100%;
    padding: 15px 15px 15px 45px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius);
    font-size: 1rem;
    transition: var(--transition);
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(201, 162, 39, 0.2);
}

.search-box .loader {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: translateY(-50%) rotate(360deg); }
}

.filters {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: center;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-group label {
    font-weight: 500;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.filter-group select {
    padding: 8px 15px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius);
    font-size: 0.9rem;
    cursor: pointer;
    background: #fff;
}

.filter-group select:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* Batch Offer Bar */
.batch-offer-bar {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: #fff;
    padding: 15px 25px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    box-shadow: var(--shadow);
}

.batch-offer-bar .btn {
    background: #fff;
    color: var(--primary-dark);
}

.batch-offer-bar .btn:hover {
    background: var(--secondary-color);
    color: #fff;
}

/* Results Info */
.results-info {
    margin-bottom: 20px;
    color: var(--text-muted);
}

/* Coins Grid */
.coins-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px; /* Space between cards */
    padding: 20px 0;
}

@media (min-width: 768px) {
    .coins-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 992px) {
    .coins-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Results Info Bar with View Toggle */
.results-info-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 10px 15px;
    background: var(--light-color);
    border-radius: var(--radius);
}

.view-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.view-toggle-btn {
    padding: 6px 12px;
    border: 1px solid var(--border-color);
    background: white;
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition);
}

.view-toggle-btn:first-child {
    border-radius: var(--radius) 0 0 var(--radius);
}

.view-toggle-btn:last-child {
    border-radius: 0 var(--radius) var(--radius) 0;
    border-left: none;
}

.view-toggle-btn:hover {
    background: var(--light-color);
    color: var(--text-color);
}

.view-toggle-btn.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

/* Coins List View (Table Format) */
.coins-list-view {
    background: white;
    border-radius: var(--radius);
    padding: 0;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.coins-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
}

.coins-table thead {
    background: var(--secondary-color);
    color: white;
}

.coins-table th {
    padding: 12px 15px;
    text-align: left;
    font-weight: 600;
    white-space: nowrap;
}

.coins-table td {
    padding: 12px 15px;
    vertical-align: middle;
    border-bottom: 1px solid var(--border-color);
}

.coin-list-row:hover {
    background-color: var(--light-color);
}

.coin-list-thumb {
    width: 60px;
    height: 60px;
    object-fit: contain;
    border-radius: 4px;
    background: #f8f9fa;
}

.coin-list-image .no-image-mini {
    width: 60px;
    height: 60px;
    background: #f0f0f0;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ccc;
}

.coin-title-link {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
}

.coin-title-link:hover {
    color: var(--primary-color);
}

.coin-list-estimate strong {
    color: var(--primary-color);
}

.coin-list-actions {
    white-space: nowrap;
}

.coin-list-actions .btn {
    margin-right: 5px;
}

/* Responsive List View */
@media (max-width: 768px) {
    .results-info-bar {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    .coins-table {
        font-size: 0.85rem;
    }
    
    .coins-table th,
    .coins-table td {
        padding: 8px 10px;
    }
    
    .coin-list-thumb {
        width: 45px;
        height: 45px;
    }
    
    .coins-table th:nth-child(3),
    .coins-table td:nth-child(3),
    .coins-table th:nth-child(4),
    .coins-table td:nth-child(4) {
        display: none;
    }
}

.coin-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 600px; /* Increased to accommodate more padding */
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: box-shadow 0.3s ease;
    margin-bottom: 30px; /* Space between rows */
    background: #fff;
    position: relative;
}

.coin-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* Card Image Padding */
.coin-card-image {
    padding: 25px; /* Increased padding around image */
    background: #f8f9fa;
    text-align: center;
}

.coin-card-image img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
}

/* Card body structure for constant height */
.coin-card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 30px; /* Increased padding inside card */
}

.coin-card-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 0;
    margin-bottom: 25px; /* Space before buttons */
}

/* Coin Fields - Vertical Left-Aligned Layout */
.coin-fields {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.coin-field {
    display: flex;
    flex-direction: column;
    padding: 12px 0;
    border-bottom: 1px solid #f5f5f5;
    text-align: left;
}

.coin-field:last-child {
    border-bottom: none;
}

.coin-field-highlight {
    background: #f8f9fa;
    margin: 5px -10px;
    padding: 12px 10px;
    border-radius: 6px;
    border-bottom: none;
}

.field-label {
    font-weight: 600;
    color: #888;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 5px;
    text-align: left;
}

.field-label i {
    margin-right: 5px;
    color: var(--primary-color);
}

.field-value {
    font-size: 15px;
    color: #333;
    font-weight: 500;
    text-align: left;
}

.field-value.price-value {
    color: #28a745;
    font-weight: 700;
    font-size: 18px;
}

/* Status badge inline */
.status-badge-inline {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    border-radius: 15px;
    font-size: 13px;
    font-weight: 500;
}

.status-badge-inline.status-available {
    background: var(--status-available-bg);
    color: var(--status-available-color);
}

.status-badge-inline.status-sold {
    background: var(--status-sold-bg);
    color: var(--status-sold-color);
}

.status-badge-inline.status-on-hold,
.status-badge-inline.status-onhold {
    background: var(--status-onhold-bg);
    color: var(--status-onhold-color);
}

/* Same/Better badge in field */
.same-better-badge {
    display: inline-block;
    background: #28a745;
    color: white;
    padding: 3px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

/* Coin Card Actions - Stacked Vertically */
.coin-card-actions {
    display: flex;
    flex-direction: column; /* Stack vertically */
    gap: 15px; /* Increased space between buttons */
    margin-top: auto; /* Push to bottom */
    padding-top: 25px; /* Increased space above buttons */
    border-top: 2px solid #e0e0e0;
}

/* Remove the horizontal button group */
.btn-group-horizontal {
    display: none; /* Remove side-by-side layout */
}

/* Button Action Styling - Same Height for All */
.btn-action {
    width: 100%; /* Full width */
    height: 42px; /* Same height for all */
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 500;
    border-radius: 5px;
    transition: all 0.3s ease;
    text-decoration: none;
    border: none;
    cursor: pointer;
}

/* Primary button (View Details) */
.btn-primary.btn-action {
    background: #007bff;
    color: white;
}

.btn-primary.btn-action:hover {
    background: #0056b3;
    transform: translateY(-1px);
}

/* Secondary button (View Certificate) */
.btn-secondary.btn-action {
    background: #6c757d;
    color: white;
}

.btn-secondary.btn-action:hover {
    background: #545b62;
}

/* Success button (Quick Offer) */
.btn-success.btn-action {
    background: #28a745;
    color: white;
}

.btn-success.btn-action:hover {
    background: #218838;
}

/* Outline success button (Add to Cart) */
.btn-outline-success.btn-action {
    background: white;
    color: #28a745;
    border: 2px solid #28a745;
}

.btn-outline-success.btn-action:hover {
    background: #28a745;
    color: white;
}

/* Warning button (Edit) */
.btn-warning.btn-action {
    background: #ffc107;
    color: #212529;
}

.btn-warning.btn-action:hover {
    background: #e0a800;
}

/* Disabled button */
.btn-disabled.btn-action {
    background: #e9ecef !important;
    color: #6c757d !important;
    border-color: #e9ecef !important;
    cursor: not-allowed !important;
    opacity: 0.6;
    pointer-events: none;
}

.coin-select {
    position: absolute;
    top: 15px;
    left: 15px;
    z-index: 10;
}

.coin-checkbox {
    width: 22px;
    height: 22px;
    cursor: pointer;
    accent-color: var(--primary-color);
}

.coin-image-link {
    display: block;
    text-decoration: none;
}

.coin-image {
    height: 200px;
    background: linear-gradient(135deg, #f5f5f5, #e0e0e0);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.coin-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

/* Lazy Loading Styles */
.coin-image img.lazy-image {
    opacity: 0.5;
}

.coin-image img.lazy-image.loaded {
    opacity: 1;
}

.coin-image img:hover {
    transform: scale(1.05);
}

.no-image {
    text-align: center;
    color: var(--text-muted);
}

.no-image i {
    font-size: 3rem;
    margin-bottom: 10px;
    color: var(--border-color);
}

.coin-info {
    padding: 20px;
}

.coin-title {
    font-size: 1.1rem;
    color: var(--secondary-color);
    margin-bottom: 20px;
    line-height: 1.4;
    padding-bottom: 15px;
    border-bottom: 2px solid #e0e0e0;
}

.coin-title a {
    color: inherit;
    text-decoration: none;
}

.coin-title a:hover {
    color: var(--primary-color);
}

.coin-details {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 15px;
}

.coin-details .detail {
    font-size: 0.85rem;
    background: var(--light-color);
    padding: 4px 10px;
    border-radius: 20px;
}

/* 3-line description truncation for card layout */
.coin-description {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.6em;
    max-height: 4.8em; /* 3 lines * 1.6em */
    margin-bottom: 12px;
}

.coin-description .detail {
    display: inline;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.coin-description .detail::after {
    content: " • ";
    color: var(--border-color);
}

.coin-description .detail:last-child::after {
    content: "";
}

.coin-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

/* Status Badges - Enhanced */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    border: 2px solid transparent;
}

.status-badge-lg {
    padding: 8px 16px;
    font-size: 1rem;
}

/* Available - Green */
.status-available {
    background: var(--status-available-bg);
    color: var(--status-available-color);
    border-color: var(--status-available-border);
}

/* Sold - Red */
.status-sold {
    background: var(--status-sold-bg);
    color: var(--status-sold-color);
    border-color: var(--status-sold-border);
}

/* On-Hold - Yellow/Orange */
.status-onhold {
    background: var(--status-onhold-bg);
    color: var(--status-onhold-color);
    border-color: var(--status-onhold-border);
}

.possible-value {
    font-weight: 600;
    color: var(--primary-dark);
}

.coin-actions {
    display: flex;
    gap: 10px;
    padding: 0 20px 20px;
    flex-wrap: wrap;
}

.coin-actions .btn {
    flex: 1;
    text-align: center;
    min-width: 100px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border: none;
    border-radius: var(--radius);
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.85rem;
}

.btn-lg {
    padding: 15px 30px;
    font-size: 1.1rem;
}

.btn-block {
    width: 100%;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: #fff;
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-dark), #8a7119);
    transform: translateY(-2px);
}

.btn-secondary {
    background: var(--secondary-color);
    color: #fff;
}

.btn-secondary:hover {
    background: #1a252f;
}

.btn-success {
    background: var(--success-color);
    color: #fff;
}

.btn-danger {
    background: var(--danger-color);
    color: #fff;
}

.btn-warning {
    background: var(--warning-color);
    color: #fff;
}

.btn-warning:hover {
    background: #e0a800;
}

.btn.disabled,
.btn:disabled,
.btn-disabled,
button.disabled,
button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
    background-color: #ccc !important;
    border-color: #ccc !important;
    color: #666 !important;
    background-image: none !important;
}

.btn-gold {
    background: linear-gradient(135deg, #d4af37, #b8972d);
    color: #fff;
}

.btn-gold:hover {
    background: linear-gradient(135deg, #b8972d, #9a7e24);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--border-color);
    color: var(--text-color);
}

.btn-outline:hover {
    border-color: var(--secondary-color);
    background: var(--secondary-color);
    color: #fff;
}

/* Cart Page Styles */
.cart-page {
    max-width: 900px;
    margin: 0 auto;
}

.cart-items {
    background: #fff;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.cart-header {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-count {
    font-weight: 600;
    color: var(--secondary-color);
}

.cart-list {
    max-height: 500px;
    overflow-y: auto;
}

.cart-item {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid var(--border-color);
    gap: 15px;
}

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

.cart-item-image {
    width: 80px;
    height: 80px;
    border-radius: var(--radius);
    overflow: hidden;
    flex-shrink: 0;
}

.cart-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cart-item-info {
    flex: 1;
}

.cart-item-info h4 {
    margin-bottom: 5px;
}

.cart-item-info h4 a {
    color: var(--secondary-color);
    text-decoration: none;
}

.cart-item-info h4 a:hover {
    color: var(--primary-color);
}

.cart-item-details {
    display: flex;
    gap: 15px;
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 5px;
}

.cart-item-price {
    color: var(--primary-dark);
    font-weight: 500;
}

.cart-summary {
    padding: 20px;
    background: var(--light-color);
    border-top: 1px solid var(--border-color);
}

.summary-row {
    display: flex;
    justify-content: space-between;
    font-size: 1.1rem;
}

.summary-row strong {
    color: var(--primary-dark);
    font-size: 1.3rem;
}

.summary-note {
    margin-top: 10px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.cart-actions {
    padding: 20px;
    display: flex;
    gap: 15px;
    justify-content: space-between;
}

.empty-cart {
    text-align: center;
    padding: 60px 20px;
    background: #fff;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}

.empty-cart i {
    font-size: 4rem;
    color: var(--border-color);
    margin-bottom: 20px;
}

.empty-cart h3 {
    color: var(--secondary-color);
    margin-bottom: 10px;
}

.empty-cart p {
    color: var(--text-muted);
    margin-bottom: 25px;
}

/* Coin Detail Page */
.coin-detail-page {
    max-width: 1200px;
    margin: 0 auto;
}

.coin-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 40px;
    margin-bottom: 40px;
    align-items: start; /* Top-align grid items */
}

.coin-detail-image {
    background: #fff;
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    align-items: flex-start; /* Top align instead of center */
    justify-content: flex-start;
    min-height: auto; /* Remove fixed min-height */
    max-width: 100%; /* Constrain to grid column */
    overflow: hidden; /* Prevent overflow */
}

.main-coin-image {
    max-width: 100%;
    max-height: 400px;
    object-fit: contain;
}

.no-image-large {
    text-align: center;
    color: var(--text-muted);
    padding: 60px;
}

.no-image-large i {
    font-size: 5rem;
    margin-bottom: 20px;
    color: var(--border-color);
}

.coin-detail-info {
    background: #fff;
    border-radius: var(--radius-lg);
    padding: 30px;
    box-shadow: var(--shadow);
}

.coin-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 25px;
    gap: 15px;
}

.coin-detail-header h1 {
    font-size: 1.5rem;
    color: var(--secondary-color);
    flex: 1;
}

/* Description under title */
.coin-description-top {
    margin: 20px 0;
    padding: 20px;
    background: #f8f9fa;
    border-left: 4px solid var(--primary-color);
    border-radius: 4px;
}

.coin-description-top p {
    margin: 0;
    line-height: 1.6;
    color: var(--text-color);
}

.coin-specs {
    margin-bottom: 25px;
}

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

.specs-table tr {
    border-bottom: 1px solid var(--border-color);
}

.specs-table th,
.specs-table td {
    padding: 12px 0;
    text-align: left;
}

.specs-table th {
    color: var(--text-muted);
    font-weight: 500;
    width: 150px;
}

.specs-table th i {
    margin-right: 8px;
    color: var(--primary-color);
}

.specs-table td {
    color: var(--secondary-color);
}

.price-value {
    font-size: 1.3rem;
    font-weight: bold;
    color: var(--primary-dark);
}

.extra-data-title {
    margin: 20px 0 15px;
    color: var(--secondary-color);
}

.coin-actions-detail {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.unavailable-notice {
    padding: 15px;
    background: var(--light-color);
    border-radius: var(--radius);
    color: var(--text-muted);
}

.contact-seller {
    background: var(--light-color);
    padding: 20px;
    border-radius: var(--radius);
}

.contact-seller h4 {
    margin-bottom: 15px;
    color: var(--secondary-color);
}

.contact-seller p {
    margin-bottom: 8px;
    color: var(--text-muted);
}

.contact-seller i {
    width: 20px;
    color: var(--primary-color);
}

.contact-seller a {
    color: var(--secondary-color);
}

/* Related Coins */
.related-coins-section {
    margin-top: 40px;
}

.related-coins-section h3 {
    color: var(--secondary-color);
    margin-bottom: 25px;
}

.related-coins-section h3 i {
    color: var(--primary-color);
    margin-right: 10px;
}

.related-coins-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.related-coin-card {
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: var(--transition);
}

.related-coin-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.related-coin-card a {
    text-decoration: none;
}

.related-coin-image {
    height: 150px;
    background: var(--light-color);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.related-coin-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.no-image-sm {
    color: var(--border-color);
    font-size: 2rem;
}

.related-coin-info {
    padding: 15px;
}

.related-coin-info h4 {
    font-size: 0.9rem;
    color: var(--secondary-color);
    margin-bottom: 8px;
}

.related-coin-info .badge {
    font-size: 0.75rem;
    background: var(--light-color);
    padding: 3px 8px;
    border-radius: 10px;
}

/* Not Found Page */
.not-found-page {
    text-align: center;
    padding: 80px 20px;
    background: #fff;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}

.not-found-page i {
    font-size: 5rem;
    color: var(--border-color);
    margin-bottom: 20px;
}

.not-found-page h1 {
    color: var(--secondary-color);
    margin-bottom: 10px;
}

.not-found-page p {
    color: var(--text-muted);
    margin-bottom: 25px;
}

/* Pagination */
.pagination {
    margin-top: 30px;
    display: flex;
    justify-content: center;
}

.pagination-wrapper {
    display: flex;
    align-items: center;
    gap: 15px;
    background: #fff;
    padding: 15px 25px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.page-btn {
    background: var(--light-color);
    border: none;
    padding: 10px 15px;
    border-radius: var(--radius);
    cursor: pointer;
    transition: var(--transition);
}

.page-btn:hover:not(:disabled) {
    background: var(--primary-color);
    color: #fff;
}

.page-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Page number buttons */
.page-btn.page-number {
    min-width: 40px;
    text-align: center;
    font-weight: 500;
}

.page-btn.page-number.active {
    background: var(--primary-color);
    color: #fff;
    pointer-events: none;
}

/* Anchor-based pagination buttons */
a.page-btn {
    text-decoration: none;
    color: inherit;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

a.page-btn:hover {
    background: var(--primary-color);
    color: #fff;
}

span.page-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: var(--light-color);
}

.page-ellipsis {
    color: var(--text-muted);
    padding: 0 8px;
    font-weight: bold;
}

.page-info {
    color: var(--text-muted);
}

/* No Results */
.no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    background: #fff;
    border-radius: var(--radius-lg);
}

.no-results i {
    font-size: 4rem;
    color: var(--border-color);
    margin-bottom: 20px;
}

.no-results h3 {
    color: var(--secondary-color);
    margin-bottom: 10px;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255,255,255,0.9);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-bottom: 15px;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    z-index: 3000;
    overflow-y: auto;
    padding: 20px;
}

.modal-content {
    background: #fff;
    max-width: 600px;
    margin: 50px auto;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    position: relative;
    animation: modalSlide 0.3s ease;
}

@keyframes modalSlide {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-content h2 {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: #fff;
    padding: 20px 25px;
    margin: 0;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.modal-content h2 i {
    margin-right: 10px;
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 2rem;
    color: #fff;
    cursor: pointer;
    opacity: 0.8;
    transition: var(--transition);
}

.modal-close:hover {
    opacity: 1;
}

.modal-content form {
    padding: 25px;
}

.selected-coins {
    padding: 15px 25px;
    background: var(--light-color);
    max-height: 150px;
    overflow-y: auto;
}

.selected-coin-item {
    padding: 8px 0;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.9rem;
}

.selected-coin-item:last-child {
    border-bottom: none;
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--secondary-color);
}

.form-group label i {
    color: var(--primary-color);
    margin-right: 5px;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius);
    font-size: 1rem;
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(201, 162, 39, 0.2);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-response {
    margin-top: 20px;
    padding: 15px;
    border-radius: var(--radius);
    text-align: center;
}

.form-response.success {
    background: #d4edda;
    color: #155724;
}

.form-response.error {
    background: #f8d7da;
    color: #721c24;
}

/* Contact Page */
.contact-container {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 30px;
}

.contact-info-card,
.contact-form-card {
    background: #fff;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    padding: 30px;
}

.contact-info-card h3,
.contact-form-card h3 {
    color: var(--secondary-color);
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--primary-color);
}

.contact-info-card h3 i,
.contact-form-card h3 i {
    color: var(--primary-color);
}

.contact-item {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.contact-item i {
    font-size: 1.5rem;
    color: var(--primary-color);
    width: 30px;
}

.contact-item strong {
    display: block;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.contact-item a {
    color: var(--secondary-color);
}

/* Download Page */
.download-container {
    display: flex;
    justify-content: center;
}

.download-card {
    background: #fff;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    padding: 50px;
    text-align: center;
    max-width: 500px;
}

.download-icon {
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, var(--success-color), #1e8449);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 25px;
}

.download-icon i {
    font-size: 3rem;
    color: #fff;
}

.download-card h3 {
    color: var(--secondary-color);
    margin-bottom: 15px;
}

.download-card p {
    color: var(--text-muted);
    margin-bottom: 25px;
}

.download-info {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.download-info span {
    background: var(--light-color);
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.download-info i {
    color: var(--primary-color);
    margin-right: 5px;
}

/* Footer */
.main-footer {
    background: linear-gradient(135deg, var(--secondary-color), #1a252f);
    color: #fff;
    padding: 40px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-bottom: 30px;
}

.footer-info h4,
.footer-contact h4 {
    color: var(--primary-color);
    margin-bottom: 15px;
}

.footer-info h4 i {
    margin-right: 8px;
}

.footer-contact p {
    margin-bottom: 8px;
}

.footer-contact a {
    color: #fff;
    text-decoration: none;
}

.footer-contact a:hover {
    color: var(--primary-color);
}

.footer-contact i {
    width: 20px;
    margin-right: 8px;
    color: var(--primary-color);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.6);
}

/* Responsive */
@media (max-width: 992px) {
    .contact-container {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .coin-detail-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: block;
    }
    
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--secondary-color);
        flex-direction: column;
        padding: 20px;
        gap: 10px;
    }
    
    .nav-links.active {
        display: flex;
    }
    
    .page-header h1 {
        font-size: 1.8rem;
    }
    
    .coins-grid {
        grid-template-columns: 1fr;
    }
    
    .filters {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-group {
        flex-direction: column;
        align-items: stretch;
    }
    
    .batch-offer-bar {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .cart-item {
        flex-direction: column;
        text-align: center;
    }
    
    .cart-actions {
        flex-direction: column;
    }
    
    .coin-actions-detail {
        flex-direction: column;
    }
    
    /* Mobile card adjustments */
    .coin-card-body {
        padding: 20px; /* Less padding on mobile */
    }
    
    .coin-card-image {
        padding: 15px;
    }
    
    .coin-card-actions {
        gap: 12px; /* Less gap on mobile */
        padding-top: 20px;
    }
    
    .btn-action {
        height: 46px; /* Taller for easier tapping */
        font-size: 15px;
    }
    
    .coin-card {
        min-height: 520px;
    }
}



/* ==========================================
   Dual Image Support (Front/Back)
   Added for IMAGEFRONT/IMAGEBACK columns
   ========================================== */

/* Coin Flip Container for Grid View */
.coin-flip-container {
    width: 100%;
    height: 100%;
    perspective: 1000px;
}

.coin-flip-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.6s;
    transform-style: preserve-3d;
}

.coin-image.has-back-image:hover .coin-flip-inner {
    transform: rotateY(180deg);
}

.coin-front, .coin-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.coin-front img, .coin-back img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.coin-back {
    transform: rotateY(180deg);
}

/* Dual Image Badge */
.dual-image-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: var(--primary-color);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    z-index: 10;
    box-shadow: var(--shadow);
}

.dual-image-badge i {
    animation: pulse-rotate 2s infinite;
}

@keyframes pulse-rotate {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Dual Image Indicator for Related Coins */
.dual-image-indicator {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0,0,0,0.6);
    color: white;
    padding: 3px 6px;
    border-radius: 3px;
    font-size: 0.7rem;
}

/* Coin Detail Page - Gallery */
.coin-gallery {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.image-toggle-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.image-toggle-btn {
    padding: 10px 20px;
    background: var(--light-color);
    border: 2px solid var(--border-color);
    border-radius: var(--radius);
    cursor: pointer;
    transition: var(--transition);
    font-weight: 500;
}

.image-toggle-btn:hover {
    background: var(--secondary-color);
    color: white;
}

.image-toggle-btn.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.image-toggle-btn i {
    margin-right: 5px;
}

.coin-image-panel {
    display: none;
    text-align: center;
    position: relative;
}

.coin-image-panel.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.coin-image-panel .main-coin-image {
    max-width: 100%;
    max-height: 450px;
    object-fit: contain;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
}

.image-label {
    display: block;
    margin-top: 10px;
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* Coin Thumbnails Strip */
.coin-thumbnails {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
}

.coin-thumbnails .thumbnail {
    width: 80px;
    cursor: pointer;
    border: 2px solid var(--border-color);
    border-radius: var(--radius);
    padding: 5px;
    transition: var(--transition);
    text-align: center;
}

.coin-thumbnails .thumbnail:hover {
    border-color: var(--secondary-color);
}

.coin-thumbnails .thumbnail.active {
    border-color: var(--primary-color);
    box-shadow: 0 0 10px rgba(201, 162, 39, 0.3);
}

.coin-thumbnails .thumbnail img {
    width: 100%;
    height: 60px;
    object-fit: contain;
}

.coin-thumbnails .thumbnail span {
    display: block;
    font-size: 0.7rem;
    margin-top: 5px;
    color: var(--text-muted);
}

/* Cart Item Dual Image */
.cart-item-image {
    position: relative;
    width: 100px;
    height: 100px;
    overflow: hidden;
}

.cart-item-image.has-back {
    cursor: pointer;
}

.cart-item-image .cart-img-front,
.cart-item-image .cart-img-back {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: opacity 0.3s ease;
}

.cart-item-image .cart-img-back {
    opacity: 0;
}

.cart-item-image.has-back:hover .cart-img-front {
    opacity: 0;
}

.cart-item-image.has-back:hover .cart-img-back {
    opacity: 1;
}

.cart-flip-hint {
    position: absolute;
    bottom: 5px;
    right: 5px;
    background: rgba(0,0,0,0.6);
    color: white;
    padding: 2px 5px;
    border-radius: 3px;
    font-size: 0.65rem;
}

/* Related Coin Image Position */
.related-coin-image {
    position: relative;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .coin-thumbnails .thumbnail {
        width: 60px;
    }
    
    .coin-thumbnails .thumbnail img {
        height: 45px;
    }
    
    .image-toggle-buttons {
        flex-direction: column;
        align-items: stretch;
    }
    
    .image-toggle-btn {
        width: 100%;
    }
    
    .cart-item-image {
        width: 80px;
        height: 80px;
    }
}



/* ==========================================
   Estimate Badge and Total Styles
   ========================================== */

.estimate-badge {
    display: inline-block;
    background: linear-gradient(135deg, #f6d365 0%, #d4a200 100%);
    color: #333;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-left: 10px;
}

.selected-coin-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px;
    margin-bottom: 8px;
    background: #f8f9fa;
    border-radius: 6px;
    border-left: 3px solid var(--primary-gold);
}

.selected-coin-item i {
    color: var(--primary-gold);
    margin-right: 10px;
}

.total-estimate {
    background: linear-gradient(135deg, #2c3e50 0%, #1a252f 100%);
    color: #fff;
    padding: 12px 15px;
    margin-top: 15px;
    border-radius: 6px;
    text-align: center;
}

.total-estimate strong {
    font-size: 1.1rem;
}

/* Sort filter icon styling */
.filter-group label i.fa-sort {
    color: var(--primary-gold);
}



/* ==========================================
   Coin Detail Page - Thumbnail Grid & Popup
   ========================================== */

.coin-gallery-thumbnails {
    text-align: center;
    position: relative;
}

.click-hint {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.click-hint i {
    color: var(--primary-gold);
}

.coin-thumb-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    justify-content: center;
}

.coin-thumb-item {
    cursor: zoom-in;
    border: 3px solid #e0e0e0;
    border-radius: 10px;
    padding: 12px;
    background: #fff;
    transition: all 0.3s ease;
    position: relative;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

.coin-thumb-item:hover {
    border-color: var(--primary-color, #c9a227);
    box-shadow: 0 8px 30px rgba(0,0,0,0.18);
}

/* Thumbnail wrapper for magnifier effect */
.coin-thumb-wrapper {
    position: relative;
    width: 300px;
    height: 300px;
    overflow: hidden;
    border-radius: 6px;
    background: #fafafa;
}

.coin-thumbnail-img {
    width: 300px;
    height: 300px;
    object-fit: contain;
    display: block;
    transition: opacity 0.15s ease;
}

/* Magnifier lens overlay - shows zoomed portion in-place */
.magnifier-lens {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-repeat: no-repeat;
    background-size: 750px 750px; /* 2.5x zoom factor */
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s ease;
    border-radius: 6px;
}

/* When actively zooming, hide thumbnail and show magnified view */
.coin-thumb-wrapper.zooming .coin-thumbnail-img {
    opacity: 0;
}

.coin-thumb-wrapper.zooming .magnifier-lens {
    opacity: 1;
}

.thumb-label {
    display: block;
    margin-top: 10px;
    font-size: 0.85rem;
    color: #555;
    font-weight: 500;
    text-align: center;
}

/* Zoom hint icon - bottom right corner */
.zoom-hint {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(201, 162, 39, 0.9);
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    opacity: 0.7;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.coin-thumb-wrapper:hover .zoom-hint {
    opacity: 0;
}

/* Click hint text */
.click-to-enlarge {
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.75rem;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    white-space: nowrap;
}

.coin-thumb-item:hover .click-to-enlarge {
    opacity: 1;
}

/* Image Popup Modal */
#imagePopup {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    overflow: auto;
}

#imagePopup .popup-content {
    position: relative;
    margin: 5% auto;
    max-width: 90%;
    max-height: 85vh;
    text-align: center;
}

#imagePopup .popup-img {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 8px;
}

#imagePopup .popup-close {
    position: absolute;
    top: -40px;
    right: 0;
    color: #fff;
    font-size: 35px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s;
}

#imagePopup .popup-close:hover {
    color: var(--primary-gold);
}

#imagePopup .popup-title {
    color: #fff;
    margin-top: 15px;
    font-size: 1.1rem;
}

@media (max-width: 768px) {
    .coin-thumb-wrapper {
        width: 200px;
        height: 200px;
    }
    
    .coin-thumbnail-img {
        width: 200px;
        height: 200px;
    }
    
    /* Disable magnifier zoom on mobile - use click popup instead */
    .magnifier-lens {
        display: none !important;
    }
    
    .zoom-hint {
        display: none;
    }
    
    .coin-thumb-item {
        cursor: pointer;
    }
}

@media (max-width: 480px) {
    .coin-thumb-wrapper,
    .coin-thumbnail-img {
        width: 150px;
        height: 150px;
    }
    
    .coin-thumb-grid {
        gap: 15px;
    }
}



/* ==========================================
   Listing Page - Hover Toggle Effect (4-Image System)
   ========================================== */

/* Container for hover toggle */
.coin-image.has-hover-image {
    position: relative;
}

.coin-image.has-hover-image .coin-front-img {
    opacity: 1;
    transition: opacity 0.3s ease;
}

.coin-image.has-hover-image .coin-back-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* Hover effect - swap images */
.coin-image.has-hover-image:hover .coin-front-img {
    opacity: 0;
}

.coin-image.has-hover-image:hover .coin-back-img {
    opacity: 1;
}

/* Hover flip badge */
.hover-flip-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: var(--primary-gold, #c9a227);
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    z-index: 5;
    transition: transform 0.3s ease;
}

.coin-image.has-hover-image:hover .hover-flip-badge {
    transform: rotate(180deg);
}

/* ==========================================
   Coin Detail Page - Simple Thumbnails (No Magnifier)
   ========================================== */

/* 4-image grid layout */
.coin-thumb-grid-4 {
    display: grid;
    grid-template-columns: repeat(2, minmax(140px, 1fr)); /* Responsive columns */
    gap: 15px;
    max-width: 100%; /* Fit within container */
    margin: 0 auto;
    justify-content: center;
}

/* Simple thumbnail wrapper - responsive within grid */
.coin-thumb-wrapper-simple {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    min-height: 150px;
    background: #fafafa;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Responsive image sizing for coin detail page */
.coin-thumbnail-img-simple {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    max-height: 250px;
    object-fit: contain !important;
    transition: transform 0.3s ease;
}

/* Constrain all images within coin detail page */
.coin-detail-image img,
.coin-thumb-wrapper-simple img,
.coin-thumb-grid-4 img {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    max-height: 250px;
    object-fit: contain !important;
}

.coin-thumb-item:hover .coin-thumbnail-img-simple {
    transform: scale(1.05);
}

/* Thumbnail item for 4-image grid */
.coin-thumb-grid-4 .coin-thumb-item {
    cursor: pointer;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    padding: 10px;
    background: #fff;
    transition: all 0.3s ease;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.coin-thumb-grid-4 .coin-thumb-item:hover {
    border-color: var(--primary-gold, #c9a227);
    box-shadow: 0 4px 15px rgba(0,0,0,0.12);
}

/* ==========================================
   Full-Screen Gallery Modal
   ========================================== */

.gallery-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    align-items: center;
    justify-content: center;
}

.gallery-overlay {
    position: absolute;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
}

.gallery-content {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

/* Close button */
.gallery-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    font-size: 24px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
}

.gallery-close:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: rotate(90deg);
}

/* Navigation arrows */
.gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    font-size: 28px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
}

.gallery-nav:hover {
    background: rgba(255, 255, 255, 0.25);
}

.gallery-prev {
    left: 20px;
}

.gallery-next {
    right: 20px;
}

/* Main image display */
.gallery-main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    max-height: calc(100vh - 200px);
    width: 100%;
}

.gallery-main-img {
    max-width: 90%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.5);
}

/* Image info */
.gallery-info {
    text-align: center;
    padding: 15px 0;
    color: white;
}

.gallery-title {
    font-size: 1.2rem;
    font-weight: 500;
    margin-right: 15px;
}

.gallery-counter {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.7);
}

/* Thumbnail strip */
.gallery-thumbstrip {
    display: flex;
    gap: 10px;
    justify-content: center;
    padding: 15px 0;
    flex-wrap: wrap;
}

.gallery-thumb {
    width: 70px;
    height: 70px;
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    border: 3px solid transparent;
    transition: all 0.3s ease;
    opacity: 0.6;
}

.gallery-thumb:hover {
    opacity: 0.9;
}

.gallery-thumb.active {
    border-color: var(--primary-gold, #c9a227);
    opacity: 1;
}

.gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Mobile responsive - keep 300px width where possible */
@media (max-width: 768px) {
    .coin-thumb-grid-4 {
        grid-template-columns: repeat(2, minmax(140px, 300px));
        gap: 15px;
        max-width: 660px;
    }
    
    .coin-thumb-wrapper-simple {
        width: 100% !important;
        max-width: 300px !important;
        height: auto !important;
    }
    
    .coin-thumbnail-img-simple {
        width: 100% !important;
        max-width: 300px !important;
        height: auto !important;
    }
    
    .gallery-nav {
        width: 45px;
        height: 45px;
        font-size: 20px;
    }
    
    .gallery-prev {
        left: 10px;
    }
    
    .gallery-next {
        right: 10px;
    }
    
    .gallery-close {
        top: 10px;
        right: 10px;
        width: 40px;
        height: 40px;
        font-size: 18px;
    }
    
    .gallery-thumb {
        width: 55px;
        height: 55px;
    }
}

@media (max-width: 480px) {
    .coin-thumb-grid-4 {
        grid-template-columns: repeat(2, minmax(120px, 300px));
        gap: 10px;
        max-width: 100%;
    }
    
    .coin-thumb-wrapper-simple {
        width: 100% !important;
        max-width: 300px !important;
        height: auto !important;
    }
    
    .coin-thumbnail-img-simple {
        width: 100% !important;
        max-width: 300px !important;
        height: auto !important;
    }
    
    .coin-thumb-grid-4 .coin-thumb-item {
        padding: 8px;
    }
    
    .thumb-label {
        font-size: 0.75rem;
    }
    
    .gallery-thumb {
        width: 45px;
        height: 45px;
    }
}



/* View Count and Trending Badges */
.coin-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin-top: 10px;
}

.view-count-badge {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 13px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.trending-badge {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: #fff;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 13px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}



/* ==========================================
   Coin Navigation - Previous/Next Buttons
   ========================================== */
.coin-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-bottom: 25px;
    padding: 18px 25px;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 12px;
    border: 1px solid rgba(0,0,0,0.08);
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.coin-nav-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: #ffffff;
    text-decoration: none;
    border-radius: 8px;
    border: none;
    font-size: 0.95rem;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    cursor: pointer;
    box-shadow: 0 3px 10px rgba(0, 123, 255, 0.25);
    min-width: 150px;
    justify-content: center;
}

.coin-nav-btn:hover:not(.disabled) {
    background: linear-gradient(135deg, #0056b3 0%, #003d80 100%);
    color: #fff;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 123, 255, 0.35);
}

.coin-nav-btn:active:not(.disabled) {
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(0, 123, 255, 0.25);
}

.coin-nav-btn.disabled {
    opacity: 0.45;
    cursor: not-allowed;
    background: linear-gradient(135deg, #adb5bd 0%, #868e96 100%);
    box-shadow: none;
    pointer-events: none;
}

.coin-nav-btn i {
    font-size: 1.1rem;
    transition: transform 0.3s ease;
}

.coin-nav-prev:hover:not(.disabled) i {
    transform: translateX(-3px);
}

.coin-nav-next:hover:not(.disabled) i {
    transform: translateX(3px);
}

.coin-nav-all {
    background: linear-gradient(135deg, var(--primary-color) 0%, #b8942a 100%);
    box-shadow: 0 3px 10px rgba(201, 162, 39, 0.3);
    min-width: 130px;
}

.coin-nav-all:hover {
    background: linear-gradient(135deg, #b8942a 0%, #9a7c23 100%) !important;
    box-shadow: 0 6px 20px rgba(201, 162, 39, 0.4) !important;
}

.coin-nav-all i {
    font-size: 1rem;
}

.nav-label {
    display: inline;
    letter-spacing: 0.3px;
}

/* Keyboard navigation hint */
.coin-navigation::after {
    content: "Use ← → arrow keys to navigate";
    position: absolute;
    bottom: -22px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.75rem;
    color: #6c757d;
    opacity: 0.7;
    white-space: nowrap;
}

.coin-navigation {
    position: relative;
    margin-bottom: 45px;
}

@media (max-width: 768px) {
    .coin-navigation {
        flex-wrap: wrap;
        justify-content: center;
        padding: 15px;
        gap: 12px;
        margin-bottom: 40px;
    }
    
    .coin-nav-btn {
        padding: 10px 18px;
        font-size: 0.9rem;
        min-width: 130px;
    }
    
    .coin-navigation::after {
        display: none;
    }
}

@media (max-width: 576px) {
    .coin-navigation {
        gap: 10px;
    }
    
    .coin-nav-btn {
        padding: 10px 15px;
        font-size: 0.85rem;
        min-width: auto;
        flex: 1;
    }
    
    .nav-label {
        display: none;
    }
    
    .coin-nav-all {
        order: 3;
        flex: 0 0 100%;
    }
    
    .coin-nav-all .nav-label {
        display: inline;
    }
}



/* ==========================================
   Same/Better Badge Styles
   ========================================== */

.same-better-wrapper {
    margin-top: 10px;
}

.same-better-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 500;
}

.same-better-badge i {
    font-size: 0.75rem;
}

/* ==========================================
   Enhanced Card Responsive Styles
   ========================================== */

@media (max-width: 768px) {
    .coin-card {
        min-height: 480px;
    }
    
    .coin-card-actions {
        padding: 12px 15px 15px;
        gap: 6px;
    }
    
    .coin-card-actions .btn {
        min-width: 70px;
        font-size: 0.75rem;
        padding: 5px 6px;
    }
}

@media (max-width: 480px) {
    .coin-card {
        min-height: auto;
    }
    
    .coin-card-actions {
        flex-direction: column;
    }
    
    .coin-card-actions .btn {
        width: 100%;
        min-width: unset;
    }
}



/* ==========================================
   SEO & Professional Card Layout Styles
   ========================================== */

/* Professional Coin Fields - Vertical Layout */
.coin-fields {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 12px 0;
}

.coin-field {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
}

.coin-field:last-child {
    border-bottom: none;
}

.coin-field-highlight {
    background: linear-gradient(135deg, #fffbeb, #fef3c7);
    margin: 0 -20px;
    padding: 10px 20px;
    border-bottom: 1px solid #fde68a;
}

.field-label {
    font-weight: 600;
    color: #666;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 6px;
}

.field-label i {
    color: var(--primary-color);
    width: 14px;
    text-align: center;
}

.field-value {
    font-size: 0.85rem;
    color: #333;
    text-align: right;
    font-weight: 500;
}

.field-value.price-value {
    color: var(--primary-dark);
    font-weight: 700;
    font-size: 1rem;
}

/* Status Badge Inline */
.status-badge-inline {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

.status-badge-inline.status-available {
    background: var(--status-available-bg);
    color: var(--status-available-color);
}

.status-badge-inline.status-sold {
    background: var(--status-sold-bg);
    color: var(--status-sold-color);
}

.status-badge-inline.status-onhold,
.status-badge-inline.status-on-hold {
    background: var(--status-onhold-bg);
    color: var(--status-onhold-color);
}

/* Same/Better Badge */
.same-better-badge {
    background: #28a745;
    color: white;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

/* Button Layout Fixes - PROPER SPACING */
.coin-card-actions {
    display: flex;
    flex-direction: column;
    gap: 15px !important; /* Enforce spacing between buttons */
    margin-top: auto;
    padding-top: 25px;
    border-top: 2px solid #e0e0e0;
    background: transparent;
}

/* Alternative margin-based spacing for browsers without gap support */
.coin-card-actions > * {
    margin-bottom: 12px;
}
.coin-card-actions > *:last-child {
    margin-bottom: 0;
}

.btn-block {
    width: 100%;
    display: block;
    text-align: center;
}

.btn-group-horizontal {
    display: flex;
    gap: 8px;
}

.btn-group-horizontal .btn {
    flex: 1;
    min-width: 0;
}

/* Outline Success Button */
.btn-outline-success {
    background: transparent;
    border: 2px solid var(--success-color);
    color: var(--success-color);
}

.btn-outline-success:hover {
    background: var(--success-color);
    color: #fff;
}

/* Enhanced Card Actions Button Sizing */
.coin-card-actions .btn {
    font-size: 0.85rem;
    padding: 10px 15px;
}

.coin-card-actions .btn-sm {
    padding: 8px 12px;
    font-size: 0.8rem;
}

.coin-card-actions .btn i {
    font-size: 0.9em;
}

/* Card Body Enhancements - WITH INTERNAL PADDING */
.coin-card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 25px; /* Internal padding so text doesn't touch edges */
}

.coin-card-content {
    flex: 1;
    margin-bottom: 15px;
}

/* Coin Title in Cards */
.coin-card .coin-title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--secondary-color);
    line-height: 1.3;
}

.coin-card .coin-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

.coin-card .coin-title a:hover {
    color: var(--primary-color);
}

/* Improve Card Min Height */
.coin-card {
    min-height: 580px;
}

/* Mobile Responsiveness for Cards */
@media (max-width: 768px) {
    .coin-fields {
        padding: 10px 0;
    }
    
    .coin-field {
        padding: 6px 0;
    }
    
    .field-label {
        font-size: 0.75rem;
    }
    
    .field-value {
        font-size: 0.8rem;
    }
    
    /* Button spacing maintained on mobile */
    .btn-group-horizontal {
        gap: 6px;
    }
    
    .coin-card-actions .btn {
        padding: 10px 12px;
        font-size: 0.85rem;
    }
}

/* SEO Breadcrumb Enhancements */
.breadcrumbs {
    margin-bottom: 25px;
}

.breadcrumbs ol {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    padding: 12px 18px;
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin: 0;
}

.breadcrumbs li {
    display: flex;
    align-items: center;
    font-size: 0.9rem;
}

.breadcrumbs li a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.2s ease;
}

.breadcrumbs li a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

.breadcrumbs li:not(:last-child)::after {
    content: '›';
    margin: 0 12px;
    color: var(--text-muted);
    font-weight: bold;
}

.breadcrumbs li:last-child span {
    color: var(--text-muted);
}



/* ==========================================
   Responsive Design for Cards and Buttons
   ========================================== */

/* Mobile: 1 column */
@media (max-width: 767px) {
    .coins-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .coin-card {
        min-height: 500px;
    }
    
    .coin-card-body {
        padding: 20px; /* Still maintain padding on mobile */
    }
    
    .btn-action {
        height: 44px; /* Slightly taller on mobile for touch */
        font-size: 15px;
    }
    
    .coin-card-actions {
        gap: 12px !important; /* Maintain spacing between buttons on mobile */
        padding-top: 20px;
    }
}

/* Tablet: 2 columns */
@media (min-width: 768px) and (max-width: 991px) {
    .coins-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .coin-card {
        min-height: 520px;
    }
}

/* Desktop: 3 columns */
@media (min-width: 992px) {
    .coins-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 25px;
    }
    
    .coin-card {
        min-height: 550px;
    }
}

/* Large Desktop: 4 columns */
@media (min-width: 1400px) {
    .coins-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Enhanced Coin Field Styling in Cards */
.coin-field {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #f5f5f5;
}

.coin-field:last-child {
    border-bottom: none;
}

.field-label {
    font-weight: 600;
    color: #666;
    font-size: 13px;
}

.field-value {
    font-size: 14px;
    color: #333;
    text-align: right;
    font-weight: 500;
}

/* Price/Estimate Highlight */
.coin-field-highlight .field-value {
    color: #28a745;
    font-weight: 700;
    font-size: 16px;
}

/* Coin Description Truncation */
.coin-description {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e0e0e0;
    font-size: 13px;
    color: #666;
    line-height: 1.6;
    
    /* 3-line truncation */
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}



/* ==========================================
   CARD SPACING FIX - More Aggressive Spacing
   ========================================== */

/* Grid with more spacing */
.coins-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)) !important;
    gap: 30px !important;
    padding: 30px 15px !important;
}

/* Card with more internal space */
.coin-card {
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
    min-height: 650px !important;
    border: 1px solid #ddd !important;
    overflow: hidden !important; /* Prevent any content overflow */
    border-radius: 10px !important;
    overflow: hidden !important;
    box-shadow: 0 3px 6px rgba(0,0,0,0.1) !important;
    transition: box-shadow 0.3s ease !important;
    margin-bottom: 0 !important;
    background: white !important;
}

.coin-card:hover {
    box-shadow: 0 6px 15px rgba(0,0,0,0.15) !important;
}

/* Image area with more padding - SINGLE IMAGE */
.coin-card-image {
    padding: 30px !important;
    background: #f8f9fa !important;
    text-align: center !important;
    border-bottom: 2px solid #e0e0e0 !important;
    min-height: 280px !important;
    overflow: hidden !important; /* Prevent image overflow */
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.coin-card-image img {
    max-width: 100% !important;
    width: auto !important;
    height: auto !important;
    max-height: 220px !important;
    object-fit: contain !important;
    border-radius: 6px !important;
}

.coin-card-image .no-image {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    color: #999 !important;
    gap: 10px !important;
}

.coin-card-image .no-image i {
    font-size: 3rem !important;
}

/* Card body with generous padding */
.coin-card-body {
    flex: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    padding: 30px !important;
}

/* Content area */
.coin-card-content {
    flex: 1 !important;
    margin-bottom: 25px !important;
}

/* Title with more space */
.coin-card .coin-title {
    font-size: 18px !important;
    font-weight: bold !important;
    margin-bottom: 20px !important;
    padding-bottom: 15px !important;
    border-bottom: 2px solid #e0e0e0 !important;
    color: #333 !important;
    line-height: 1.4 !important;
}

.coin-card .coin-title a {
    color: inherit !important;
    text-decoration: none !important;
}

.coin-card .coin-title a:hover {
    color: var(--primary-color) !important;
}

/* Fields with more vertical spacing */
.coin-fields {
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
}

.coin-field {
    display: flex !important;
    flex-direction: column !important;
    padding: 10px 0 !important;
    border-bottom: 1px solid #f0f0f0 !important;
}

.coin-field:last-child {
    border-bottom: none !important;
}

.field-label {
    font-size: 11px !important;
    text-transform: uppercase !important;
    color: #888 !important;
    letter-spacing: 0.5px !important;
    font-weight: 600 !important;
    margin-bottom: 4px !important;
}

.field-value {
    font-size: 14px !important;
    color: #333 !important;
    font-weight: 500 !important;
}

.field-value.price-value {
    color: var(--success-color) !important;
    font-weight: 700 !important;
    font-size: 16px !important;
}

/* Button actions with MORE spacing */
.coin-card-actions {
    display: flex !important;
    flex-direction: column !important;
    margin-top: auto !important;
    padding-top: 25px !important;
    border-top: 2px solid #e0e0e0 !important;
    gap: 0 !important;
}

/* More space between buttons using margin */
.coin-card-actions > * {
    margin-bottom: 15px !important;
}

.coin-card-actions > *:last-child {
    margin-bottom: 0 !important;
}

/* Button styling */
.btn-action {
    width: 100% !important;
    height: 46px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    border-radius: 6px !important;
    transition: all 0.3s ease !important;
    text-decoration: none !important;
    cursor: pointer !important;
}

/* Responsive Grid - More space */
@media (min-width: 768px) {
    .coins-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 30px !important;
    }
}

@media (min-width: 992px) {
    .coins-grid {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 35px !important;
    }
}

@media (min-width: 1400px) {
    .coins-grid {
        grid-template-columns: repeat(4, 1fr) !important;
        gap: 35px !important;
    }
}

/* Mobile adjustments */
@media (max-width: 767px) {
    .coins-grid {
        gap: 25px !important;
        padding: 20px 10px !important;
        grid-template-columns: 1fr !important;
    }
    
    .coin-card {
        min-height: 580px !important;
    }
    
    .coin-card-body {
        padding: 25px !important;
    }
    
    .coin-card-image {
        padding: 25px !important;
        min-height: 250px !important;
    }
    
    .coin-card-actions > * {
        margin-bottom: 12px !important;
    }
    
    .btn-action {
        height: 48px !important;
        font-size: 15px !important;
    }
}



/* ==========================================
   Coin Description Section (Detail Page)
   ========================================== */
.coin-description-section {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.coin-description-section h4 {
    margin-bottom: 15px;
    color: var(--secondary-color);
    font-size: 18px;
}

.coin-description-section h4 i {
    margin-right: 8px;
    color: var(--primary-color);
}

.coin-description-full {
    padding: 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-left: 4px solid var(--primary-color);
    border-radius: 0 var(--radius) var(--radius) 0;
    line-height: 1.8;
    color: var(--text-color);
    font-size: 15px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.coin-description-full br {
    margin-bottom: 10px;
}



/* ==========================================
   Admin-Only Purchase Information Section
   Visible only when admin is logged in
   ========================================== */

/* Admin section wrapper on coin detail page */
.coin-admin-section {
    margin-top: 30px;
    padding: 20px;
    background: #fff3cd;
    border: 2px solid #ffc107;
    border-radius: 8px;
}

/* Admin badge label */
.admin-badge {
    display: inline-block;
    background: #ffc107;
    color: #212529;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 15px;
}

.admin-badge i {
    margin-right: 5px;
}

/* Admin section headings */
.coin-admin-section h4 {
    color: #856404;
    margin-bottom: 15px;
    font-size: 18px;
}

.coin-admin-section h4 i {
    margin-right: 8px;
}

/* Admin specs table styling */
.admin-specs-table {
    background: rgba(255, 255, 255, 0.7);
    border-radius: 4px;
}

.admin-specs-table tr {
    border-bottom: 1px solid #ffeaa7;
}

.admin-specs-table tr:last-child {
    border-bottom: none;
}

.admin-specs-table th {
    color: #856404;
}

/* Text utility classes */
.text-success {
    color: #28a745 !important;
}

.text-danger {
    color: #dc3545 !important;
}

.text-muted {
    color: #6c757d !important;
}

/* Small outline button for links */
.btn-outline-primary {
    color: #007bff;
    background-color: transparent;
    border: 1px solid #007bff;
    padding: 4px 10px;
    font-size: 13px;
    border-radius: 4px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: var(--transition);
}

.btn-outline-primary:hover {
    background-color: #007bff;
    color: #fff;
    text-decoration: none;
}

.btn-sm {
    padding: 4px 8px;
    font-size: 12px;
}
