﻿/* =====================================================================
   brand.css — Brand page only (Brand view + its Partials/_Products)
   Same look as listproductstyle.css — Johnwin theme, English / LTR
   #690810 (wine) · #3C2F21 (ink) · #B8987F (sand line)
   #ECE2D9 (page) · #FAF3EC (card) · #E8DCD2 (soft panel)
   Order on the page: product list first, then the brand box under it.
   ===================================================================== */

/* ---------- Page wrapper ---------- */
.custom-container.p-t25 {
    width: 90%;
    max-width: 1440px;
    margin: 0 auto;
    padding: 110px 0 60px 0; /* layout header is position:absolute */
    direction: ltr;
    text-align: left;
    color: #3C2F21;
}

    .custom-container.p-t25 a:hover,
    .custom-container.p-t25 a:focus {
        text-decoration: none;
    }

    .custom-container.p-t25 img {
        max-width: 100%;
    }

    /* ---------- Layout: one column, products then brand box ---------- */
    .custom-container.p-t25 #content {
        position: relative;
        display: flex;
        flex-direction: column;
        align-items: stretch;
        row-gap: 32px;
        margin: 0;
        padding: 0;
    }

        .custom-container.p-t25 #content::before,
        .custom-container.p-t25 #content::after {
            display: none;
        }

#content > #main,
#content > #side {
    position: relative;
    top: auto;
    float: none;
    flex: none;
    width: 100%;
    max-width: none;
    min-width: 0;
    margin: 0;
}

#content > #main {
    padding: 0;
}

#main .bc-bx-bn {
    margin: 0;
    padding: 0;
}

/* =====================================================================
   PRODUCT CARDS — the brand Partials/_Products
   Markup: #products > a.col-product > .pn-bx > .col-bx
   ===================================================================== */

#main #products {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 16px;
    margin: 0;
    padding: 0;
}

    #main #products::before,
    #main #products::after {
        display: none;
    }

/* The link wraps the whole card */
#products > .col-product {
    position: relative;
    display: flex;
    float: none;
    width: auto;
    margin: 0;
    padding: 0;
    background: none;
    border: 0;
    border-radius: 1000px 1000px 10px 10px;
    color: inherit;
}

    #products > .col-product:focus-visible {
        outline: 2px solid #690810;
        outline-offset: 3px;
    }

/* Neutralise the Bootstrap column inside the link */
#products .pn-bx {
    display: flex;
    float: none;
    flex: 1 1 auto;
    width: 100%;
    max-width: none;
    min-height: 0;
    margin: 0;
    padding: 0;
}

/* Card: image / title / (spacer) / old price / price, cart button on the right */
#products .col-bx {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: auto auto 1fr auto;
    column-gap: 10px;
    width: 100%;
    max-width: none;
    height: auto;
    margin: 0;
    padding: 14px;
    background: rgba(250, 243, 236, 0.80);
    border: 0;
    border-radius: 1000px 1000px 10px 10px;
    box-shadow: 0 3px 12px 0 rgba(60, 47, 33, 0.10);
    text-align: left;
    transition: box-shadow .25s ease, transform .25s ease;
}

#products > .col-product:hover .col-bx {
    box-shadow: 0 10px 24px -8px rgba(60, 47, 33, 0.25);
    transform: translateY(-3px);
}

#products .col-bx > .clear {
    display: none;
}

/* Image */
#products .col-bx > .Aspect_Ratio_1_1,
#products .col-bx > .img-ce {
    grid-column: 1 / -1;
    grid-row: 1;
}

#products .Aspect_Ratio_1_1 {
    position: relative;
    width: 100%;
    height: auto;
    margin: 0;
    padding: 0 !important;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: none;
    border-radius: 1000px 1000px 8px 8px;
}

#products .img-ce {
    position: static;
    display: block;
    float: none;
    width: 100%;
    max-width: 100%;
    height: 100%;
    margin: 0;
    object-fit: cover;
    border-radius: 1000px 1000px 8px 8px;
}

#products .col-bx > .img-ce {
    aspect-ratio: 1 / 1;
    height: auto;
}

/* Title */
#products .ti-pr-44 {
    grid-column: 1 / -1;
    grid-row: 2;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: auto;
    min-height: 3em;
    margin: 0;
    padding: 12px 0 4px 0;
    color: #3C2F21;
    font-size: 15px;
    font-weight: 500;
    line-height: 1.5;
    text-align: left;
}

/* Price block: its children are placed straight on the card grid */
#products .price-nd {
    display: contents;
}

#products .p-off {
    grid-column: 1;
    grid-row: 3;
    align-self: end;
    float: none;
    margin: 16px 0 0 0;
    padding: 0;
    color: rgba(60, 47, 33, 0.45);
    font-size: 13px;
    line-height: 1.4;
    text-align: left;
    text-decoration: line-through;
}

#products .p-nm {
    grid-column: 1;
    grid-row: 4;
    align-self: end;
    float: none;
    margin: 0;
    padding: 0;
    color: #3C2F21;
    font-size: 17px;
    font-weight: 600;
    line-height: 1.4;
    text-align: left;
    font-variant-numeric: tabular-nums;
}

    #products .p-nm span {
        margin-left: 3px;
        color: rgba(60, 47, 33, 0.55);
        font-size: 11px;
        font-weight: 500;
    }

/* Discount % / "New" badge: sits on the bottom-left of the image */
#products .sp-off {
    grid-column: 1 / -1;
    grid-row: 1;
    align-self: end;
    justify-self: start;
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin: 0 0 10px 10px;
    padding: 3px 8px;
    background: #690810;
    border-radius: 2px;
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.4;
}

    #products .sp-off svg {
        width: 10px;
        height: 10px;
    }

/* Cart button */
#products .link-shop {
    grid-column: 2;
    grid-row: 3 / span 2;
    align-self: end;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 36px;
    margin: 0;
    padding: 0;
    background: #690810;
    border-radius: 3px;
    transition: background-color .2s;
}

    #products .link-shop svg {
        width: 20px;
        height: 20px;
    }

#products > .col-product:hover .link-shop {
    background: #58060d;
}

/* ---------- "No products found" box ---------- */
#main .bc-bx-bn .col-lg-12 {
    float: none;
    width: 100%;
    height: auto !important;
    padding: 0;
}

    #main .bc-bx-bn .col-lg-12 p {
        margin: 0;
        padding: 24px !important;
        background: rgba(250, 243, 236, 0.90) !important;
        border: 0.5px solid rgba(184, 152, 127, 0.45);
        border-radius: 10px;
        color: #3C2F21;
        font-size: 16px !important;
        text-align: center !important;
    }

/* =====================================================================
   BRAND BOX — under the products
   Logo and name centred, description below across the full width
   ===================================================================== */

#content > #side {
    max-height: none;
    padding: 40px 48px 32px 48px;
    overflow: visible;
    background: rgba(250, 243, 236, 0.90);
    border: 0.5px solid rgba(184, 152, 127, 0.45);
    border-radius: 10px;
    box-shadow: 0 3px 12px 0 rgba(60, 47, 33, 0.08);
}

#side .rw-blg {
    margin: 0;
    padding: 0;
    background: none;
    border: 0;
    text-align: center;
}

    /* Logo, centred, in the same arched frame as the product cards */
    #side .rw-blg > img {
        display: block;
        width: 130px;
        max-width: 100%;
        height: auto;
        margin: 0 auto 18px auto;
        padding: 16px;
        aspect-ratio: 1 / 1;
        object-fit: contain;
        background: rgba(255, 255, 255, 0.65);
        border: 0.5px solid rgba(184, 152, 127, 0.45);
        border-radius: 1000px 1000px 8px 8px;
    }

    #side .rw-blg > h3 {
        margin: 0;
        padding: 0 !important;
        color: #3C2F21;
        font-family: 'DoranClassicDots', 'Modam-Regular', Georgia, serif;
        font-size: 30px;
        font-weight: 500;
        line-height: 1.3;
        text-align: center !important;
    }

    #side .rw-blg > h4 {
        margin: 0;
        padding: 6px 0 0 0 !important;
        color: rgba(60, 47, 33, 0.55);
        font-size: 14px;
        font-weight: 400;
        line-height: 1.5;
        text-align: center !important;
    }

        #side .rw-blg > h3:empty,
        #side .rw-blg > h4:empty {
            display: none;
        }

/* Description: full width of the box, left aligned */
#side .category-description {
    width: 100%;
    margin: 28px 0 0 0;
    padding: 28px 0 0 0;
    border-top: 1px solid rgba(184, 152, 127, 0.45);
    color: rgba(60, 47, 33, 0.85);
    font-size: 14px;
    line-height: 1.85;
    text-align: left;
}

    #side .category-description h1,
    #side .category-description h2,
    #side .category-description h3,
    #side .category-description h4 {
        margin: 0;
        padding: 0 0 12px 0;
        color: #3C2F21;
        font-family: 'DoranClassicDots', 'Modam-Regular', Georgia, serif;
        font-weight: 500;
        text-align: left;
    }

    #side .category-description h1 {
        font-size: 24px;
    }

    #side .category-description h2,
    #side .category-description h3,
    #side .category-description h4 {
        font-size: 19px;
    }

    #side .category-description p {
        max-width: none;
        margin: 0;
        padding: 0 0 14px 0;
        color: rgba(60, 47, 33, 0.85);
        font-size: 14px;
        line-height: 1.85;
        text-align: left !important;
    }

        #side .category-description p:last-child {
            padding-bottom: 0;
        }

    #side .category-description a {
        color: #690810;
        text-decoration: underline;
        text-underline-offset: 3px;
    }

    #side .category-description ul,
    #side .category-description ol {
        margin: 0 0 14px 0;
        padding-left: 20px;
    }

    #side .category-description ul {
        list-style: disc;
    }

    #side .category-description li {
        padding: 3px 0;
    }

    #side .category-description img {
        height: auto;
    }

    #side .category-description hr {
        display: none;
    }

/* ---------- "No products found" box ---------- */
#main .bc-bx-bn .col-lg-12 {
    float: none;
    width: 100%;
    height: auto !important;
    padding: 0;
}

    #main .bc-bx-bn .col-lg-12 p {
        margin: 0;
        padding: 24px !important;
        background: rgba(250, 243, 236, 0.90) !important;
        border: 0.5px solid rgba(184, 152, 127, 0.45);
        border-radius: 10px;
        color: #3C2F21;
        font-size: 16px !important;
        text-align: center !important;
    }

/* =====================================================================
   RESPONSIVE
   ===================================================================== */
@media screen and (max-width: 1200px) {
    #main #products {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media screen and (max-width: 990px) {
    .custom-container.p-t25 {
        width: 94%;
        padding-top: 80px;
    }

        .custom-container.p-t25 #content {
            row-gap: 24px;
        }

    #content > #side {
        padding: 32px 28px 24px 28px;
    }

    #side .rw-blg > img {
        width: 110px;
    }

    #side .rw-blg > h3 {
        font-size: 26px;
    }

    #main #products {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

/* Mobile: one card per row, image on the right, text on the left */
@media screen and (max-width: 760px) {
    .custom-container.p-t25 {
        padding-top: 64px;
    }

    #content > #side {
        padding: 24px 16px 18px 16px;
    }

    #side .rw-blg > img {
        width: 90px;
        padding: 12px;
        margin-bottom: 14px;
    }

    #side .rw-blg > h3 {
        font-size: 22px;
    }

    #side .rw-blg > h4 {
        font-size: 13px;
    }

    #side .category-description {
        margin-top: 20px;
        padding-top: 20px;
        font-size: 13.5px;
    }


    #main #products {
        grid-template-columns: minmax(0, 1fr);
        gap: 12px;
    }

    #products > .col-product {
        border-radius: 10px;
    }

    #products .col-bx {
        grid-template-columns: minmax(0, 1fr) 38%;
        grid-template-rows: auto auto 1fr auto auto;
        column-gap: 14px;
        min-height: 150px;
        padding: 12px;
        background: rgba(250, 243, 236, 0.95);
        border: 0.5px solid rgba(184, 152, 127, 0.45);
        border-radius: 10px;
        box-shadow: 0 2px 8px 0 rgba(60, 47, 33, 0.06);
    }

    #products > .col-product:hover .col-bx {
        transform: none;
    }

    #products .col-bx > .Aspect_Ratio_1_1,
    #products .col-bx > .img-ce {
        grid-column: 2;
        grid-row: 1 / -1;
        align-self: start;
    }

    #products .Aspect_Ratio_1_1,
    #products .img-ce {
        border-radius: 1000px 1000px 6px 6px;
    }

    #products .ti-pr-44 {
        grid-column: 1;
        grid-row: 1;
        min-height: 0;
        padding: 2px 0 4px 0;
        font-size: 14px;
        line-height: 1.6;
    }

    #products .sp-off {
        grid-column: 1;
        grid-row: 2;
        align-self: start;
        margin: 2px 0 0 0;
    }

    #products .p-off {
        grid-column: 1;
        grid-row: 4;
        margin-top: 12px;
        padding-top: 10px;
        border-top: 1px solid rgba(184, 152, 127, 0.40);
    }

    #products .p-nm {
        grid-column: 1;
        grid-row: 5;
        font-size: 16px;
    }

    #products .link-shop {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    #products .col-bx,
    #products .link-shop {
        transition: none;
    }

    #products > .col-product:hover .col-bx {
        transform: none;
    }
}
