/* Global styles */
:root {
    --primary-color: #3f51b5;
    --primary-dark: #303f9f;
    --primary-light: #e8eaf6;
    --secondary-color: #333;
    --accent-color: #FFC107;
    --text-dark: #333;
    --text-light: #757575;
    --background-white: #fff;
    --background-light: #f5f7fa;
    --border-color: #e0e0e0;
    --shadow-color: rgba(0, 0, 0, 0.05);
    --font-primary: 'Poppins', sans-serif;
    --font-body: 'Inter', sans-serif;
    --success-color: #4CAF50;
    --error-color: #D32F2F;
    --whatsapp-green: #25D366;
}

.vendor-post-container {
    font-family: var(--font-body);
    color: var(--text-dark);
    background-color: var(--background-light);
    max-width: 1200px;
    margin: 0 auto;
    padding: 15px;
}

.section-title {
    font-family: var(--font-primary);
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--secondary-color);
}

.card-section {
    background-color: var(--background-white);
    padding: 24px;
    border-radius: 12px;
    margin-bottom: 16px;
    box-shadow: 0 2px 10px var(--shadow-color);
    transition: box-shadow 0.3s ease;
}

.card-section:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* Hero section */
.vendor-hero-section {
    padding: 24px;
}

.vendor-title {
    font-family: var(--font-primary);
    font-size: 28px;
    color: var(--secondary-color);
    margin-bottom: 10px;
}

.vendor-rating {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 15px;
}

.rating-badge {
    background-color: var(--success-color);
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    font-weight: bold;
}

.stars {
    color: var(--accent-color);
}

.rating-count {
    color: var(--text-light);
}

.verified-badge {
    display: flex;
    align-items: center;
    color: #2196F3;
    font-weight: 500;
}

.verified-badge i {
    margin-right: 5px;
}

.vendor-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.meta-item {
    display: flex;
    align-items: center;
    color: var(--text-light);
}

.meta-item i {
    margin-right: 8px;
    color: var(--primary-color);
}

/* Gallery section */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    grid-gap: 10px;
    margin-bottom: 20px;
}

.gallery-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    aspect-ratio: 4/3;
}

.gallery-item.featured {
    grid-column: span 2;
    grid-row: span 2;
}

.gallery-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gallery-item:hover .gallery-image {
    transform: scale(1.05);
}

.more-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: white;
    font-weight: bold;
}

.more-overlay span {
    font-size: 28px;
}

.gallery-categories {
    display: flex;
    overflow-x: auto;
    margin-bottom: 20px;
    padding-bottom: 10px;
    scrollbar-width: thin;
}

.gallery-categories::-webkit-scrollbar {
    height: 4px;
}

.gallery-categories::-webkit-scrollbar-thumb {
    background-color: var(--border-color);
    border-radius: 4px;
}

.category-item {
    flex: 0 0 auto;
    text-align: center;
    padding: 10px 20px;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-right: 15px;
    transition: all 0.2s ease;
}

.category-item.active {
    border-bottom-color: var(--primary-color);
    color: var(--primary-color);
}

.category-name {
    font-weight: 600;
    margin-bottom: 5px;
}

.category-count {
    font-size: 12px;
    color: var(--text-light);
}

.upload-photos-btn {
    background-color: var(--primary-light);
    color: var(--primary-dark);
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    transition: background-color 0.3s ease;
}

.upload-photos-btn i {
    margin-right: 8px;
}

.upload-photos-btn:hover {
    background-color: var(--primary-dark);
    color: white;
}

.no-images {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 50px 0;
    color: var(--text-light);
}

.no-images i {
    font-size: 48px;
    margin-bottom: 15px;
    color: var(--border-color);
}

/* Actions section */
.action-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.action-btn {
    flex: 1 1 calc(33.33% - 10px);
    min-width: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s ease;
}

.call-btn {
    background-color: var(--success-color);
    color: white;
}

.whatsapp-btn {
    background-color: var(--whatsapp-green);
    color: white;
    border: none;
}

.inquiry-btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
}

.action-btn i {
    margin-right: 8px;
}

.action-btn:hover {
    opacity: 0.95;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.quick-links {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.quick-link {
    display: flex;
    align-items: center;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    padding: 8px 0;
}

.quick-link i {
    margin-right: 8px;
}

.quick-link:hover {
    color: var(--primary-dark);
}

.business-info {
    border-top: 1px solid var(--border-color);
    padding-top: 20px;
}

.info-item {
    display: flex;
    align-items: center;
    color: var(--text-light);
}

.info-item i {
    margin-right: 8px;
    color: var(--primary-color);
}

/* Navigation tabs */
.tab-navigation {
    display: flex;
    overflow-x: auto;
    background-color: var(--background-white);
    border-radius: 10px;
    box-shadow: 0 2px 10px var(--shadow-color);
    position: sticky;
    top: 0;
    z-index: 100;
    scrollbar-width: none;
}

.tab-navigation::-webkit-scrollbar {
    display: none;
}

.tab-item {
    flex: 0 0 auto;
    text-align: center;
    padding: 15px 20px;
    color: var(--text-light);
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    white-space: nowrap;
    border-bottom: 2px solid transparent;
}

.tab-item.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.tab-item:hover {
    color: var(--primary-dark);
}

/* About section */
.section-row {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
}

.about-content {
    flex: 3 1 300px;
}

.contact-sidebar {
    flex: 1 1 200px;
}

.about-details {
    margin-top: 16px;
}

.detail-item {
    display: flex;
    flex-wrap: wrap;
    margin-bottom: 10px;
    padding: 8px 0;
    border-bottom: 1px solid var(--border-color);
}

.detail-label {
    flex: 1 1 140px;
    color: var(--text-light);
    margin-right: 10px;
}

.detail-value {
    flex: 2 1 200px;
    font-weight: 500;
}

.contact-item {
    display: flex;
    align-items: center;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    margin-bottom: 10px;
    padding: 8px 0;
}

.contact-item i {
    margin-right: 10px;
}

/* Reviews section */
.rating-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    margin-bottom: 30px;
}

.overall-rating {
    display: flex;
    align-items: center;
    flex: 1 1 300px;
}

.rating-number {
    background-color: var(--success-color);
    color: white;
    font-size: 32px;
    font-weight: bold;
    width: 65px;
    height: 65px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    margin-right: 15px;
}

.rating-text p {
    margin: 0;
    line-height: 1.5;
}

.rating-source {
    font-size: 12px;
    color: var(--text-light);
}

.review-action {
    flex: 1 1 200px;
}

.review-action h4 {
    margin-bottom: 10px;
}

.rate-stars {
    display: flex;
    gap: 8px;
}

.rate-stars i {
    color: var(--border-color);
    font-size: 24px;
    cursor: pointer;
    transition: color 0.3s ease;
}

.rate-stars i:hover {
    color: var(--accent-color);
}

.recent-trend {
    margin-bottom: 30px;
}

.recent-trend h4 {
    margin-bottom: 15px;
}

.trend-ratings {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 10px;
    scrollbar-width: thin;
}

.trend-ratings::-webkit-scrollbar {
    height: 5px;
}

.trend-ratings::-webkit-scrollbar-thumb {
    background-color: var(--border-color);
    border-radius: 5px;
}

.trend-rating-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: var(--background-light);
    padding: 12px 15px;
    border-radius: 8px;
    min-width: 50px;
    transition: transform 0.2s ease;
}

.trend-rating-item:hover {
    transform: translateY(-2px);
}

.trend-score {
    font-weight: 600;
    margin-bottom: 5px;
}

.trend-rating-item i {
    color: var(--accent-color);
}

.user-reviews h4 {
    margin-bottom: 15px;
}

.review-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.filter-btn {
    background-color: var(--background-light);
    border: none;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-btn.active {
    background-color: var(--primary-light);
    color: var(--primary-dark);
    font-weight: 600;
}

.review-item {
    border-bottom: 1px solid var(--border-color);
    padding: 15px 0;
    margin-bottom: 15px;
}

.reviewer-info {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
    flex-wrap: wrap;
    gap: 10px;
}

.reviewer-avatar {
    width: 40px;
    height: 40px;
    background-color: var(--primary-light);
    border-radius: 50%;
    flex-shrink: 0;
}

.reviewer-details {
    flex: 1 1 auto;
}

.reviewer-name {
    margin: 0;
    font-size: 16px;
}

.review-count {
    margin: 0;
    font-size: 12px;
    color: var(--text-light);
}

.review-date {
    font-size: 14px;
    color: var(--text-light);
}

.review-rating {
    margin-bottom: 8px;
}

.review-rating i {
    color: var(--accent-color);
}

.review-text {
    margin: 0;
    line-height: 1.6;
}

/* WhatsApp CTA */
.whatsapp-cta {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    background-color: #F0F2F5;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    gap: 15px;
}

.cta-content h3 {
    margin: 0;
    font-size: 16px;
    color: var(--text-light);
}

.cta-content h2 {
    margin: 5px 0;
    color: var(--text-dark);
    font-weight: 600;
}

.cta-content h2 span {
    color: var(--whatsapp-green);
}

.cta-action {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.message-field {
    display: flex;
    align-items: center;
    background-color: white;
    padding: 8px 15px;
    border-radius: 25px;
    border: 1px solid #E0E0E0;
    flex: 1;
    min-width: 200px;
}

.wa-icon {
    width: 20px;
    height: 20px;
    margin-right: 10px;
    flex-shrink: 0;
}

.message-field input {
    border: none;
    outline: none;
    width: 100%;
    font-size: 14px;
}

.send-btn {
    background-color: var(--whatsapp-green);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
    white-space: nowrap;
}

.send-btn:hover {
    background-color: #128C7E;
}

/* No post found */
.no-post-found {
    text-align: center;
    padding: 60px 0;
    background-color: var(--background-white);
    border-radius: 10px;
    box-shadow: 0 2px 10px var(--shadow-color);
}

.no-post-found i {
    font-size: 48px;
    color: var(--primary-light);
    margin-bottom: 15px;
}

.no-post-found h3 {
    font-size: 24px;
    color: var(--text-dark);
    margin-bottom: 10px;
}

.no-post-found p {
    color: var(--text-light);
}

/* Modal styling */
.modal-content {
    border-radius: 15px;
    overflow: hidden;
    border: none;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.modal-header {
    background-color: var(--primary-color);
    color: white;
    padding: 15px 25px;
    border-bottom: none;
}

.modal-title {
    font-family: var(--font-primary);
    font-weight: 600;
}

.btn-close {
    background-color: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
}

.modal-body {
    padding: 25px;
}

.form-label {
    color: var(--text-dark);
    font-weight: 500;
    margin-bottom: 5px;
}

.form-control {
    border-radius: 8px;
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    transition: border-color 0.3s ease;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.create_inquiry {
    background-color: var(--primary-color);
    border: none;
    border-radius: 8px;
    padding: 12px 25px;
    font-weight: 600;
    transition: all 0.3s ease;
    width: 100%;
    margin-top: 10px;
}

.create_inquiry:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
}

/* Toast notification styling */
.toast-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 300px;
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.15);
    overflow: hidden;
    z-index: 9999;
    opacity: 0;
    transform: translateY(-20px);
    transition: all 0.3s ease;
}

.toast-notification.show {
    opacity: 1;
    transform: translateY(0);
}

.toast-notification .toast-header {
    padding: 12px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #eee;
}

.toast-notification.success .toast-header {
    background-color: #E8F5E9;
    color: #388E3C;
}

.toast-notification.error .toast-header {
    background-color: #FFEBEE;
    color: #D32F2F;
}

.toast-notification .toast-body {
    padding: 15px;
}

.toast-notification .toast-close {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    opacity: 0.7;
}

.toast-notification .toast-close:hover {
    opacity: 1;
}

/* Form validation */
.form-control.is-invalid {
    border-color: #dc3545;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%23dc3545' viewBox='0 0 12 12'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

.invalid-feedback {
    display: block;
    width: 100%;
    margin-top: 0.25rem;
    font-size: 0.875em;
    color: #dc3545;
}

/* Accessibility improvements */
.btn:focus, .form-control:focus, .action-btn:focus, .quick-link:focus, .tab-item:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Responsive Media Queries */
@media (max-width: 992px) {
    .vendor-title {
        font-size: 26px;
    }
    
    .rating-summary {
        gap: 15px;
    }
}

@media (max-width: 768px) {
    .action-buttons {
        flex-direction: column;
    }
    
    .action-btn {
        flex: 1 1 100%;
    }
    
    .gallery-item.featured {
        grid-column: span 2;
        grid-row: span 1;
    }
    
    .card-section {
        padding: 20px;
    }
    
    .section-title {
        font-size: 20px;
    }
}

@media (max-width: 576px) {
    .vendor-rating {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .rating-badge {
        margin-bottom: 5px;
    }
    
    .vendor-meta {
        flex-direction: column;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .gallery-item.featured {
        grid-column: span 2;
    }
    
    .reviewer-info {
        flex-wrap: wrap;
    }
    
    .review-date {
        width: 100%;
        margin-top: 5px;
    }
    
    .quick-links {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .tab-item {
        padding: 12px 16px;
        font-size: 14px;
    }
    
    .send-btn {
        padding: 10px 15px;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    body.dark-mode-enabled {
        --text-dark: #f5f5f5;
        --text-light: #b0b0b0;
        --background-white: #2d2d2d;
        --background-light: #1a1a1a;
        --border-color: #444;
        --shadow-color: rgba(0, 0, 0, 0.2);
    }
}

/* Animation effects */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.fade-in {
    animation: fadeIn 0.5s ease-in-out;
}

/* Print styles */
@media print {
    .vendor-actions-section,
    .whatsapp-cta,
    .upload-photos-btn,
    .vendor-tabs-section {
        display: none !important;
    }
    
    .card-section {
        box-shadow: none;
        border: 1px solid #ddd;
        break-inside: avoid;
    }
}