.psd-container {
    max-width: 80%;
    margin: 0 auto;
    /* Ensures the container is centered */
    padding: 20px;
    display: flex;
    /* Added flexbox for centering content within the container */
    flex-direction: column;
    /* Stacks content vertically */
    align-items: center;
    /* Centers items horizontally */
    background-color: #1b1b1b;
}

/* Header Navigation */
.psd-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 24px;
    font-size: 14px;
    color: #808080;
    width: 100%;
    /* Ensures breadcrumb takes full width to align its content */
    justify-content: center;
    /* Centers the breadcrumb items */
}

.psd-breadcrumb a {
    color: #ffa31a;
    text-decoration: none;
}

.psd-breadcrumb a:hover {
    text-decoration: underline;
}

/* Main Layout */
.psd-main-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 32px;
    margin-bottom: 48px;
    width: 100%;
    /* Ensures main layout takes full width within the container */
    max-width: 1400px;
    /* Added a max-width to prevent it from becoming too wide on very large screens */
}

/* Product Main Section */
.psd-product-main {
    background: #292929;
    border-radius: 16px;
    box-shadow: none;
    overflow: hidden;
}

/* Image Slider */
.psd-image-gallery {
    position: relative;
    width: 100%;
    /* Changed to 100% to be responsive within its column */
    height: 750px;
    overflow: hidden;
}

.psd-gallery-main-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: none;
    border-radius: 8px;
    cursor: pointer;
}

.psd-gallery-main-image.active {
    display: block;
}

.psd-gallery-nav {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    background: rgba(0, 0, 0, 0.5);
    padding: 8px 12px;
    border-radius: 20px;
}

.psd-gallery-nav-thumbnail {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.psd-gallery-nav-thumbnail.active,
.psd-gallery-nav-thumbnail:hover {
    border-color: #ffa31a;
    transform: scale(1.1);
}

.psd-product-badge {
    position: absolute;
    top: 16px;
    left: 16px;
    background: #ffa31a;
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    z-index: 10;
}

/* New styles for the favorite heart icon */
.psd-favorite-icon {
    position: absolute;
    top: 16px;
    right: 16px;
    font-size: 28px;
    /* Increased size for better visibility */
    color: #fff;
    /* Default color for empty heart */
    cursor: pointer;
    z-index: 10;
    text-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
    /* Add a subtle shadow for contrast */
    transition: color 0.2s ease, transform 0.2s ease;
    opacity: 0;
    /* Hidden by default */
}

/* Show heart icon on hover of the image gallery */
.psd-image-gallery:hover .psd-favorite-icon {
    opacity: 1;
}

.psd-favorite-icon:hover {
    transform: scale(1.2);
    /* Slightly enlarge on hover */
}

.psd-favorite-icon.favorited {
    color: #dc3545;
    /* Red for favorited state */
}


.psd-product-content {
    padding: 20px;
}

.psd-product-title {
    font-size: 32px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 16px;
    line-height: 1.2;
}

.psd-product-price {
    font-size: 36px;
    font-weight: 800;
    color: #dc2626;
    margin-bottom: 24px;
}

.psd-section-title {
    font-size: 24px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 16px;
}

/* Styles for "Single Ad Type" and "Vendor Logo + Listing Title" */
.psd-product-summary-header {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding-bottom: 16px;
}

.psd-product-summary-left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-grow: 1;
    min-width: 0;
    margin-top: 16px;
}

.psd-vendor-logo-small {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.psd-listing-display-title {
    font-size: 24px;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.2;
    word-wrap: break-word;
}

.psd-single-ad-type-display {
    background-color: #1b1b1b;
    color: #ffffff;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
}

.psd-ad-type-text {
    font-size: 16px;
    color: #808080;
    line-height: 1.7;
}

.psd-description-text {
    font-size: 16px;
    color: #808080;
    line-height: 1.7;
}

/* Vendor Info Card */
.psd-vendor-card {
    margin-top: 32px;
    padding: 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 16px;
    color: white;
}

.psd-vendor-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}

.psd-vendor-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, 0.3);
    object-fit: cover;
}

.psd-vendor-info h3 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 4px;
}

.psd-vendor-info p {
    opacity: 0.9;
    font-size: 14px;
}

.psd-vendor-contact {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.psd-contact-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    color: white;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.psd-contact-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

/* Sidebar */
.psd-sidebar {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.psd-sidebar-card {
    background: #292929;
    border-radius: 16px;
    box-shadow: none;
    overflow: hidden;
}

.psd-sidebar-header {
    padding: 0px 24px;
}

.psd-sidebar-title {
    font-size: 22px;
    font-weight: 700;
    color: #ffffff;
}

.psd-sidebar-content {
    padding-right: 24px;
}

/* Related Products (More from Vendor) */
.psd-related-item {
    display: flex;
    gap: 12px;
    padding: 12px;
    border-radius: 12px;
    transition: all 0.3s ease;
    text-decoration: none;
    color: inherit;
    margin-bottom: 12px;
}

.psd-related-item:hover {
    background: #1b1b1b;
    transform: translateX(4px);
}

.psd-related-image {
    width: 150px;
    height: 150px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
}

.psd-related-info h4 {
    font-size: 14px;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 4px;
    line-height: 1.3;
}

.psd-tags-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.psd-tag-btn {
    display: inline-flex;
    align-items: center;
    padding: 10px 18px;
    background: #1b1b1b;
    border: 3px solid #292929;
    border-radius: 8px;
    color: #808080;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    color: #808080;
}

.psd-tag-btn:hover {
    background: #ffa31a;
    color: white;
    border-color: #ffa31a;
    transform: translateY(-2px);
}

/* Similar Products Section */
.psd-similar-products {
    margin-top: 48px;
    width: 100%;
    /* Ensures similar products section takes full width */
    max-width: 1400px;
    /* Added max-width for consistency */
}

.psd-similar-products h2 {
    font-size: 28px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 32px;
    text-align: center;
}

.psd-products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    /* Changed to 4 columns on large screens */
    gap: 24px;
}

.psd-product-card {
    background: #292929;
    border-radius: 16px;
    box-shadow: none;
    overflow: hidden;
    transition: all 0.3s ease;
    text-decoration: none;
    color: inherit;
}

.psd-product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.psd-card-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: 8px;
}


/* New styles for vendor logo + title in similar products card */
.psd-vendor-title-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.psd-card-vendor-logo {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.psd-card-title-combined {
    font-size: 16px;
    font-weight: 600;
    color: #ffffff;
    line-height: 1.3;
    flex-grow: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Back Button */
.psd-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: #6b7280;
    color: white;
    border-radius: 88px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    margin-top: 32px;
}

.psd-back-btn:hover {
    background: #4b5563;
    transform: translateY(-2px);
}

/* Responsive Design */
@media (max-width: 1200px) {

    /* Adjusted breakpoint for 3 columns */
    .psd-products-grid {
        grid-template-columns: repeat(3, 1fr);
        /* 3 columns on medium-large screens */
    }
}

@media (max-width: 1024px) {
    .psd-main-layout {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .psd-sidebar {
        order: initial;
    }

    .psd-sidebar-card {
        display: block;
    }

    .psd-category-tags {
        display: block;
    }

    .psd-product-summary-header {
        align-items: flex-start;
        gap: 16px;
    }

    .psd-products-grid {
        grid-template-columns: repeat(2, 1fr);
        /* 2 columns on medium screens */
    }
}

/* New style for sidebar alignment on larger screens */
@media (min-width: 1025px) {
    .psd-sidebar {
        margin-top: 100px;
    }
}

@media (max-width: 768px) {
    .psd-container {
        padding: 16px;
    }

    .psd-product-content {
        padding: 24px;
    }

    .psd-product-title {
        font-size: 24px;
    }

    .psd-product-price {
        font-size: 28px;
    }

    .psd-vendor-header {
        flex-direction: column;
        text-align: center;
    }

    .psd-vendor-contact {
        justify-content: center;
    }

    .psd-products-grid {
        grid-template-columns: 1fr;
        /* Single column on small screens */
    }

    .psd-image-gallery {
        height: 350px;
    }

    .psd-gallery-nav-thumbnail {
        width: 40px;
        height: 40px;
    }

    .psd-listing-display-title {
        font-size: 20px;
    }
}

/* Message Styles */
.psd-message {
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 24px;
    font-weight: 500;
}

.psd-message.error {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.psd-message.success {
    background: #f0fdf4;
    color: #16a34a;
    border: 1px solid #bbf7d0;
}

/* === New CSS for a hypothetical Bottom Bar === */
.psd-bottom-bar {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: #1b1b1b;
    border-top: 1px solid #292929;
    padding: 10px 20px;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    justify-content: space-around;
    align-items: center;
}

@media (max-width: 768px) {
    .psd-bottom-bar {
        display: flex;
    }
}

.psd-bottom-bar-button {
    flex: 1;
    text-align: center;
    padding: 10px 0;
    text-decoration: none;
    color: #ffa31a;
    font-weight: 600;
    font-size: 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.psd-bottom-bar-button i {
    font-size: 20px;
}

.psd-bottom-bar-button:hover {
    background-color: #292929;
    border-radius: 5px;
}

/* --- Lightbox/Modal Styles --- */
.psd-lightbox-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1001;
    justify-content: center;
    align-items: center;
}

.psd-lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.psd-lightbox-image {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 8px;
}

.psd-lightbox-close {
    position: absolute;
    top: 10px;
    right: 10px;
    color: white;
    font-size: 30px;
    cursor: pointer;
    z-index: 1002;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.psd-lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 10px;
}

.psd-lightbox-nav-btn {
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    padding: 10px 15px;
    cursor: pointer;
    font-size: 24px;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background 0.3s ease;
}

.psd-lightbox-nav-btn:hover {
    background: rgba(0, 0, 0, 0.8);
}

/* Notification Box Styles */
.psd-notification-box {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #333;
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 16px;
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    display: none;
    /* Hidden by default */
    text-align: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.psd-notification-box.success {
    background-color: #28a745;
    /* Green for success */
}

.psd-notification-box.error {
    background-color: #dc3545;
    /* Red for error */
}

/* Contact vendor button styles */
.psd-contact-vendor-btn {
    display: block;
    width: calc(100% - 40px);
    padding: 12px 20px;
    margin: 20px auto 0;
    background-color: #ffa31a;
    color: #1b1b1b;
    text-align: center;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 16px;
    transition: background-color 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    box-sizing: border-box;
}

.psd-contact-vendor-btn:hover {
    background-color: #cc8200;
}

.psd-contact-vendor-btn i {
    margin-right: 8px;
}


/* Favorite icon styles */
.psd-favorite-icon.favorited {
    color: #dc3545;
}

.psd-favorite-icon.favorited .fa-star {
    color: #FEC107;
}

.psd-favorite-icon:hover .fa-star {
    color: #FEC107;
}

/* Product tags styles */
.psd-product-tags {
    margin: 18px 0 0 0;
}

.psd-tags-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.psd-tag-btn {
    display: inline-block;
    background: #1b1b1b;
    color: #808080;
    padding: 4px 14px;
    border-radius: 5px;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    border: 1px solid #292929;
}

/* No listings message */
.psd-no-listings-message {
    color: #64748b;
    text-align: center;
    padding: 20px;
}

/* Vendor logo link styles */
.listing-vendor-logo-link {
    width: 48px !important;
    height: 48px !important;
    border-radius: 50% !important;
    overflow: hidden !important;
    display: block !important;
    flex-shrink: 0 !important;
}

.listing-vendor-logo-img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
}