.sec-buy-sell {
    padding: 20px 0;
}

.buy-category {
    margin-bottom: 30px;
}

.wrap-profile-container .row-profile {
    padding-bottom: 0;
}

.buy-category__row {
    gap: 10px 0;
    --gutter: 5px;
}

.product-buy {
    width: 100%;
    background-color: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
}

.product-buy:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.product-buy__image-wrapper {
    position: relative;
    width: 100%;
    padding-top: 100%;
    background-color: #f8f8f8;
    overflow: hidden;
}

.product-buy__image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-buy__badge {
    position: absolute;
    bottom: 8px;
    left: 8px;
    background-color: rgba(0, 0, 0, 0.7);
    color: #ffffff;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 4px;
}

.product-buy__favorite {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 32px;
    height: 32px;
    padding: 0;
    background-color: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.product-buy__favorite:hover {
    background-color: #ffffff;
    transform: scale(1.1);
}

.product-buy__favorite svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: #666;
    stroke-width: 2;
}

.product-buy__favorite:focus {
    outline: none;
}

.product-buy__favorite.is-active svg {
    fill: #ff4757;
    stroke: #ff4757;
}

.product-buy__content {
    padding: 12px;
}

.product-buy__title {
    font-size: 15px;
    font-weight: 500;
    color: #333;
    margin-bottom: 4px;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    min-height: 42px;
}

.product-buy__subtitle {
    font-size: 13px;
    color: #999;
    margin-bottom: 8px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.product-buy__price {
    font-size: 16px;
    font-weight: 700;
    color: #ff4757;
    margin-bottom: 8px;
}

.product-buy__location {
    font-size: 12px;
    color: #999;
    display: flex;
    align-items: center;
    gap: 4px;
}

.product-buy__location svg {
    width: 12px;
    height: 12px;
    fill: #999;
}


#buy-sell-detail .wrapper {
    background: #ededed;
}

.buy-detail {}

.buy-detail__block {
    background: white;
    padding: 12px;
    border-radius: 12px;
    margin-bottom: 20px;
    gap: 15px;
}

.buy-detail__content {
    background: white;
    padding: 12px;
    border-radius: 12px;
}

.buy-detail__price {
    font-size: 24px;
    color: #e5193b;
    line-height: 24px;
    font-weight: 700;
    margin-bottom: 15px;
}

.buy-detail__contact {}

.buy-detail__for {
    margin-bottom: 10px;
}

.buy-detail__for-wrap {
    position: relative;
    display: block;
    line-height: 0;
    padding-top: 100%;
    border-radius: 10px;
    overflow: hidden;
}

.buy-detail__for-wrap img {
    position: absolute;
    width: 100%;
    height: 100%;
    left: 0;
    top: 0;
    object-fit: cover;
}

.buy-detail__nav.slick-dotted.slick-slider {
    margin-bottom: 0;
}

.buy-detail__nav .slick-list {
    margin: 0 -5px;
}

.buy-detail__nav-item {
    margin: 0 5px;
}

.buy-detail__nav-item.slick-current .buy-detail__nav-wrap {
    border-color: var(--color-main);
    opacity: 1;
}

.buy-detail__nav-wrap {
    position: relative;
    display: block;
    line-height: 0;
    padding-top: 100%;
    border-radius: 10px;
    overflow: hidden;
    opacity: .7;
    border: 2px solid transparent;
}

.buy-detail__nav-wrap img {
    position: absolute;
    width: 100%;
    height: 100%;
    left: 0;
    top: 0;
    object-fit: cover;
}

.buy-detail__ttl {
    font-size: 26px;
    font-weight: 700;
    margin-bottom: 10px;
}

.buy-detail__contact {

    background: #ededed;
    border-radius: 10px;
    padding: 10px;
}

.buy-detail__desc {
    margin-bottom: 10px;
}

.buy-detail__subttl {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 10px;
}
.buy-detail__shared{
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 10px;
}
.buy-detail__shared .btn{
    background: #f4f4f4;
    padding: 8px 15px;
    border-radius: 6px;
    font-size: 14px;
    color: #333;
    display: flex;
    align-items: center;
    gap: 6px;
    flex: auto;
}
.buy-detail__shared .btn svg, .buy-detail__shared .btn img{
    width: 25px;
    height: 25px;
}
.buy-detail__shared .btn.phone{
    background: #ff4757;
    color: white;
}
.buy-detail__shared .btn svg path{
    stroke: white;
}
/* comment */
.buy-comment {

    background-color: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.buy-comment:not(:first-child) {
    margin-top: 20px;
}

.buy-comment__header {
    padding: 16px 20px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.buy-comment__title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.buy-comment__count {
    font-size: 14px;
    color: #999;
}

.buy-comment__list {
    padding: 0;
    max-height: 500px;
    overflow-y: auto;
}

.buy-comment__item {
    padding: 16px 20px;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    gap: 12px;
}

.buy-comment__item:last-child {
    border-bottom: none;
}

.buy-comment__avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #e0e0e0;
    flex-shrink: 0;
    overflow: hidden;
}

.buy-comment__avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.buy-comment__content {
    flex: 1;
    min-width: 0;
}

.buy-comment__user-info {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.buy-comment__username {
    font-size: 15px;
    font-weight: 600;
    color: #333;
}

.buy-comment__time {
    font-size: 13px;
    color: #999;
}

.buy-comment__text {
    font-size: 14px;
    color: #333;
    line-height: 1.5;
    margin-bottom: 8px;
    word-wrap: break-word;
}

.buy-comment__actions {
    display: flex;
    gap: 16px;
    align-items: center;
}

.buy-comment__action-btn {
    background: none;
    border: none;
    color: #999;
    font-size: 13px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.buy-comment__action-btn:hover {
    background-color: #f5f5f5;
    color: #333;
}

.buy-comment__action-btn svg {
    width: 16px;
    height: 16px;
}

.buy-comment__action-btn--liked {
    color: #ff4757;
}

.buy-comment__action-btn--liked svg {
    fill: #ff4757;
}

.buy-comment__input-wrapper {
    padding: 16px 20px;
    border-top: 1px solid #e0e0e0;
    display: flex;
    gap: 12px;
    align-items: self-start;
}

.buy-comment__user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: #e0e0e0;
    flex-shrink: 0;
    overflow: hidden;
}

.buy-comment__user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.buy-comment__input-container {
    flex: 1;
    display: flex;
    gap: 8px;
    align-items: self-start;
}

.buy-comment__input {
    flex: 1;
    padding: 6px 16px;
    border: 1px solid #e0e0e0;
    border-radius: 20px;
    font-size: 14px;
    font-family: inherit;
    resize: none;
    min-height: 36px;
    max-height: 100px;
    line-height: 1.5;
    transition: border-color 0.2s ease;
}

.buy-comment__input:focus {
    outline: none;
    border-color: #1a4d2e;
}

.buy-comment__input::placeholder {
    color: #999;
}

.buy-comment__submit-btn {
    padding: 7px 20px;
    background-color: #1a4d2e;
    color: #ffffff;
    border: none;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.buy-comment__submit-btn:hover {
    background-color: #155027;
}

.buy-comment__submit-btn:active {
    transform: scale(0.95);
}

.buy-comment__submit-btn:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

.buy-comment__empty {
    padding: 60px 20px;
    text-align: center;
    color: #999;
}

.buy-comment__empty-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 16px;
    opacity: 0.3;
}

.buy-comment__empty-text {
    font-size: 15px;
}


.buy-comment__list::-webkit-scrollbar {
    width: 6px;
}

.buy-comment__list::-webkit-scrollbar-track {
    background: #f0f0f0;
}

.buy-comment__list::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}

.buy-comment__list::-webkit-scrollbar-thumb:hover {
    background: #999;
}

/* end */

/* profile buy */
.add-product {
    /* max-height: 100vh; */
    background-color: #ffffff;
}

.add-product__header {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    background-color: #ffffff;
    border-bottom: 1px solid #e0e0e0;
    position: sticky;
    top: 0;
    z-index: 10;
}

.add-product__back-btn {
    background: none;
    border: none;
    color: #333;
    font-size: 24px;
    cursor: pointer;
    padding: 8px;
    margin-right: 16px;
    display: flex;
    align-items: center;
}

.add-product__link {
    font-size: 16px;
    color: var(--color-main);
}

.add-product__title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    flex: 1;
}

.add-product__form {

    padding: 24px 20px;
}

.add-product__section {
    margin-bottom: 32px;
}

.add-product__section-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.add-product__section-title::before {
    content: '';
    width: 4px;
    height: 20px;
    background-color: #1a4d2e;
    border-radius: 2px;
}

.add-product__field {
    margin-bottom: 20px;
}

.add-product__label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #333;
    margin-bottom: 8px;
}

.add-product__required {
    color: #ff4757;
    margin-left: 4px;
}

.add-product__input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 15px;
    font-family: inherit;
    transition: border-color 0.2s ease;
}

.add-product__input:focus {
    outline: none;
    border-color: #1a4d2e;
}

.add-product__input::placeholder {
    color: #999;
}

.add-product__select {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 15px;
    font-family: inherit;
    background-color: #ffffff;
    cursor: pointer;
    transition: border-color 0.2s ease;
}

.add-product__select:focus {
    outline: none;
    border-color: #1a4d2e;
}

.add-product__textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 15px;
    font-family: inherit;
    resize: vertical;
    min-height: 80px;
    transition: border-color 0.2s ease;
}

.add-product__textarea:focus {
    outline: none;
    border-color: #1a4d2e;
}

.add-product__textarea--large {
    min-height: 150px;
}

.add-product__upload-area {
    border: 2px dashed #e0e0e0;
    border-radius: 8px;
    padding: 32px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    background-color: #fafafa;
}

.add-product__upload-area:hover {
    border-color: #1a4d2e;
    background-color: #f0f8f4;
}

.add-product__upload-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 16px;
    color: #999;
}

.add-product__upload-text {
    font-size: 15px;
    color: #333;
    margin-bottom: 8px;
}

.add-product__upload-hint {
    font-size: 13px;
    color: #999;
}

.add-product__file-input {
    display: none;
}

.add-product__preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 12px;
    margin-top: 16px;
}

.add-product__preview-item {
    position: relative;
    padding-top: 100%;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #e0e0e0;
}

.add-product__preview-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.add-product__remove-btn {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 24px;
    height: 24px;
    padding: 0;
    background-color: rgba(0, 0, 0, 0.7);
    border: none;
    border-radius: 50%;
    color: #ffffff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease;
}

.add-product__remove-btn:hover {
    background-color: rgba(255, 71, 87, 0.9);
}

.add-product__char-count {
    font-size: 12px;
    color: #999;
    text-align: right;
    margin-top: 4px;
}

.add-product__actions {
    position: sticky;
    bottom: 0;
    padding: 16px 20px;
    background-color: #ffffff;
    border-top: 1px solid #e0e0e0;
    display: flex;
    gap: 12px;
}

.add-product__btn {
    flex: 1;
    padding: 8px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.add-product__btn--primary {
    background-color: #1a4d2e;
    color: #ffffff;
}

.add-product__btn--primary:hover {
    background-color: #155027;
}

.add-product__btn--primary:active {
    transform: scale(0.98);
}

.add-product__btn--secondary {
    background-color: #f5f5f5;
    color: #666;
    border: 1px solid #e0e0e0;
}

.add-product__btn--secondary:hover {
    background-color: #ebebeb;
}

.add-product .buy-sell {
    padding: 20px;
}

.search-bar {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    padding: 15px;
    gap: 10px;
}


.filter-item {
    border: 1px solid lightgray;
    border-radius: 6px;
}

.filter-category .category-toggle,
.filter-location .location-toggle {
    border: none !important;
    background-color: transparent !important;
    font-weight: 600;
    color: #333;
    padding: 10px;
    font-size: 16px;
}


.category-toggle::after,
.location-toggle::after {
    display: none;
}

/* Nút Tìm Kiếm */
.search-btn {
    background-color: #ffc107;
    border-color: #ffc107;
    color: #333;
    font-weight: 700;
    border-radius: 6px;
    padding: 10px 25px;
    height: 100%;
    /* margin-left: 6px; */
    font-size: 16px;
    white-space: nowrap;
}

.search-input-group {
    background: #f4f4f4;
    border-radius: 8px;
    padding: 3px 10px;
}

.search-input-group .search-icon {
    background-color: transparent;
    border: none;
    /* color: #999; */
    font-size: 16px;
}

.search-input-group .search-input {
    border: none;
    box-shadow: none !important;
    padding-left: 0;
    font-size: 15px;
    background: transparent;
}

.location-popover {
    position: absolute !important;
    top: 100%;
    right: 0;
    left: auto !important;
    border-radius: 8px;
    border: none;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    min-width: 320px;
    padding: 0;
}

.location-picker {
    padding: 15px;
}

.location-picker-heading {
    font-size: 16px;
    font-weight: 700;
    color: #333;
    margin-bottom: 5px;
}

.location-popover hr {
    margin-top: 5px;
    margin-bottom: 15px;
    border-top: 1px solid #eee;
}

.custom-form-group {
    margin-bottom: 15px;
}

.custom-form-group label {
    font-size: 14px;
    font-weight: 600;
    color: #555;
}

.required-star {
    color: #f00;
}

.custom-select {
    border: 1px solid #ddd;
    border-radius: 4px;
    height: calc(1.5em + .75rem + 2px);
}


.apply-btn {
    background-color: #ffc107;
    border-color: #ffc107;
    color: #333;
    font-weight: 700;
    margin-top: 10px;
    border-radius: 6px;
}

/* end profile buy */
@media (min-width: 992px) {
    .hidden-min-lg {
        display: none !important;
    }
}

@media (max-width: 992px) {
    .wrap-profile-container {
        padding-bottom: 0px !important;
    }

    .add-product__btn {
        padding: 5px 24px
    }

    .buy-category>.buy-category__row {}

    .buy-category__row>* {
        padding: 0 5px;
    }

    .buy-comment {
        box-shadow: none;
    }

    .buy-comment__header {
        padding: 12px 16px;
    }

    .buy-comment__item {
        padding: 12px 16px;
    }

    .buy-comment__input-wrapper {
        padding: 12px 16px;
    }

    .buy-comment__avatar {
        width: 36px;
        height: 36px;
    }

    .buy-comment__user-avatar {
        width: 32px;
        height: 32px;
    }

    .buy-detail__ttl {
        font-size: 20px;
        margin-bottom: 7px;
    }

    .buy-detail__desc:not(:last-child) {
        margin-bottom: 10px;
    }

    .buy-detail__price {
        font-size: 18px;
    }

    .add-product__link .text,
    .add-product__title .icon {
        display: none;
    }

    .add-product__header {
        padding: 10px;
    }

    .add-product__back-btn {
        padding: 4px;
        margin-right: 4px;
    }

    .add-product__title {
        font-size: 16px;
        line-height: 1.4;
    }
}

@media (max-width: 610px) {
    .search-bar {
        flex-wrap: wrap;
        position: relative;
    }

    .search-bar .filter-item {
        display: none;
    }

    .search-input-group .search-icon {
        display: none;
    }

    .search-bar .search-btn {
        position: absolute;
        right: 16px;
        top: 15px;
        padding: 11px 20px;
        height: auto;
    }
    .search-input-group .search-input{
        padding-right: 100px;
    }

}
