/* ======================================================================
   🎨 CSS STYLES - v4.5 (Product Image Gallery Update)
   ====================================================================== */
:root {
    --primary-color: #0d6efd;
    --primary-hover: #0b5ed7;
    --secondary-color: #6c757d;
    --secondary-hover: #5c636a;
    --success-color: #198754;
    --info-color: #0dcaf0;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --light-color: #f8f9fa;
    --dark-color: #212529;
    --text-primary: #212529;
    --text-secondary: #6c757d;
    --bg-body: #ffffff;
    --bg-white: #ffffff;
    --border-color: #e9ecef;
    --border-radius: 0.75rem;
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 8px 25px rgba(0, 0, 0, 0.15);
    --heading-font: 'Poppins', sans-serif;
    --body-font: 'Roboto', sans-serif;
    --header-height: 60px;
    --bottom-nav-height: 65px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    font-family: var(--body-font);
    margin: 0;
    background-color: var(--bg-body);
    color: var(--text-primary);
    line-height: 1.6;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    width: 100%;
    padding: 0 1rem;
}

.page-wrapper {
    padding-top: var(--header-height);
    padding-bottom: calc(var(--bottom-nav-height) + 1rem);
}

a {
    color: var(--primary-color);
    text-decoration: none;
}

a:hover {
    color: var(--primary-hover);
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--heading-font);
    color: var(--dark-color);
    margin-top: 0;
    margin-bottom: 0.75rem;
    font-weight: 600;
}

h1 {
    font-size: 1.8rem;
    padding: 1rem 1rem 0 1rem;
}

h2 {
    font-size: 1.5rem;
}

h3 {
    font-size: 1.25rem;
}

.main-header {
    background: var(--bg-white);
    height: var(--header-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--border-color);
    padding: 0 1rem;
}

.main-header .logo {
    display: flex;
    align-items: center;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary-color);
}

.main-header .logo img {
    max-height: 40px;
    width: auto;
}

.main-header .header-actions a {
    font-size: 1.6rem;
    color: var(--text-secondary);
}

.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: var(--bottom-nav-height);
    background: var(--bg-white);
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-around;
    align-items: stretch;
    z-index: 1000;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.06);
}

.bottom-nav a {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex-grow: 1;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.7rem;
    transition: color 0.2s;
    gap: 4px;
}

.bottom-nav a i {
    font-size: 1.4rem;
}

.bottom-nav a.active,
.bottom-nav a:hover {
    color: var(--primary-color);
}

.btn {
    display: inline-block;
    padding: 0.7rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    border: 1px solid transparent;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: var(--heading-font);
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--bg-white) !important;
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: var(--secondary-color);
    color: var(--bg-white) !important;
    border-color: var(--secondary-color);
}

.btn-danger {
    background-color: var(--danger-color);
    color: var(--bg-white) !important;
    border-color: var(--danger-color);
}

.btn-success {
    background-color: var(--success-color);
    color: var(--bg-white) !important;
    border-color: var(--success-color);
}

.btn-info {
    background-color: var(--info-color);
    color: var(--bg-white) !important;
    border-color: var(--info-color);
}

.btn-logout {
    background-color: var(--danger-color);
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-weight: bold;
}

.btn-outline-primary {
    background-color: transparent;
    color: var(--primary-color) !important;
    border-color: var(--primary-color);
}

.btn-outline-primary:hover {
    background-color: var(--primary-color);
    color: var(--bg-white) !important;
}

.card {
    background: var(--bg-white);
    border-radius: var(--border-radius);
    padding: 1rem;
    margin: 0 1rem 1rem 1rem;
    box-shadow: var(--shadow-sm);
}

.homepage-content-wrapper {
    padding: 0 1rem;
}

.homepage-cta-cards {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.5rem;
}

.cta-card {
    text-align: center;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.cta-icon {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

.cta-title {
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.cta-desc {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 0.8rem;
    line-height: 1.3;
}

.cta-btn {
    font-size: 0.8rem;
    padding: 0.5rem 0.8rem;
    margin-top: auto;
}

@media (min-width: 768px) {


    .homepage-cta-cards {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
        max-width: 1200px;
        margin: 2rem auto 0 auto;
    }

    .cta-card {
        padding: 2rem;
    }

    .cta-icon {
        font-size: 3rem;
        margin-bottom: 1rem;
    }

    .cta-title {
        font-size: 1.5rem;
        margin-bottom: 1rem;
    }

    .cta-desc {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }

    .cta-btn {
        font-size: 1rem;
        padding: 0.7rem 1.5rem;
    }

    .homepage-content-wrapper {
        max-width: 1200px;
        margin: 0 auto;
    }

    .homepage-content-wrapper .listing-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-primary);
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="number"],
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
    background-color: var(--light-color);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    background-color: var(--bg-white);
    box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.25);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

select:disabled {
    background-color: #e9ecef;
    opacity: 1;
}

.message-banner {
    padding: 1rem;
    margin: 1rem;
    border-radius: var(--border-radius);
    color: var(--bg-white);
    text-align: center;
}

.message-success {
    background-color: var(--success-color);
}

.message-error {
    background-color: var(--danger-color);
}

.message-info {
    background-color: var(--info-color);
    color: var(--dark-color);
}

.message-warning {
    background-color: #ffc107;
    color: #212529;
    /* Dark text for contrast on yellow */
}

.listing-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    padding: 1rem;
}

@media (min-width: 600px) {
    .listing-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }
}

.item-card {
    background: var(--bg-white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    position: relative;
    padding: 1.5rem;
    transition: transform 0.2s, box-shadow 0.2s;
}

.item-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

.item-card .item-image-wrapper {
    width: 80px;
    height: 80px;
    margin: 0 auto 1rem;
    border-radius: 50%;
    border: 3px solid var(--bg-white);
    box-shadow: var(--shadow-sm);
    background-color: var(--light-color);
    display: flex;
    align-items: center;
    justify-content: center;
}

.item-card .item-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.item-card h3 {
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
    text-align: center;
}

.item-card .location {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    font-size: 0.85rem;
}

.item-card .rating-display {
    text-align: center;
    color: var(--warning-color);
    margin-bottom: 1rem;
}

.item-card .tag-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-top: auto;
    padding-top: 1rem;
}

.item-card .tag {
    background: #e9ecef;
    color: var(--text-secondary);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
}

.boosted-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--warning-color);
    color: var(--dark-color);
    padding: 4px 8px;
    font-size: 0.7rem;
    font-weight: 700;
    border-radius: var(--border-radius);
}



.single-item-page {
    padding: 0;
}

.single-item-page h1 {
    text-align: center;
    font-size: 1.5rem;
    padding: 0;
}



.single-item-page .content-section {
    margin-bottom: 2rem;
}

.single-item-page .content-section h3 {
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}

.product-image-zoomable {
    cursor: zoom-in;
}

@media (min-width: 768px) {
    .single-item-page.product-detail-page {
        max-width: 960px;
        margin: 0 auto;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
        align-items: start;
    }

    .single-item-page.product-detail-page .product-image-gallery-wrapper {
        grid-column: 1 / 2;
    }

    .single-item-page.product-detail-page .product-details-content {
        grid-column: 2 / 3;
    }

    .single-item-page.product-detail-page h1 {
        text-align: left;
    }
}

.tabs {
    display: flex;
    flex-wrap: wrap;
    border-bottom: 2px solid var(--border-color);
    margin-bottom: 1.5rem;
}

.tabs a {
    padding: 0.75rem 1.25rem;
    color: var(--text-secondary);
    font-weight: 600;
    border-bottom: 3px solid transparent;
    white-space: nowrap;
}

.tabs a.active,
.tabs a:hover {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeInContent 0.5s;
}

@keyframes fadeInContent {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#tab-products .listing-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
}

.product-card {
    padding: 0;
    text-align: left;
    display: flex;
    flex-direction: column;
}

.product-card-image_wrapper {
    width: 100%;
    aspect-ratio: 4 / 3;
    background-color: var(--light-color);
    border-radius: var(--border-radius) var(--border-radius) 0 0;
    overflow: hidden;
}

.product-card-image_wrapper img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background-color: var(--light-color);
}

.product-card .product-card-content {
    padding: 0.75rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.product-card .product-card-content h4 {
    margin: 0 0 0.5rem;
    font-size: 0.9rem;
    flex-grow: 1;
}

.product-card .product-card-content p {
    font-size: 1rem;
    font-weight: bold;
    color: var(--success-color);
    margin: 0;
}

/* NEW: Styles for thumbnail gallery */
.thumbnail-gallery {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.product-thumbnail {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border: 2px solid var(--border-color);
    border-radius: 0.5rem;
    cursor: pointer;
    transition: border-color 0.2s;
}

.product-thumbnail:hover {
    border-color: var(--secondary-color);
}

.product-thumbnail.active {
    border-color: var(--primary-color);
}

.dashboard-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.dashboard-list li a {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1rem 1.5rem;
    color: var(--text-primary);
    text-decoration: none;
    border-bottom: 1px solid var(--border-color);
    transition: background-color 0.2s;
}

.dashboard-list li a:hover {
    background-color: var(--light-color);
}

.dashboard-list li:last-child a {
    border-bottom: none;
}

.dashboard-list li a i {
    font-size: 1.4rem;
    width: 30px;
    text-align: center;
    color: var(--text-secondary);
}

.dashboard-list li a .fa-chevron-right {
    margin-left: auto;
    color: var(--border-color);
}

.rating-display .fa-star {
    font-size: 1.1em;
}

.rating-display .far {
    color: #ccc;
}

.review-card {
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 1rem;
    margin-bottom: 1rem;
}

.review-card .review-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.review-card .reviewer-name {
    font-weight: bold;
}

.star-rating-input {
    display: flex;
    flex-direction: row-reverse;
    justify-content: flex-end;
}

.star-rating-input input {
    display: none;
}

.star-rating-input label {
    font-size: 2rem;
    color: #ddd;
    cursor: pointer;
    transition: color 0.2s;
}

.star-rating-input input:checked~label,
.star-rating-input label:hover,
.star-rating-input label:hover~label {
    color: var(--warning-color);
}


/* Data Tables for Mobile */
.data-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-white);
}

.data-table thead {
    display: none;
}

.data-table tr {
    display: block;
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 0;
}

.data-table tr:last-child {
    border-bottom: none;
}

.data-table td {
    display: block;
    text-align: left !important;
    padding: 2px 0;
    border: none;
}

.data-table td::before {
    content: attr(data-label);
    font-weight: bold;
    color: var(--text-secondary);
    margin-right: 10px;
    display: inline-block;
    min-width: 100px;
}

.data-table .actions {
    margin-top: 10px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.data-table .actions .btn,
.data-table .actions button,
.data-table .actions a {
    padding: 5px 10px;
    font-size: 0.8em;
}

/* Admin Panel (desktop-focused) */
body.admin-mode {
    background-color: #f1f5f9;
}

/* ======================================================================
   BLOG STYLES
   ====================================================================== */

/* Blog Cards (Listing) */
.blog-card:hover .blog-card-image-wrapper img {
    transform: scale(1.05);
}

.blog-card:hover h3 {
    color: var(--primary-color);
    transition: color 0.2s;
}

/* Blog Post Detail Page */
.blog-post-full-content {
    font-size: 1.125rem;
    /* 18px */
    line-height: 1.8;
    color: #333;
    font-family: 'Merriweather', Georgia, serif;
    /* If available, or fallback */
}

.blog-post-full-content p {
    margin-bottom: 1.5rem;
}

.blog-post-full-content h2 {
    margin-top: 2.5rem;
    margin-bottom: 1.25rem;
    font-size: 1.8rem;
    color: var(--dark-color);
}

.blog-post-full-content h3 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.blog-post-full-content img {
    max-width: 100%;
    height: auto;
    border-radius: var(--border-radius);
    margin: 1.5rem 0;
    box-shadow: var(--shadow-sm);
}

.blog-post-full-content ul,
.blog-post-full-content ol {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

.blog-post-full-content blockquote {
    border-left: 4px solid var(--primary-color);
    padding-left: 1.5rem;
    margin: 2rem 0;
    font-style: italic;
    color: #555;
    background: var(--light-color);
    padding: 1rem 1rem 1rem 1.5rem;
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
}

/* Image Slider Improvements */
.image-slider-container {
    margin-bottom: 2rem;
    box-shadow: var(--shadow);
    border-radius: var(--border-radius);
    overflow: hidden;
    /* Ensure rounded corners clip content */
}

/* Specific fix for images INSIDE the slider to prevent double margins */
.image-slider-container .slide img {
    margin: 0;
    /* Override the generic .blog-post-full-content img margin */
    width: 100%;
    display: block;
    /* Removes bottom space caused by inline-block */
    border-radius: 0;
    /* Let container handle border radius */
    box-shadow: none;
    /* Remove shadow from individual images, container has it */
}

/* Mobile optimizations for blog post spacing */
@media (max-width: 768px) {
    .blog-post-full-content h2 {
        margin-top: 1.5rem;
        margin-bottom: 1rem;
        font-size: 1.5rem;
    }

    .image-slider-container {
        margin-bottom: 1rem;
    }

    .blog-post-full-content img {
        margin: 1rem 0;
        /* Reduce margin for non-slider images on mobile */
    }
}

.slider-btn {
    background: rgba(255, 255, 255, 0.8);
    color: var(--dark-color);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s;
}

.slider-btn:hover {
    background: #fff;
    color: var(--primary-color);
}

/* Comments Section */
.comment-card:last-child {
    border-bottom: none !important;
}

.admin-layout {
    min-height: 100vh;
    display: flex;
    align-items: flex-start;
}

.admin-sidebar {
    background: var(--dark-color);
    color: var(--light-color);
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    transition: transform 0.3s ease-in-out;
    z-index: 1100;
    flex: 0 0 260px;
    display: flex;
    flex-direction: column;
}

.admin-sidebar-header {
    flex-shrink: 0;
    text-align: center;
    padding: 1rem;
    margin-bottom: 1rem;
}

.admin-sidebar-header h1 {
    color: var(--light-color);
    font-size: 1.5rem;
}

.admin-sidebar-nav {
    flex-grow: 1;
    overflow-y: auto;
}

.admin-sidebar-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.admin-sidebar-nav li a {
    display: flex;
    align-items: center;
    padding: 0.9rem 1.5rem;
    color: #adb5bd;
    text-decoration: none;
    font-size: 0.95rem;
    gap: 1rem;
}

.admin-sidebar-nav li a:hover {
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--bg-white);
}

.admin-sidebar-nav li a.active {
    background-color: var(--primary-color);
    color: var(--bg-white);
    font-weight: 600;
}

.admin-sidebar-nav li a i {
    width: 20px;
    text-align: center;
    font-size: 1.1rem;
}

.admin-sidebar .logout-form-wrapper {
    flex-shrink: 0;
    padding: 1rem 0;
}

.admin-main-content {
    margin-left: 260px;
    padding: 2rem;
    background-color: #f1f5f9;
    min-height: 100vh;
    width: calc(100% - 260px);
}

.admin-page-header {
    margin-bottom: 2rem;
}

.admin-menu-toggle {
    display: none;
}

@media (max-width: 991px) {
    .admin-menu-toggle {
        display: block;
        position: fixed;
        top: 15px;
        left: 15px;
        z-index: 1200;
        background: var(--primary-color);
        color: white;
        padding: 8px 12px;
        border-radius: var(--border-radius);
        font-size: 1.2rem;
        border: none;
        cursor: pointer;
    }

    .admin-sidebar {
        transform: translateX(-260px);
    }

    .admin-sidebar.active {
        transform: translateX(0);
        box-shadow: var(--shadow-lg);
    }

    .admin-main-content {
        margin-left: 0;
        width: 100%;
    }

    .admin-main-content .data-table {
        border: 0;
    }

    .admin-main-content .data-table thead {
        display: none;
    }

    .admin-main-content .data-table tr {
        display: block;
        margin-bottom: 1rem;
        border-radius: var(--border-radius);
        border: 1px solid var(--border-color);
        box-shadow: var(--shadow-sm);
        background: var(--bg-white);
    }

    .admin-main-content .data-table td {
        display: block;
        padding: 0.75rem 1rem;
        text-align: right;
        border-bottom: 1px dotted var(--border-color);
    }

    .admin-main-content .data-table td::before {
        content: attr(data-label);
        float: left;
        font-weight: bold;
        text-transform: uppercase;
        font-size: 0.8em;
        color: var(--text-secondary);
    }

    .admin-main-content .data-table td:last-child {
        border-bottom: 0;
    }

    .admin-main-content .data-table .actions {
        justify-content: flex-end;
    }
}

/* Modal styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1050;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
    align-items: center;
    justify-content: center;
}

.modal.show {
    display: flex;
    flex-direction: column;
    padding: 1rem;
}

.modal-content {
    background-color: var(--bg-white);
    width: 100%;
    max-width: 550px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    position: relative;
    animation: fadeInModal 0.3s ease-out;
    display: flex;
    flex-direction: column;
}

@keyframes fadeInModal {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    flex-shrink: 0;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.4rem;
}

.modal-close-btn {
    font-size: 1.5rem;
    font-weight: bold;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-secondary);
    line-height: 1;
}

.modal-body {
    flex: 1 1 auto;
    padding-right: 15px;
    margin-right: -15px;
    overflow-y: auto;
}

.modal-footer {
    flex-shrink: 0;
    padding-top: 1.5rem;
    margin-top: 1.5rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
}

/* Image Zoom Modal Styles */
.image-zoom-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    z-index: 2000;
    justify-content: center;
    align-items: center;
}

.image-zoom-modal.show {
    display: flex;
}

.image-zoom-modal img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
}

.image-zoom-modal .close-zoom {
    position: absolute;
    top: 20px;
    right: 30px;
    color: #fff;
    font-size: 3rem;
    font-weight: bold;
    cursor: pointer;
}

/* Ultra-Compact Profile Header */
.profile-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 0.75rem 1rem !important;
    background: var(--bg-white);
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 1rem;
}

.profile-header-image {
    width: 100px !important;
    height: 100px !important;
    flex-shrink: 0;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.profile-header-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-header-details {
    flex-grow: 1;
}

.profile-header-details h1 {
    text-align: left !important;
    padding: 0 !important;
    margin: 0 !important;
    font-size: 1.5rem !important;
    line-height: 1.2 !important;
}

.profile-header-details .rating-display {
    text-align: left !important;
    margin: 0.1rem 0 !important;
    font-size: 0.85rem !important;
}

.profile-header-details .location {
    text-align: left !important;
    margin: 0 !important;
    font-size: 0.8rem !important;
    color: var(--text-secondary);
}

.profile-header-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.profile-header-actions .btn {
    padding: 0.3rem 0.8rem !important;
    font-size: 0.8rem !important;
}

@media (max-width: 768px) {
    .profile-header {
        flex-direction: row !important;
        align-items: flex-start !important;
        gap: 1rem !important;
        padding: 0.75rem !important;
    }

    .profile-header-image {
        width: 100px !important;
        height: 100px !important;
    }

    .profile-header-details h1 {
        font-size: 1.1rem !important;
        text-align: left !important;
    }

    .profile-header-details .rating-display,
    .profile-header-details .location {
        text-align: left !important;
    }

    .profile-header-actions {
        margin-top: 0.5rem;
    }
}

/* Compact Tabs */
.tabs {
    margin-bottom: 0.5rem !important;
}

.tabs a {
    padding: 0.5rem 1rem !important;
    font-size: 0.9rem !important;
}

.content-section {
    margin-bottom: 1rem !important;
}

.content-section h3 {
    margin-bottom: 0.5rem !important;
    font-size: 1.1rem !important;
}

/* Auth Divider */
.auth-divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 1.5rem 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid var(--border-color);
}

.auth-divider:not(:empty)::before {
    margin-right: 1rem;
}

.auth-divider:not(:empty)::after {
    margin-left: 1rem;
}

/* =========================================
   FIX: Data Table Responsive Styles
   (Overriding previous mobile-only defaults)
   ========================================= */

/* Desktop Defaults (Restore Table Layout) */
.data-table {
    display: table;
    width: 100%;
}

.data-table thead {
    display: table-header-group;
}

.data-table tbody {
    display: table-row-group;
}

.data-table tr {
    display: table-row;
    border-bottom: 1px solid var(--border-color);
}

.data-table td {
    display: table-cell;
    padding: 1rem;
    vertical-align: middle;
    border-bottom: 1px solid var(--border-color);
    text-align: left !important;
}

.data-table th {
    display: table-cell;
    text-align: left;
    padding: 1rem;
    border-bottom: 2px solid var(--border-color);
    background: #f8f9fa;
    color: var(--text-secondary);
    font-weight: 600;
}

.data-table td::before {
    display: none;
}

.data-table .actions {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-top: 0;
}

/* Mobile Responsive Override */
@media (max-width: 768px) {
    .data-table {
        display: block;
    }

    .data-table thead {
        display: none;
    }

    .data-table tr {
        display: block;
        border-bottom: 1px solid var(--border-color);
        padding: 1rem 0;
    }

    .data-table td {
        display: block;
        text-align: left !important;
        padding: 0.5rem 1rem;
        border: none;
    }

    .data-table td::before {
        content: attr(data-label);
        font-weight: bold;
        color: var(--text-secondary);
        margin-right: 10px;
        display: inline-block;
        min-width: 100px;
    }

    .data-table .actions {
        margin-top: 10px;
        justify-content: flex-start;
    }
}

/* Blog Post Page */
.single-item-page.blog-post-page {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 1rem;
    background: var(--bg-white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
}

.single-item-page.blog-post-page h1 {
    font-size: 2.2rem;
    margin-bottom: 0.5rem;
    padding: 0;
}

.blog-post-full-content {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-primary);
}

.blog-post-full-content img {
    margin: 2rem 0;
    max-height: 500px;
    width: auto;
    max-width: 100%;
    display: block;
    margin-left: auto;
    margin-right: auto;
    box-shadow: var(--shadow-sm);
}

/* Constrain video container */
.single-item-page.blog-post-page iframe,
.single-item-page.blog-post-page .video-wrapper {
    margin-top: 2rem;
    max-width: 100%;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
}

/* Blog Image Slider */
/* Blog Image Slider */
.image-slider-container {
    position: relative;
    max-width: 100%;
    margin-bottom: 2rem;
    overflow: hidden;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    background: var(--light-color);
    /* Light background for letterboxing */
}

.slider-wrapper {
    position: relative;
    width: 100%;
    padding-top: 56.25%;
    /* 16:9 Aspect Ratio */
    height: 0;
    /* Height is handled by padding */
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #000;
    /* Dark background enhances photo viewing */
}

.slide.active {
    opacity: 1;
    z-index: 1;
}

.slide img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    /* Let image define its own width up to max */
    height: auto;
    object-fit: contain;
    margin: 0 !important;
    /* Force no margin */
    display: block;
}

@media (max-width: 768px) {
    .image-slider-container {
        margin-bottom: 1rem;
    }

    /* Slightly taller aspect ratio for mobile might be better, or stick to 16:9 */
    .slider-wrapper {
        padding-top: 75%;
        /* 4:3 Aspect Ratio for mobile (taller) often better for mixed content */
    }
}

.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    padding: 1rem;
    cursor: pointer;
    z-index: 2;
    font-size: 1.5rem;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
}

.slider-btn:hover {
    background: rgba(0, 0, 0, 0.8);
}

.prev-slide {
    left: 10px;
}

.next-slide {
    right: 10px;
}

/* ======================================================================
   🔐 PREMIUM LOGIN PAGE STYLES
   ====================================================================== */
.login-wrapper {
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - var(--header-height) - var(--bottom-nav-height) - 4rem);
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    gap: 2rem;
}

.login-branding {
    text-align: center;
    max-width: 500px;
}

.login-logo-container {
    margin-bottom: 1.5rem;
}

.login-logo-container img {
    height: 100px;
    width: auto;
    filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.1));
}

.login-branding h1 {
    font-size: 2rem;
    color: var(--dark-color);
    margin-bottom: 1rem;
    font-weight: 800;
    line-height: 1.1;
}

.login-branding p {
    color: var(--text-secondary);
    font-size: 1.15rem;
    line-height: 1.6;
    margin-bottom: 2rem;
}

.login-features {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.login-features .feat {
    background: var(--light-color);
    padding: 0.6rem 1.2rem;
    border-radius: 50px;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--primary_color);
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.login-features .feat i {
    color: var(--success-color);
}

.login-card {
    background: var(--bg-white);
    padding: 3rem 2.5rem;
    border-radius: 2rem;
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 450px;
    text-align: center;
    border: 1px solid var(--border-color);
}

.login-card-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.login-card-subtitle {
    color: var(--text-secondary);
    font-size: 1rem;
    margin-bottom: 2.5rem;
}

.login-social-container {
    margin-bottom: 2rem;
    display: flex;
    justify-content: center;
}

.login-divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 2rem 0;
    color: var(--border-color);
}

.login-divider::before,
.login-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid var(--border-color);
}

.login-divider span {
    padding: 0 15px;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--secondary-color);
}

.login-bottom-info p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 1rem;
}

.register-link {
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: underline;
}

@media (max-width: 768px) {
    .login-wrapper {
        padding: 1.5rem 1rem;
        gap: 1.5rem;
    }

    .login-branding h1 {
        font-size: 1.4rem;
    }

    .login-branding p {
        font-size: 1rem;
        margin-bottom: 1rem;
    }

    .login-logo-container img {
        height: 80px;
    }

    .login-card {
        padding: 2rem 1.25rem;
        border-radius: 1.5rem;
    }

    .login-card-title {
        font-size: 1.6rem;
    }

    .login-card-subtitle {
        margin-bottom: 1.5rem;
    }

    .login-social-container {
        margin-bottom: 1.5rem;
    }

    .login-divider {
        margin: 1.5rem 0;
    }
}

@media (min-width: 992px) {
    .login-wrapper {
        flex-direction: row;
        gap: 6rem;
        text-align: left;
        padding: 4rem 2rem;
    }

    .login-branding {
        text-align: left;
    }

    .login-logo-container {
        margin-left: 0;
    }

    .login-features {
        justify-content: flex-start;
    }
}