/*
 * Pages migrated from Shopline's page builder (inc/shopline-pages.php).
 *
 * Each page prints its own section CSS (scoped to .jase-shopline-page by
 * jase-core's ShoplineCss); this file is what those sections took for granted
 * from Shopline's theme: the section widths, the gallery / image-with-text /
 * text-block base rules, Bootstrap-like defaults (14px text, 10px rem-era
 * spacing), plus the WooCommerce product grids that replaced Shopline's
 * product lists. Re-implemented, not copied. Keep visual fixes here; never
 * hand-edit a page's imported CSS.
 */

/* ------------------------------------------------------------ page frame */

/* Section pages run edge to edge like on Shopline; the sections size themselves. */
.jase-sections-page .site-content > .col-full {
    max-width: none;
    padding-left: 0;
    padding-right: 0;
}

.jase-sections-page .site-main,
.jase-sections-page .hentry,
.jase-sections-page .content-area {
    margin-bottom: 0;
}

.jase-sections-page .site-header {
    margin-bottom: 0;
}

.jase-sections-page .storefront-breadcrumb,
.jase-sections-page .woocommerce-breadcrumb {
    display: none;
}

.jase-sections-page .entry-content,
.jase-sections-page.page .entry-content {
    max-width: none;
    margin: 0;
}

/* Shopline shows no title on these pages; keep it for screen readers. */
.jase-hide-title .entry-header {
    position: absolute !important;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(1px, 1px, 1px, 1px);
    white-space: nowrap;
}

/* ------------------------------------------------------------ base */

/* The page's own absolutely positioned and z-indexed pieces stay inside the
   content: they cannot land on, or paint over, the theme's header. */
.jase-shopline-page {
    position: relative;
    z-index: 0;
    font-size: 14px;
    line-height: 1.42857;
    word-wrap: break-word;
}

.jase-shopline-page *,
.jase-shopline-page *::before,
.jase-shopline-page *::after {
    box-sizing: border-box;
}

.jase-shopline-page img {
    vertical-align: middle;
}

.jase-shopline-page p {
    margin: 0 0 10px;
}

.jase-shopline-page ul,
.jase-shopline-page ol {
    margin: 0 0 10px;
    padding-left: 40px;
}

.jase-shopline-page h1,
.jase-shopline-page h2,
.jase-shopline-page h3,
.jase-shopline-page h4,
.jase-shopline-page h5,
.jase-shopline-page h6 {
    margin: 20px 0 10px;
    line-height: 1.1;
    font-weight: 500;
    letter-spacing: normal;
}

.jase-shopline-page h1 { font-size: 36px; }
.jase-shopline-page h2 { font-size: 30px; }
.jase-shopline-page h3 { font-size: 24px; }
.jase-shopline-page h4 { font-size: 18px; }
.jase-shopline-page h5 { font-size: 14px; }
.jase-shopline-page h6 { font-size: 12px; }

.jase-shopline-page table {
    margin: 0 0 10px;
}

/* Section buttons are plain elements styled by the page, not theme buttons. */
.jase-shopline-page button {
    background: none;
    border: 0;
    border-radius: 0;
    padding: 0;
    color: inherit;
    font: inherit;
    font-weight: inherit;
    text-align: inherit;
    cursor: pointer;
}

.jase-shopline-page button:hover {
    background: none;
    color: inherit;
}

/* GEINAZ's in-page header: on Shopline it sits behind the store's fixed
   header and is never seen, so it is not shown here either. */
.jase-shopline-page .gzx .site-shell > .site-header {
    display: none;
}

/* ------------------------------------------------------------ Shopline sections */

.jase-shopline-page .section-width {
    width: 100%;
    margin: 0 auto;
    padding: 30px 15px;
}

.jase-shopline-page .section-width.section-full-width {
    width: 100%;
    margin: 0;
    padding: 0;
}

@media (min-width: 768px) {
    .jase-shopline-page .section-width { width: 750px; }
}

@media (min-width: 992px) {
    .jase-shopline-page .section-width { width: 970px; }
}

@media (min-width: 1200px) {
    .jase-shopline-page .section-width { width: 1170px; }
}

.jase-shopline-page .gallery__link {
    width: 100%;
}

/* img.x beats the theme's `.page .entry-content img { height: auto }`. */
.jase-shopline-page img.gallery__img,
.jase-shopline-page img.image-with-text__image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    overflow: hidden;
}

.jase-shopline-page .gallery__title {
    margin: 0;
    max-height: 100%;
    overflow: hidden;
    color: #fff;
    font-size: 24px;
    z-index: 1;
}

.jase-shopline-page .gallery__mask {
    position: absolute;
    top: 0;
    left: 0;
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    padding: 10px;
}

.jase-shopline-page .gallery__mask--top { justify-content: flex-start; }
.jase-shopline-page .gallery__mask--middle { justify-content: center; }
.jase-shopline-page .gallery__mask--bottom { justify-content: flex-end; }
.jase-shopline-page .gallery__mask--20 { background-color: rgba(0, 0, 0, .2); }
.jase-shopline-page .gallery__mask--40 { background-color: rgba(0, 0, 0, .4); }
.jase-shopline-page .gallery__mask--60 { background-color: rgba(0, 0, 0, .6); }
.jase-shopline-page .gallery__mask--80 { background-color: rgba(0, 0, 0, .8); }

.jase-shopline-page .image-with-text__image-container {
    width: 100%;
    padding-bottom: 15px;
}

.jase-shopline-page .image-with-text__image-link {
    width: 100%;
}

@media (min-width: 768px) {
    .jase-shopline-page .image-with-text__image-container {
        width: 50%;
        padding: 15px;
    }
}

.jase-shopline-page .text-block__item {
    flex: 1;
    color: #333;
    word-break: break-word;
}

.jase-shopline-page .text-block__title,
.jase-shopline-page .text-block__subtitle,
.jase-shopline-page .text-block__content {
    margin: 0;
    padding: 15px 0;
}

@media (min-width: 768px) {
    .jase-shopline-page .text-block__title,
    .jase-shopline-page .text-block__subtitle,
    .jase-shopline-page .text-block__content {
        padding: 15px;
    }
}

.jase-shopline-page .text-block__title { font-size: 24px; }
.jase-shopline-page .text-block__subtitle { font-size: 18px; opacity: .6; }
.jase-shopline-page .text-block__content { font-size: 16px; }
.jase-shopline-page .text-block__content a { color: #3493fb; }

.jase-shopline-page .text-block__button-container {
    display: flex;
    padding-top: 15px;
}

@media (min-width: 768px) {
    .jase-shopline-page .text-block__button-container { padding: 15px; }
}

.jase-shopline-page .text-block__button {
    display: inline-block;
    padding: 6px 80px;
    border: 1px solid var(--jase-red);
    border-radius: 3px;
    background: var(--jase-red);
    color: #fff;
    font-size: 16px;
    text-align: center;
    text-decoration: none;
}

.jase-shopline-page .text-block__button:hover {
    background: #fff;
    color: var(--jase-red);
}

/* FAQ sections: the page sets --page-background per section. */
.jase-shopline-page .accordion-widget {
    background-color: var(--page-background, #fff);
    color: var(--page-text, #333);
}

.jase-shopline-page .accordion__title {
    margin: 0;
    padding: 15px 0;
    font-size: 24px;
    text-align: center;
}

.jase-shopline-page .accordion__items summary {
    font-size: 18px;
}

/* Section headings above product grids. */
.jase-shopline-page .product-list__title,
.jase-shopline-page .jase-products-tab {
    margin: 0;
    padding: 15px;
    color: #333;
    font-size: 24px;
    text-align: center;
    word-break: break-all;
}

.jase-shopline-page .jase-products-tab {
    font-size: 20px;
}

.jase-shopline-page .product-list__btn {
    display: flex;
    width: fit-content;
    margin: 15px auto;
    padding: 6px 80px;
    border: 1px solid var(--jase-red);
    border-radius: 3px;
    background: var(--jase-red);
    color: #fff;
    font-size: 16px;
    text-decoration: none;
}

/* ------------------------------------------------------------ product grids */

/* [products] replaced Shopline's product lists: WooCommerce cards in the section. */
.jase-shopline-page .jase-products {
    padding: 15px;
}

.jase-shopline-page .jase-products ul.products {
    margin: 0;
    padding: 0;
}

/* Bestseller badges ("熱銷 No.N"), numbered in grid order. */
.jase-shopline-page .jase-products--ranked ul.products {
    counter-reset: jase-rank;
}

.jase-shopline-page .jase-products--ranked li.product {
    position: relative;
    counter-increment: jase-rank;
}

.jase-shopline-page .jase-products--ranked li.product::before {
    content: "熱銷 No." counter(jase-rank);
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 2;
    padding: 4px 9px;
    border-radius: 999px;
    background: #2f4b46;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.2;
    pointer-events: none;
}

.jase-shopline-page .jase-products--ranked li.product:nth-child(1)::before { background: #e59a1c; color: #3a2a00; }
.jase-shopline-page .jase-products--ranked li.product:nth-child(2)::before { background: #aeb6bd; color: #2b3237; }
.jase-shopline-page .jase-products--ranked li.product:nth-child(3)::before { background: #b9774a; }

/* ------------------------------------------------------------ text pages */

/* Shopline's text pages use its 1170px container, not the theme's 900px column. */
.jase-shopline-page-body.page .entry-content {
    max-width: none;
}

.jase-layout-text {
    font-size: 14px;
    line-height: 1.6;
}

/* Shopline's rich-text link colour (the theme's links are body-coloured). */
.jase-layout-text a {
    color: #3493fb;
}

.jase-layout-text img {
    max-width: 100%;
    height: auto;
}

.jase-layout-text iframe {
    max-width: 100%;
}

/* Blog list page (/pages/66704f856a894300160e34a6): Shopline's post list,
   text left and cover image right, inside its 1170px container. */
.jase-shopline-page .container {
    max-width: 1170px;
    margin: 0 auto;
    padding: 0 15px;
}

.jase-shopline-page .PostList .List-item {
    margin: 0;
    padding: 30px 0;
}

.jase-shopline-page .PostList .List-item a {
    color: inherit;
    text-decoration: none;
}

.jase-shopline-page .PostList .List-item-content {
    display: flex;
    flex-direction: row-reverse;
    align-items: flex-start;
    gap: 30px;
}

.jase-shopline-page .PostList .List-item-excerpt {
    flex: 0 0 360px;
}

.jase-shopline-page .PostList .List-item-excerpt img {
    width: 100%;
}

.jase-shopline-page .PostList .List-item-text {
    flex: 1;
}

.jase-shopline-page .PostList .List-item-title {
    margin: 0 0 20px;
    font-size: 22px;
}

.jase-shopline-page .PostList .List-item-preview {
    display: -webkit-box;
    margin-bottom: 20px;
    overflow: hidden;
    color: var(--jase-muted);
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

.jase-shopline-page .PostList .List-item-text > span {
    color: var(--jase-red);
    font-size: 12px;
}

@media (max-width: 767px) {
    .jase-shopline-page .PostList .List-item-content {
        flex-direction: column-reverse;
        gap: 15px;
    }

    .jase-shopline-page .PostList .List-item-excerpt {
        flex-basis: auto;
        width: 100%;
    }
}
