/*
 * ChamaeleonStyle V5 – General content pages
 * ===========================================
 * Styles old account/contact/legal markup without changing its business logic.
 */
.cs-title-main,
.cs-page-title {
    margin-bottom: 10px;
    font-size: clamp(2rem, 3vw, 3rem);
    font-weight: 800;
    letter-spacing: -0.03em;
}

.cs-title-sub,
.cs-card-title {
    margin-bottom: 12px;
    color: var(--cs-black);
    font-size: 17px;
    font-weight: 800;
}

.cs-page-sub {
    max-width: 760px;
    margin-bottom: 24px;
    color: var(--cs-muted);
    font-size: 14px;
}

.cs-grid-2,
.cs-form-grid-2 {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1px;
    background: var(--cs-border);
    border: 1px solid var(--cs-border);
}

.cs-grid-2 > .cs-col,
.cs-form-grid-2 > * {
    background: #fff;
}

/* Legacy account tiles. */
.flexlcentcont {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1px !important;
    width: 100%;
    background: var(--cs-border) !important;
    border: 1px solid var(--cs-border);
}

.flexmxitems {
    width: auto !important;
    margin: 0 !important;
    padding: 22px !important;
    background: #fff !important;
    text-align: left;
    line-height: 1.55 !important;
    font-size: 14px !important;
}

/* Generic legacy boxes that used to float beside one another. */
.boxfloat350,
.boxfloat500,
.boxfloat600 {
    display: block;
    width: 100% !important;
    max-width: 900px;
    margin: 0 0 24px !important;
    padding: 22px;
    float: none !important;
    border: 1px solid var(--cs-border);
    background: #fff;
}

/* Contact / legal pages may contain plain tables. */
.content_content table:not(.cs-cart-table) td,
.content_content table:not(.cs-cart-table) th {
    padding: 9px 10px;
    border-bottom: 1px solid var(--cs-border);
    vertical-align: top;
}

/* ==========================================================================
   OUTLET / SINGLE SALE
   ==========================================================================
   content/singlesale.php uses its own legacy markup:
     .gallery
       .gallery-item
         image
         .article
         .price
         .size
         .order-button / .inquiry-button
         .product-info
         .product-textil

   These rules deliberately style only that markup and therefore do not
   interfere with normal product lists or product detail pages.
   ========================================================================== */


/* --------------------------------------------------------------------------
   Sale page introduction
   -------------------------------------------------------------------------- */

.boxinhalteabstand > #after-floating-box > font {
    display: block;
    max-width: 1050px;
    margin: 0;
    font-family: var(--font);
    color: var(--cs-text);
}

/*
 * The old PHP outputs <font size="8"> etc.
 * We override those historical browser sizes with modern responsive values.
 */
.boxinhalteabstand > #after-floating-box > font[size="8"] {
    margin-bottom: 8px;
    font-size: clamp(30px, 3vw, 46px) !important;
    line-height: 1.05;
    font-weight: 800;
    letter-spacing: -0.035em;
}

.boxinhalteabstand > #after-floating-box > font[size="6"] {
    margin-bottom: 8px;
    font-size: clamp(18px, 1.7vw, 24px) !important;
    line-height: 1.35;
    font-weight: 650;
}

.boxinhalteabstand > #after-floating-box > font[size="4"] {
    max-width: 900px;
    margin-bottom: 32px;
    color: var(--cs-muted);
    font-size: 15px !important;
    line-height: 1.6;
}


/* --------------------------------------------------------------------------
   Sale product grid
   -------------------------------------------------------------------------- */

.gallery {
    display: grid;

    grid-template-columns: repeat(5, minmax(0, 1fr));

    width: 100%;
    margin: 24px 0 0;
    padding: 0;

    gap: 1px;

    background: var(--cs-border);
    border-top: 1px solid var(--cs-border);
    border-left: 1px solid var(--cs-border);
}


/* --------------------------------------------------------------------------
   Individual sale item
   -------------------------------------------------------------------------- */

.gallery-item {
    position: relative;

    display: flex;
    flex-direction: column;

    min-width: 0;
    margin: 0;
    padding: 0 16px 18px;

    background: var(--cs-white);

    border-right: 1px solid var(--cs-border);
    border-bottom: 1px solid var(--cs-border);

    color: var(--cs-text);

    transition:
        background-color 0.15s ease,
        border-color 0.15s ease;
}

.gallery-item:hover {
    background: #FAFAF8;
}


/* --------------------------------------------------------------------------
   Sale image
   -------------------------------------------------------------------------- */

.gallery-item > a:first-child {
    display: flex;

    width: calc(100% + 32px);
    height: 330px;

    margin: 0 -16px 15px;

    align-items: center;
    justify-content: center;

    overflow: hidden;

    background: #FFFFFF;

    border-bottom: 1px solid var(--cs-border);
}

.gallery-item > a:first-child img {
    display: block;

    width: 100% !important;
    height: 100% !important;

    max-width: 100% !important;
    max-height: 330px !important;

    margin: 0;

    object-fit: contain;

    transition: transform 0.2s ease;
}

.gallery-item:hover > a:first-child img {
    transform: scale(1.015);
}


/* --------------------------------------------------------------------------
   Sale product information
   -------------------------------------------------------------------------- */

.gallery-item .article {
    margin-top: 1px;

    color: var(--cs-muted);

    font-size: 11px;
    line-height: 1.4;
}

.gallery-item .article b {
    color: var(--cs-text);
    font-weight: 700;
}

.gallery-item .price {
    margin-top: 7px;

    color: var(--cs-brand-black);

    font-size: 20px;
    line-height: 1.2;
    font-weight: 800;
}

.gallery-item .size {
    margin-top: 6px;

    font-size: 13px;
    font-weight: 650;
}

.gallery-item .product-info {
    margin-top: 14px;
    padding-top: 12px;

    border-top: 1px solid var(--cs-border);

    color: var(--cs-muted);

    font-size: 12px;
    line-height: 1.45;
}

.gallery-item .product-textil {
    margin-top: 4px;

    color: var(--cs-muted);

    font-size: 11px;
    line-height: 1.45;
}

.gallery-item .product-textil p {
    margin: 8px 0 0 !important;

    color: var(--cs-muted) !important;

    font-size: 10px !important;
    line-height: 1.35;

    text-decoration: none !important;
}


/* --------------------------------------------------------------------------
   Order / inquiry buttons
   -------------------------------------------------------------------------- */

.gallery-item .order-button,
.gallery-item .inquiry-button {
    display: flex;

    min-height: 40px;

    margin-top: 14px;
    padding: 9px 14px;

    align-items: center;
    justify-content: center;

    border: 1px solid var(--cs-brand-black);

    background: var(--cs-brand-black);
    color: #FFFFFF;

    font-size: 12px;
    font-weight: 750;
    letter-spacing: 0.025em;

    cursor: pointer;

    transition:
        background-color 0.15s ease,
        border-color 0.15s ease,
        color 0.15s ease;
}

.gallery-item .order-button:hover,
.gallery-item .inquiry-button:hover {
    border-color: var(--cs-red);
    background: var(--cs-red);
    color: #FFFFFF;
}


/* ==========================================================================
   OUTLET RESPONSIVE
   ========================================================================== */

@media (max-width: 1400px) {

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

}


@media (max-width: 1050px) {

    .gallery {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .gallery-item > a:first-child {
        height: 300px;
    }

    .gallery-item > a:first-child img {
        max-height: 300px !important;
    }

}


@media (max-width: 760px) {

    .gallery {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .gallery-item > a:first-child {
        height: 280px;
    }

    .gallery-item > a:first-child img {
        max-height: 280px !important;
    }

}


@media (max-width: 500px) {

    .gallery {
        grid-template-columns: 1fr;
    }

    .gallery-item {
        padding-right: 14px;
        padding-left: 14px;
    }

    .gallery-item > a:first-child {
        width: calc(100% + 28px);
        height: min(430px, 105vw);

        margin-right: -14px;
        margin-left: -14px;
    }

    .gallery-item > a:first-child img {
        max-height: min(430px, 105vw) !important;
    }

}

