/* Service Detail Page Styles */

/* Service Statistics - Modern & Minimal Redesign */
.stats-card {
    background: rgba(255, 255, 255, 0.25);
    border-radius: 16px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    margin-top: 1rem;
    color: #333;
}

.stats-card .card-header {
    background: transparent;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    padding: 0.75rem 1.25rem;
    color: #333;
}

.stats-card .card-header h6 {
    color: #333 !important;
    font-size: 0.9rem;
}

.stats-card .card-body {
    padding: 1.25rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
    align-items: stretch;
}

.stat-item {
    text-align: center;
    padding: 0;
    background: transparent;
    border-radius: 0;
    transition: transform 0.3s ease;
}

.stat-item:hover {
    transform: scale(1.05);
    background: none;
    box-shadow: none;
}

.stat-value {
    font-size: 1.75rem;
    font-weight: 600;
    line-height: 1.1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    margin-bottom: 0.25rem;
}

.stat-icon {
    font-size: 1.2rem;
    opacity: 1;
}

.stat-value.rating .stat-icon { color: #ffc107; }
.stat-value.reviews .stat-icon { color: #5bc0de; }
.stat-value.views .stat-icon { color: #5cb85c; }
.stat-value.contacts .stat-icon { color: #4285f4; }

.stat-label {
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: none;
    letter-spacing: 0;
    color: #555;
}

/* Stats divider */
.stats-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    margin: 1rem 0;
}

/* Mobile responsive for stats */
@media (max-width: 768px) {
    .stats-card .card-body {
        padding: 1rem;
    }
    
    .stats-grid {
        gap: 1rem;
    }
    
    .stat-item {
        padding: 0.75rem;
    }
    
    .stat-value {
        font-size: 1.5rem;
    }
    
    .stat-label {
        font-size: 0.8rem;
    }
}

@media (max-width: 600px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: repeat(2, 1fr);
        gap: 0.4rem;
    }
    .stat-item {
        min-width: 0;
        font-size: 0.92em;
    }
    .stat-value {
        font-size: 1.2rem;
        gap: 0.18rem;
        margin-bottom: 0.15rem;
    }
    .stat-icon {
        font-size: 1rem;
    }
    .stat-label {
        font-size: 0.68rem;
    }
}

.rating-input {
    display: flex;
    flex-direction: row-reverse;
    justify-content: flex-end;
}
.rating-input input {
    display: none;
}
.rating-input label {
    font-size: 2rem;
    color: #ddd;
    cursor: pointer;
}
.rating-input input:checked ~ label,
.rating-input label:hover,
.rating-input label:hover ~ label {
    color: #ffc107;
}
.service-photo {
    width: 100%;
    max-height: 450px; /* Adjust as needed */
    object-fit: cover; /* Changed from contain for better carousel visuals */
    border-radius: 12px;
}
.contact-card {
    position: sticky;
    top: 20px;
    z-index: 100;
}
.share-btn {
    background: linear-gradient(45deg, #25d366, #128c7e);
    border: none;
    color: white;
    transition: all 0.3s ease;
}
.share-btn:hover {
    background: linear-gradient(45deg, #128c7e, #25d366);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(37, 211, 102, 0.3);
}
.otp-input {
    font-size: 1.5rem;
    letter-spacing: 0.5rem;
    text-align: center;
    font-weight: bold;
}
.step-indicator {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}
.step {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #e9ecef;
    color: #6c757d;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 10px;
    font-weight: bold;
}
.step.active {
    background: #007bff;
    color: white;
}
.step.completed {
    background: #28a745;
    color: white;
}

/* Multi-category display styles */
.multi-category-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}
.category-tag {
    font-size: 0.8rem;
    padding: 4px 10px;
    border-radius: 12px;
    font-weight: 500;
}
.primary-category {
    background-color: #0d6efd;
    color: white;
}
.secondary-category {
    background-color: #6c757d;
    color: white;
}

/* Image Preview Styles */
.image-preview-item {
    position: relative;
    width: 80px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid #dee2e6;
}

.image-preview-item img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.image-preview-remove {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Review Images Display */
.review-images {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.review-image-thumb {
    width: 60px;
    height: 60px;
    object-fit: contain;
    border-radius: 6px;
    cursor: pointer;
    border: 2px solid #dee2e6;
    transition: all 0.3s ease;
}

.review-image-thumb:hover {
    border-color: #007bff;
    transform: scale(1.05);
}

/* Enhanced Lightbox Styles */
.lightbox {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    animation: fadeIn 0.3s ease;
}

.lightbox-content {
    position: relative;
    margin: auto;
    padding: 20px;
    width: 90%;
    max-width: 800px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-image {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10000;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
}

.lightbox-close:hover {
    background: rgba(0, 0, 0, 0.8);
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: white;
    font-size: 30px;
    cursor: pointer;
    padding: 10px;
    user-select: none;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-weight: bold;
}

.lightbox-nav:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: translateY(-50%) scale(1.1);
}

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right: 20px;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .multi-category-tags {
        gap: 4px;
    }
    .lightbox-nav {
        width: 50px;
        height: 50px;
        font-size: 24px;
    }
    
    .lightbox-prev {
        left: 10px;
    }
    
    .lightbox-next {
        right: 10px;
    }
    
    .lightbox-close {
        top: 10px;
        right: 15px;
        width: 40px;
        height: 40px;
        font-size: 30px;
    }
    
    /* Remove sticky positioning on mobile for contact card */
    .contact-card {
        position: relative;
        top: auto;
    }
    
    .stats-card {
        position: relative;
        top: auto;
    }
    
    .card-title { font-size: 1.5rem !important; }
    .rating-mobile { font-size: 1.05rem; }
    
    .floating-contact-bubbles {
        bottom: 15px;
        right: 15px;
    }
    
    .floating-bubble {
        width: 55px;
        height: 55px;
        font-size: 1.3rem;
    }
    
    .floating-bubble::before {
        right: 65px;
        font-size: 12px;
        padding: 6px 10px;
    }
    
    .floating-bubble::after {
        right: 57px;
        border-width: 5px;
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Floating Contact Bubbles */
.floating-contact-bubbles {
    position: fixed;
    bottom: 20px;
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    z-index: 1050;
}

.floating-bubble {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    border: none;
    font-size: 1.5rem;
    animation: pulse 2s infinite;
    position: relative;
}

.floating-bubble:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(0,0,0,0.4);
    color: white;
}

.floating-bubble.whatsapp {
    background: linear-gradient(135deg, #25d366, #128c7e);
}

.floating-bubble.call {
    background: linear-gradient(135deg, #007bff, #0056b3);
}

.floating-bubble.whatsapp:hover {
    background: linear-gradient(135deg, #128c7e, #25d366);
}

.floating-bubble.call:hover {
    background: linear-gradient(135deg, #0056b3, #007bff);
}

/* Bubble tooltip */
.floating-bubble::before {
    content: attr(data-tooltip);
    position: absolute;
    right: 70px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 14px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    pointer-events: none;
}

.floating-bubble::after {
    content: "";
    position: absolute;
    right: 62px;
    top: 50%;
    transform: translateY(-50%);
    border: 6px solid transparent;
    border-left-color: rgba(0, 0, 0, 0.8);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.floating-bubble:hover::before,
.floating-bubble:hover::after {
    opacity: 1;
    visibility: visible;
}

/* Pulse animation */
@keyframes pulse {
    0% { 
        box-shadow: 0 4px 12px rgba(0,0,0,0.3); 
    }
    50% { 
        box-shadow: 0 4px 12px rgba(0,0,0,0.3), 0 0 0 10px rgba(37, 211, 102, 0.1); 
    }
    100% { 
        box-shadow: 0 4px 12px rgba(0,0,0,0.3); 
    }
}

/* Hide on desktop if needed */
@media (min-width: 992px) {
    .floating-contact-bubbles {
        display: flex; /* Keep visible on all devices */
    }
}

/* Special styling for active state */
.floating-bubble:active {
    transform: scale(0.95);
}

/* Notification badge (optional) */
.floating-bubble .notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #dc3545;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid white;
}

.breadcrumb-sm { font-size: 0.92rem; --bs-breadcrumb-item-padding-x: 0.5rem; }
.breadcrumb .breadcrumb-item { max-width: 120px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.rating-mobile i, .rating i { color: #ffc107; font-size: 1.05rem; }
@media (max-width: 768px) {
    .card-title { font-size: 1.5rem !important; }
    .rating-mobile { font-size: 1.05rem; }
}

.card-header .badge {
    background: #f8f9fa;
    color: #333;
    border: 1px solid #dee2e6;
    font-size: 0.85em;
    font-weight: 400;
}

.carousel-item {
    text-align: center; /* Center images within the carousel item */
}
.carousel-control-prev-icon,
.carousel-control-next-icon {
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
}

/* Product Card Styles */
.product-card {
    border: 1px solid #dee2e6;
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}
.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}
.product-image-container {
    position: relative;
    overflow: hidden;
    cursor: pointer;
}
.product-image-container .product-image {
    transition: all 0.3s ease;
}
.view-product-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: all 0.3s ease;
    background-color: rgba(255, 255, 255, 0.85);
    border-radius: 50px;
    border: none;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}
.product-image-container:hover .view-product-btn {
    opacity: 1;
}
.product-image-container:hover .product-image {
    transform: scale(1.05);
    filter: blur(1px) brightness(0.9);
}
.add-to-cart-btn {
    border-radius: 0.5rem;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    font-size: 1rem;
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    color: #28a745;
    transition: all 0.2s ease-in-out;
}
.add-to-cart-btn:hover, .add-to-cart-btn:focus {
    background-color: #28a745;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(40, 167, 69, 0.2);
    border-color: #28a745;
}
.add-to-cart-btn:active {
    transform: translateY(0);
}
.product-card .product-details .text-muted {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 32px;
}
.product-card h5 {
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 0.5rem;
    color: #333;
}
#productModalImage {
    height: 400px;
    object-fit: cover;
}
.product-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}
.product-card .no-image {
    height: 200px;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #adb5bd;
}
.product-details {
    padding: 1rem;
}
.product-price {
    font-size: 1.25rem;
    font-weight: bold;
    color: #28a745;
}
.product-quantity-label {
    color: #6c757d;
    font-size: 0.9rem;
}
.whatsapp-order-btn {
    background-color: #25D366;
    color: white;
    border: none;
    width: 100%;
    padding: 0.5rem;
    transition: background-color 0.2s;
}
.whatsapp-order-btn:hover {
    background-color: #128C7E;
    color: white;
}

/* Quantity Input Styles */
.quantity-input-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.quantity-input {
    width: 60px;
    text-align: center;
}

@media (max-width: 576px) {
    .product-image, .product-card .no-image {
        height: 150px;
    }
    .product-price {
        font-size: 1.1rem;
    }
    .product-card .input-group {
        width: 80px !important;
    }
    .product-card h5 {
        font-size: 0.95rem;
        font-weight: 600;
    }
    #cartModal .modal-footer {
        flex-direction: column;
        gap: 0.5rem;
    }
    #cartModal .modal-footer .btn {
        width: 100%;
    }
}

@media (min-width: 992px) {
    /* On service detail page, move cart up to avoid contact bubbles */
    #floating-cart {
        bottom: 170px;
    }
} 