/* ===== BUSINESS PROFILE STYLES ===== */

/* Global Styles */
* {
    box-sizing: border-box;
}

body {
    overflow-x: hidden;
    width: 100%;
}

/* Color Palette 1 - Calm, Rich, Premium, Relaxing */
:root {
    --primary-dark: #2c3e50;
    --primary-light: #34495e;
    --accent-teal: #1abc9c;
    --accent-gold: #f39c12;
    --text-primary: #2c3e50;
    --text-secondary: #7f8c8d;
    --bg-light: #f8f9fa;
    --bg-white: #ffffff;
    --border-light: #ecf0f1;
    --success: #27ae60;
    --warning: #e74c3c;
}

/* ===== LOADING & ERROR STATES ===== */
.loading-container,
.error-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 40px 20px;
    margin-top: 64px;
}

.loading-container {
    gap: 20px;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--border-light);
    border-top-color: var(--accent-teal);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.error-container {
    text-align: center;
}

.error-container h2 {
    font-size: 2rem;
    color: var(--text-primary);
    margin-bottom: 10px;
}

.error-container p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 30px;
}

.btn-primary {
    padding: 12px 24px;
    background: linear-gradient(135deg, var(--accent-teal) 0%, #16a085 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(26, 188, 156, 0.3);
}

.business-profile-container {
    animation: fadeIn 0.6s ease-out;
    width: 100%;
    box-sizing: border-box;
}

/* ===== HERO SECTION ===== */
.hero-section {
    position: relative;
    height: 300px;
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-light) 100%);
    overflow: hidden;
    margin-top: 64px;
    width: 100%;
    box-sizing: border-box;
}

@media (max-width: 480px) {
    .hero-section {
        height: 280px;
    }
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    opacity: 0.1;
    background-image: 
        radial-gradient(circle at 20% 50%, var(--accent-teal) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, var(--accent-gold) 0%, transparent 50%);
    animation: float 15s ease-in-out infinite;
}

.hero-content {
    position: relative;
    z-index: 1;
    height: 100%;
    display: flex;
    align-items: center;
    gap: 40px;
    padding: 40px;
    max-width: 1400px;
    margin: 0 auto;
}

@media (max-width: 480px) {
    .hero-content {
        gap: 16px;
        padding: 20px;
        flex-direction: column;
        justify-content: center;
    }
}

.hero-logo-section {
    flex-shrink: 0;
}

.hero-logo {
    width: 160px;
    height: 160px;
    object-fit: cover;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    border: 4px solid rgba(255, 255, 255, 0.2);
    animation: slideIn 0.6s ease-out;
}

@media (max-width: 480px) {
    .hero-logo {
        width: 100px;
        height: 100px;
        border-radius: 12px;
        border: 3px solid rgba(255, 255, 255, 0.2);
        box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
    }
}

.hero-text {
    flex: 1;
    color: white;
}

.business-name-hero {
    font-size: 3rem;
    font-weight: 800;
    font-family: 'Poppins', sans-serif;
    margin-bottom: 12px;
    text-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.6s ease-out;
}

@media (max-width: 480px) {
    .business-name-hero {
        font-size: 1.8rem;
        text-align: center;
        margin-bottom: 8px;
    }
}

.business-slogan {
    font-size: 1.3rem;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 300;
    margin-bottom: 20px;
    animation: slideUp 0.7s ease-out;
}

@media (max-width: 480px) {
    .business-slogan {
        font-size: 0.95rem;
        text-align: center;
        margin-bottom: 12px;
    }
}

.hero-rating {
    display: flex;
    align-items: center;
    gap: 12px;
    animation: slideUp 0.8s ease-out;
}

.stars {
    font-size: 1.3rem;
    letter-spacing: 2px;
}

#ratingText {
    color: rgba(255, 255, 255, 0.85);
    font-weight: 600;
}

/* ===== QUICK ACTION BUTTONS ===== */
.quick-actions {
    display: flex;
    gap: 12px;
    padding: 24px 40px;
    max-width: 1400px;
    margin: 0 auto;
    flex-wrap: wrap;
    background: var(--bg-light);
    border-bottom: 1px solid var(--border-light);
    width: 100%;
    box-sizing: border-box;
}

.action-btn-primary {
    flex: 1;
    min-width: 150px;
    padding: 14px 24px;
    background: linear-gradient(135deg, var(--accent-teal) 0%, #16a085 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 16px rgba(26, 188, 156, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: 'Inter', sans-serif;
}

.action-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(26, 188, 156, 0.35);
    background: linear-gradient(135deg, #16a085 0%, #138d75 100%);
}

.action-btn-primary:active {
    transform: translateY(0);
}

/* ===== PROFILE CONTAINER ===== */
.profile-container {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 40px;
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
    padding: 40px;
    box-sizing: border-box;
    overflow: hidden;
}

.profile-main {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

/* ===== SECTIONS ===== */
.gallery-section,
.description-section,
.services-section,
.hours-section,
.location-section,
.reviews-section {
    background: var(--bg-white);
    border-radius: 16px;
    padding: 32px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
    border: 1px solid var(--border-light);
    width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

.gallery-section h2,
.description-section h2,
.services-section h2,
.hours-section h2,
.location-section h2,
.reviews-section h2 {
    color: var(--primary-dark);
    font-size: 1.8rem;
    font-weight: 800;
    font-family: 'Poppins', sans-serif;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
}

/* ===== GALLERY ===== */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow: visible;
}

@media (max-width: 1024px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 14px;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        overflow: visible;
    }
}

@media (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        overflow: visible;
    }
}

@media (max-width: 480px) {
    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 10px;
        width: 100%;
        max-width: 100%;
        padding: 0;
        margin: 0;
        box-sizing: border-box;
        overflow: visible;
    }
}

.gallery-item {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
    border-radius: 10px;
    cursor: pointer;
    background: var(--bg-white);
    transition: all 0.3s ease;
    width: 100%;
    box-sizing: border-box;
    border: 2px solid var(--border-light);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    display: block;
}

.gallery-item:hover {
    border-color: var(--accent-teal);
    box-shadow: 0 4px 16px rgba(26, 188, 156, 0.15);
    transform: translateY(-4px);
}

@media (max-width: 480px) {
    .gallery-item {
        border-radius: 8px;
        border: 1.5px solid var(--border-light);
        aspect-ratio: 1;
    }
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
    display: block;
}

.gallery-item img:not([src]),
.gallery-item img[src=""] {
    display: none;
}

.gallery-item:hover img {
    transform: scale(1.08);
}

.gallery-item:hover::after {
    opacity: 1;
}

.gallery-item::after {
    content: '🔍';
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.4);
    color: white;
    font-size: 2rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* ===== DESCRIPTION ===== */
.business-description-text {
    color: var(--text-secondary);
    font-size: 1.05rem;
    line-height: 1.8;
    margin-bottom: 16px;
}

/* ===== SERVICES ===== */
.services-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
}

.service-item {
    padding: 16px;
    background: linear-gradient(135deg, rgba(26, 188, 156, 0.05) 0%, rgba(243, 156, 18, 0.05) 100%);
    border-radius: 12px;
    border-left: 4px solid var(--accent-teal);
    transition: all 0.3s ease;
}

.service-item:hover {
    transform: translateX(4px);
    box-shadow: 0 4px 12px rgba(26, 188, 156, 0.15);
}

.service-name {
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 4px;
}

.service-desc {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* ===== HOURS ===== */
.hours-grid {
    display: grid;
    gap: 12px;
}

.hour-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: var(--bg-light);
    border-radius: 8px;
    border-left: 4px solid var(--accent-teal);
}

.hour-day {
    font-weight: 600;
    color: var(--primary-dark);
    width: 100px;
}

.hour-time {
    color: var(--accent-teal);
    font-weight: 600;
}

.hour-closed {
    color: var(--warning);
}

/* ===== LOCATION ===== */
.location-content {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.location-text {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 16px;
    background: var(--bg-light);
    border-radius: 12px;
    border-left: 4px solid var(--accent-teal);
}

.location-text::before {
    content: '📍';
    font-size: 1.5rem;
    flex-shrink: 0;
}

.location-text p {
    margin: 0;
    color: var(--text-primary);
    line-height: 1.6;
}

.map-container {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

#businessMap {
    width: 100% !important;
    height: 300px !important;
    display: block;
}

/* ===== REVIEWS ===== */
.reviews-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 24px;
}

.review-item {
    padding: 20px;
    background: var(--bg-light);
    border-radius: 12px;
    border-left: 4px solid var(--accent-gold);
}

.review-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.review-name {
    font-weight: 700;
    color: var(--primary-dark);
}

.review-stars {
    color: var(--accent-gold);
    font-size: 0.9rem;
    letter-spacing: 1px;
}

.review-date {
    font-size: 0.85rem;
    color: var(--text-secondary);
    display: block;
    margin-bottom: 8px;
}

.review-text {
    color: var(--text-primary);
    line-height: 1.6;
}

.review-btn {
    padding: 12px 24px;
    background: linear-gradient(135deg, var(--accent-teal) 0%, #16a085 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.review-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(26, 188, 156, 0.3);
}

/* ===== SIDEBAR ===== */
.profile-sidebar {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.contact-card,
.social-card,
.category-badge,
.share-card {
    background: var(--bg-white);
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
    border: 1px solid var(--border-light);
}

.contact-card h3,
.social-card h3,
.share-card h3 {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--primary-dark);
    margin-bottom: 16px;
    font-family: 'Poppins', sans-serif;
}

.contact-items {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.contact-item {
    display: flex;
    gap: 12px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-light);
    align-items: flex-start;
}

.contact-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.contact-item .icon {
    font-size: 1.3rem;
    min-width: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-teal);
}

.contact-item div {
    flex: 1;
}

.contact-item .label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
    display: block;
}

.contact-link {
    font-weight: 600;
    color: var(--accent-teal);
    text-decoration: none;
    transition: all 0.3s ease;
    word-break: break-word;
    display: block;
}

.contact-link:hover {
    color: var(--accent-gold);
}

/* ===== CATEGORY BADGE ===== */
#businessCategory {
    display: inline-block;
    background: linear-gradient(135deg, var(--accent-teal) 0%, #16a085 100%);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.95rem;
}

/* ===== SOCIAL LINKS ===== */
.social-links {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.social-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: var(--bg-light);
    border-radius: 8px;
    text-decoration: none;
    color: var(--primary-dark);
    font-weight: 600;
    transition: all 0.3s ease;
}

.social-link:hover {
    background: var(--accent-teal);
    color: white;
    transform: translateX(4px);
}

/* ===== SHARE BUTTONS ===== */
.share-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.share-btn {
    padding: 12px 16px;
    background: linear-gradient(135deg, rgba(26, 188, 156, 0.1) 0%, rgba(22, 160, 133, 0.05) 100%);
    border: 1.5px solid var(--border-light);
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--accent-teal);
    font-size: 0.95rem;
    text-decoration: none;
    display: block;
    text-align: center;
}

.share-btn:hover {
    background: linear-gradient(135deg, rgba(26, 188, 156, 0.18) 0%, rgba(22, 160, 133, 0.12) 100%);
    border-color: var(--accent-teal);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(26, 188, 156, 0.15);
}

/* ===== MODAL ===== */
.modal {
    display: none !important;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex !important;
}

.modal-content {
    background: white;
    max-width: 500px;
    width: 90%;
    border-radius: 16px;
    padding: 32px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.4s ease-out;
}

.close-btn {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    font-size: 1.8rem;
    cursor: pointer;
    color: var(--text-secondary);
}

.modal-content h2 {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary-dark);
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-weight: 600;
    color: var(--primary-dark);
    margin-bottom: 8px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border-light);
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.star-rating {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
}

.star {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.star:hover {
    transform: scale(1.2);
}

.submit-btn {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, var(--accent-teal) 0%, #16a085 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(26, 188, 156, 0.3);
}

/* ===== IMAGE MODAL ===== */
.image-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 2500;
    align-items: center;
    justify-content: center;
}

.image-modal.active {
    display: flex;
}

.image-modal img {
    max-width: 100%;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 8px;
}

.image-nav-btn {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 1.8rem;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 2501;
}

.image-nav-prev {
    left: 16px;
}

.image-nav-next {
    right: 16px;
}

.image-nav-btn:hover {
    background: rgba(255, 255, 255, 0.35);
    transform: translateY(-50%) scale(1.08);
}

.image-counter {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.15);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 600;
}

/* ===== LOADING & ERROR ===== */
.loading-container,
.error-container {
    text-align: center;
    padding: 80px 40px;
    max-width: 1400px;
    margin: 0 auto;
}

.error-container {
    margin-top: 100px;
}

.error-container h2 {
    font-size: 2rem;
    color: var(--primary-dark);
    margin-bottom: 16px;
}

.error-container p {
    color: var(--text-secondary);
    margin-bottom: 24px;
    font-size: 1.05rem;
}

.btn-primary {
    padding: 12px 28px;
    background: linear-gradient(135deg, var(--accent-teal) 0%, #16a085 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
}

/* ===== ANIMATIONS ===== */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes float {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(20px, -10px); }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    .profile-container {
        grid-template-columns: 1fr;
        gap: 24px;
        padding: 24px;
    }

    .hero-section {
        height: 350px;
    }

    .hero-content {
        flex-direction: column;
        gap: 20px;
        padding: 24px;
        text-align: center;
    }

    .business-name-hero {
        font-size: 2rem;
    }

    .business-slogan {
        font-size: 1.1rem;
    }

    .hero-logo {
        width: 120px;
        height: 120px;
    }
}

@media (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .quick-actions {
        flex-direction: column;
        padding: 16px 20px;
    }

    .action-btn-primary {
        min-width: auto;
    }

    .services-list {
        grid-template-columns: 1fr;
    }

    .hero-section {
        height: 300px;
    }

    .business-name-hero {
        font-size: 1.8rem;
    }

    .profile-main,
    .gallery-section,
    .description-section,
    .services-section,
    .hours-section,
    .location-section,
    .reviews-section {
        padding: 20px;
        width: 100%;
        box-sizing: border-box;
    }

    .profile-sidebar {
        gap: 16px;
        width: 100%;
        box-sizing: border-box;
    }

    .contact-card,
    .social-card,
    .category-badge,
    .share-card {
        padding: 16px;
    }
}

@media (max-width: 480px) {
    .profile-container {
        width: 100%;
        max-width: 100%;
        padding: 16px;
        gap: 20px;
        box-sizing: border-box;
    }

    .hero-content {
        padding: 16px;
    }

    .hero-logo {
        width: 100px;
        height: 100px;
    }

    .business-name-hero {
        font-size: 1.4rem;
    }

    .business-slogan {
        font-size: 1rem;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
        width: 100%;
        max-width: 100%;
        padding: 0;
        margin: 0;
    }

    .gallery-item {
        width: 100%;
        max-width: 100%;
        aspect-ratio: auto;
        min-height: 300px;
        overflow: visible;
    }

    .quick-actions {
        flex-direction: column;
        padding: 12px 16px;
    }

    .action-btn-primary span {
        display: none;
    }

    .profile-main,
    .gallery-section,
    .description-section,
    .services-section,
    .hours-section,
    .location-section,
    .reviews-section {
        padding: 16px;
        width: 100%;
        box-sizing: border-box;
    }

    .profile-sidebar {
        width: 100%;
        box-sizing: border-box;
    }

    .modal-content {
        padding: 20px;
        width: 95%;
    }

    .image-nav-btn {
        width: 40px;
        height: 40px;
        font-size: 1.4rem;
    }

    .image-nav-prev {
        left: 8px;
    }

    .image-nav-next {
        right: 8px;
    }
}
