/* ====================================================================
   MARKETPLACE: SELL A PART FORM STYLES
   ==================================================================== */

.pt-market-wrapper {
    background-color: #f0f2f5; /* 🏆 Matches Discovery Page */
    padding: 60px 0 100px 0;
    min-height: 100vh;
    
    /* The Breakout Trick */
    width: 100vw !important;
    max-width: 100vw !important;
    margin-left: calc(-50vw + 50%) !important;
    margin-right: calc(-50vw + 50%) !important;
}

.pt-market-wrapper .pt-container {
    max-width: 800px; /* Keep the form narrow and readable */
    margin: 0 auto;
    padding: 0 20px;
}

.pt-market-header {
    text-align: center;
    margin-bottom: 40px;
}

.pt-main-title {
    font-size: 2.5rem;
    font-weight: 900;
    margin-bottom: 10px;
    color: #050505;
    letter-spacing: -0.5px;
}

.pt-sub-title {
    color: #65676b;
    font-size: 1.1rem;
    margin: 0;
}

/* --- Form Container --- */
.pt-sell-form-container {
    background: #fff;
    padding: 40px;
    border-radius: 0;
    box-shadow: 0 2px 12px rgba(0,0,0,0.04);
    border: 1px solid #e4e6eb;
}

/* --- Sections --- */
.pt-form-section {
    margin-bottom: 35px;
    padding-bottom: 35px;
    border-bottom: 1px solid #f0f2f5;
}

.pt-form-section:last-of-type {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.pt-section-title {
    font-size: 1.25rem;
    font-weight: 800;
    margin: 0 0 5px 0;
    color: #050505;
}

.pt-field-note {
    font-size: 0.85rem;
    color: #65676b;
    margin: 0 0 20px 0;
}

/* --- Inputs --- */
.pt-form-row { margin-bottom: 20px; }

.pt-form-row label {
    display: block;
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 8px;
    color: #050505;
}

.pt-form-row label .required { color: #d00; }

.pt-form-row input[type="text"],
.pt-form-row input[type="number"],
.pt-form-row select,
.pt-form-row textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ced0d4;
    border-radius: 0;
    font-size: 1rem;
    background: #f9f9f9;
    color: #050505;
    transition: all 0.2s;
    box-sizing: border-box;
    font-family: inherit;
}

.pt-form-row input:focus,
.pt-form-row select:focus,
.pt-form-row textarea:focus {
    background: #fff;
    border-color: #050505;
    outline: none;
    box-shadow: 0 0 0 3px rgba(0,0,0,0.05);
}

.pt-form-row select optgroup {
    font-weight: 800;
    color: #000;
}

/* --- Split Rows (Side by Side) --- */
.split-row {
    display: flex;
    gap: 20px;
}
.split-row .pt-col { flex: 1; }

/* --- Image Upload Area --- */
.pt-image-upload-area {
    border: 2px dashed #ced0d4;
    background: #fafbfc;
    padding: 40px 30px;
    text-align: center;
    border-radius: 0;
    cursor: pointer;
    position: relative;
    transition: all 0.2s;
}

.pt-image-upload-area:hover {
    border-color: #050505;
    background: #f2f2f2;
}

.pt-image-upload-area input[type="file"] {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    opacity: 0;
    cursor: pointer;
}

.pt-upload-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    color: #65676b;
    font-weight: 600;
    font-size: 1.1rem;
}

.pt-upload-placeholder .pt-icon { font-size: 2.5rem; }

#pt-image-preview-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 15px;
}

.pt-img-preview {
    width: 90px;
    height: 90px;
    object-fit: cover;
    border-radius: 0;
    border: 1px solid #e4e6eb;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

/* --- Footer --- */
.pt-form-footer {
    margin-top: 40px;
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid #f0f2f5;
}

.pt-button.pt-submit-listing {
    width: 100%;
    padding: 16px;
    font-size: 1.1rem;
    text-transform: uppercase;
    font-weight: 800;
    letter-spacing: 0.5px;
    border-radius: 0;
    background: #d00;
    color: #fff;
    border: none;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
}

.pt-button.pt-submit-listing:hover {
    background: #b30000;
    box-shadow: 0 4px 12px rgba(208, 0, 0, 0.2);
}

.pt-terms-text {
    font-size: 0.8rem;
    color: #65676b;
    margin-top: 15px;
}
.pt-terms-text a { color: #050505; font-weight: 600; text-decoration: none; }
.pt-terms-text a:hover { text-decoration: underline; }

/* --- Mobile Responsive --- */
@media (max-width: 768px) {
    .split-row { flex-direction: column; gap: 0; }
    .pt-sell-form-container { padding: 25px; border-radius: 0; border-left: none; border-right: none; }
    .pt-market-header h1 { font-size: 2rem; }
    .pt-market-wrapper { padding: 30px 0; }
}

/* ====================================================================
   CUSTOM SEARCHABLE DROPDOWN
   ==================================================================== */
.pt-custom-dropdown {
    position: relative;
    width: 100%;
}
.pt-dropdown-trigger {
    padding: 12px 15px;
    background: #f9f9f9;
    border: 1px solid #ced0d4;
    border-radius: 0;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1rem;
    color: #050505;
    user-select: none;
    transition: all 0.2s;
}
.pt-dropdown-trigger.has-error { border-color: #d00; background: #fff5f5; }
.pt-dropdown-trigger:hover { background: #fff; border-color: #050505; }
.pt-dropdown-trigger .pt-chevron { font-size: 0.8rem; color: #888; transition: transform 0.3s; font-style: normal; }
.pt-custom-dropdown.is-open .pt-dropdown-trigger .pt-chevron { transform: rotate(180deg); }

.pt-dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: #fff;
    border: 1px solid #ced0d4;
    border-radius: 0;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    z-index: 100;
    margin-top: 5px;
    overflow: hidden;
}
.pt-custom-dropdown.is-open .pt-dropdown-menu { display: block; }

.pt-dropdown-search {
    padding: 10px;
    border-bottom: 1px solid #eee;
    background: #fafbfc;
}
.pt-dropdown-search input {
    width: 100%;
    padding: 8px 12px !important;
    border: 1px solid #ddd !important;
    border-radius: 0 !important;
    font-size: 0.9rem !important;
    background: #fff !important;
    margin: 0 !important;
}

.pt-dropdown-list {
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: 250px;
    overflow-y: auto;
}
.pt-optgroup {
    padding: 8px 15px;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    color: #888;
    background: #f9f9f9;
}
.pt-option {
    padding: 10px 15px 10px 25px;
    font-size: 0.95rem;
    color: #050505;
    cursor: pointer;
    transition: background 0.2s;
    border-bottom: 1px solid #fcfcfc;
}
.pt-option:hover, .pt-option.is-selected {
    background: #f0f2f5;
    color: #d00;
    font-weight: 600;
}

/* ====================================================================
   LOCATION AUTOCOMPLETE
   ==================================================================== */
.pt-autocomplete-list {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: #fff;
    border: 1px solid #ced0d4;
    border-radius: 0;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    z-index: 1000; /* Increased Z-index to sit on top of everything */
    margin-top: 5px;
    max-height: 200px;
    overflow-y: auto;
    
    /* 🏆 OVERRIDE THEME DEFAULTS (Fixes the indentation issue) */
    margin: 5px 0 0 0 !important;
    padding: 0 !important;
    list-style: none !important;
    box-sizing: border-box !important;
}

.pt-autocomplete-list li {
    padding: 12px 15px;
    cursor: pointer;
    font-size: 0.95rem;
    border-bottom: 1px solid #fcfcfc;
    color: #050505;
    transition: background 0.2s;
    
    /* Ensure text inside aligns left too */
    margin: 0 !important;
    list-style-type: none !important;
    text-align: left;
}

.pt-autocomplete-list li:hover,
.pt-autocomplete-list li.pt-ac-focused { background: #f0f2f5; }
.pt-autocomplete-list li small,
.pt-autocomplete-list .pt-ac-sub { display: block; font-size: 0.75rem; color: #888; }
.pt-autocomplete-list .pt-ac-main { font-weight: 700; color: #050505; }
.pt-autocomplete-list .pt-ac-status { text-align: center; padding: 10px; color: #888; cursor: default; }

/* ====================================================================
   PREMIUM TOGGLE SWITCH (Shipping)
   ==================================================================== */

/* 🏆 OVERRIDE GENERIC LABEL STYLES */
.pt-form-row label.pt-toggle-switch {
    display: flex !important;
    align-items: center;
    gap: 15px;
    cursor: pointer;
    margin-bottom: 0;
}

.pt-toggle-switch input { display: none; }

.pt-slider {
    position: relative;
    width: 46px;
    height: 24px;
    background-color: #ccc;
    border-radius: 34px;
    transition: .4s;
    flex-shrink: 0;
}

.pt-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    border-radius: 50%;
    transition: .4s;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.pt-toggle-switch input:checked + .pt-slider { background-color: #d00; }
.pt-toggle-switch input:checked + .pt-slider:before { transform: translateX(22px); }
.pt-toggle-text { font-weight: 600; color: #050505; font-size: 0.95rem; }