body {
    background: #e5e5e5;
}

.ad-header {
    height: 72px;
    padding: 0 28px;
    border-bottom: 1px solid #d4d4d4;
    background: rgba(255, 255, 255, .97);
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    gap: 25px;
}

.ad-logo {
    font-size: 28px;
    font-weight: 900;
    letter-spacing: -1px;
}

.ad-logo span {
    color: var(--red);
}

.ad-search {
    width: min(590px, 100%);
    position: relative;
}

.ad-search input {
    width: 100%;
    height: 44px;
    padding: 0 50px 0 17px;
    border: 1px solid #d1d1d1;
    border-radius: 24px;
    background: #f4f4f4;
    outline: none;
}

.ad-search button {
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 50%;
    background: var(--black);
    color: #ffffff;
    position: absolute;
    top: 3px;
    right: 3px;
}

.ad-header-actions {
    margin-left: auto;
    display: flex;
    gap: 8px;
    align-items: center;
}

.ad-header-actions a {
    padding: 10px 13px;
    border-radius: 9px;
    font-size: 12px;
    font-weight: 700;
}

.account-link {
    background: var(--black);
    color: #ffffff;
}

.ad-page {
    width: min(1350px, calc(100% - 30px));
    margin: 0 auto;
    padding: 22px 0 60px;
}

.publish-success {
    margin-bottom: 16px;
    padding: 15px 18px;
    border: 1px solid #a9dbbb;
    border-radius: 13px;
    background: #f2fff6;
    color: #176c3d;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.publish-success p {
    margin-top: 3px;
    font-size: 11px;
}

.publish-success button {
    border: 0;
    background: transparent;
    color: #176c3d;
    font-size: 25px;
}

.breadcrumb {
    margin-bottom: 17px;
    color: #777777;
    font-size: 11px;
    display: flex;
    gap: 7px;
    align-items: center;
}

.breadcrumb strong {
    max-width: 350px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ad-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 370px;
    gap: 18px;
    align-items: start;
}

.ad-main {
    min-width: 0;
}

.gallery-card,
.content-card,
.buy-card,
.seller-card,
.info-card {
    border: 1px solid #d4d4d4;
    border-radius: 17px;
    background: #ffffff;
}

.gallery-card {
    padding: 14px;
}

.main-photo {
    height: min(570px, 55vw);
    min-height: 380px;
    border-radius: 13px;
    background: #eeeeee;
    overflow: hidden;
    position: relative;
}

.main-photo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.featured-badge {
    padding: 7px 10px;
    border-radius: 7px;
    background: var(--red);
    color: #ffffff;
    font-size: 10px;
    font-weight: 800;
    position: absolute;
    top: 12px;
    left: 12px;
}

.thumbnail-list {
    margin-top: 10px;
    display: flex;
    gap: 8px;
    overflow-x: auto;
}

.thumbnail {
    width: 72px;
    height: 72px;
    flex: 0 0 72px;
    padding: 0;
    border: 2px solid transparent;
    border-radius: 10px;
    background: #eeeeee;
    overflow: hidden;
}

.thumbnail.active {
    border-color: var(--red);
}

.thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.content-card {
    margin-top: 15px;
    padding: 22px;
}

.card-heading {
    margin-bottom: 17px;
}

.card-heading h2 {
    font-size: 18px;
}

.description {
    color: #414141;
    font-size: 14px;
    line-height: 1.7;
}

.details-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.details-grid > div {
    min-height: 75px;
    padding: 13px;
    border-radius: 11px;
    background: #f4f4f4;
}

.details-grid span {
    color: var(--muted);
    font-size: 10px;
    display: block;
}

.details-grid strong {
    margin-top: 5px;
    font-size: 13px;
    display: block;
}

.detail-note {
    margin-top: 14px;
    padding: 14px;
    border-radius: 10px;
    background: #f4f4f4;
}

.detail-note strong {
    font-size: 12px;
}

.detail-note p {
    margin-top: 5px;
    color: #666666;
    font-size: 12px;
}

.shipping-options {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.shipping-options > div {
    min-height: 105px;
    padding: 14px;
    border-radius: 12px;
    background: #f4f4f4;
    display: flex;
    flex-direction: column;
}

.shipping-options > div > span {
    font-size: 24px;
}

.shipping-options strong {
    margin-top: 7px;
    font-size: 12px;
}

.shipping-options small {
    margin-top: 4px;
    color: var(--muted);
    line-height: 1.4;
}

.location-info {
    display: flex;
    align-items: center;
    gap: 13px;
}

.location-info > span {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #f1f1f1;
    font-size: 21px;
    display: grid;
    place-items: center;
}

.location-info strong {
    font-size: 14px;
}

.location-info p {
    margin-top: 3px;
    color: var(--muted);
    font-size: 11px;
}

.ad-sidebar {
    position: sticky;
    top: 90px;
}

.buy-card {
    padding: 22px;
}

.ad-type {
    color: var(--red);
    font-size: 10px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .5px;
}

.buy-card h1 {
    margin-top: 8px;
    font-size: 23px;
    line-height: 1.25;
}

.ad-price {
    margin-top: 20px;
}

.ad-price small {
    margin-bottom: 3px;
    color: var(--muted);
    font-size: 10px;
    display: block;
}

.ad-price strong {
    font-size: 31px;
    letter-spacing: -1px;
    display: block;
}

.ad-price > span {
    margin-top: 5px;
    color: #15854b;
    font-size: 11px;
    font-weight: 700;
    display: block;
}

.ad-stats {
    margin-top: 15px;
    padding: 11px 0;
    border-top: 1px solid #eeeeee;
    border-bottom: 1px solid #eeeeee;
    color: #777777;
    font-size: 11px;
    display: flex;
    gap: 17px;
}

.primary-action,
.contact-action,
.favorite-button {
    width: 100%;
    min-height: 47px;
    margin-top: 10px;
    border: 0;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 800;
    display: grid;
    place-items: center;
}

.primary-action {
    background: var(--red);
    color: #ffffff;
}

.contact-action {
    background: var(--black);
    color: #ffffff;
}

.favorite-button {
    border: 1px solid #d4d4d4;
    background: #ffffff;
    color: #333333;
}

.favorite-button.active {
    border-color: #efb3b6;
    background: #fff1f1;
    color: var(--red);
}

.owner-actions {
    margin-top: 18px;
    padding: 14px;
    border-radius: 11px;
    background: #f4f4f4;
}

.owner-actions strong {
    font-size: 12px;
    display: block;
}

.owner-actions a {
    margin-top: 8px;
    color: var(--red);
    font-size: 11px;
    font-weight: 800;
    display: inline-block;
}

.security-message {
    margin-top: 15px;
    padding: 12px;
    border-radius: 10px;
    background: #f4f4f4;
    color: #666666;
    display: flex;
    gap: 9px;
}

.security-message p {
    font-size: 10px;
    line-height: 1.5;
}

.seller-card {
    margin-top: 14px;
    padding: 18px;
}

.seller-header {
    display: flex;
    gap: 12px;
    align-items: center;
}

.seller-avatar {
    width: 55px;
    height: 55px;
    flex: 0 0 55px;
    border-radius: 50%;
    background: var(--black);
    color: #ffffff;
    overflow: hidden;
    font-size: 20px;
    font-weight: 900;
    display: grid;
    place-items: center;
}

.seller-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.seller-header small {
    color: var(--muted);
    font-size: 9px;
    display: block;
}

.seller-header strong {
    margin-top: 2px;
    font-size: 13px;
    display: block;
}

.seller-header span {
    margin-top: 4px;
    color: var(--muted);
    font-size: 10px;
    display: block;
}

.seller-verification {
    margin-top: 14px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.seller-verification span {
    padding: 6px 8px;
    border-radius: 7px;
    background: #eaf8ef;
    color: #15854b;
    font-size: 9px;
    font-weight: 800;
}

.seller-since {
    margin-top: 13px;
    color: #888888;
    font-size: 10px;
}

.info-card {
    margin-top: 14px;
    padding: 14px 18px;
    color: var(--muted);
    display: grid;
    gap: 5px;
    font-size: 10px;
}

.mobile-ad-summary {
    display: none;
}

.muted-text {
    color: var(--muted);
    font-size: 12px;
}

@media (max-width: 950px) {
    .ad-layout {
        grid-template-columns: 1fr;
    }

    .ad-sidebar {
        position: static;
    }

    .buy-card > h1,
    .buy-card > .ad-type,
    .buy-card > .ad-price {
        display: none;
    }

    .mobile-ad-summary {
        margin-top: 14px;
        padding: 20px;
        border: 1px solid #d4d4d4;
        border-radius: 17px;
        background: #ffffff;
        display: block;
    }

    .mobile-ad-summary h1 {
        margin-top: 7px;
        font-size: 23px;
    }

    .mobile-price {
        margin-top: 15px;
    }

    .mobile-price small {
        color: var(--muted);
        font-size: 10px;
        display: block;
    }

    .mobile-price strong {
        font-size: 28px;
    }
}

@media (max-width: 650px) {
    .ad-header {
        height: 62px;
        padding: 0 13px;
        gap: 10px;
    }

    .ad-logo {
        font-size: 23px;
    }

    .ad-search {
        display: none;
    }

    .ad-header-actions > a:first-child {
        display: none;
    }

    .ad-page {
        width: calc(100% - 20px);
        padding-top: 14px;
    }

    .breadcrumb {
        overflow-x: auto;
        white-space: nowrap;
    }

    .main-photo {
        height: 340px;
        min-height: auto;
    }

    .content-card {
        padding: 18px 15px;
    }

    .details-grid,
    .shipping-options {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 420px) {
    .details-grid,
    .shipping-options {
        grid-template-columns: 1fr;
    }

    .main-photo {
        height: 300px;
    }
}