/* ============================================================
   🏆 PT MARKETPLACE SINGLE LISTING - COMPLETE PROFESSIONAL SUITE
   Modified: Minimal header, icon buttons, gallery expand, description truncation
   ============================================================ */

/* ============================================================
   MOD 4: MINIMAL HEADER (Replaces theme header/footer)
   ============================================================ */
.pt-listing-minimal-header {
    position: relative;
    z-index: 999;
    background: #fff;
    border-bottom: 1px solid #e4e6eb;
    padding: 0 20px;
    height: 56px;
    display: flex;
    align-items: center;
}

.pt-listing-header-inner {
    width: 100%;
    max-width: 1440px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.pt-listing-header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.pt-listing-close-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #f0f2f5;
    color: #050505;
    text-decoration: none;
    transition: background 0.2s ease;
}

.pt-listing-close-btn:hover {
    background: #e4e6eb;
}

.pt-listing-logo img {
    height: 30px;
    width: auto;
    display: block;
}

.pt-listing-logo-text {
    font-weight: 800;
    font-size: 1.1rem;
    color: #050505;
    text-decoration: none;
}

.pt-listing-logo {
    text-decoration: none;
}

.pt-header-brand-title {
    font-size: 1.9rem;
    font-weight: 800;
    color: #050505;
    letter-spacing: -0.5px;
}

/* Prevent horizontal scroll globally for this template */
html, body {
    overflow-x: hidden;
    max-width: 100vw;
}

/* ============================================================
   1. FORCE FULL WIDTH BREAKOUT
   ============================================================ */
.pt-listing-wrapper {
    position: relative;
    width: 100vw !important;
    max-width: 100vw !important;
    margin-left: calc(-50vw + 50%) !important;
    margin-right: calc(-50vw + 50%) !important;
    background-color: #f0f2f5;
    padding: 30px 0 80px 0;
    min-height: 100vh;
    box-sizing: border-box;
    overflow-x: hidden;
}

.pt-container-fluid {
    width: 100%;
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 40px;
    box-sizing: border-box;
}

.pt-listing-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) 420px;
    gap: 30px;
    align-items: start;
}


/* ============================================================
   2. GALLERY SHORTCODE CONTAINER + EXPAND ICON (MOD 2)
   ============================================================ */
.pt-listing-gallery-container {
    position: relative;
    width: 100%;
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
    box-sizing: border-box;
    width: min(100%, calc((100vh - 220px) * 1.3333)) !important; /* 🏆 Smart Ratio Sizing (Header + Padding) */
    aspect-ratio: 4/3;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
}

.pt-listing-gallery-container .custom-gallery-wrapper,
.pt-listing-gallery-container .main-image-container {
    width: 100% !important;
    max-width: 100% !important;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column; /* Ensures content stacks if needed, but mostly for centering */
}

/* Ensure images scale down to fit the new height constraint */
.pt-listing-gallery-container img {
    max-height: 100%;
    max-width: 100%;
    width: auto !important;
    height: auto !important;
    object-fit: contain;
    margin: auto; /* 🏆 Vertically centers image if flex parent has height */
}

/* Ensure inner slider items fill the 4:3 container */
.pt-listing-gallery-container .pt-gallery-main-image-item {
    aspect-ratio: auto !important;
    height: 100% !important;
    width: 100% !important;
}

/* ✅ MOD 2: Gallery Expand Button */
.pt-gallery-expand-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 10;
    width: 28px;
    height: 28px;
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, transform 0.2s ease;
    backdrop-filter: blur(4px);
}

.pt-gallery-expand-btn:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: scale(1.05);
}


/* ============================================================
   3. UNIFIED SIDEBAR BLOCK
   ============================================================ */
.pt-unified-sidebar-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.pt-sidebar-section {
    padding: 20px 24px;
    border-top: 1px solid #ebedf0;
}

.pt-sidebar-section.no-border {
    border-top: none;
}

.pt-sidebar-section.no-bottom {
    padding-bottom: 24px;
}


/* ============================================================
   4. HEADER DETAILS
   ============================================================ */
.pt-listing-title {
    font-size: 1.75rem;
    font-weight: 800;
    color: #050505;
    margin: 0 0 8px 0;
    line-height: 1.2;
}

.pt-listing-price {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 5px;
}

.pt-listing-timestamp {
    font-size: 0.85rem;
    color: #65676b;
}


/* ============================================================
   5. SELLER SECTION + SELLER DETAILS LINK (MOD 3)
   ============================================================ */
.pt-seller-identity-block {
    display: flex;
    gap: 15px;
    align-items: flex-start;
}

.pt-seller-identity-block img {
    border-radius: 50%;
    border: 1px solid #eee;
}

.pt-seller-name-link {
    font-weight: 700;
    color: #050505;
    font-size: 1.1rem;
    text-decoration: none;
}

.pt-trust-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: #f0fcf4;
    border: 1px solid #c6f6d5;
    color: #22543d;
    padding: 2px 10px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 700;
}

.pt-seller-join-date {
    font-size: 0.8rem;
    color: #8c939d;
}

/* ✅ MOD 3: Seller Details Link */
.pt-seller-details-link {
    margin-left: auto;
    font-size: 0.85rem;
    font-weight: 600;
    color: #0084ff;
    text-decoration: none;
    white-space: nowrap;
    align-self: center;
    transition: color 0.2s ease;
}

.pt-seller-details-link:hover {
    color: #0073e6;
    text-decoration: underline;
}


/* ============================================================
   6. 💎 BUTTON SUITE (MOD 1: Buy Now + Make Offer + Icon Btns)
   ============================================================ */

/* Primary Row: Buy Now + Make Offer side by side */
.pt-primary-btn-row {
    display: flex;
    gap: 10px;
    margin-bottom: 12px;
}

/* BUY NOW BUTTON */
.pt-buy-now-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1.4;
    background: linear-gradient(180deg, #2d2d2d 0%, #000000 100%);
    color: #ffffff !important;
    text-align: center;
    padding: 14px 16px;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.25s ease;
    border: 1px solid #000;
    box-sizing: border-box;
}

.pt-buy-now-btn:hover,
.pt-buy-now-btn:focus,
.pt-buy-now-btn:active {
    background: linear-gradient(180deg, #454545 0%, #1a1a1a 100%);
    transform: translateY(-1px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
    color: #fff !important;
}

/* ✅ MOD 1: MAKE OFFER BUTTON */
.pt-make-offer-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #1a6b3a;
    color: #fff !important;
    border: 2px solid #145530;
    padding: 14px 16px;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.25s ease;
    box-sizing: border-box;
    box-shadow: 0 2px 8px rgba(26, 107, 58, 0.3);
}

.pt-make-offer-btn:hover,
.pt-make-offer-btn:focus,
.pt-make-offer-btn:active {
    background: #145530;
    border-color: #0f4025;
    box-shadow: 0 4px 14px rgba(26, 107, 58, 0.4);
    transform: translateY(-1px);
    color: #fff !important;
}

.pt-make-offer-btn:hover svg {
    stroke: #fff;
}

/* ACTION ROW: Message (large) + Share icon + Save icon */
.pt-action-row-inline {
    display: flex;
    gap: 8px;
    align-items: center;
    width: 100%;
}

/* MESSAGE BUTTON — matches forum .pt-msg-btn style */
.pt-msg-btn-primary {
    flex: 2.5;
    background: #f5f5f5;
    color: #666 !important;
    border: 1px solid #ededed;
    padding: 12px 15px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.pt-msg-btn-primary:hover {
    background: #ebebeb;
    color: #444 !important;
}

/* ✅ MOD 1: Icon-only buttons with tooltip */
.pt-icon-btn-wrapper {
    position: relative;
    flex-shrink: 0;
}

.pt-icon-btn {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f0f2f5;
    color: #050505;
    border: 1px solid #e4e6eb;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0;
}

.pt-icon-btn:hover {
    background: #e4e6eb;
}

.pt-icon-btn.is-active {
    background: #fff0f0;
    color: #d00;
    border-color: #ffcaca;
}

.pt-icon-btn.is-active svg {
    fill: #d00;
    stroke: #d00;
}

/* Icon Button Hover Tooltip */
.pt-icon-tooltip {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: #1a1a1a;
    color: #fff;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 5px 10px;
    border-radius: 6px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
    pointer-events: none;
    z-index: 50;
}

.pt-icon-tooltip::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: #1a1a1a transparent transparent transparent;
}

.pt-icon-btn-wrapper:hover .pt-icon-tooltip {
    opacity: 1;
    visibility: visible;
}

.pt-btn-secondary-full {
    display: block;
    width: 100%;
    background: #e4e6eb;
    color: #050505;
    text-align: center;
    padding: 12px;
    border-radius: 8px;
    font-weight: 700;
    text-decoration: none;
    box-sizing: border-box;
}


/* ============================================================
   7. SUBHEADINGS & CONTENT
   ============================================================ */
.pt-sidebar-subheading {
    font-size: 0.95rem;
    font-weight: 700;
    color: #050505;
    margin: 0 0 12px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.pt-description-text {
    font-size: 0.95rem;
    line-height: 1.5;
    color: #4b4b4b;
}

/* ✅ MOD 5: Description Truncation */
.pt-description-text.is-truncated .pt-description-full {
    max-height: 6.5em; /* Roughly 4-5 lines visible */
    overflow: hidden;
    position: relative;
}

.pt-description-text.is-truncated .pt-description-full::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2.5em;
    background: linear-gradient(transparent, #fff);
    pointer-events: none;
}

.pt-description-text.is-expanded .pt-description-full {
    max-height: none;
    overflow: visible;
}

.pt-description-text.is-expanded .pt-description-full::after {
    display: none;
}

.pt-see-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: none !important;
    border: none;
    color: #e60000;
    font-weight: 700;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    cursor: pointer;
    padding: 10px 0 0 0;
    transition: opacity 0.2s ease;
    text-decoration: none;
    box-shadow: none !important;
}

.pt-see-more-chevron {
    display: inline-block;
    transition: transform 0.25s ease;
    flex-shrink: 0;
}

.pt-see-more-btn.is-expanded .pt-see-more-chevron {
    transform: rotate(180deg);
}

.pt-see-more-btn:hover,
.pt-see-more-btn:focus,
.pt-see-more-btn:active {
    background: none !important;
    color: #e60000 !important;
    opacity: 0.6;
    outline: none;
    box-shadow: none !important;
}


/* ============================================================
   8. SPECS TABLE FORMATTING
   ============================================================ */
.pt-specs-inline table { width: 100%; font-size: 0.85rem; border-collapse: collapse; }
.pt-specs-inline th { color: #65676b; font-weight: normal; text-align: left; padding: 4px 0; }
.pt-specs-inline td { font-weight: 600; text-align: right; padding: 4px 0; }


/* ============================================================
   9. RANK & TOOLTIP LOGIC
   ============================================================ */
.pt-tier-badge {
    border-radius: 4px;
    font-weight: 800;
    text-transform: uppercase;
    white-space: nowrap;
}

.pt-tooltip-trigger {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.pt-tooltip-popup {
    visibility: hidden;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    background-color: #1a1a1a;
    color: #fff;
    border-radius: 8px;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s, visibility 0.3s;
    box-shadow: 0 10px 25px rgba(0,0,0,0.3);
    pointer-events: none;
}

.pt-tooltip-popup.position-top { bottom: 140%; }
.pt-tooltip-popup.position-bottom { top: 140%; }

.pt-tooltip-popup::after {
    content: "";
    position: absolute;
    left: 50%;
    margin-left: -8px;
    border-width: 8px;
    border-style: solid;
    border-color: transparent;
}

.pt-tooltip-popup.position-top::after {
    top: 100%;
    border-top-color: #1a1a1a;
    border-bottom: none;
}

.pt-tooltip-popup.position-bottom::after {
    bottom: 100%;
    border-bottom-color: #1a1a1a;
    border-top: none;
}

.pt-tooltip-trigger:hover .pt-tooltip-popup {
    visibility: visible;
    opacity: 1;
}


/* ============================================================
   10. LOCATION & MAP
   ============================================================ */
.pt-location-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.pt-location-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.78rem;
    font-weight: 600;
    color: #65676b;
    background: #f0f2f5;
    border: 1px solid #e4e6eb;
    padding: 3px 10px;
    border-radius: 20px;
    max-width: 160px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex-shrink: 0;
}

.pt-open-maps-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    margin-top: 10px;
    padding: 10px 16px;
    background: #f0f2f5;
    border: 1px solid #e4e6eb;
    border-radius: 8px;
    color: #050505;
    font-size: 0.85rem;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.2s ease;
    width: 100%;
    box-sizing: border-box;
}

.pt-open-maps-btn:hover {
    background: #e4e6eb;
    color: #0084ff;
}

.pt-open-maps-btn:hover svg {
    stroke: #0084ff;
}

.pt-listing-map {
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #ebedf0;
}


/* ============================================================
   11. RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
    .pt-listing-grid {
        grid-template-columns: 1fr;
    }
    .pt-container-fluid {
        padding: 0 20px;
    }
    /* Fixed header — bulletproof, works even if a parent has overflow set */
    .pt-listing-minimal-header {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        width: 100%;
        z-index: 9999;
    }
    /* Push content below the fixed header (56px = header height) */
    .pt-listing-wrapper {
        padding: 20px 0 60px 0;
        margin-top: 56px;
    }
}

@media (max-width: 768px) {
    .pt-container-fluid {
        padding: 0 14px;
    }
    .pt-listing-grid {
        gap: 14px;
    }
    .pt-listing-wrapper {
        padding: 14px 0 50px 0;
    }
    .pt-sidebar-section {
        padding: 16px 18px;
    }
    .pt-listing-title {
        font-size: 1.45rem;
    }
    .pt-seller-meta-row {
        flex-wrap: wrap;
    }
    /* Buttons stay side-by-side — tighten sizing */
    .pt-buy-now-btn,
    .pt-make-offer-btn {
        font-size: 0.82rem;
        padding: 13px 10px;
        letter-spacing: 0.3px;
    }
}

@media (max-width: 480px) {
    .pt-listing-title {
        font-size: 1.25rem;
    }
    .pt-listing-minimal-header {
        padding: 0 12px;
        height: 52px;
    }
    /* Adjust content offset for the shorter header at this breakpoint */
    .pt-listing-wrapper {
        margin-top: 52px;
    }
    /* Buttons still side-by-side on small phones */
    .pt-buy-now-btn,
    .pt-make-offer-btn {
        font-size: 0.78rem;
        padding: 12px 8px;
        letter-spacing: 0.2px;
    }
    .pt-msg-btn-primary {
        font-size: 0.85rem;
        padding: 12px 10px;
    }
    .pt-sidebar-section {
        padding: 14px 14px;
    }
    .pt-map-area-container iframe {
        height: 200px;
    }
}

/* Ensure the favicon logo doesn't stretch */
.pt-listing-logo-favicon {
    display: flex;
    align-items: center;
    transition: opacity 0.2s;
}

.pt-listing-logo-favicon:hover {
    opacity: 0.8;
}

/* Inline Seller Meta */
.pt-seller-meta-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 4px;
}

.pt-trust-inline {
    font-size: 0.8rem;
    font-weight: 700;
    color: #22543d;
    background: #f0fcf4;
    padding: 2px 8px;
    border-radius: 12px;
    border: 1px solid #c6f6d5;
    white-space: nowrap;
}

.pt-trust-inline span {
    font-weight: 400;
    opacity: 0.7;
}

/* Map Zone Highlight */
.pt-map-area-container {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #e4e6eb;
}

/* This creates a "Red Zone" visual effect over the center of the map */
.pt-map-overlay-zone {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 120px;
    height: 120px;
    background: rgba(255, 0, 0, 0.1);
    border: 2px dashed rgba(255, 0, 0, 0.5);
    border-radius: 50%;
    pointer-events: none;
    z-index: 2;
    box-shadow: 0 0 0 1000px rgba(0,0,0,0.03); /* Subtle dimming outside zone */
}

.pt-map-area-container iframe {
    filter: grayscale(0.2) contrast(1.1);
}

/* Badge Tweaks */
.pt-tier-badge {
    font-size: 0.65rem;
    padding: 2px 8px;
    background: #f0f2f5;
    border-radius: 4px;
}

/* User Rank Row */
.pt-marketplace-rank-row {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 5px;
}

.pt-rank-label {
    font-size: 0.8rem;
    color: #65676b;
    font-weight: 600;
}

.pt-tooltip-trigger {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.pt-help-icon {
    width: 15px;
    height: 15px;
    font-size: 9px;
    font-weight: 800;
    background: #e4e6eb;
    color: #65676b;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: help;
    flex-shrink: 0;
    transition: background 0.2s ease, color 0.2s ease;
}

.pt-tooltip-trigger:hover .pt-help-icon {
    background: #050505;
    color: #fff;
}


/* ============================================================
   12. MARK AS SOLD BUTTON (Seller Only)
   ============================================================ */
.pt-mark-sold-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    flex: 1;
    background: linear-gradient(180deg, #e60000 0%, #b80000 100%);
    color: #fff !important;
    border: 1px solid #9e0000;
    padding: 14px 16px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: 0 3px 10px rgba(230, 0, 0, 0.25);
    box-sizing: border-box;
}

.pt-mark-sold-btn:hover,
.pt-mark-sold-btn:focus,
.pt-mark-sold-btn:active {
    background: linear-gradient(180deg, #cc0000 0%, #9e0000 100%);
    box-shadow: 0 5px 14px rgba(230, 0, 0, 0.35);
    transform: translateY(-1px);
    color: #fff !important;
}

/* Relist state — green, matching existing make-offer palette */
.pt-mark-sold-btn.is-sold {
    background: linear-gradient(180deg, #1e7a42 0%, #145530 100%);
    border-color: #0f4025;
    box-shadow: 0 3px 10px rgba(26, 107, 58, 0.3);
    color: #fff !important;
}

.pt-mark-sold-btn.is-sold:hover,
.pt-mark-sold-btn.is-sold:focus,
.pt-mark-sold-btn.is-sold:active {
    background: linear-gradient(180deg, #145530 0%, #0f4025 100%);
    box-shadow: 0 5px 14px rgba(26, 107, 58, 0.4);
    transform: translateY(-1px);
    color: #fff !important;
}

.pt-mark-sold-btn:disabled {
    cursor: not-allowed;
    transform: none !important;
}

/* ============================================================
   13. OWNER CONTROL PANEL (Single Listing)
   ============================================================ */
.pt-owner-control-panel {
    background: #fff;
    border: 1px solid #e4e6eb;
    border-radius: 12px;
    padding: 20px;
    margin-top: 30px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.pt-owner-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #f0f2f5;
}

.pt-owner-label {
    font-size: 0.85rem;
    font-weight: 800;
    text-transform: uppercase;
    color: #65676b;
    letter-spacing: 0.5px;
}

.pt-owner-link:hover {
    color: #0073e6;
    text-decoration: underline;
}

.pt-owner-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.pt-delete-form {
    margin: 0;
    width: 100%;
    grid-column: 1 / -1;
    display: flex; /* Ensures button fills height if needed */
}

/* Base Button Style (Green Default) */
.pt-make-offer-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 14px 16px;
    background: #1a6b3a;
    color: #fff !important;
    border: 2px solid #145530;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.25s ease;
    box-sizing: border-box;
    box-shadow: 0 2px 8px rgba(26, 107, 58, 0.3);
    text-decoration: none !important;
    width: 100%;
    white-space: nowrap;
}

.pt-make-offer-btn:hover {
    background: #145530;
    border-color: #0f4025;
    box-shadow: 0 4px 14px rgba(26, 107, 58, 0.4);
    transform: translateY(-1px);
    color: #fff !important;
}

/* Base Owner Button Style (Independent) */
.pt-owner-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 14px 16px;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.25s ease;
    box-sizing: border-box;
    text-decoration: none !important;
    width: 100%;
    white-space: nowrap;
    border: 2px solid transparent;
}

/* --- Button Variants --- */

/* My Listings (Clean Professional Button) */
.pt-my-listings-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    flex: 1;
    padding: 14px 16px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    color: #1f2937 !important;
    font-size: 0.95rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-decoration: none !important;
    transition: all 0.2s ease;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
    box-sizing: border-box;
    cursor: pointer;
}
.pt-my-listings-btn:hover {
    background: #f9fafb;
    border-color: #d1d5db;
    color: #000;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    text-decoration: none;
}

/* Edit (Grey) */
.pt-owner-btn.pt-btn-edit {
    background: #f3f4f6;
    color: #1f2937 !important;
    border-color: #e5e7eb;
    box-shadow: none;
}
.pt-owner-btn.pt-btn-edit:hover {
    background: #e5e7eb;
    border-color: #d1d5db;
    color: #000 !important;
}

/* Mark as Sold (Red Professional) */
.pt-owner-btn.pt-btn-sold {
    background: #dc2626;
    border-color: #b91c1c;
    color: #fff !important;
    box-shadow: 0 2px 4px rgba(220, 38, 38, 0.3);
}
.pt-owner-btn.pt-btn-sold:hover {
    background: #b91c1c;
    border-color: #991b1b;
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(220, 38, 38, 0.4);
}

/* Delete (Red) */
.pt-owner-btn.pt-btn-delete {
    background: #fff;
    color: #d00 !important;
    border-color: #ffe5e5;
    box-shadow: none;
}
.pt-owner-btn.pt-btn-delete:hover {
    background: #fff0f0;
    border-color: #ffcaca;
    color: #b00 !important;
}

/* Mobile Stack */
@media (max-width: 600px) {
    .pt-owner-actions {
        grid-template-columns: 1fr;
    }
}

/* ============================================================
   14. OWNER CONTROLS OVERRIDES (Sidebar Context)
   ============================================================ */

/* 1. EDIT LISTING BUTTON (Grey) */
/* Targets both legacy class and new class */
.pt-sidebar-section .pt-buy-now-btn[href*="action=edit"],
.pt-sidebar-section .pt-owner-btn.pt-btn-edit {
    background: #f3f4f6;
    color: #1f2937 !important;
    border: 1px solid #e5e7eb;
    box-shadow: none;
    flex: 1; /* Force 50% width in flex row */
}
.pt-sidebar-section .pt-buy-now-btn[href*="action=edit"]:hover,
.pt-sidebar-section .pt-owner-btn.pt-btn-edit:hover {
    background: #e5e7eb;
    color: #000 !important;
    border-color: #d1d5db;
}

/* 2. MARK AS SOLD BUTTON (Red) */
.pt-sidebar-section .pt-mark-sold-btn,
.pt-sidebar-section .pt-owner-btn.pt-btn-sold {
    background: #dc2626;
    color: #fff !important;
    border: 1px solid #b91c1c;
    box-shadow: 0 2px 4px rgba(220, 38, 38, 0.3);
    flex: 1; /* Force 50% width in flex row */
}
.pt-sidebar-section .pt-mark-sold-btn:hover,
.pt-sidebar-section .pt-owner-btn.pt-btn-sold:hover {
    background: #b91c1c;
    border-color: #991b1b;
}

/* 3. MY LISTINGS BUTTON (Neutral) */
.pt-sidebar-section .pt-my-listings-btn {
    background: #fff;
    border: 1px solid #e5e7eb;
    color: #1f2937 !important;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}
 .pt-sidebar-section .pt-my-listings-btn:hover {
    background: #f9fafb;
    border-color: #d1d5db;
    color: #000 !important;
}

/* == CLAUDE CODE SYNC TEST — if you see this in File Manager the automation is working == */
