/* assets/css/vendor-detail.css */

/* --- General Layout --- */
.vendor-detail-page {
    margin: 0 auto;
    padding: 20px;
    max-width: 100vw; /* Ensure container doesn't exceed viewport width */
    overflow-x: hidden; /* Prevent horizontal scroll on the page container */
    box-sizing: border-box; /* Include padding in width calculation */
}

/* Ensure all children use border-box to prevent padding adding to width */
.vendor-detail-page *, .vendor-detail-page *::before, .vendor-detail-page *::after {
    box-sizing: border-box;
}

.detail-page-grid-container {
    display: grid;
    /* Main content takes about 70%, sidebar takes 30% */
    grid-template-columns: 3fr 1fr; 
    gap: 30px;
    margin-top: 30px;
}

/* Make the sidebar stack on small screens */
@media (max-width: 992px) {
    .detail-page-grid-container {
        grid-template-columns: 1fr;
    }
    
    .contact-widget-vendor-detail {
        margin-top: 30px;
    }
}

/* --- Mobile Responsiveness Enhancements --- */
@media (max-width: 768px) {
    /* Critical: Force body handling (optional but good practice) */
    html, body {
        width: 100%;
        overflow-x: hidden; 
    }

    .vendor-detail-page {
        padding: 5px; /* Extremely minimal padding */
        width: 100%;
        max-width: 100vw;
        overflow-x: hidden;
        display: flex;
        flex-direction: column;
    }
    
    /* Force main layout to stack */
    .detail-page-grid-container {
        display: block !important; /* Force block to kill any grid behavior */
        width: 100%;
        margin-top: 15px;
        padding: 0;
    }

    .vendor-sidebar-panel {
        width: 100%;
        margin-top: 30px;
        padding: 0 5px;
        box-sizing: border-box;
    }

    /* Force packages grid to single column */
    .packages-grid-container {
        display: grid;
        grid-template-columns: 1fr !important;
        width: 100%;
        gap: 15px;
    }
    
    /* Ensure package card fits */
    .package-card {
        width: 100%;
        margin: 0;
        box-sizing: border-box;
        min-width: 0; /* Allow shrinking */
    }
    
    .filter-item {
        min-width: 70px; /* Reduced min width */
    }
    
    /* Portfolio grid fix */
    .portfolio-gallery {
        grid-template-columns: 1fr !important;
        gap: 15px;
    }
    
    .portfolio-card {
        width: 100%;
        min-width: 0;
    }
    
    /* Ensure content fits */
    .vendor-cover-photo {
        height: 200px; /* Reduced height */
        border-radius: 4px; /* Smaller radius */
        margin: 0; /* No negative margins - keep safe */
        width: 100%; /* Fill available space */
    }

    .vendor-header-info {
        padding: 10px 15px;
    }

    .vendor-header-info h1 {
        font-size: 1.6rem; 
        line-height: 1.2;
        margin-bottom: 5px;
    }

    .vendor-location {
        font-size: 0.85rem;
        margin-bottom: 5px;
    }

    /* Scrollable Tabs - NOW WRAPPING (No Scroll) */
    .vendor-tabs {
        overflow-x: visible; /* Use visible to allow dropdowns if any (though wrapping is key) */
        white-space: normal; /* Allow breaking to new lines */
        flex-wrap: wrap; /* CRITICAL: Allow wrapping */
        padding-bottom: 0; 
        justify-content: center; /* Center align on mobile */
        max-width: 100%; 
        margin-bottom: 20px;
        gap: 5px; /* Use gap for spacing instead of padding */
    }
    
    .vendor-tabs a {
        padding: 8px 12px;
        font-size: 0.9rem;
        flex: 1 1 auto; /* Grow/Shrink but respect content */
        text-align: center;
        border-bottom: 2px solid #eee; /* Ensure borders are visible on wrapped items */
        border-radius: 4px; /* Slight radius for button-like feel on mobile */
        margin-bottom: 5px; /* Space between rows */
        background-color: #f9f9f9; /* Light bg to distinguish buttons */
    }
    
    .vendor-tabs a.active {
        background-color: #ffe6e6; /* Highlight active tab background */
        border-bottom-color: #FA5754;
    }

    /* Filters scrollbar - NOW WRAPPING (No Scroll) */
    #service-filters {
        padding: 10px 0;
        gap: 15px; 
        margin-bottom: 20px;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        
        display: flex;
        flex-wrap: wrap; /* CRITICAL: Allow wrapping */
        overflow-x: visible; /* Remove scroll */
        justify-content: center; /* Center the grid of icons */
        white-space: normal;
    }

    /* Ensure items don't stretch weirdly */
    .filter-item {
        flex: 0 0 auto; /* Don't grow, keep natural size */
        margin-bottom: 10px;
    }
    
    /* Packages Grid - Single Column on very small screens if needed */
    .packages-grid-container {
        grid-template-columns: 1fr; /* Full width cards */
    }

    .package-card {
        margin-bottom: 15px;
    }

    /* Service Filters - Ensure good touch targets */
    .filter-icon-circle {
        width: 55px;
        height: 55px;
    }
    
    .filter-name {
        font-size: 0.75rem;
    }
    
    /* Portfolio Carousel Popup */
    .carousel-content {
        width: 95vw; /* Wider popup on mobile */
        height: 85vh;
    }
    
    .carousel-btn {
        padding: 15px; /* Larger touch target */
    }
}

/* --- Hero Section --- */
.vendor-hero-section {
    position: relative;
    margin-bottom: 20px;
}

.vendor-cover-photo {
    height: 350px;
    background-size: cover;
    background-position: center;
    border-radius: 8px;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: flex-end; /* Position info at the bottom */
}

.vendor-cover-photo::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0));
}

.vendor-header-info {
    position: relative;
    z-index: 10;
    padding: 20px 40px;
    color: #fff;
}

.vendor-header-info h1 {
    font-size: 3.5rem;
    margin-bottom: 5px;
    color: #FA5754;
}

.vendor-location {
    font-size: 1.1rem;
    margin-bottom: 10px;
    opacity: 0.9;
    color: #FFFFFF;
}

.vendor-rating .stars {
    color: #ffd700; /* Gold color for stars */
    letter-spacing: 2px;
}

.vendor-rating .rating-value {
    margin-left: 10px;
    font-weight: bold;
}


/* --- Navigation Tabs --- */
.vendor-tabs {
    display: flex;
    border-bottom: 2px solid #eee;
    margin-bottom: 30px;
}

.vendor-tabs a {
    padding: 15px 20px;
    text-decoration: none;
    color: #333;
    font-weight: 600;
    border-bottom: 2px solid transparent;
    transition: border-color 0.3s, color 0.3s;
}

.vendor-tabs a:hover {
    color: #FA5754;
}

.vendor-tabs a.active {
    color: #FA5754;
    border-bottom-color: #FA5754;
}


/* --- Content Sections --- */
.content-section {
    padding-bottom: 30px;
    margin-bottom: 30px;
    border-bottom: 1px solid #eee;
}

.content-section:last-child {
    border-bottom: none;
}

.content-section h2 {
    font-size: 1.8rem;
    color: #333;
    margin-bottom: 20px;
}

/* Services Offered */
.vendor-row-services {
    border-radius: 8px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    flex-shrink: 0; 
}

.service-tag {
    display: inline-block;
    background-color: transparent;
    color: #fa5754;
    padding: 2px 8px;
    margin-right: 8px;
    margin-bottom: 5px;
    border-radius: 4px;
    font-size: 0.8em;
    font-weight: 600;
    border: 1px solid #fa5754;
}

/* Reviews */
.review-card {
    border: 1px solid #ddd;
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 15px;
}

.review-rating {
    font-weight: bold;
    color: #FA5754;
    margin: 5px 0;
}

.review-author {
    font-size: 0.9em;
    color: #666;
}


/* --- Sidebar Widget --- */

.social-links-widget {
    margin-top: 20px;
}

.social-links-widget a {
    display: block;
    padding: 8px 0;
    color: #FA5754;
    text-decoration: none;
}


/* ======================================= */
/* --- Packages & Pricing Cards (Grid) --- */
/* ======================================= */

.packages-grid-container {
    display: grid;
    /* Responsive grid: 4 columns max, min size 250px */
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); 
    gap: 20px;
    margin-top: 15px;
}

/* Individual Package Card Style (using Flex for equal height) */
.package-card {
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
    transition: box-shadow 0.3s, transform 0.3s;
    /* VITAL: Setup as Flexbox column for equal heights */
    display: flex; 
    flex-direction: column;
    height: 100%;
}

.package-card:hover {
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
}

/* Package Name Header */
.package-name {
    border-top-left-radius: 10px; 
    border-top-right-radius: 10px;
    font-size: 1rem;
    background-color: #fa5754; 
    color: #ffffff;
    margin-top: 0;
    padding: 20px 15px 10px 15px;
    min-height: 70px;
}

/* Content Wrapper (Pushes buttons to the bottom) */
.package-content-wrapper {
    margin-bottom: auto; /* CRITICAL: Pushes next element down */
    padding: 15px; 
    padding-top: 0; 
    flex-grow: 1; /* Allows it to expand to fill available space */
}

/* Price and Service Tag Row */
.package-price-row {
    display: flex;
    justify-content: space-between; 
    align-items: center;
    padding: 10px 0; 
    margin-bottom: 10px; 
    border-bottom: 1px dashed #e0e0e0; 
}

.package-price-info {
    display: flex;
    align-items: baseline;
}

.price-label {
    font-size: 1em;
    color: #6c757d; 
    font-weight: 500;
    margin-right: 8px;
}

.package-price {
    font-size: 1.1rem;
    font-weight: 700;
    color: #fa5754; 
}

.package-service-tag {
    display: inline-block;
    padding: 3px 8px;
    font-size: 0.8em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background-color: #f1f1f1;
    color: #333333; 
    border-radius: 4px; 
}

/* Description Text */
.package-description {
    color: #333;
    line-height: 1.6;
    margin-bottom: 20px;
    min-height: 100px; /* Helps standardize height of text block */
}

/* Action Buttons Wrapper */
.package-actions {
    display: flex; 
    gap: 10px;
    margin-top: 20px; 
    padding: 0 15px 15px 15px;
}

.btn-action {
    flex: 1; 
    padding: 10px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    text-align: center;
    transition: background-color 0.2s, color 0.2s;
}

.btn-view-details {
    background-color: #f1f1f1; 
    color: #333;
}

.btn-view-details:hover {
    background-color: #e0e0e0;
}

.btn-enquire {
    background-color: #ffc107; 
    color: #333; 
}

.btn-enquire:hover {
    background-color: #e0a800;
}


/* --- Service Filter Ribbon Styles --- */

#service-filters {
    display: flex;
    overflow-x: auto; 
    white-space: nowrap; 
    gap: 30px; 
    padding: 15px 0;
    margin-bottom: 30px;
    -ms-overflow-style: none; /* IE and Edge */
    scrollbar-width: none; /* Firefox */
}

#service-filters::-webkit-scrollbar {
    display: none;
}

.filter-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    transition: transform 0.2s, opacity 0.2s;
    text-align: center;
    flex-shrink: 0; 
}

.filter-item:hover {
    transform: translateY(-3px);
    opacity: 0.9;
}

.filter-icon-circle {
    width: 70px; 
    height: 70px;
    border-radius: 50%;
    background-color: #f1f1f1; 
    border: 2px solid #e0e0e0;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden; 
    margin-bottom: 5px; 
}

.filter-icon {
    width: 100%;
    height: 100%;
    object-fit: contain; 
    padding: 12px; 
}

.filter-name {
    font-size: 0.9em;
    color: #333;
    font-weight: 500;
    white-space: normal; 
    line-height: 1.2; 
    max-width: 90px;
}

.filter-item.active .filter-icon-circle {
    border-color: #FA5754; 
    background-color: #ffe6e6;
}

.no-content-message {
    grid-column: 1 / -1; /* Make message span the entire grid width */
    display: block;
    width: 100%;
    text-align: left;
    padding: 15px;
    background-color: #fff0f0;
    border: 1px solid #fa5754;
    border-radius: 5px;
    color: #fa5754;
}


/* ======================================= */
/* --- Portfolio Gallery (FIXED GRID) ---- */
/* ======================================= */

.portfolio-gallery {
    /* Use CSS Grid for responsive gallery columns */
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); 
    gap: 20px; 
    margin-top: 15px;
}

.portfolio-card {
    background-color: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden; 
    cursor: pointer;
    display: flex; 
    flex-direction: column;
    transition: box-shadow 0.3s ease, transform 0.2s;
}

.portfolio-card:hover {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.portfolio-thumbnail {
    width: 100%;
    height: 180px; 
    object-fit: cover; 
    display: block;
    transition: opacity 0.3s;
}

.portfolio-card:hover .portfolio-thumbnail {
    opacity: 0.9;
}

.portfolio-info {
    padding: 12px 15px;
}

.portfolio-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    margin-top: 0;
    margin-bottom: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.portfolio-description {
    font-size: 0.9rem;
    color: #666;
    line-height: 1.4;
    margin: 0;
}

.portfolio-count-text {
    font-style: italic;
    color: #666;
    margin-bottom: 10px;
}

/* --- Image Carousel Popup (Lightbox) --- */
.image-carousel-popup {
    display: none; 
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    justify-content: center;
    align-items: center;
}

.carousel-content {
    position: relative;
    width: 80vw;
    height: 80vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.carousel-container {
    flex: 1;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

#carousel-main-image {
    max-width: 100%;
    max-height: 100%;
    display: block;
    margin: auto;
    object-fit: contain;
}

/* Close Button */
.close-btn {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
    z-index: 1001;
}

.close-btn:hover,
.close-btn:focus {
    color: #bbb;
    text-decoration: none;
    cursor: pointer;
}

/* Navigation Buttons */
.carousel-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    padding: 15px;
    font-size: 20px;
    cursor: pointer;
    z-index: 1001;
    border-radius: 50%;
}

.carousel-nav-btn.prev {
    left: -60px;
}

.carousel-nav-btn.next {
    right: -60px;
}

@media (max-width: 768px) {
    .carousel-nav-btn.prev {
        left: 10px;
    }

    .carousel-nav-btn.next {
        right: 10px;
    }
}

/* --- Social Links Widget Styling --- */

.social-icons-container {
    display: flex;
    gap: 15px;
    margin-top: 15px;
}

/* Base style for the clickable icon link (the circle) */
.social-icon-link {
    /* KEY CHANGE: Use position: relative for absolute positioning of the icon */
    position: relative; 
    
    display: block; /* Ensures the width/height are respected */
    width: 45px;
    height: 45px;
    border-radius: 50%;
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15); 
}

/* CRITICAL: Target the icon tag (i) for aggressive centering */
.social-icon-link i {
    /* Use Absolute positioning combined with Translate for perfect centering */
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%); 
    
    color: white; 
    font-size: 1.5rem; 
    
    /* Font Weight Fix: Ensure it's not trying to render as a solid icon (fas) */
    font-weight: 400; 
    
    /* Reset any inherited margins/padding */
    margin: 0;
    padding: 0;
}

.social-icon-link:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

/* Specific Brand Colors (Keep these as they are for the colored circles) */
.facebook-icon {
    background-color: #3b5998;
}

.instagram-icon {
    /* Instagram Gradient/Color */
    background: #f09433; 
    background: -moz-linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%); 
    background: -webkit-linear-gradient(45deg, #f09433 0%,#e6683c 25%,#dc2743 50%,#cc2366 75%,#bc1888 100%); 
    filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#f09433', endColorstr='#bc1888',GradientType=1 );
}

.youtube-icon {
    background-color: #ff0000;
}

/* --- Image Carousel Popup (Lightbox) - New Info Block --- */

.carousel-info-block {
    position: absolute;
    bottom: 0; /* Position at the bottom of the container */
    left: 0;
    right: 0;
    padding: 15px 40px; 
    /* Semi-transparent dark background for readability over the image */
    background-color: rgba(0, 0, 0, 0.6); 
    color: #ffffff;
    z-index: 1002; /* Above the image, below the close button */
}

#carousel-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 0 5px 0;
    color: #FA5754; /* Highlight the title with your brand color */
}

#carousel-description {
    font-size: 0.95rem;
    margin: 0;
    line-height: 1.4;
    color: #FFFFFF;
}

/* --- Review Section Styling --- */

.vendor-reviews-section h2 {
    border-bottom: 2px solid #eee;
    padding-bottom: 10px;
    margin-bottom: 30px;
    font-size: 1.8rem;
    color: #333;
}

.review-card {
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    background-color: #fcfcfc;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.review-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    border-bottom: 1px dashed #ddd;
    padding-bottom: 10px;
    margin-bottom: 15px;
}

.reviewer-name strong {
    font-size: 1.1rem;
    color: #FA5754; /* Highlight reviewer name */
    display: block;
    margin-bottom: 2px;
}

.review-date {
    font-size: 0.85rem;
    color: #999;
}

/* Star Rating Style */
.review-rating {
    font-size: 1.2rem;
    line-height: 1;
}

.full-star {
    color: gold; /* Full stars */
}

.empty-star {
    color: #ccc; /* Empty stars */
}

.review-title {
    font-size: 1.3rem;
    color: #444;
    margin: 0 0 8px 0;
    font-weight: 600;
}

.review-description {
    color: #555;
    line-height: 1.6;
    margin: 0;
}

/* No Reviews Message */
.no-reviews-box {
    text-align: center;
    padding: 40px;
    border: 2px dashed #ccc;
    border-radius: 10px;
    color: #777;
}

.no-reviews-box p {
    font-size: 1.1rem;
    margin-bottom: 15px;
}

/* --- View All Reviews Button Styling --- */

.btn-view-all {
    /* Base Button Look and Feel */
    display: inline-block;
    padding: 10px 25px;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    
    /* Occasor Primary Brand Color Scheme */
    background-color: transparent; /* Light background */
    color: #FA5754; /* Red Text */
    border: 2px solid #FA5754; /* Red Border */
}

/* Hover State: Fills the button with the brand color */
.btn-view-all:hover,
.btn-view-all:focus {
    background-color: #FA5754; /* Red Fill */
    color: white; /* White Text */
    border-color: #FA5754; /* Keep border color consistent */
    box-shadow: 0 4px 8px rgba(250, 87, 84, 0.3); /* Subtle glow effect */
}
/* --- Average Rating Display CSS --- */

.rating-display {
    display: flex;
    align-items: center;
    gap: 8px; /* Space between stars and text */
}

.star-icons i {
    font-size: 1rem; /* Adjust size as needed */
}

.full-star,
.half-star {
    color: gold; /* Consistent star color */
}

.empty-star {
    color: #ccc;
}
.rating-value-text a {
    color: #FA5754;
}

.rating-value-text a:hover {
    text-decoration: underline;
}
