/* LilaBloom catalog and product detail pages */
html, body {
    max-width: 100%;
    overflow-x: clip;
}

.catalog-main,
.product-page-main {
    background: #fffdf9;
    color: #34252e;
}

.catalog-hero {
    width: min(1180px, calc(100% - 48px));
    margin: 0 auto;
    padding: clamp(70px, 9vw, 118px) 0 34px;
}

.catalog-hero .eyebrow,
.product-breadcrumb {
    margin: 0 0 14px;
    color: #9b5d7f;
    font-size: 11px;
    font-weight: 850;
    letter-spacing: .17em;
    text-transform: uppercase;
}

.catalog-hero h1 {
    max-width: 800px;
    margin: 0 0 18px;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(46px, 7vw, 78px);
    font-weight: 500;
    letter-spacing: -.045em;
    line-height: .98;
}

.catalog-hero > p:not(.eyebrow) {
    max-width: 680px;
    margin: 0;
    color: #77656e;
    font-size: 16px;
    line-height: 1.7;
}

.catalog-controls {
    width: min(1180px, calc(100% - 48px));
    margin: 0 auto 34px;
    padding: 20px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 210px;
    gap: 12px;
    border: 1px solid rgba(51,37,45,.1);
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 10px 35px rgba(73,48,61,.05);
}

.catalog-search,
.catalog-sort {
    width: 100%;
    min-height: 48px;
    border: 1px solid rgba(51,37,45,.18);
    border-radius: 999px;
    background: #fffdf9;
    color: #34252e;
    font: inherit;
    outline: none;
}

.catalog-search {
    padding: 0 18px;
}

.catalog-sort {
    padding: 0 38px 0 16px;
}

.catalog-search:focus,
.catalog-sort:focus {
    border-color: #9b5d7f;
    box-shadow: 0 0 0 3px rgba(155,93,127,.12);
}

.catalog-filter-wrap {
    width: min(1180px, calc(100% - 48px));
    margin: 0 auto 26px;
}

.catalog-filters {
    display: flex;
    gap: 9px;
    overflow-x: auto;
    padding: 2px 0 8px;
    scrollbar-width: none;
}

.catalog-filters::-webkit-scrollbar { display: none; }

.catalog-filter {
    flex: 0 0 auto;
    min-height: 40px;
    padding: 0 16px;
    border: 1px solid rgba(51,37,45,.18);
    border-radius: 999px;
    background: transparent;
    color: #59434f;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
}

.catalog-filter.active {
    border-color: #34252e;
    background: #34252e;
    color: white;
}

.catalog-result-line {
    width: min(1180px, calc(100% - 48px));
    margin: 0 auto 16px;
    display: flex;
    justify-content: space-between;
    gap: 16px;
    color: #88757f;
    font-size: 12px;
    font-weight: 700;
}

.catalog-grid,
.related-grid {
    width: min(1180px, calc(100% - 48px));
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
}

.catalog-grid {
    padding-bottom: clamp(86px, 10vw, 140px);
}

.catalog-card,
.related-card {
    min-width: 0;
    overflow: hidden;
    border: 1px solid rgba(51,37,45,.09);
    border-radius: 20px;
    background: #fff;
    color: #34252e;
    text-decoration: none;
    box-shadow: 0 8px 28px rgba(73,48,61,.05);
    transition: transform .2s ease, box-shadow .2s ease;
}

.catalog-card:hover,
.related-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 18px 40px rgba(73,48,61,.11);
}

.catalog-card-image-wrap,
.related-card-image-wrap {
    position: relative;
    overflow: hidden;
    background: #f3ece7;
    aspect-ratio: 1 / 1.12;
}

.catalog-card-image,
.related-card-image {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    transition: transform .35s ease;
}

.catalog-card:hover .catalog-card-image,
.related-card:hover .related-card-image {
    transform: scale(1.025);
}

.catalog-card-body,
.related-card-body {
    padding: 15px 15px 17px;
}

.catalog-card-category,
.related-card-category {
    margin: 0 0 7px;
    color: #9b5d7f;
    font-size: 9px;
    font-weight: 850;
    letter-spacing: .13em;
    text-transform: uppercase;
}

.catalog-card h2,
.related-card h3 {
    margin: 0 0 9px;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 20px;
    font-weight: 500;
    line-height: 1.08;
}

.catalog-card-price,
.related-card-price {
    margin: 0;
    font-size: 14px;
    font-weight: 850;
}

.catalog-stock-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 7px 9px;
    border-radius: 999px;
    background: rgba(52,37,46,.9);
    color: white;
    font-size: 9px;
    font-weight: 850;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.catalog-empty {
    grid-column: 1 / -1;
    padding: 60px 24px;
    border: 1px dashed rgba(51,37,45,.22);
    border-radius: 22px;
    text-align: center;
    color: #77656e;
}

.catalog-empty h2 {
    margin: 0 0 10px;
    color: #34252e;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 31px;
    font-weight: 500;
}

/* Product detail */
.product-page-shell {
    width: min(1180px, calc(100% - 48px));
    margin: 0 auto;
    padding: clamp(54px, 7vw, 92px) 0 clamp(80px, 10vw, 130px);
}

.product-breadcrumb a {
    color: inherit;
    text-decoration: none;
}

.product-detail {
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(360px, .92fr);
    gap: clamp(36px, 6vw, 82px);
    align-items: start;
}

.product-detail-gallery {
    min-width: 0;
}

.product-main-image-wrap {
    overflow: hidden;
    border-radius: 28px;
    background: #f3ece7;
}

.product-main-image {
    width: 100%;
    aspect-ratio: 1 / 1.08;
    display: block;
    object-fit: cover;
}

.product-detail-thumbs {
    margin-top: 12px;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
}

.product-detail-thumb {
    padding: 0;
    overflow: hidden;
    border: 1px solid transparent;
    border-radius: 12px;
    background: #f3ece7;
    cursor: pointer;
}

.product-detail-thumb.active {
    border-color: #34252e;
}

.product-detail-thumb img {
    width: 100%;
    aspect-ratio: 1 / 1;
    display: block;
    object-fit: cover;
}

.product-detail-copy {
    position: sticky;
    top: 108px;
}

.product-detail-category {
    margin: 0 0 12px;
    color: #9b5d7f;
    font-size: 10px;
    font-weight: 850;
    letter-spacing: .16em;
    text-transform: uppercase;
}

.product-detail-copy h1 {
    margin: 0 0 18px;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(42px, 5vw, 66px);
    font-weight: 500;
    letter-spacing: -.04em;
    line-height: .98;
}

.product-detail-price {
    margin: 0 0 24px;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 29px;
    font-weight: 700;
}

.product-detail-description {
    margin: 0 0 26px;
    color: #715f68;
    font-size: 15px;
    line-height: 1.75;
    white-space: pre-line;
}

.product-detail-meta {
    margin: 0 0 28px;
    padding: 0;
    display: grid;
    gap: 0;
    list-style: none;
    border-top: 1px solid rgba(51,37,45,.1);
}

.product-detail-meta li {
    padding: 13px 0;
    display: grid;
    grid-template-columns: 112px 1fr;
    gap: 14px;
    border-bottom: 1px solid rgba(51,37,45,.1);
    font-size: 13px;
}

.product-detail-meta strong {
    color: #34252e;
}

.product-detail-meta span {
    color: #77656e;
}

.product-actions {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
}

.product-add-button,
.product-view-bag {
    min-height: 52px;
    border-radius: 999px;
    font: inherit;
    font-size: 13px;
    font-weight: 850;
}

.product-add-button {
    border: 1px solid #34252e;
    background: #34252e;
    color: white;
    cursor: pointer;
}

.product-add-button:disabled {
    opacity: .48;
    cursor: not-allowed;
}

.product-view-bag {
    padding: 0 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(51,37,45,.2);
    color: #34252e;
    text-decoration: none;
}

.product-action-status {
    min-height: 22px;
    margin: 10px 0 0;
    color: #7e526b;
    font-size: 12px;
    font-weight: 750;
}

.related-products {
    margin-top: clamp(80px, 10vw, 130px);
}

.related-heading {
    width: min(1180px, calc(100% - 48px));
    margin: 0 auto 26px;
}

.related-heading h2 {
    margin: 0;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(34px, 4.5vw, 52px);
    font-weight: 500;
    letter-spacing: -.035em;
}

.product-not-found {
    padding: 90px 20px;
    text-align: center;
}

.product-not-found h1 {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 46px;
    font-weight: 500;
}

@media (max-width: 900px) {
    .catalog-grid,
    .related-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .product-detail {
        grid-template-columns: 1fr;
    }

    .product-detail-copy {
        position: static;
    }
}

@media (max-width: 680px) {
    .catalog-hero,
    .catalog-controls,
    .catalog-filter-wrap,
    .catalog-result-line,
    .catalog-grid,
    .related-grid,
    .product-page-shell,
    .related-heading {
        width: calc(100% - 28px);
    }

    .catalog-hero {
        padding-top: 52px;
    }

    .catalog-controls {
        grid-template-columns: 1fr;
        padding: 14px;
        border-radius: 18px;
    }

    .catalog-grid,
    .related-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .catalog-card,
    .related-card {
        border-radius: 16px;
    }

    .catalog-card-body,
    .related-card-body {
        padding: 11px 11px 13px;
    }

    .catalog-card h2,
    .related-card h3 {
        font-size: 16px;
    }

    .catalog-card-category,
    .related-card-category {
        font-size: 8px;
    }

    .catalog-card-price,
    .related-card-price {
        font-size: 13px;
    }

    .product-page-shell {
        padding-top: 36px;
    }

    .product-main-image-wrap {
        border-radius: 20px;
    }

    .product-detail-thumbs {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .product-detail-copy h1 {
        font-size: clamp(39px, 12vw, 52px);
    }

    .product-actions {
        grid-template-columns: 1fr;
    }

    .product-view-bag {
        min-height: 48px;
    }

    .product-detail-meta li {
        grid-template-columns: 90px 1fr;
    }
}
