/* SolarFintech Custom UI/UX Enhancements */

:root {
    --primary-gradient: linear-gradient(135deg, #1d4ed8, #2563eb);
    --success-gradient: linear-gradient(135deg, #059669, #10b981);
    --warning-gradient: linear-gradient(135deg, #d97706, #f59e0b);
    --danger-gradient: linear-gradient(135deg, #dc2626, #ef4444);
    --card-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* Smooth Transitions */
.section {
    animation: fadeIn 0.4s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Modern Card Stats */
.card-stat {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: none !important;
    background: white;
}

.card-stat:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.card-stat small {
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
    color: #64748b;
}

.card-stat h4 {
    font-weight: 800;
    margin-top: 0.5rem;
    color: #1e293b;
}

/* Skeleton Loading Animation */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: 4px;
    display: inline-block;
    min-height: 1em;
    width: 100%;
}

@keyframes skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Table Enhancements */
.table thead th {
    background-color: #f8fafc;
    border-bottom: 2px solid #e2e8f0;
    color: #475569;
    font-size: 0.8rem;
    text-transform: uppercase;
}

.table-striped tbody tr:nth-of-type(odd) {
    background-color: rgba(248, 250, 252, 0.8);
}

/* Sidebar Modernization */
.sidebar {
    background: #0f172a !important;
    border-right: 1px solid #1e293b;
}

/* Standardized Tab/Nav Spacing */
.nav-tabs .nav-link, 
.sidebar .nav-link {
    padding: 0.5rem 0.75rem !important;
    margin: 0.1rem !important;
    font-size: 0.9rem;
}

.sidebar .nav-link {
    display: flex;
    align-items: center;
}

.sidebar .nav-link i {
    width: 20px;
    text-align: center;
}

.sidebar .nav-link.active {
    background: #2563eb !important;
    color: white !important;
    box-shadow: 0 4px 6px -1px rgba(37, 99, 235, 0.3);
}

/* Scrollbar Customization */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Badge Enhancements */
.badge {
    padding: 0.5em 0.8em;
    font-weight: 600;
}

/* Product Catalog Amazon-Style Layout */
.product-card {
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    border: 1px solid #e2e8f0;
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.08), 0 10px 10px -5px rgba(0, 0, 0, 0.03);
    border-color: #cbd5e1;
}

.product-image-wrap {
    position: relative;
    padding-top: 75%; /* 4:3 Aspect Ratio */
    background: #f8fafc;
    border-bottom: 1px solid #f1f5f9;
}

.product-image-wrap img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-image-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f8fafc, #e2e8f0);
    color: #94a3b8;
}

.product-card-body {
    padding: 1.25rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.product-card-category {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #2563eb;
    margin-bottom: 0.5rem;
}

.product-card-title {
    font-size: 1rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 0.5rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 2.8em;
}

.product-specs-list {
    font-size: 0.8rem;
    color: #64748b;
    margin-bottom: 1rem;
    padding-left: 0;
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.product-spec-badge {
    background: #f1f5f9;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-weight: 500;
}

.product-price-section {
    margin-top: auto;
    padding-top: 0.75rem;
    border-top: 1px dashed #e2e8f0;
}

.product-selling-price {
    font-size: 1.25rem;
    font-weight: 800;
    color: #0f172a;
}

.product-base-price-detail {
    font-size: 0.75rem;
    color: #64748b;
    margin-top: 0.25rem;
}

.product-card-badges {
    position: absolute;
    top: 10px;
    left: 10px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    z-index: 2;
}

.product-card-actions {
    padding: 1rem 1.25rem;
    background: #f8fafc;
    border-top: 1px solid #f1f5f9;
    display: flex;
    gap: 0.5rem;
}

/* Category Filter Tabs Scrollable */
.category-filter-pill {
    white-space: nowrap;
    border: 1px solid #cbd5e1;
    background: #ffffff;
    color: #475569;
    font-weight: 600;
    font-size: 0.85rem;
    border-radius: 30px;
    padding: 0.5rem 1.25rem !important;
    transition: all 0.2s ease;
    cursor: pointer;
}

.category-filter-pill:hover {
    background: #f1f5f9;
    color: #1e293b;
    border-color: #94a3b8;
}

.category-filter-pill.active {
    background: #2563eb !important;
    color: #ffffff !important;
    border-color: #2563eb !important;
    box-shadow: 0 4px 6px -1px rgba(37, 99, 235, 0.2);
}

/* Table Row Thumbnail */
.table-product-thumb {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    object-fit: cover;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
}

/* Release Timeline Scroll bar customization */
.release-timeline-scroll::-webkit-scrollbar {
    width: 6px;
}
.release-timeline-scroll::-webkit-scrollbar-track {
    background: #f1f5f9;
}
.release-timeline-scroll::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}
.release-timeline-scroll::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}
.accordion-toggle-btn {
    cursor: pointer;
    transition: transform 0.2s ease;
}

/* Custom Rank Badges styling */
.bg-bronze {
    background-color: #a77044 !important;
    background: linear-gradient(135deg, #854d0e, #cd7f32) !important;
    color: white !important;
}
.bg-silver {
    background-color: #708090 !important;
    background: linear-gradient(135deg, #475569, #94a3b8) !important;
    color: white !important;
}
.bg-gold {
    background-color: #d4af37 !important;
    background: linear-gradient(135deg, #a16207, #eab308) !important;
    color: white !important;
}
.bg-platinum {
    background-color: #334155 !important;
    background: linear-gradient(135deg, #1e293b, #475569) !important;
    color: white !important;
}
.bg-diamond {
    background-color: #0369a1 !important;
    background: linear-gradient(135deg, #1d4ed8, #0ea5e9) !important;
    color: white !important;
}
