/* Luxury Service Card v6 - 3D Overlap & Precision Sizing */
.service-card-new {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    margin-bottom: 30px; /* Space for the 50% button overlap */
    display: flex;
    align-items: center;
    padding: 10px 10px 15px 10px; /* Bottom padding increased for button space */
    width: 100%;
    min-height: 100px;
    position: relative;
    overflow: visible; /* Important for 3D overlap */
}

.service-left-v6 {
    width: 110px;
    height: 110px;
    flex-shrink: 0;
    position: relative;
    z-index: 2;
}

.service-image-wrapper-v6 {
    width: 100%;
    height: 100%;
    position: relative;
}

.service-image-wrapper-v6 img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px 0 0 12px;
}

/* 3D Overlapping ADD Button - Now on the image */
.add-button-v6 {
    position: absolute;
    bottom: 5px; /* Moved up to be ON the image */
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    width: 85%;
}

.add-button-v6 button {
    background: #ffffff;
    border: 1px solid #7c4dff;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0;
    cursor: pointer;
    overflow: hidden;
    height: 28px; /* Thinner button */
    width: 100%;
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
    transition: all 0.2s ease;
}

.add-button-v6 .add-text {
    flex: 1;
    font-size: 10px;
    font-weight: 800;
    color: #7c4dff;
    text-align: center;
}

.add-button-v6 .plus-icon-box {
    background: #7c4dff;
    color: #fff;
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}

.service-right-v6 {
    flex: 1;
    padding: 0 12px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 1px;
    overflow: hidden;
}

.service-title-v6, .service-title-new {
    font-size: 14px;
    font-weight: 700;
    color: #000;
    margin: 0;
    line-height: 1.2;
    margin-bottom: 4px;
    text-transform: capitalize;
}

.service-pricing-v6 {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 1px;
}

.new-price {
    font-size: 14px;
    font-weight: 800;
    color: #1e40af;
}

.old-price {
    font-size: 10px;
    color: #999;
    text-decoration: line-through;
}

.discount-badge {
    background: #fdf2f2;
    color: #dc2626;
    font-size: 8px;
    font-weight: 700;
    padding: 1px 3px;
    border-radius: 2px;
}

.service-rating-v6, .service-rating-new {
    display: flex;
    align-items: center;
    gap: 3px;
    font-size: 11px;
    color: #16a34a;
    margin-bottom: 2px;
}

.service-rating-v6 i, .service-rating-new i {
    font-size: 9px;
}

.rating-val {
    font-weight: 700;
}

.review-count {
    color: #666;
}

/* Mobile Adjustments */
@media (max-width: 600px) {
    .service-card-new {
        height: 90px;
    }
    .service-left-v6 {
        width: 90px;
        height: 90px;
    }
    .add-button-v6 {
        bottom: 3px;
        width: 90%;
    }
    .add-button-v6 button {
        height: 24px;
    }
    .add-button-v6 .plus-icon-box {
        width: 22px;
        height: 22px;
    }
    .service-title-v6 {
        font-size: 10px;
    }
}

.rating-count {
    color: #6B7280;
    font-size: 13px;
}

.service-price-duration {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 4px;
}

.price-new-badge {
    color: #1e40af; /* Darker blue */
    font-size: 16px;
    font-weight: 700;
}

.old-price-badge {
    color: #9ca3af;
    font-weight: 400;
    font-size: 14px;
    text-decoration: line-through;
}

.service-footer-new {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-top: auto;
}

.service-footer-v4 {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
}

.rating-badge-v4 {
    background: #f0fdf4;
    color: #16a34a;
    padding: 1px 4px;
    border-radius: 4px;
    font-size: 10px;
    display: inline-flex;
    align-items: center;
    gap: 2px;
    margin: 0;
}

.rating-badge-v4 i {
    font-size: 8px;
}

.add-button-v4 {
    position: absolute;
    bottom: -10px; /* Overlap image bottom */
    left: 50%;
    transform: translateX(-50%);
    width: 80%; /* 80% of image wrapper (which is roughly 40-50% of card side) */
    z-index: 5;
}

.add-button-v4 button {
    background: #7c4dff;
    border: 1px solid #fff;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 28px;
    padding: 0;
    width: 100%;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

.add-button-v4 .add-text {
    flex: 1;
    font-size: 10px;
    font-weight: 800;
    color: #fff;
    text-align: center;
    letter-spacing: 0.5px;
}

.add-button-v4 .plus-icon {
    background: #6366f1;
    color: #fff;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}


.service-description-new {
    list-style: none;
    padding: 0;
    margin: 4px 0 0 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.service-description-new li {
    font-size: 11px;
    color: #4b5563;
    display: flex;
    align-items: flex-start;
    gap: 4px;
    position: relative;
    line-height: 1.35;
}

.service-description-new li::before {
    content: "•";
    color: #0066FF;
    font-weight: bold;
    font-size: 14px;
    line-height: 1;
}

body.dark-mode .service-description-new li {
    color: var(--grey-dark);
}

.view-details-link {
    color: #16a34a;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    display: none; /* Hide in favor of button */
}

.view-details-link:hover {
    color: #15803d;
    text-decoration: underline;
}

body.dark-mode .view-details-link {
    color: #818cf8;
}

.service-left {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.service-right {
    flex-shrink: 0;
}

.service-image-wrapper {
    width: 100px;
    height: 100px; /* Fixed square for thin card match */
    border-radius: 8px;
    position: relative;
    overflow: visible; /* Allow button overlap */
}

.service-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
}

.add-btn-container {
    position: absolute;
    bottom: -15px; /* 50% overlap at bottom of frame */
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    display: flex;
    justify-content: center;
    z-index: 20;
}

.add-service-btn-v3 {
    background: white;
    border: 1.5px solid #7c4dff;
    border-radius: 25px;
    display: flex;
    align-items: center;
    padding: 0;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.2s ease;
    height: 36px;
}

.add-service-btn-v3 .add-text {
    padding: 0 12px 0 15px;
    font-size: 14px;
    font-weight: 700;
    color: #7c4dff;
    letter-spacing: 0.5px;
}

.add-service-btn-v3 .plus-icon-block {
    background: #7c4dff;
    color: white;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.add-service-btn-v3:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transform: translateY(-1px);
}

.add-service-btn-new {
    background: #ffffff;
    color: #7c4dff;
    border: 1.5px solid #7c4dff;
    height: 30px;
    padding: 0 12px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 10px rgba(124, 77, 255, 0.25);
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.add-service-btn-new:hover {
    background: #f5f0ff;
    box-shadow: 0 4px 10px rgba(124, 77, 255, 0.3);
}

/* Plus icon inside the button */
.plus-icon-circle {
    width: 16px;
    height: 16px;
    background: #7c4dff;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
}

/* Premium Animated Loading State for Add Button */
.add-service-btn-new.loading,
.qty-control.loading {
    pointer-events: none;
    position: relative;
    overflow: hidden;
    animation: premiumPulse 1s cubic-bezier(0.4, 0, 0.2, 1) infinite;
    box-shadow: 0 0 15px rgba(251, 191, 36, 0.3) !important;
}

/* White shimmering background */
.add-service-btn-new.loading {
    background: #ffffff !important;
    color: #f59e0b !important;
    border: 2px solid #fbbf24 !important;
    font-weight: 800;
}

/* Multi-layered flowing yellow progress */
.add-service-btn-new.loading::after,
.qty-control.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: linear-gradient(110deg,
            rgba(251, 191, 36, 0.2) 0%,
            rgba(245, 158, 11, 0.7) 45%,
            rgba(255, 255, 255, 0.5) 50%,
            rgba(245, 158, 11, 0.7) 55%,
            rgba(251, 191, 36, 0.2) 100%);
    background-size: 250% 100%;
    animation:
        yellowLineProgress 1s cubic-bezier(0.2, 0.8, 0.2, 1) forwards,
        premiumShimmer 0.7s linear infinite;
    z-index: 0;
    filter: drop-shadow(0 0 5px rgba(251, 191, 36, 0.5));
}

.qty-control.loading {
    background: white !important;
    border-color: #fbbf24 !important;
}

.qty-control.loading .qty-btn,
.qty-control.loading .qty-count {
    position: relative;
    z-index: 2;
    color: #f59e0b !important;
}

@keyframes yellowLineProgress {
    0% {
        width: 0;
    }

    100% {
        width: 100%;
    }
}

@keyframes premiumShimmer {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

@keyframes premiumPulse {
    0% {
        transform: scale(1);
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    }

    50% {
        transform: scale(1.04);
        box-shadow: 0 8px 20px rgba(251, 191, 36, 0.4);
    }

    100% {
        transform: scale(1);
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    }
}

/* Quantity Control State - Matching Reference Image */
.qty-control {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    height: 100%;
    background: white;
    border: 1px solid #6366f1;
    /* Purple border */
    border-radius: 20px;
    /* Pill shape */
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    padding: 0 5px;
}

.qty-btn {
    width: 30px;
    height: 100%;
    background: transparent;
    border: none;
    color: #6366f1;
    /* Purple icons */
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.qty-btn i,
.qty-btn .fas {
    color: #6366f1;
    font-size: 14px;
    display: inline-block;
}

.qty-btn:hover {
    background: rgba(99, 102, 241, 0.1);
    border-radius: 50%;
}

.qty-count {
    color: #6366f1;
    /* Purple number */
    font-size: 18px;
    font-weight: 700;
}

/* Responsive adjustments - Keep image on right */
@media (max-width: 600px) {
    .service-card-new {
        grid-template-columns: 1fr 100px; /* Force image right */
        padding: 10px;
        min-height: 90px;
    }

    .service-image-wrapper {
        width: 100px;
        height: 100px;
    }

    .service-title-new {
        font-size: 14px;
    }

    .add-btn-container {
        bottom: -12px;
    }
}

@media (max-width: 400px) {
    .service-card-new {
        grid-template-columns: 100px 1fr;
        gap: 12px;
    }

    .service-image-wrapper {
        width: 100px;
        height: 100px;
        min-height: 100px;
    }
    
    .service-title-new {
        font-size: 16px;
    }
}

/* Skeleton Loading Animation */
@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }

    100% {
        background-position: 200% 0;
    }
}

.skeleton {
    background: #f0f0f0;
    background-image: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 2s infinite linear;
    border-radius: 4px;
}

body.dark-mode .skeleton {
    background: #2d2d2d;
    background-image: linear-gradient(90deg, #2d2d2d 25%, #3d3d3d 50%, #2d2d2d 75%);
}

.service-card-skeleton {
    background: white;
    border-radius: 12px;
    padding: 16px;
    display: grid;
    grid-template-columns: 1fr 200px;
    gap: 16px;
    border: 1px solid #f0f0f0;
    margin-bottom: 20px;
}

body.dark-mode .service-card-skeleton {
    background: var(--card-dark);
    border-color: var(--border-dark);
}

.skeleton-text {
    height: 16px;
    margin-bottom: 8px;
    width: 80%;
}

.skeleton-title {
    height: 24px;
    margin-bottom: 12px;
    width: 60%;
}

.skeleton-image {
    width: 200px;
    height: 200px;
    border-radius: 12px;
}

.skeleton-btn {
    width: 110px;
    height: 40px;
    border-radius: 20px;
    margin-top: 20px;
}

@media (max-width: 600px) {
    .service-card-skeleton {
        grid-template-columns: 1fr 150px;
        gap: 12px;
    }

    .skeleton-image {
        width: 150px;
        height: 150px;
    }
}

@media (max-width: 400px) {
    .service-card-skeleton {
        grid-template-columns: 1fr 120px;
    }

    .skeleton-image {
        width: 120px;
        height: 120px;
    }

    @keyframes fadeInCards {
        from {
            opacity: 0;
            transform: translateY(10px);
        }

        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    .service-card-new.fade-in {
        animation: fadeInCards 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
        opacity: 0;
        /* Ensure hidden initially */
    }
}


/* --- INTEGRATED SCROLL EXPAND STYLES - DISABLED --- */
/* These styles have been disabled to allow services to load normally */

/*
.service-card {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.service-card.full.service-card-new {
    transform: scale(1);
    opacity: 1;
    z-index: 10;
    border: 2px solid var(--brand-primary);
}

.service-card.minimized.service-card-new {
    height: 90px;
    padding: 10px 16px;
    grid-template-columns: 80px 1fr 50px;
    gap: 12px;
    display: grid;
    align-items: center;
    overflow: hidden;
    margin-bottom: 8px;
    background: #fff;
    cursor: pointer;
}

.service-card.minimized .service-right {
    grid-column: 1;
    grid-row: 1;
    width: 80px;
    height: 70px;
    justify-content: flex-start;
}

.service-card.minimized .service-image-wrapper {
    width: 70px;
    height: 70px;
    margin: 0;
}

.service-card.minimized .service-image-wrapper img {
    border-radius: 8px;
}

.service-card.minimized .service-left {
    grid-column: 2;
    grid-row: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
}

.service-card.minimized .service-title-new {
    font-size: 15px;
    margin: 0;
    -webkit-line-clamp: 1;
    line-clamp: 1;
}

.service-card.minimized .service-price-duration {
    font-size: 13px;
}

.service-card.minimized .service-price-duration .duration-badge,
.service-card.minimized .service-description-new,
.service-card.minimized .view-details-link,
.service-card.minimized .service-rating-new,
.service-card.minimized .deal-badge {
    display: none;
}

.service-card.minimized .add-btn-container {
    position: static;
    transform: none;
    width: 40px;
    height: 40px;
    grid-column: 3;
    grid-row: 1;
}

.service-card.minimized .add-service-btn-new {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    padding: 0;
    background: var(--brand-secondary);
    color: white;
    border: none;
}

.service-card.minimized .add-service-btn-new span {
    display: none;
}

.service-card.minimized .add-service-btn-new::after {
    content: '+';
    font-size: 24px;
    line-height: 1;
}

.service-card.minimized .qty-control {
    width: 40px;
    height: 40px;
    border-radius: 20px;
    padding: 0;
    flex-direction: column;
    background: transparent;
    border: none;
    box-shadow: none;
}

.service-card.minimized .qty-btn {
    display: none;
}

.service-card.minimized .qty-count {
    font-size: 16px;
    background: var(--brand-primary);
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

@keyframes expandCard {
    from {
        height: 90px;
        grid-template-columns: 80px 1fr 50px;
    }

    to {
        height: auto;
        max-height: 500px;
    }
}

.service-card.expanding {
    animation: expandCard 0.4s forwards;
}

@media (max-width: 600px) {
    .service-card.minimized.service-card-new {
        padding: 8px;
        gap: 8px;
        grid-template-columns: 60px 1fr 40px;
    }

    .service-card.minimized .service-right,
    .service-card.minimized .service-image-wrapper {
        width: 60px;
        height: 60px;
    }
}
*/

/* --- MORE DETAIL BUTTON & POPUP --- */

.more-detail-btn {
    align-self: flex-start;
    margin-top: 10px;
    background: transparent;
    color: #16a34a; /* Simple Green */
    border: none;
    padding: 0;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: 0.2s;
    text-decoration: none;
}

.more-detail-btn:hover {
    color: #15803d;
    text-decoration: underline;
    background: transparent;
    transform: none;
    box-shadow: none;
}

body.dark-mode .more-detail-btn {
    background: transparent;
    color: #4ade80;
}

/* Modal Overlay */
.service-detail-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
}

.service-detail-modal-overlay.active {
    display: flex;
    animation: fadeInModal 0.3s ease forwards;
}

/* Modal Content */
.service-detail-modal-content {
    background: #ffffff;
    width: 100%;
    max-width: 550px;
    max-height: 90vh;
    border-radius: 24px 24px 0 0; /* Premium bottom-sheet curve on top */
    padding: 32px 24px;
    position: relative;
    overflow-y: auto;
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.15);
    margin-top: auto; /* Push to bottom on mobile */
    animation: slideUpModal 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@media (min-width: 601px) {
    .service-detail-modal-content {
        border-radius: 24px;
        margin-top: 0;
        width: 90%;
        box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
    }
}

body.dark-mode .service-detail-modal-content {
    background: #1c1c1e;
    color: #f9fafb;
}

.close-modal-btn {
    position: absolute;
    top: 15px;
    right: 20px;
    background: transparent;
    border: none;
    font-size: 28px;
    color: #8e8e93;
    cursor: pointer;
    line-height: 1;
    padding: 0;
}

.close-modal-btn:hover {
    color: #111827;
}

body.dark-mode .close-modal-btn:hover {
    color: white;
}

/* Modal Details Styles */
.seo-popup-title {
    font-size: 22px;
    font-weight: 700;
    color: #111827;
    margin-top: 0;
    margin-bottom: 16px;
    line-height: 1.3;
}

body.dark-mode .seo-popup-title {
    color: white;
}

.seo-popup-desc p {
    font-size: 15px;
    line-height: 1.6;
    color: #4b5563;
    margin-bottom: 12px;
}

body.dark-mode .seo-popup-desc p {
    color: #d1d5db;
}

.seo-popup-tags-title {
    font-size: 16px;
    font-weight: 600;
    color: #374151;
    margin-top: 24px;
    margin-bottom: 12px;
}

body.dark-mode .seo-popup-tags-title {
    color: #e5e7eb;
}

.seo-popup-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.seo-popup-tags .seo-tag {
    background: #f3f4f6;
    color: #4b5563;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

body.dark-mode .seo-popup-tags .seo-tag {
    background: #374151;
    color: #d1d5db;
}

@keyframes fadeInModal {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUpModal {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}