/* ==========================================================
   SOUK BASKINTA — MARKETPLACE HOME
   ========================================================== */

.bk-souk-home {
    --soukteal: #124b58;
    --soukteal-dark: #153f40;
    --soukgreen: #718a3d;
    --soukcream: #f7f3e8;
    --soukink: #203532;
    --soukmuted: #66716e;
    --soukline: rgba(18,75,88,.13);

    background: #fff;
    color: var(--soukink);
}

.bk-souk-home-container {
    width: min(1240px, calc(100% - 48px));
    margin-inline: auto;
}


/* ==========================================================
   HERO
   ========================================================== */

.bk-souk-home-hero {
    position: relative;
    width: 100vw;
    min-height: 505px;
    margin-left: calc(50% - 50vw);

    background-size: cover;
    background-position: center;

    overflow: hidden;
}

.bk-souk-home-hero-overlay {
    position: absolute;
    inset: 0;

    background:
        linear-gradient(
            90deg,
            rgba(11,47,45,.93) 0%,
            rgba(11,47,45,.78) 43%,
            rgba(11,47,45,.33) 72%,
            rgba(11,47,45,.15) 100%
        );
}

.bk-souk-home-hero-grid {
    position: relative;
    z-index: 2;

    min-height: 505px;

    display: grid;
    grid-template-columns: 1.08fr .92fr;
    gap: 50px;
    align-items: center;
}

.bk-souk-home-hero-copy {
    padding: 58px 0;
}

.bk-souk-home-eyebrow,
.bk-souk-home-kicker {
    display: block;

    color: var(--soukgreen);

    font-size: 11px;
    font-weight: 800;
    letter-spacing: .15em;
    text-transform: uppercase;
}

.bk-souk-home-hero h1 {
    margin: 6px 0 0;

    color: #fff;

    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(54px,6vw,84px);
    line-height: .98;
    letter-spacing: -.04em;
}

.bk-souk-home-hero h2 {
    margin: 8px 0 10px;

    color: #fff;

    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(24px,2.4vw,34px);
    line-height: 1.1;
}

.bk-souk-home-hero p {
    max-width: 620px;

    margin: 0;

    color: rgba(255,255,255,.91);

    font-size: 16px;
    line-height: 1.65;
}


/* SEARCH */

.bk-souk-home-search {
    max-width: 680px;

    margin-top: 25px;

    display: grid;
    grid-template-columns: 1fr auto;

    padding: 5px;

    border-radius: 8px;

    background: #fff;
}

.bk-souk-home-search input {
    min-width: 0;
    height: 48px;

    padding: 0 16px;

    border: 0 !important;
    outline: 0 !important;

    background: transparent;

    color: var(--soukink);
    font-size: 15px;
}

.bk-souk-home-search button {
    min-width: 110px;

    border: 0;
    border-radius: 6px;

    background: var(--soukteal);
    color: #fff;

    font-weight: 800;

    cursor: pointer;
}


/* HERO CTA */

.bk-souk-home-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 11px;

    margin-top: 20px;
}

.bk-souk-home-btn {
    min-height: 46px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 0 20px;

    border-radius: 7px;

    font-size: 13px;
    font-weight: 800;

    text-decoration: none !important;
}

.bk-souk-home-btn.primary {
    background: var(--soukteal);
    color: #fff !important;
}

.bk-souk-home-btn.ghost {
    border: 1px solid rgba(255,255,255,.65);

    background: rgba(255,255,255,.06);
    color: #fff !important;
}


/* HERO PRODUCT COLLAGE */

.bk-souk-home-hero-products {
    position: relative;

    height: 390px;
}

.bk-souk-hero-product {
    position: absolute;

    overflow: hidden;

    border: 4px solid rgba(255,255,255,.80);
    border-radius: 15px;

    background: #fff;

    box-shadow: 0 20px 50px rgba(0,0,0,.25);
}

.bk-souk-hero-product img {
    width: 100%;
    height: 100%;

    display: block;

    object-fit: cover;
}

.bk-souk-hero-product.p1 {
    width: 215px;
    height: 275px;

    left: 4%;
    bottom: 24px;

    transform: rotate(-4deg);
}

.bk-souk-hero-product.p2 {
    width: 230px;
    height: 310px;

    left: 31%;
    top: 18px;

    z-index: 2;
}

.bk-souk-hero-product.p3 {
    width: 200px;
    height: 260px;

    right: 0;
    bottom: 35px;

    transform: rotate(4deg);
}


/* ==========================================================
   STANDARD SECTIONS
   ========================================================== */

.bk-souk-home-section {
    padding: 60px 0;
}

.bk-souk-home-categories {
    padding-bottom: 26px;
}

.bk-souk-home-featured {
    padding-top: 32px;
}

.bk-souk-home-section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;

    gap: 24px;

    margin-bottom: 23px;
}

.bk-souk-home-section-head h2,
.bk-souk-home-story h2,
.bk-souk-home-visit h2 {
    margin: 5px 0 0;

    color: var(--soukteal-dark);

    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(30px,3vw,44px);
    line-height: 1.05;
    letter-spacing: -.02em;
}


/* ==========================================================
   CATEGORIES
   ========================================================== */

.bk-souk-home-category-row {
    display: flex;
    flex-wrap: wrap;

    gap: 10px;
}

.bk-souk-home-category {
    min-height: 52px;

    display: inline-flex;
    align-items: center;

    gap: 9px;

    padding: 8px 16px;

    border: 1px solid var(--soukline);
    border-radius: 8px;

    background: #fff;
    color: var(--soukteal-dark);

    text-decoration: none !important;
}

.bk-souk-home-category span {
    font-size: 23px;
}

.bk-souk-home-category strong {
    font-size: 13px;
}

.bk-souk-home-category:hover,
.bk-souk-home-category.active {
    border-color: rgba(18,75,88,.38);

    background: #f5f7f4;
}


/* ==========================================================
   PRODUCT GRID
   ========================================================== */

.bk-souk-home-product-grid {
    display: grid;
    grid-template-columns: repeat(5,minmax(0,1fr));

    gap: 17px;
}

.bk-souk-home-product {
    min-width: 0;

    overflow: hidden;

    border: 1px solid var(--soukline);
    border-radius: 10px;

    background: #fff;

    box-shadow: 0 8px 25px rgba(16,51,49,.045);
}

.bk-souk-home-product-image {
    position: relative;

    display: block;

    aspect-ratio: 1 / 1;

    overflow: hidden;

    background: #f4f1e9;
}

.bk-souk-home-product-image img {
    width: 100%;
    height: 100%;

    display: block;

    object-fit: cover;

    transition: transform .3s ease;
}

.bk-souk-home-product:hover
.bk-souk-home-product-image img {
    transform: scale(1.025);
}


/* LOCKED: MADE IN BASKINTA AT BOTTOM OF IMAGE */

.bk-souk-home-made {
    position: absolute;

    left: 10px;
    bottom: 10px;

    padding: 6px 9px;

    border-radius: 4px;

    background: rgba(113,138,61,.95);
    color: #fff;

    box-shadow: 0 3px 10px rgba(0,0,0,.13);

    font-size: 9px;
    font-weight: 800;
    letter-spacing: .075em;
    text-transform: uppercase;
}


/* CARD CONTENT */

.bk-souk-home-product-copy {
    padding: 15px;
}

.bk-souk-home-vendor-name {
    display: block;

    margin-bottom: 4px;

    color: var(--soukmuted);

    font-size: 11px;
    font-weight: 700;

    text-decoration: none !important;
}

.bk-souk-home-product h3 {
    min-height: 45px;

    margin: 0 0 6px;

    font-family: Georgia, "Times New Roman", serif;
    font-size: 18px;
    line-height: 1.2;
}

.bk-souk-home-product h3 a {
    color: var(--soukteal-dark);

    text-decoration: none !important;
}

.bk-souk-home-product-category {
    min-height: 25px;

    margin-bottom: 7px;

    color: var(--soukgreen);

    font-size: 9px;
    font-weight: 800;
    letter-spacing: .075em;
    text-transform: uppercase;
}

.bk-souk-home-product-price {
    min-height: 27px;

    margin-bottom: 11px;

    color: var(--soukteal-dark);

    font-size: 14px;
    font-weight: 800;
}

.bk-souk-home-product-price .amount {
    font-size: 16px;
}

.bk-souk-home-product-action {
    min-height: 40px;

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

    padding: 0 10px;

    border-radius: 5px;

    background: var(--soukteal);
    color: #fff !important;

    font-size: 12px;
    font-weight: 800;

    text-decoration: none !important;
}


/* ==========================================================
   PRODUCERS
   ========================================================== */

.bk-souk-home-producers-section {
    padding-top: 20px;
}

.bk-souk-home-producer-grid {
    display: grid;
    grid-template-columns: repeat(5,minmax(0,1fr));

    gap: 17px;
}

.bk-souk-home-producer {
    overflow: hidden;

    border: 1px solid var(--soukline);
    border-radius: 10px;

    background: #fff;
}

.bk-souk-home-producer-media {
    height: 180px;

    display: grid;
    place-items: center;

    padding: 20px;

    background: #f8f6f0;

    text-decoration: none !important;
}

.bk-souk-home-producer-media img {
    max-width: 100%;
    max-height: 100%;

    object-fit: contain;
}

.bk-souk-home-producer-media > span {
    color: var(--soukteal-dark);

    font-family: Georgia, serif;
    font-size: 54px;
}

.bk-souk-home-producer-copy {
    padding: 17px;
}

.bk-souk-home-producer h3 {
    margin: 0 0 7px;

    font-family: Georgia, serif;
    font-size: 19px;
}

.bk-souk-home-producer h3 a {
    color: var(--soukteal-dark);

    text-decoration: none !important;
}

.bk-souk-home-producer p {
    min-height: 42px;

    margin: 0 0 12px;

    color: var(--soukmuted);

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

.bk-souk-home-producer-link {
    color: var(--soukteal);

    font-size: 12px;
    font-weight: 800;

    text-decoration: none !important;
}


/* ==========================================================
   MADE IN BASKINTA STORY
   ========================================================== */

.bk-souk-home-story,
.bk-souk-home-visit {
    width: 100vw;

    margin-left: calc(50% - 50vw);

    display: grid;
    grid-template-columns: 1.08fr .92fr;

    background: var(--soukcream);
}

.bk-souk-home-story-image,
.bk-souk-home-visit-image {
    min-height: 390px;

    background-size: cover;
    background-position: center;
}

.bk-souk-home-story-copy,
.bk-souk-home-visit-copy {
    padding: 65px clamp(35px,6vw,100px);

    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
}

.bk-souk-home-story-copy p,
.bk-souk-home-visit-copy p {
    max-width: 560px;

    margin: 17px 0 23px;

    color: #53615e;

    font-size: 15px;
    line-height: 1.7;
}


/* ==========================================================
   COMMUNITY PRODUCTS
   ========================================================== */

.bk-souk-home-community {
    background: #fff;
}


/* ==========================================================
   VISIT CONNECTION
   ========================================================== */

.bk-souk-home-visit {
    grid-template-columns: 1fr 1fr;

    margin-top: 15px;
}

.bk-souk-home-visit-copy {
    background: #f7f3e8;
}


/* EMPTY */

.bk-souk-home-empty {
    padding: 45px;

    border: 1px solid var(--soukline);
    border-radius: 9px;

    background: var(--soukcream);

    color: var(--soukmuted);

    text-align: center;
}


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

@media (max-width: 1100px) {

    .bk-souk-home-product-grid,
    .bk-souk-home-producer-grid {
        grid-template-columns:
            repeat(3,minmax(0,1fr));
    }

    .bk-souk-home-hero-products {
        transform: scale(.88);
        transform-origin: center right;
    }
}


@media (max-width: 850px) {

    .bk-souk-home-hero-grid {
        grid-template-columns: 1fr;
    }

    .bk-souk-home-hero-products {
        display: none;
    }

    .bk-souk-home-story,
    .bk-souk-home-visit {
        grid-template-columns: 1fr;
    }

    .bk-souk-home-story-image,
    .bk-souk-home-visit-image {
        min-height: 300px;
    }
}


@media (max-width: 700px) {

    .bk-souk-home-container {
        width: calc(100% - 30px);
    }

    .bk-souk-home-hero h1 {
        font-size: 52px;
    }

    .bk-souk-home-search {
        grid-template-columns: 1fr;
    }

    .bk-souk-home-search button {
        min-height: 45px;
    }

    .bk-souk-home-product-grid,
    .bk-souk-home-producer-grid {
        grid-template-columns:
            repeat(2,minmax(0,1fr));

        gap: 11px;
    }

    .bk-souk-home-section {
        padding: 44px 0;
    }

    .bk-souk-home-story-copy,
    .bk-souk-home-visit-copy {
        padding: 45px 25px;
    }
}


@media (max-width: 440px) {

    .bk-souk-home-product-grid,
    .bk-souk-home-producer-grid {
        grid-template-columns: 1fr;
    }

    .bk-souk-home-category-row {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .bk-souk-home-category {
        padding: 8px 11px;
    }
}


/* ==========================================================
   SOUK BASKINTA — UNIFORM PRODUCT CARD HEIGHTS
   ========================================================== */

/* Every grid cell stretches to identical height */
.bk-souk-home-product-grid {
    align-items: stretch;
}


/* Full card becomes a vertical flex container */
.bk-souk-home-product {
    display: flex;
    flex-direction: column;
    height: 100%;
}


/* Keep every image area identical */
.bk-souk-home-product-image {
    flex: 0 0 auto;
}


/*
 * Product copy fills remaining vertical space.
 * This is what lets the CTA sit at the bottom.
 */
.bk-souk-home-product-copy {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
}


/* Reserve consistent space for vendor name */
.bk-souk-home-vendor-name {
    min-height: 18px;
}


/*
 * Reserve two text lines for every product title,
 * even when the title only uses one line.
 */
.bk-souk-home-product h3 {
    min-height: 46px;
    margin-bottom: 8px;
}


/*
 * Reserve category space even if a product has
 * no category assigned yet.
 */
.bk-souk-home-product-category {
    min-height: 25px;
    margin-bottom: 8px;
}


/* Keep price row uniform */
.bk-souk-home-product-price {
    min-height: 30px;
    display: flex;
    align-items: center;
    margin-bottom: 12px;
}


/*
 * Push CTA to bottom of card.
 * All buttons now align across the row.
 */
.bk-souk-home-product-action {
    margin-top: auto;
    width: 100%;
}


/* Mobile can naturally relax the title height */
@media (max-width: 440px) {

    .bk-souk-home-product h3 {
        min-height: auto;
    }
}


/* ==========================================================
   SOUK HOME — COMPACT MASTER CATEGORY NAV
   ========================================================== */

.bk-souk-home-categories
.bk-souk-home-section-head {
    max-width: 860px;
}


.bk-souk-home-category-row {
    width: 100%;
    max-width: 860px;

    display: grid;

    grid-template-columns:
        repeat(
            auto-fit,
            minmax(190px, 1fr)
        );

    gap: 10px;
}


/*
 * Master category cards should feel like navigation,
 * not like a long vendor-specific taxonomy list.
 */
.bk-souk-home-category {
    width: 100%;
    min-height: 58px;

    justify-content: flex-start;

    padding: 10px 18px;
}


.bk-souk-home-category span {
    flex: 0 0 auto;

    font-size: 22px;
}


.bk-souk-home-category strong {
    font-size: 14px;
}


/*
 * Avoid excessive vertical whitespace now that
 * the category list is intentionally smaller.
 */
.bk-souk-home-categories {
    padding-top: 52px;
    padding-bottom: 18px;
}


.bk-souk-home-featured {
    padding-top: 28px;
}


@media (max-width: 700px) {

    .bk-souk-home-category-row {
        max-width: none;

        grid-template-columns:
            1fr;
    }
}


/* ==========================================================
   SOUK HOME — MASTER CATEGORY CARD FIX
   Prevent width + padding from overflowing grid tracks.
   ========================================================== */

.bk-souk-home-category-row {
    display: grid !important;

    grid-template-columns:
        repeat(3, minmax(0, 1fr)) !important;

    gap: 14px !important;

    width: 100%;
    max-width: 860px;
}


/* Critical fix */
.bk-souk-home-category {
    box-sizing: border-box !important;

    width: 100% !important;
    min-width: 0 !important;

    min-height: 62px;

    margin: 0 !important;

    padding: 12px 20px !important;

    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;

    gap: 12px;

    overflow: hidden;
}


/* Prevent long category names forcing column wider */
.bk-souk-home-category strong {
    min-width: 0;

    white-space: normal;

    line-height: 1.25;
}


/* Tablet */
@media (max-width: 800px) {

    .bk-souk-home-category-row {
        grid-template-columns:
            repeat(2, minmax(0, 1fr)) !important;
    }
}


/* Mobile */
@media (max-width: 520px) {

    .bk-souk-home-category-row {
        grid-template-columns:
            1fr !important;
    }
}
