/**
 * BuildWithMe — home services quick links and product/service listing pages.
 */

/* ——— Home content below slider ——— */
#wrapper.index-wrapper {
    padding-top: 1.75rem;
    padding-bottom: 2.5rem;
}

#wrapper.index-wrapper > .container > .row > .section:first-of-type,
#wrapper.index-wrapper .section-services-quick-links {
    margin-top: 0.25rem;
}

/* ——— Services quick links ——— */
.section-services-quick-links .section-header {
    margin-bottom: 1.25rem;
}

.section-services-quick-links .section-header .title {
    font-size: 1.25rem;
    letter-spacing: -0.01em;
}

.section-services-quick-links .bwm-services-quick-row {
    margin-left: -10px;
    margin-right: -10px;
}

.section-services-quick-links .bwm-services-quick-row > [class*="col-"] {
    padding-left: 10px;
    padding-right: 10px;
    margin-bottom: 1rem;
    display: flex;
}

.section-services-quick-links .service-quick-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1 1 auto;
    width: 100%;
    min-height: 7.5rem;
    padding: 1.15rem 0.75rem;
    margin-bottom: 0;
    text-align: center;
    text-decoration: none;
    color: inherit;
    border: 1px solid #e4e7ee;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 1px 0 rgba(44, 52, 76, 0.04);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease, color 0.2s ease;
}

.section-services-quick-links .service-quick-link:hover,
.section-services-quick-links .service-quick-link:focus {
    border-color: var(--vr-color-main, #1bc5bd);
    box-shadow: 0 6px 20px rgba(27, 197, 189, 0.12);
    transform: translateY(-2px);
    text-decoration: none;
    color: inherit;
}

.section-services-quick-links .service-icon {
    font-size: 1.75rem;
    color: var(--vr-color-main, #1bc5bd);
    margin-bottom: 0.65rem;
    line-height: 1;
}

.section-services-quick-links .service-name {
    font-size: 0.8125rem;
    font-weight: 600;
    color: #2c344c;
    line-height: 1.35;
    max-width: 100%;
}

/* ——— Listing / products grid (#wrapper) ——— */
#wrapper .product-list-header {
    padding-bottom: 1.25rem;
    margin-bottom: 0.25rem;
    border-bottom: 1px solid #e8eaef;
}

#wrapper .product-list-title {
    font-size: 1.375rem;
    letter-spacing: -0.02em;
}

#wrapper .category-description {
    margin-top: 0.35rem;
    margin-bottom: 0;
    max-width: 48rem;
}

#wrapper .container-products-page {
    margin-bottom: 4rem;
}

#wrapper .container-products-page > .row:first-child .sidebar-widget {
    background: #f7f8fc;
    border: 1px solid #e8eaef;
    border-radius: 12px;
    padding: 1.25rem 1.25rem 1rem;
    margin-bottom: 0.25rem;
}

#wrapper .container-products-page .form-inline-filter .form-control,
#wrapper .container-products-page .form-inline-filter .select2-container {
    margin-bottom: 0;
}

#wrapper .container-products-page .form-inline-filter label.small {
    margin-bottom: 0.35rem;
}

#wrapper .container-products-page .product-list-content {
    padding-top: 0.75rem;
}

#wrapper .container-products-page .row-product {
    margin-left: -10px;
    margin-right: -10px;
    /* Default .row stretch makes short cards grow to match the tallest in the row */
    align-items: flex-start;
}

#wrapper .container-products-page .row-product .col-product {
    padding-left: 10px;
    padding-right: 10px;
    margin-bottom: 1.25rem;
}

/*
 * Theme .product-description is for the product *detail* tabs (min-height: 300px; margin-bottom: 90px).
 * Listing cards (e.g. labor) reused that class — reset inside grid cards only.
 */
#wrapper .container-products-page .product-item .product-description {
    min-height: 0 !important;
    margin-bottom: 0 !important;
    float: none;
    width: 100%;
    display: block;
}

#wrapper .container-products-page .bwm-listing-card-excerpt {
    width: 100%;
    max-width: 100%;
}

#wrapper .container-products-page .bwm-listing-card-excerpt p {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-bottom: 0;
}

#wrapper .container-products-page .product-item {
    border-radius: 10px;
    border: 1px solid #eceef3;
    background: #fff;
    box-shadow: 0 2px 8px rgba(44, 52, 76, 0.04);
    margin-bottom: 0;
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

#wrapper .container-products-page .product-item:hover {
    border-color: #dde1ea;
    box-shadow: 0 8px 24px rgba(44, 52, 76, 0.08);
}

/* Category pill over thumbnail (not above it in document flow) */
#wrapper .container-products-page .bwm-service-listing-card .bwm-labor-card-thumb-wrap {
    position: relative;
    display: block;
    width: 100%;
}

#wrapper .container-products-page .bwm-service-listing-card .bwm-labor-card-thumb-badge {
    position: absolute;
    top: 0.5rem;
    inset-inline-start: 0.5rem;
    z-index: 4;
    max-width: calc(100% - 3.5rem);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    pointer-events: none;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
}

/* Labor service listing cards — body spacing (title, badge, excerpt, price) */
#wrapper .container-products-page .bwm-service-listing-card .item-details.bwm-service-listing-card__body {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.35rem;
    padding: 0.65rem 0.9rem 0.9rem;
    float: none;
}

#wrapper .container-products-page .bwm-service-listing-card .item-details .product-title {
    margin: 0;
    padding: 0;
    line-height: 1.3;
    font-size: 0.9375rem;
}

#wrapper .container-products-page .bwm-service-listing-card .item-details .product-title a {
    line-height: 1.35;
    padding: 0;
}

#wrapper .container-products-page .bwm-service-listing-card .item-details .product-user.bwm-service-listing-card__meta {
    margin: 0;
    line-height: 1.2;
}

#wrapper .container-products-page .bwm-service-listing-card .item-details .badge-sm {
    font-weight: 600;
    padding: 0.22em 0.55em;
    border-radius: 6px;
    vertical-align: middle;
}

#wrapper .container-products-page .bwm-service-listing-card .bwm-service-listing-card__excerpt {
    margin: 0;
    margin-top: 0.05rem;
}

#wrapper .container-products-page .bwm-service-listing-card .bwm-listing-card-excerpt p {
    line-height: 1.35;
    color: #6b7280 !important;
}

#wrapper .container-products-page .bwm-service-listing-card .item-meta.bwm-service-listing-card__footer {
    margin: 0;
    margin-top: 0.25rem;
    padding-top: 0.55rem;
    border-top: 1px solid #eef0f4;
}

#wrapper .container-products-page .bwm-service-listing-card .product-price {
    margin: 0;
    line-height: 1.45;
}

#wrapper .container-products-page .bwm-service-listing-card .product-price .lbl-price {
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #1a1f2e;
}

#wrapper .container-products-page .bwm-service-listing-card .product-price .text-muted.small {
    font-size: 0.75rem;
    font-weight: 500;
}
