.graymarket-header {
    margin-bottom: 30px;
    text-align: center;
}

.graymarket-header h2 {
    margin: 0;
    color: #2c3e50;
    font-size: 28px;
    font-weight: bold;
    margin-bottom: 10px;
}

.graymarket-header::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: #3498db;
    margin: 0 auto;
    border-radius: 2px;
}

/* Search and Filter Styles */
.graymarket-search-filter {
    background: white;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #e1e5e9;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

input.graymarket-search-bar {
    border-radius: 5px !important;
}

.graymarket-search-bar {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 16px;
    margin-bottom: 15px;
    box-sizing: border-box;
}

.graymarket-search-bar:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 5px rgba(52, 152, 219, 0.3);
}

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

.graymarket-filter-btn {
    padding: 8px 16px;
    border: 1px solid #3498db;
    background: white;
    color: black;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.graymarket-filter-btn:hover {
    background: black;
    color: white;
    border-color: #ddd;
    transition: all 0.2s ease;
}

.graymarket-filter-btn.active {
    background: #3498db;
    color: white;
    border-color: #3498db;
}

.graymarket-filter-btn.upcoming.active {
    background: #F9C10B;
    border-color: #F9C10B;
}

.graymarket-filter-btn.open.active {
    background: #278754;
    border-color: #278754;
}

.graymarket-filter-btn.closing-today.active {
    background: #F3627A;
    border-color: #F3627A;
}

.graymarket-filter-btn.close.active {
    background: #FF4500;
    border-color: #FF4500;
}

.graymarket-filter-btn.listed.active {
    background: #6F42C1;
    border-color: #6F42C1;
}

/* NEW CSS for count styling */
.graymarket-filter-count {
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 600;
    margin-left: 5px;
    background-color: #3498db;
    color: white;
}

.graymarket-filter-btn.active .graymarket-filter-count {
    background: rgba(255, 255, 255, 0.3);
}

/* =====  TYPE FILTER (Front-End)===== */

.graymarket-type-filter {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
    margin: 10px 0 15px;
}

.graymarket-type-filter .graymarket-type-filter-title {
    font-weight: 600;
    color: #333;
    margin-right: 10px;
}

/* Hide native checkbox */
.graymarket-type-filter input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

/* Label styling - unified */
.graymarket-type-filter label {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #fff;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
}

.graymarket-type-filter label:hover {
    background: #f8f9fa;
    border-color: #3498db;
}

/* Custom checkbox square */
.graymarket-type-filter label::before {
    content: "";
    width: 16px;
    height: 16px;
    border: 2px solid #bbb;
    border-radius: 3px;
    background: white;
    display: inline-block;
    transition: border-color 0.2s, background 0.2s;
}

/* Checked State with tick icon */
.graymarket-type-filter input[type="checkbox"]:checked+span::before,
.graymarket-type-filter label:has(input[type="checkbox"]:checked)::before {
    background: #3498db;
    border-color: #3498db;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 12 10' xmlns='http://www.w3.org/2000/svg'%3E%3Cpolyline points='1.5 6 4.5 9 10.5 1' stroke='white' stroke-width='2' fill='none'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
}

.graymarket-type-filter span {
    position: relative;
    padding-left: 0;
}

/* ================================
RESPONSIVE
================================ */

@media (max-width: 768px) {
    .graymarket-type-filter {
        justify-content: flex-start;
    }

    .graymarket-type-filter label {
        font-size: 13px;
        padding: 5px 10px;
    }

    .graymarket-type-filter label::before {
        width: 14px;
        height: 14px;
    }
}

/* Rest of your existing CSS remains the same */
.graymarket-no-results {
    text-align: center;
    padding: 40px 20px;
    background: white;
    border-radius: 8px;
    border: 1px solid #e1e5e9;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-top: 20px;
}

.graymarket-no-data {
    text-align: center;
    padding: 40px 20px;
    background: white;
    border-radius: 8px;
    border: 1px solid #e1e5e9;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.graymarket-no-data p {
    font-size: 16px;
    color: #6c757d;
    margin: 10px 0;
}

.graymarket-no-data a {
    color: #3498db;
    text-decoration: none;
    font-weight: 500;
    padding: 10px 20px;
    background: #3498db;
    color: white;
    border-radius: 5px;
    display: inline-block;
    transition: background-color 0.2s ease;
}

.graymarket-no-data a:hover {
    background: #2980b9;
}

.graymarket-plain-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.graymarket-ipo-item {
    background: white;
    border-radius: 8px;
    border: 2px solid #e1e5e9;
    border-bottom: 3px solid #3498db;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: box-shadow 0.2s ease;
}

.graymarket-ipo-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.graymarket-item-header {
    padding: 25px;
    background: #ffffff;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100px;
}

.graymarket-company-logo {
    width: 120px;
    height: 60px;
    object-fit: contain;
    border-radius: 6px;
    border: 1px solid #e9ecef;
    background: #ffffff;
    padding: 5px;
}

.graymarket-item-content {
    padding: 5px 25px;
}

.graymarket-item-content p {
    margin: 15px 0;
    font-size: 15px;
    line-height: 1.5;
    color: #495057;
    border-bottom: 1px solid #f1f3f4;
    padding-bottom: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.graymarket-item-content p:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.graymarket-item-content strong {
    color: #343a40;
    font-weight: 600;
    font-size: 14px;
    min-width: 130px;
}

.graymarket-ad-header span {
    font-weight: bold;
}

.graymarket-gmp {
    color: #0066cc !important;
    font-weight: 600 !important;
    font-size: 16px !important;
}

.graymarket-price {
    color: #28a745 !important;
    font-weight: 600 !important;
    font-size: 16px !important;
}

.graymarket-estimated-price {
    color: #fd7e14 !important;
    font-weight: 600 !important;
    font-size: 16px !important;
}

.graymarket-listed-price {
    color: #17a2b8 !important;
    font-weight: 600 !important;
    font-size: 16px !important;
}

.graymarket-gain {
    font-weight: 600 !important;
    font-size: 14px !important;
    padding: 4px 12px !important;
    border-radius: 4px !important;
    text-align: center;
    min-width: 70px;
}

.graymarket-gain.positive {
    background-color: #d4edda !important;
    color: #155724 !important;
    border: 1px solid #c3e6cb !important;
}

.graymarket-gain.negative {
    background-color: #f8d7da !important;
    color: #721c24 !important;
    border: 1px solid #f5c6cb !important;
}

.graymarket-gain.neutral {
    background-color: #e2e3e5 !important;
    color: #383d41 !important;
    border: 1px solid #d6d8db !important;
}

.graymarket-status {
    color: white !important;
    padding: 4px 12px !important;
    border-radius: 4px !important;
    font-size: 12px !important;
    font-weight: 500 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
}

.graymarket-status.upcoming {
    background: #F9C10B !important;
}

.graymarket-status.open {
    background: #278754 !important;
}

.graymarket-status.close {
    background: #FF4500 !important;
}

.graymarket-status.closing-today {
    background: #F3627A !important;
}

.graymarket-status.listed {
    background: #6F42C1 !important;
}

.graymarket-allotted {
    color: white !important;
    padding: 2px 8px !important;
    border-radius: 4px !important;
    font-size: 10px !important;
    font-weight: 500 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    background: #17a2b8 !important;
    margin-left: 5px !important;
    display: inline-block !important;
}

.graymarket-type {
    color: white !important;
    padding: 4px 12px !important;
    border-radius: 4px !important;
    font-size: 12px !important;
    font-weight: 500 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
}

.graymarket-ipo-item .graymarket-type {
    background: #6f42c1 !important;
}

.graymarket-ipo-item:has(span:contains("NSE SME")) .graymarket-type,
.graymarket-ipo-item span[class*="graymarket-type"]:contains("NSE SME") {
    background: #007bff !important;
}

.graymarket-ipo-item:has(span:contains("BSE SME")) .graymarket-type,
.graymarket-ipo-item span[class*="graymarket-type"]:contains("BSE SME") {
    background: #28a745 !important;
}

span.graymarket-type[data-type="NSE SME"] {
    background: #007bff !important;
}

span.graymarket-type[data-type="BSE SME"] {
    background: #28a745 !important;
}

.graymarket-read-more-btn {
    background: #3498db !important;
    color: white !important;
    padding: 8px 16px !important;
    border-radius: 5px !important;
    text-decoration: none !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    display: inline-block !important;
    transition: background-color 0.2s ease !important;
}

.graymarket-read-more-btn:hover {
    background: #2980b9 !important;
    color: white !important;
    text-decoration: none !important;
}

.graymarket-read-more-center {
    text-align: center !important;
    justify-content: center !important;
}

/* Admin specific styles */
.graymarket-add-new-section {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.graymarket-list-item {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
    position: relative;
}

.graymarket-list-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Advertisement specific styles */
.graymarket-ad-item {
    border-bottom: 3px solid #ff6b6b !important;
    position: relative;
}

.graymarket-ad-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
}

.graymarket-ad-badge {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    animation: pulse 2s infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.7;
    }
}

.graymarket-ad-item .graymarket-item-header h3 {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 18px;
    color: white;
}

.graymarket-ad-item img {
    transition: transform 0.3s ease;
}

.graymarket-ad-item:hover img {
    transform: scale(1.02);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .graymarket-header h2 {
        font-size: 24px;
    }

    .graymarket-plain-container {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .graymarket-ipo-item {
        margin: 0 5px;
    }

    .graymarket-item-header {
        padding: 20px;
    }

    .graymarket-company-logo {
        height: 60px;
        max-width: 100px;
    }

    .graymarket-item-content {
        padding: 5px 20px;
    }

    .graymarket-item-content p {
        font-size: 16px;
        margin: 12px 0;
        padding-bottom: 12px;
        display: flex;
        justify-content: space-between;
        align-items: center;
        flex-wrap: wrap;
    }

    .graymarket-item-content strong {
        min-width: 110px;
        font-size: 15px;
    }

    .graymarket-gmp,
    .graymarket-price,
    .graymarket-estimated-price,
    .graymarket-listed-price {
        font-size: 17px !important;
    }

    .graymarket-gain {
        font-size: 15px !important;
    }

    .graymarket-filter-buttons {
        justify-content: flex-start;
    }

    .graymarket-filter-btn {
        font-size: 12px;
        padding: 6px 12px;
    }
}

@media (max-width: 480px) {
    .graymarket-header h2 {
        font-size: 20px;
    }

    .graymarket-item-content {
        padding: 5px 15px;
    }

    .graymarket-company-logo {
        height: 50px;
        max-width: 80px;
    }

    .graymarket-item-content p {
        font-size: 15px;
        margin: 10px 0;
        padding-bottom: 10px;
        display: flex;
        justify-content: space-between;
        align-items: center;
        flex-wrap: wrap;
    }

    .graymarket-item-content strong {
        font-size: 14px;
        min-width: 100px;
    }

    .graymarket-gmp,
    .graymarket-price,
    .graymarket-estimated-price,
    .graymarket-listed-price,
    .graymarket-gain {
        font-size: 16px !important;
    }
}

/* Custom CSS */
.graymarket-company-name {
    text-align: right !important;
    word-wrap: break-word;
    hyphens: auto;
}

#gmpipo-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5px;
}

.gmp-page.button {
    border-radius: 5px;
    background-color: #3498DB;
    font-weight: bold;
    font-size: 14px;
    padding: 8px 16px;
}

.gmp-active-page {
    border-radius: 5px;
    background-color: #2673AA !important;
    color: white;
    font-weight: bold;
}

.gmp-dots {
    margin: 0 6px;
    font-weight: bold;
}

/* ================================
   Advertisement Card Styling
================================ */

.graymarket-ad-item {
    border-bottom: 3px solid #ff6b6b !important;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.graymarket-ad-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

/* Header */
.graymarket-ad-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 15px 20px;
}

.graymarket-ad-header h3 {
    margin: 0;
    color: white;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Sponsored badge */
.graymarket-ad-badge {
    background: rgba(255, 255, 255, 0.25);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Image */
.graymarket-ad-image img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    pointer-events: none;
    margin-top: 1px;
}

/* Footer Button Area */
.graymarket-ad-footer {
    padding: 20px;
    text-align: center;
    border-top: 1px solid #e9ecef;
    background: #f8f9fa;
}

.graymarket-ad-btn {
    display: inline-block;
    background: #3498db;
    color: white;
    padding: 12px 30px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 14px;
    pointer-events: none;
    /* Entire card clickable */
}

/* ===============================
   EXACT MATCH SKELETON (IPO CARD)
================================ */

/* Grid SAME as real */
.graymarket-skeleton-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

/* Card EXACT same as .graymarket-ipo-item */
.graymarket-skeleton-card {
    background: white;
    border-radius: 8px;
    border: 2px solid #e1e5e9;
    border-bottom: 3px solid #3498db;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

/* Header EXACT same spacing */
.sk-logo-center {
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid #e9ecef;
    padding: 25px;
}

.sk-logo-center::before {
    content: "";
    width: 120px;
    height: 60px;
    border-radius: 6px;
    display: block;
}

/* Content EXACT padding */
.graymarket-skeleton-card .sk-content {
    padding: 5px 25px;
}

/* Each row EXACT same spacing */
.sk-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 15px 0;
    padding-bottom: 15px;
    border-bottom: 1px solid #f1f3f4;
}

/* Remove border from last row */
.sk-row:last-of-type {
    border-bottom: none;
}

/* Label width match */
.sk-label {
    height: 14px;
    width: 130px;
    border-radius: 4px;
}

/* Value width realistic */
.sk-value {
    height: 14px;
    width: 80px;
    border-radius: 4px;
}

/* Badge style match */
.sk-badge {
    height: 22px;
    width: 90px;
    border-radius: 4px;
}

/* Gain badge match */
.sk-gain {
    height: 22px;
    width: 70px;
    border-radius: 4px;
}

/* Button EXACT match */
.sk-button {
    height: 34px;
    width: 160px;
    margin: 15px auto 20px;
    border-radius: 5px;
}

/* Optimized single shimmer per card */
.graymarket-skeleton-card {
    position: relative;
    overflow: hidden;
}

.graymarket-skeleton-card::after {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg,
            transparent,
            rgba(255, 255, 255, 0.5),
            transparent);
    animation: cardShimmer 1.4s infinite;
}

@keyframes cardShimmer {
    100% {
        transform: translateX(300%);
    }
}

/* Base skeleton color */
.sk-logo-center::before,
.sk-label,
.sk-value,
.sk-badge,
.sk-gain,
.sk-button {
    background: #f2f2f2;
}

@media screen and (max-width: 480px) {
    .graymarket-company-name {
        text-align: right !important;
        word-wrap: break-word !important;
        hyphens: auto;
        white-space: normal !important;
        overflow: visible !important;
        flex: 1;
        margin-left: 10px;
        display: inline-block !important;
        line-height: 1.3;
        max-width: 100%;
    }
}