/* Account Grid Layout */
.account-grid-header {
    margin-bottom: 20px;
}

/* Top Row: Title + Search Button */
.header-top-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.account-grid-title {
    font-size: 30px;
    font-weight: 700;
    color: #333;
    margin: 0;
}

/* Divider */
.header-divider {
    border: none;
    border-top: 1px solid #d0c4e8;
    margin: 0 0 15px 0;
}

/* Bottom Row: Count + Filter Group */
.header-bottom-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.account-count {
    font-size: 20px;
    color: #666;
    margin: 0;
    white-space: nowrap;
}

/* Filter Group */
.filter-group {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.filter-label {
    font-size: 14px;
    color: #666;
    margin-right: 5px;
    white-space: nowrap;
}

.filter-btn {
    padding: 4px 16px;
    border: 1px solid #ddd;
    background: #fff;
    border-radius: 6px;
    font-size: 13px;
    color: #666;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.filter-btn:hover {
    border-color: #7c3aed;
    color: #7c3aed;
}

.filter-btn.active {
    background: linear-gradient(135deg, #7c3aed 0%, #a855f7 100%);
    border-color: #7c3aed;
    color: #fff;
}

.search-btn {
    padding: 8px 16px;
    background: #fff;
    border: 0px solid #ddd;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: all 0.3s ease;
}

.search-btn:hover {
    border-color: #7c3aed;
    color: #7c3aed;
}

/* Account Cards Grid */
.accounts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 20px;
    margin-bottom: 30px;
}

.account-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.account-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.account-card-image {
    position: relative;
    width: 100%;
    padding-top: 100%; /* 4:3 Aspect Ratio */
    overflow: hidden;
    background: #000;
}

.account-card-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.account-card-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(255, 193, 7, 0.95);
    color: #000;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Purple Gradient Footer */
.account-card-footer {
    background: linear-gradient(135deg, #6b21a8 0%, #7c3aed 50%, #a855f7 100%);
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.account-card-info {
    flex: 1;
}

.account-id {
    font-size: 20px;
    color: #fae105;
    margin-bottom: 4px;
}

.account-price {
    font-size: 40px;
    font-weight: 700;
    color: #fff;
    margin: 0;
    line-height: 1;
}

.account-price-suffix {
    font-size: 18px;
}

/* Button Actions Container */
.account-card-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 120px;
}

/* Contact Buy Button (Yellow/Gold) */
.contact-buy-btn {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    color: #ec354a;
    padding: 5px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    white-space: nowrap;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    display: block;
}

.contact-buy-btn:hover {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    transform: scale(1.05);
    color: #000;
}

/* View Detail Button (White) */
.view-detail-btn {
    background: #fff;
    color: #ec354a;
    padding: 5px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    white-space: nowrap;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    display: block;
}

.view-detail-btn:hover {
    background: #f3f4f6;
    transform: scale(1.05);
    color: #000;
}

/* Pagination */
.pagination-wrapper {
    display: flex;
    justify-content: center;
    margin-top: 30px;
    margin-bottom: 30px;
}

.pagination {
    display: flex;
    gap: 8px;
    align-items: center;
}

.pagination-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid #ddd;
    background: #fff;
    color: #666;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-size: 14px;
}

.pagination-btn:hover {
    border-color: #7c3aed;
    color: #7c3aed;
}

.pagination-btn.active {
    background: linear-gradient(135deg, #7c3aed 0%, #a855f7 100%);
    color: #fff;
    border-color: #7c3aed;
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .accounts-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .accounts-grid {
        grid-template-columns: 1fr;
    }
    
    .header-top-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .header-bottom-row {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .filter-group {
        width: 100%;
        justify-content: flex-start;
    }
    
    .search-btn {
        width: 100%;
        justify-content: center;
    }
    
    .account-card-footer {
        flex-direction: column;
        gap: 10px;
        align-items: stretch;
    }
    
    .account-card-actions {
        width: 100%;
        min-width: unset;
    }
    
    .contact-buy-btn,
    .view-detail-btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .account-grid-title {
        font-size: 20px;
    }
    
    .filter-btn {
        padding: 6px 12px;
        font-size: 12px;
    }
}
