.card {
    margin: 0 !important;
}

#services-container {
    margin: 0 -7.5px;
    display: flex !important;
    flex-wrap: wrap;
    gap: 15px;
}

#services-container .service-col-5 {
    box-sizing: border-box;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
    padding: 10px !important;
}

#service-tabs .nav-link,
#service-tabs-row2 .nav-link {
    color: #333;
    border-radius: 20px;
    padding: 5px 15px;
    margin: 0 5px;
    transition: all 0.3s;
    border: 2px solid #0C00A3;
}

#service-tabs .nav-link:hover,
#service-tabs-row2 .nav-link:hover {
    background-color: #0C00A3;
    color: #fff;
}

#service-tabs .nav-link.active,
#service-tabs-row2 .nav-link.active {
    background-color: #0C00A3;
    color: #fff;
    font-weight: 600;
}

#service-tabs .nav-link .badge,
#service-tabs-row2 .nav-link .badge {
    margin-left: 5px;
}

#service-search {
    border: 2px solid #0C00A3;
    padding: 10px 20px;
}

.form-control:focus {
    border-color: inherit;
    box-shadow: none;
    outline: 0;
    background-color: transparent;
}

.service-card {
    transition: all 0.3s ease;
    border: 1px solid #e0e0e0;
}

#services-container .service-col-5:hover {
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
    border-color: #0c00a3;
}

#services-container .service-col-5:hover .card-img-top {
    transform: scale(1.05);
}

.service-card .card-img-wrapper {
    position: relative;
    width: 100%;
    height: auto !important;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: #f8f8f8;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    border: 2px solid #0c00a3;
    border-radius: 12px;
}

#services-pagination .page-link {
    color: #333;
    border: 1px solid #dee2e6;
    padding: 0.5rem 0.75rem;
    margin: 0 2px;
    border-radius: 4px;
}

#services-pagination .page-item.active .page-link,
#services-pagination .page-item.active .page-link:hover {
    background-color: #0C00A3;
    border-color: #0C00A3;
    color: #fff;
}

#services-pagination .page-link:hover:not(.disabled) {
    background-color: #f8f9fa;
    border-color: #0C00A3;
}

#services-pagination .page-item.disabled .page-link {
    color: #6c757d;
    pointer-events: none;
    background-color: #fff;
}

.card-img-top {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
}

#services-container .service-col-5 .service-card-wrapper {
    position: relative;
    border-radius: unset;
    padding: 0;
    box-shadow: unset;
    border: unset;
}

#services-container .service-col-5 .service-card-wrapper .card-body {
    padding: 8px !important;
}

.service-top-right-badges {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 3;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
}

.service-favorite-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 33px;
    height: 33px;
    flex-shrink: 0;
    align-self: center;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
    color: rgba(180, 180, 180, 0.85);
    cursor: pointer;
    transition: transform 0.25s ease, color 0.25s ease, box-shadow 0.25s ease;
    transform-origin: center;
}

.service-favorite-btn .fa-heart {
    font-size: 25px;
    line-height: 1;
    transition: transform 0.25s ease;
}

.service-favorite-btn:hover,
.service-favorite-btn:focus {
    outline: none;
    transform: scale(1.18);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.16);
}

.service-favorite-btn:hover .fa-heart,
.service-favorite-btn:focus .fa-heart {
    transform: scale(1.08);
}

.service-favorite-btn.is-favorite {
    color: #ff6600;
}

.service-favorite-btn.is-favorite .fa-heart {
    text-shadow: 0 1px 4px rgba(255, 102, 0, 0.35);
}

.service-type-badge {
    top: 10px;
    left: 10px;
    z-index: 2;
}

.service-img-wrapper {
    height: 150px;
    overflow: hidden;
    background: #f8f9fa;
    position: relative;
}

.service-card-title {
    font-size: 0.85rem;
    height: 2.5rem;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    text-overflow: ellipsis;
    line-height: 1.25rem;
    word-break: break-word;
}

.service-price-row {
    font-size: 0.9rem;
    margin-top: auto;
}

.service-price-row .service-price {
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
    color: #c60000;
}

.service-price-row .service-order-count {
    font-size: 0.75rem;
    color: #6c757d !important;
}

.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s ease-in-out infinite;
    border-radius: 4px;
}

@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

.skeleton-tab {
    height: 40px;
    width: 120px;
    margin: 0 5px;
    border-radius: 20px;
    display: inline-block;
}

.skeleton-service-card {
    height: 280px;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.skeleton-card-image {
    height: 150px;
    border-radius: 8px 8px 0 0;
}

.skeleton-card-body {
    padding: 1rem;
}

.skeleton-badge {
    height: 20px;
    width: 60px;
    margin-bottom: 0.5rem;
    border-radius: 4px;
}

.skeleton-title {
    height: 40px;
    width: 100%;
    margin-bottom: 0.5rem;
    border-radius: 4px;
}

.skeleton-price-row {
    display: flex;
    justify-content: space-between;
    margin-top: 0.5rem;
}

.skeleton-price {
    height: 20px;
    width: 100px;
    border-radius: 4px;
}

.skeleton-order-count {
    height: 20px;
    width: 80px;
    border-radius: 4px;
}

.skeleton-pagination {
    display: flex;
    justify-content: flex-end;
}

.skeleton-pagination .pagination {
    margin-bottom: 0;
}

.skeleton-pagination .page-item {
    margin: 0 2px;
}

.skeleton-pagination .page-link {
    height: 36px;
    min-width: 36px;
    border-radius: 4px;
    padding: 0.5rem 0.75rem;
    border: 1px solid #dee2e6;
}

.skeleton-pagination .page-item.icon .page-link {
    width: 36px;
    height: 36px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

#service-tabs,
#service-tabs-row2 {
    display: none;
}

#skeleton-tabs {
    display: block;
}

#skeleton-container {
    display: flex;
    flex-wrap: wrap;
}

#skeleton-pagination {
    display: block;
}

@media (max-width: 768px) {
    #service-tabs .nav-link,
    #service-tabs-row2 .nav-link {
        font-size: 0.85rem;
        padding: 6px 12px;
        margin: 0 2px;
    }

    #service-tabs,
    #service-tabs-row2 {
        gap: 4px;
    }

    #service-tabs.justify-content-center,
    #service-tabs-row2.justify-content-center {
        justify-content: center;
        flex-wrap: wrap;
    }

    .service-col-5 {
        flex: 0 0 50%;
        max-width: calc(50% - 15px);
        padding: 0 5px !important;
        margin-bottom: 0.5rem !important;
    }

    #services-container .service-col-5 .service-card-wrapper .card-body {
        padding: 10px !important;
    }
}

.service-card {
    border-radius: 8px;
    overflow: hidden;
}

.badge-sm {
    font-size: 0.7rem;
    padding: 2px 6px;
}

@media (min-width: 992px) {
    .service-col-5 {
        flex: 0 0 20%;
        max-width: calc(20% - 15px);
    }
}

.page-item.icon .page-link {
    width: 36px;
    height: 36px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.page-item.ellipsis .page-link {
    cursor: default;
}

#services-pagination {
    flex-wrap: wrap;
    justify-content: center;
}

@media (max-width: 767.98px) {
    nav[aria-label="Services pagination"] {
        justify-content: center !important;
        flex-wrap: wrap;
    }

    #services-pagination {
        flex-wrap: wrap;
        gap: 4px;
        justify-content: center;
        width: 100%;
    }

    #services-pagination .page-item {
        margin: 2px 0;
    }

    #services-pagination .page-link {
        margin: 0;
        padding: 0.375rem 0.5rem;
        font-size: 0.875rem;
    }

    #services-pagination .page-item.icon .page-link {
        width: 32px;
        height: 32px;
        padding: 0;
    }
}

#mobile-scroll-timeout {
    display: none;
}

@media (max-width: 767.98px) {
    #mobile-scroll-timeout {
        display: flex;
        flex-direction: column;
        align-items: center;
        position: fixed;
        right: 12px;
        bottom: 16px;
        z-index: 10;
        padding: 8px 12px;
        background: rgba(12, 0, 163, 0.92);
        color: #fff;
        border-radius: 12px;
        box-shadow: 0 4px 14px rgba(12, 0, 163, 0.28);
        pointer-events: auto;
        line-height: 1.2;
    }

    #mobile-scroll-timeout .scroll-hint {
        font-size: 15px;
        font-weight: 600;
        margin-bottom: 4px;
        white-space: nowrap;
    }

    #mobile-scroll-timeout .scroll-countdown {
        font-size: 18px;
        font-weight: 700;
        letter-spacing: 0.02em;
    }

    #mobile-scroll-timeout.is-expired .scroll-hint {
        margin-bottom: 0;
        white-space: nowrap;
    }
}
