/* Vendor Tab Styles */
.vendor-tab-btn:hover {
    color: #ff3c3c !important;
    background: rgba(255, 60, 60, 0.05);
}

.vendor-tab-btn.active {
    color: #ff3c3c !important;
    border-bottom-color: #ff3c3c !important;
    background: rgba(255, 60, 60, 0.05);
}

/* Feed Styles (reuse from freelancer.php) */
.freelancer-feed-container {
    max-width: 100%;
    width: 100%;
    margin: 0;
    padding: 0 20px;
}

@media (min-width: 992px) {
    .freelancer-feed-container {
        padding: 0 300px;
    }
}

@media (min-width: 768px) and (max-width: 991px) {
    .freelancer-feed-container {
        padding: 0 60px;
    }
}

.freelancer-feed-posts-list {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.freelancer-feed-post-card {
    background: #ffffff;
    border-radius: 20px;
    padding: 28px 32px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06), 0 1px 4px rgba(0, 0, 0, 0.04);
    border: 1px solid #f0f0f0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.freelancer-feed-post-card:hover {
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1), 0 2px 8px rgba(0, 0, 0, 0.06);
    transform: translateY(-3px);
    border-color: #e8ecef;
}

.freelancer-feed-post-header {
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    position: relative;
}

.freelancer-feed-post-author {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.freelancer-feed-author-avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #f0f0f0;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    color: #6c757d;
    font-size: 1.1rem;
}

.freelancer-feed-author-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.freelancer-feed-author-name {
    color: #2c3e50;
    font-size: 1rem;
    font-weight: 600;
}

.freelancer-feed-post-date {
    color: #6c757d;
    font-size: 0.875rem;
}

.freelancer-feed-post-body {
    margin-top: 15px;
}

.freelancer-feed-post-text {
    color: #495057;
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: 15px;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.freelancer-feed-post-image {
    margin: 18px 0;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.freelancer-feed-post-image img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s ease;
}

.freelancer-feed-post-image:hover img {
    transform: scale(1.02);
}

.freelancer-feed-post-video {
    margin: 18px 0;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.freelancer-feed-post-video.horizontal-video {
    max-width: 100%;
}

.freelancer-feed-post-video.horizontal-video iframe {
    width: 100%;
    height: 400px;
    border-radius: 18px;
    display: block;
}

.freelancer-feed-post-video.vertical-video {
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

/* Like and Repost Button Styles */
.freelancer-feed-post-actions-bar {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #f0f0f0;
}

.freelancer-feed-like-btn,
.freelancer-feed-repost-btn {
    background: none;
    border: none;
    color: #6c757d;
    font-size: 0.95rem;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 8px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.freelancer-feed-like-btn:hover,
.freelancer-feed-repost-btn:hover {
    background: #f8f9fa;
    color: #2c3e50;
}

.freelancer-feed-like-btn.liked {
    color: #ff3c3c;
}

.freelancer-feed-like-btn.liked i {
    color: #ff3c3c;
}

.freelancer-feed-like-btn:disabled,
.freelancer-feed-repost-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.freelancer-feed-repost-btn:hover {
    color: #ff3c3c;
}

.freelancer-feed-repost-badge {
    padding: 8px 16px;
    margin-bottom: 12px;
    background: #f8f9fa;
    border-radius: 8px;
    font-size: 0.875rem;
    color: #6c757d;
}

.freelancer-feed-repost-badge a {
    color: #ff3c3c;
    text-decoration: none;
    font-weight: 600;
}

.freelancer-feed-repost-badge a:hover {
    text-decoration: underline;
}

@media (max-width: 767px) {
    .freelancer-feed-container {
        padding: 0 15px;
    }
    
    .freelancer-feed-post-card {
        padding: 20px;
    }
    
    .vendor-tab-btn {
        padding: 15px 20px;
        font-size: 0.9rem;
    }
}

/* Modern Vendor Listing Styles */
.main-content {
    padding: 2rem 0;
}

/* Product Card Wrapper */
.product-card-wrapper {
    height: 100%;
    margin-bottom: 1.5rem;
}

.product-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
    height: 100%;
}

.product-card-link:hover {
    text-decoration: none;
    color: inherit;
}

/* Product Card */
.product-card {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    border: 1px solid #f0f0f0;
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.15);
    border-color: #e0e0e0;
}

/* Product Image Container - Responsive Aspect Ratio */
.product-image-container {
    position: relative;
    width: 96%;
    aspect-ratio: 4/3; /* Default 4:3 for desktop/tablet */
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    border: 1px solid #f0f0f0;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    margin: 8px;
}

/* Mobile view - 1:2 aspect ratio (portrait) */
@media (max-width: 576px) {
    .product-image-container {
        aspect-ratio: 3/4; /* 3:4 ratio for mobile (xs and sm) */
    }
}

.product-image {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    object-position: center;
    transition: transform 0.3s ease;
    border-radius: 8px;
}

.product-card:hover .product-image {
    transform: scale(1.05);
}

.product-image-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    color: #6c757d;
    border-radius: 12px;
    margin: 8px;
    padding: 16px;
}

.product-image-placeholder i {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.product-image-placeholder span {
    font-size: 0.9rem;
    font-weight: 500;
}

/* Listing Type Badge */
.listing-type-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2;
}

.badge {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.rental-badge {
    background: #FF0000;
    color: white;
    box-shadow: 0 2px 4px rgba(255, 0, 0, 0.3);
}

.product-badge {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
}

/* Product Info */
.product-info {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.vendor-profile-pic {
    border: 1px solid #ff3c3c;
    box-sizing: border-box;
}

.vendor-reviewer-avatar-wrap {
    flex-shrink: 0;
}

.vendor-reviewer-avatar-link {
    display: block;
    line-height: 0;
    text-decoration: none;
}

.vendor-reviewer-avatar {
    width: 48px;
    height: 48px;
    min-width: 48px;
    min-height: 48px;
    max-width: 48px;
    max-height: 48px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
    border: 2px solid #f0f0f0;
    box-sizing: border-box;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.vendor-reviewer-avatar-link:hover .vendor-reviewer-avatar {
    border-color: #ff3c3c;
    box-shadow: 0 2px 8px rgba(255, 60, 60, 0.15);
}

.vendor-reviewer-avatar--placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    font-size: 1.1rem;
}

/* Reviews section */
.vendor-review-login-alert {
    border-radius: 12px;
    --bs-alert-color: #991b1b;
    --bs-alert-bg: #fff5f5;
    --bs-alert-border-color: #fecaca;
    --bs-alert-link-color: #ff3c3c;
    --bs-alert-link-hover-color: #e03333;
    background-color: var(--bs-alert-bg);
    border-color: var(--bs-alert-border-color);
    color: var(--bs-alert-color);
}

.vendor-review-login-link,
.vendor-reviewer-name-link {
    color: #ff3c3c;
    font-weight: 600;
    text-decoration: none;
}

.vendor-review-login-link:hover,
.vendor-reviewer-name-link:hover {
    color: #e03333;
    text-decoration: underline;
}

.vendor-reviews-section {
    margin-top: 8px;
}

.vendor-reviews-heading {
    color: #2c3e50;
    font-weight: 600;
    margin-bottom: 24px;
}

.vendor-reviews-list {
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.vendor-review-item {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.vendor-review-meta {
    display: flex;
    align-items: center;
    gap: 12px;
}

.vendor-reviewer-details {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.vendor-reviewer-name {
    font-weight: 600;
    color: #2c3e50;
    font-size: 1rem;
}

.vendor-review-date {
    color: #6c757d;
    font-size: 0.85rem;
}

.vendor-review-body-box {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 14px;
    padding: 18px 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
}

.vendor-review-text {
    color: #495057;
    line-height: 1.65;
    margin: 0;
    word-wrap: break-word;
    font-size: 0.975rem;
}

.vendor-reviews-empty {
    background: #fff;
    border: 1px dashed #dee2e6;
    border-radius: 14px;
}

.vendor-review-item.profile-review-item--highlight .vendor-review-body-box,
.freelancer-review-card.profile-review-item--highlight {
    animation: cgReviewHighlight 2.4s ease-out;
}

@keyframes cgReviewHighlight {
    0%, 35% { box-shadow: 0 0 0 3px rgba(255, 60, 60, 0.38); }
    100% { box-shadow: none; }
}

@media (max-width: 576px) {
    .vendor-review-body-box {
        padding: 14px 16px;
    }

    .vendor-reviews-list {
        gap: 22px;
    }
}

.vendor-top-container {
    /* desktop defaults kept inline; override on mobile below */
}

.vendor-tab-btn {
    font-size: 0.95rem;
}
.vendor-tab-btn i {
    font-size: 0.9rem;
}
.vendor-tab-btn-reviews .badge {
    font-size: 0.7rem;
    padding: 0.25rem 0.5rem;
}

@media (max-width: 576px) {
    .product-info {
        padding: 0.9rem 0.85rem 0.8rem;
        gap: 0.35rem;
    }
    .product-title {
        font-size: 0.95rem;
        min-height: auto;
        margin-bottom: 0;
    }
    .price-section {
        margin-top: 0.4rem;
    }
}

/* Mobile layout: match home/landing card feel (tight, 2-up grid, 3:4 tile) */
@media (max-width: 576px) {
    .vendor-top-container {
        margin-top: 30px !important;
    }

    .vendor-hero {
        flex-direction: column !important;
        align-items: center !important;
        text-align: center !important;
        gap: 0.85rem !important;
    }
    .vendor-hero-info {
        width: 100% !important;
        text-align: center !important;
    }
    .message-vendor-btn-wrap {
        width: 100% !important;
        justify-content: center !important;
    }
    .message-vendor-btn-wrap .btn {
        width: 100% !important;
        justify-content: center !important;
    }
    .vendor-hero .flex-shrink-0 {
        width: 100%;
        display: flex;
        justify-content: center;
    }

    .vendor-tab-content .row.g-4 {
        margin-left: 0 !important;
        margin-right: 0 !important;
        gap: 6px 6px !important;
    }
    .vendor-tab-content .row.g-4 > [class*="col-"] {
        padding-left: 0 !important;
        padding-right: 0 !important;
        flex: 0 0 calc((100% - 6px) / 2) !important;
        max-width: calc((100% - 6px) / 2) !important;
    }
    .product-card-wrapper {
        height: 100%;
        margin-bottom: 0.75rem;
    }
    .product-card {
        height: 100%;
        border-radius: 12px;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    }
    .product-image-container {
        width: 100%;
        margin: 0;
        padding: 6px;
        aspect-ratio: 3/4;
    }
    .product-info {
        padding: 0.6rem 0.65rem 0.5rem;
        gap: 0.25rem;
    }
    .product-title {
        font-size: 0.9rem;
        min-height: auto;
        margin-bottom: 0;
        line-height: 1.3;
    }
    .product-description {
        font-size: 0.78rem;
        margin: 0 0 0.15rem;
    }
    .vendor-info {
        display: none !important;
    }
    .price-section {
        margin-top: 0.2rem;
    }
    .price {
        font-size: 1rem;
    }
}

.product-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 0.75rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.8rem;
}

.vendor-info {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
    color: #6c757d;
}

.vendor-info i {
    font-size: 1rem;
    margin-right: 0.5rem;
    color: #95a5a6;
}

.vendor-name {
    font-size: 0.9rem;
    font-weight: 500;
}

.price-section {
    margin-bottom: 1.25rem;
}

.price {
    display: flex;
    align-items: baseline;
    gap: 0.25rem;
}

.currency {
    font-size: 1rem;
    font-weight: 600;
    color: #27ae60;
}

.amount {
    font-size: 1.4rem;
    font-weight: 700;
    color: #27ae60;
    line-height: 1;
}

.period {
    font-size: 0.9rem;
    color: #7f8c8d;
    font-weight: 500;
}


/* Empty State */
.empty-state {
    padding: 4rem 2rem;
    text-align: center;
}

.empty-state i {
    opacity: 0.6;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .product-image-container {
        padding: 14px;
        margin: 6px;
    }
}

@media (max-width: 768px) {
    .product-image-container {
        padding: 12px;
        margin: 4px;
    }
    
    .product-info {
        padding: 1.25rem;
    }
    
    .product-title {
        font-size: 1rem;
        min-height: 2.4rem;
    }
    
    .amount {
        font-size: 1.2rem;
    }
}

/* Mobile 3-column layout (xs and sm) */
@media (max-width: 576px) {
    .product-image-container {
        padding: 8px;
        margin: 2px;
    }
    
    .product-info {
        padding: 0.75rem;
    }
    
    .product-title {
        font-size: 0.9rem;
        min-height: 2.2rem;
        line-height: 1.3;
    }
    
    .vendor-info {
        margin-bottom: 0.75rem;
    }
    
    .vendor-name {
        font-size: 0.8rem;
    }
    
    .amount {
        font-size: 1.1rem;
    }
    
    .currency {
        font-size: 0.9rem;
    }
    
    .period {
        font-size: 0.8rem;
    }
    
    .badge {
        font-size: 0.65rem;
        padding: 0.25rem 0.5rem;
    }
}

/* Extra small screens - ensure 3 columns */
@media (max-width: 400px) {
    .product-image-container {
        padding: 6px;
        margin: 1px;
    }
    
    .product-info {
        padding: 0.5rem;
    }
    
    .product-title {
        font-size: 0.85rem;
        min-height: 2rem;
    }
    
    .badge {
        font-size: 0.6rem;
        padding: 0.2rem 0.4rem;
    }
}

/* Grid Spacing */
.row.g-4 > * {
    padding-right: calc(var(--bs-gutter-x) * 0.5);
    padding-left: calc(var(--bs-gutter-x) * 0.5);
    margin-bottom: calc(var(--bs-gutter-y));
}

/* Mobile 3-column specific spacing */
@media (max-width: 576px) {
    .row.g-4 {
        --bs-gutter-x: 0.75rem;
        --bs-gutter-y: 1rem;
    }
    
    .row.g-4 > * {
        padding-right: calc(var(--bs-gutter-x) * 0.5);
        padding-left: calc(var(--bs-gutter-x) * 0.5);
        margin-bottom: calc(var(--bs-gutter-y));
    }
}

/* Extra small screens spacing */
@media (max-width: 400px) {
    .row.g-4 {
        --bs-gutter-x: 0.5rem;
        --bs-gutter-y: 0.75rem;
    }
}

/* Smooth animations */
* {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Remove focus/active outlines - clean professional look */
.product-card-link:focus,
.product-card-link:active,
.product-card-link:focus-visible {
    outline: none !important;
    box-shadow: none !important;
}

.product-card-link:focus .product-card,
.product-card-link:active .product-card {
    /* Keep hover effect only */
}
