/* The used-product cards share the same layout in the catalog and homepage. */
body #products-grid > .used-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    background: #1d1d1d !important;
    border: 1px solid #3a3a3a !important;
    border-radius: 24px !important;
    padding: 2px !important;
    color: #f7f7f7;
    transform: none !important;
}

body #products-grid > .used-card .product-image-wrapper {
    flex: none;
    height: auto !important;
    aspect-ratio: 4 / 3 !important;
    border-radius: 21px !important;
    background: #242424 !important;
}

body #products-grid > .used-card .product-content {
    padding: 12px clamp(10px, 1.3vw, 18px) 15px !important;
}

body #products-grid > .used-card .product-card-tags {
    padding: 0;
    margin: 0 0 8px;
    min-height: 42px;
    gap: 8px;
}

body #products-grid > .used-card .used-tag {
    background: #373737;
    color: #f7f7f7;
}

body #products-grid > .used-card .product-brand {
    display: inline-block;
    background: none;
    color: #b2b2b2;
}

body #products-grid > .used-card .product-card-tags > button.favorite-heart,
body #products-grid > .used-card .favorite-mark {
    background: #262626 !important;
    color: #f7f7f7 !important;
    border: 1px solid #454545 !important;
    border-radius: 11px !important;
}

body #products-grid > .used-card .favorite-mark {
    border: 0 !important;
}

body #products-grid > .used-card .favorite-heart[aria-pressed="true"] svg {
    fill: currentColor;
}

body #products-grid > .used-card .product-title {
    display: block;
    min-height: 0 !important;
    margin: 0 0 12px !important;
    font-size: clamp(18px, 1.6vw, 23px) !important;
    font-weight: 700 !important;
    line-height: 1.25 !important;
    color: #f7f7f7 !important;
}

.used-card-specs {
    display: grid;
    grid-template-columns: minmax(0, 0.77fr) minmax(0, 1.23fr);
    margin: 0 0 10px;
    padding: 10px 0;
    border-radius: 12px;
    background: #292929;
}

.used-card-specs > div {
    min-width: 0;
    padding: 0 10px;
    overflow-wrap: anywhere;
}

.used-card-specs > div + div {
    border-inline-start: 1px solid #454545;
}

.used-card-specs dt {
    font-size: 12px;
    color: #b2b2b2;
}

.used-card-specs dd {
    margin: 4px 0 0;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.25;
}

.used-card-details {
    margin: 0 0 8px;
    font-size: 12px;
    overflow-wrap: anywhere;
}

.used-card-store {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    color: #d2d2d2;
    font-family: var(--remake-system-font, inherit);
    font-size: 12px;
    font-weight: inherit;
    line-height: 1.45;
    margin: 0 0 7px;
}

.used-card-store svg {
    flex: none;
    width: 14px;
    height: 14px;
    margin-top: 1px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.6;
}

.used-card-store span {
    min-width: 0;
    overflow-wrap: break-word;
}

.used-city-filter {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    max-width: 290px;
    margin: 0 0 12px;
    font-size: 14px;
    color: #d2d2d2;
}

.used-iphone-results .used-city-filter {
    grid-column: 2;
    margin-bottom: 0;
}

.used-iphone-results .used-catalog-filters {
    grid-row: 3 / span 3;
}

.used-city-filter select {
    min-width: 0;
    min-height: 44px;
    max-width: 100%;
    padding: 6px 10px;
    border: 1px solid #555;
    border-radius: 10px;
    background: #303030;
    color: #f0f0f0;
    color-scheme: dark;
    font-family: inherit;
    font-size: 16px;
    cursor: pointer;
}

.used-city-filter select:focus-visible {
    outline: 2px solid #eee;
    outline-offset: 2px;
}

.used-card-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 3px 10px;
    margin: 0 0 12px;
    color: #b2b2b2;
    font-size: 12px;
}

body #products-grid > .used-card .used-card-meta .remake-market-note {
    margin: 0 0 0 auto;
    color: inherit !important;
    font-size: inherit !important;
}

body #products-grid > .used-card .sim-toggle {
    order: 0;
}

.used-card-buy {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, auto);
    gap: 9px;
    align-items: center;
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid #3a3a3a;
}

body #products-grid > .used-card .used-card-buy .product-price-block,
body #products-grid > .used-card .used-card-buy .product-actions {
    order: 0;
    margin: 0 !important;
}

body #products-grid > .used-card .used-card-buy .product-price {
    display: flex;
    align-items: center;
    min-height: 44px;
    white-space: normal;
    overflow-wrap: anywhere;
    font-size: clamp(19px, 2.15vw, 33px) !important;
    color: #f7f7f7 !important;
}

body #products-grid > .used-card .used-card-buy .product-actions {
    display: grid;
    grid-template-columns: 44px auto;
    gap: 7px;
}

body #products-grid > .used-card .used-card-buy button {
    min-height: 44px !important;
    margin: 0 !important;
    padding: 7px 10px !important;
    border-radius: 10px !important;
    white-space: nowrap;
    font-size: 13px !important;
    box-shadow: none !important;
}

body #products-grid > .used-card .used-card-buy .btn-call-me:not(.is-added) {
    background: #f5f5f5 !important;
    color: #191919 !important;
    border-color: #f5f5f5 !important;
}

body #products-grid > .used-card .used-card-buy .btn-call {
    background: #262626 !important;
    color: #f7f7f7 !important;
    border-color: #4c4c4c !important;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    padding: 0 !important;
}

body #products-grid > .used-card .used-card-buy .btn-call svg {
    width: 19px;
    height: 19px;
}

@media (min-width: 768px) {
    body #products-grid:has(> .used-card):not(:has(> .product-card:not(.used-card))) {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        align-items: stretch;
    }
}

@media (min-width: 1040px) {
    body #products-grid:has(> .used-card):not(:has(> .product-card:not(.used-card))) {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    }
}

@media (max-width: 767.98px) {
    body #products-grid > .used-card {
        grid-column: 1 / -1;
    }
}

@media (max-width: 767.98px) {
    body #products #products-grid > .used-card .product-image-wrapper {
        aspect-ratio: 1 / 1 !important;
    }

    body #products #products-grid > .used-card .product-content {
        padding: 9px 11px 12px !important;
    }

    body #products #products-grid > .used-card .product-card-tags {
        margin-bottom: 5px;
    }

    body #products #products-grid > .used-card .product-title {
        margin-bottom: 10px !important;
        font-size: 17px !important;
        line-height: 1.24 !important;
    }

    body #products #products-grid > .used-card .used-card-specs {
        grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
        margin-bottom: 8px;
        padding: 8px 0;
    }

    body #products #products-grid > .used-card .used-card-specs > div {
        padding: 0 8px;
        overflow-wrap: break-word;
    }

    body #products #products-grid > .used-card .used-card-specs dt {
        font-size: 11px;
        line-height: 1.3;
    }

    body #products #products-grid > .used-card .used-card-specs dd {
        font-size: 15px;
        line-height: 1.22;
    }

    body #products #products-grid > .used-card .used-card-meta {
        margin-bottom: 10px;
    }

    body #products #products-grid > .used-card .used-card-buy {
        grid-template-columns: minmax(0, 1fr);
        gap: 7px;
        padding-top: 9px;
    }

    body #products #products-grid > .used-card .used-card-buy .product-price {
        min-height: 0;
        font-size: 23px !important;
        line-height: 1.15;
        white-space: nowrap;
        overflow-wrap: normal;
        font-variant-numeric: tabular-nums;
    }

    body #products #products-grid > .used-card .used-card-buy .product-actions {
        grid-template-columns: 44px minmax(0, 1fr);
        width: 100%;
    }

    body #products #products-grid > .used-card .used-card-buy .btn-call-me {
        min-width: 0;
        justify-content: center;
    }
}
