/* =======================================================================
   TBH INDIA — HOMEPAGE PREMIUM FINISHING LAYER
   Scope: homepage only. Loaded after home-theme.css.
   Does not replace or modify the shared theme.
   ======================================================================= */

.tbh-home {
    --home-premium-ink: #17140e;
    --home-premium-gold: #d4af37;
    --home-premium-gold-light: #f4dfa0;
    --home-premium-cream: #fffaf0;
    --home-premium-muted: #766f63;
}

.tbh-home a:focus-visible,
.tbh-home button:focus-visible {
    outline: 3px solid var(--home-premium-gold);
    outline-offset: 3px;
}

.tbh-home .home-visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* Consistent boxed CTA for EVERY Shop by Category tile. */
.tbh-home .home-category-card__cta {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: fit-content;
    max-width: 100%;
    min-height: 34px;
    margin-top: 2px;
    padding: 8px 12px !important;
    border: 1px solid rgba(172, 132, 25, .42) !important;
    border-radius: 999px !important;
    background: linear-gradient(135deg, #fffdf6, #f5e8c0) !important;
    box-shadow: 0 5px 14px rgba(60, 43, 8, .10), inset 0 1px 0 rgba(255,255,255,.95);
    color: #5b4510 !important;
    font-size: 11.5px !important;
    font-weight: 850 !important;
    line-height: 1.25;
    text-decoration: none;
    white-space: normal;
    transition: background .2s ease, border-color .2s ease, transform .2s ease, box-shadow .2s ease;
}

.tbh-home .home-category-card__cta b {
    display: inline-block;
    flex: 0 0 auto;
    color: #8b6811 !important;
    font-size: 14px !important;
    line-height: 1;
    transition: transform .2s ease;
}

.tbh-home .home-category-card:hover .home-category-card__cta,
.tbh-home .home-category-card:focus-visible .home-category-card__cta {
    border-color: rgba(172, 132, 25, .75) !important;
    background: linear-gradient(135deg, #f8e7a5, #e7c75b) !important;
    box-shadow: 0 8px 18px rgba(60, 43, 8, .16), inset 0 1px 0 rgba(255,255,255,.7);
    transform: translateY(-1px);
}

.tbh-home .home-category-card:hover .home-category-card__cta b {
    transform: translateX(2px);
}

/* Optional real category image mode; blank image settings keep SVG tiles. */
.tbh-home .home-category-card--with-image {
    position: relative;
    isolation: isolate;
    color: #fff;
    background: #211b14;
}

.tbh-home .home-category-card--with-image::after {
    content: "";
    position: absolute;
    z-index: -1;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(180deg, rgba(14,12,8,.04) 0%, rgba(14,12,8,.16) 38%, rgba(14,12,8,.86) 100%);
}

.tbh-home .home-category-card__image {
    position: absolute;
    z-index: -2;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    border-radius: inherit;
    transition: transform .45s cubic-bezier(.2,.7,.2,1);
}

.tbh-home .home-category-card--with-image:hover .home-category-card__image {
    transform: scale(1.045);
}

.tbh-home .home-category-card--with-image .home-category-card__content {
    position: relative;
    z-index: 1;
}

.tbh-home .home-category-card--with-image .home-category-card__content h3 {
    color: #fff !important;
    text-shadow: 0 2px 15px rgba(0,0,0,.35);
}

/* Hero imagery: current SVG art remains the fallback when src is blank. */
.tbh-home .home-banner-art--custom-image {
    min-width: 0;
    width: 100%;
    padding: clamp(12px, 2vw, 28px);
}

.tbh-home .home-banner-art__custom-image {
    display: block;
    width: min(100%, 500px);
    max-width: 100%;
    max-height: 440px;
    height: auto;
    object-fit: contain;
    object-position: center;
    border: 1px solid rgba(231, 197, 96, .26);
    border-radius: clamp(18px, 2.3vw, 30px);
    box-shadow: 0 24px 70px rgba(0,0,0,.25), 0 0 0 8px rgba(255,255,255,.025);
}

.tbh-home .home-banner-full-image {
    position: absolute;
    z-index: 1;
    inset: 0;
    display: block;
    overflow: hidden;
    border-radius: inherit;
    background: #14120d;
}

.tbh-home .home-banner-full-image img {
    display: block;
    width: 100%;
    height: 100%;
    min-height: inherit;
    object-fit: cover;
    object-position: center;
}

.tbh-home .home-banner-slide--image-full {
    position: relative;
    min-height: 520px;
    background: #14120d;
}

.tbh-home .home-banner-slide--image-full .home-banner-full-image:focus-visible {
    outline: 3px solid var(--home-premium-gold-light);
    outline-offset: -6px;
}

/* The hero controls must stay above a full-bleed banner link. */
.tbh-home .home-banner-controls {
    z-index: 5;
}

/* Featured offer cards: visual fallback plus optional local campaign artwork. */
.tbh-home .home-offers-section {
    padding: clamp(26px, 3.2vw, 44px) max(16px, calc((100% - var(--home-container, 1240px)) / 2)) clamp(26px, 3vw, 40px);
    background: linear-gradient(180deg, #fffdf8 0%, #fbf6e9 100%);
}

.tbh-home .home-offers-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 22px;
    max-width: var(--home-container, 1240px);
    margin: 0 auto 21px;
}

.tbh-home .home-offers-heading h2 {
    margin: 0;
    color: var(--home-premium-ink);
    font-size: clamp(25px, 3vw, 37px);
    line-height: 1.08;
    letter-spacing: -.04em;
}

.tbh-home .home-offers-heading p {
    margin: 8px 0 0;
    color: var(--home-premium-muted);
    font-size: 14px;
    line-height: 1.6;
}

.tbh-home .home-offers-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 14px;
    max-width: var(--home-container, 1240px);
    margin: 0 auto;
}

.tbh-home .home-offer-card {
    position: relative;
    isolation: isolate;
    min-width: 0;
    min-height: 220px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-end;
    gap: 9px;
    overflow: hidden;
    padding: 19px;
    border: 1px solid rgba(172, 132, 25, .22);
    border-radius: 20px;
    color: #fff;
    background: linear-gradient(135deg, #282119, #12110e);
    box-shadow: 0 12px 28px rgba(25,20,12,.10);
    text-decoration: none;
    transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}

.tbh-home .home-offer-card::before {
    content: "";
    position: absolute;
    z-index: -1;
    inset: 0;
    background: linear-gradient(180deg, rgba(12,12,10,.02) 0%, rgba(12,12,10,.12) 35%, rgba(12,12,10,.88) 100%);
}

.tbh-home .home-offer-card::after {
    content: "";
    position: absolute;
    z-index: -2;
    inset: 0;
    background: radial-gradient(ellipse at 76% 22%, rgba(232,195,87,.30), transparent 48%), linear-gradient(135deg, #49402d, #15130f 72%);
    background-size: cover;
    background-position: center;
    transition: transform .55s cubic-bezier(.2,.7,.2,1);
}

.tbh-home .home-offer-card--beauty::after { background-image: radial-gradient(ellipse at 78% 18%, rgba(227,142,175,.45), transparent 45%), linear-gradient(135deg, #4f283a, #17120f 74%); }
.tbh-home .home-offer-card--tech::after { background-image: radial-gradient(ellipse at 80% 20%, rgba(100,164,220,.46), transparent 46%), linear-gradient(135deg, #25394a, #111317 74%); }
.tbh-home .home-offer-card--home::after { background-image: radial-gradient(ellipse at 80% 20%, rgba(156,180,125,.42), transparent 46%), linear-gradient(135deg, #344133, #151610 74%); }
.tbh-home .home-offer-card--footwear::after { background-image: radial-gradient(ellipse at 80% 20%, rgba(215,164,95,.42), transparent 46%), linear-gradient(135deg, #4b3525, #17120e 74%); }
.tbh-home .home-offer-card--grocery::after { background-image: radial-gradient(ellipse at 80% 20%, rgba(153,191,105,.42), transparent 46%), linear-gradient(135deg, #34432a, #141710 74%); }

.tbh-home .home-offer-card:hover,
.tbh-home .home-offer-card:focus-visible {
    transform: translateY(-4px);
    border-color: rgba(212,175,55,.72);
    box-shadow: 0 20px 38px rgba(25,20,12,.17);
}

.tbh-home .home-offer-card:hover::after {
    transform: scale(1.055);
}

.tbh-home .home-offer-card__eyebrow {
    position: relative;
    z-index: 1;
    color: #f4d780;
    font-size: 9px;
    font-weight: 900;
    line-height: 1.35;
    letter-spacing: .14em;
    text-transform: uppercase;
}

.tbh-home .home-offer-card strong {
    position: relative;
    z-index: 1;
    color: #fff;
    font-size: clamp(18px, 1.55vw, 24px);
    line-height: 1.04;
    letter-spacing: -.035em;
}

.tbh-home .home-offer-card__cta {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 33px;
    margin-top: 4px;
    padding: 8px 11px;
    border: 1px solid rgba(245,220,145,.52);
    border-radius: 999px;
    background: rgba(10,10,9,.42);
    color: #fffaf0;
    font-size: 11px;
    font-weight: 850;
    line-height: 1.2;
    backdrop-filter: blur(8px);
}

.tbh-home .home-offer-card__cta b {
    color: #f2d16b;
    transition: transform .2s ease;
}

.tbh-home .home-offer-card:hover .home-offer-card__cta b {
    transform: translateX(2px);
}

.tbh-home .home-offer-card--custom-image .home-offer-card__image {
    position: absolute;
    z-index: -2;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform .55s cubic-bezier(.2,.7,.2,1);
}

.tbh-home .home-offer-card--custom-image::after {
    background: none;
}

.tbh-home .home-offer-card--custom-image:hover .home-offer-card__image {
    transform: scale(1.055);
}

/* Responsive refinements */
@media (max-width: 1100px) {
    .tbh-home .home-offers-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .tbh-home .home-offer-card {
        min-height: 205px;
    }
}

@media (max-width: 760px) {
    .tbh-home .home-offers-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 12px;
    }

    .tbh-home .home-offers-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 11px;
    }

    .tbh-home .home-offer-card {
        min-height: 190px;
        padding: 15px;
        border-radius: 17px;
    }

    .tbh-home .home-offer-card strong {
        font-size: clamp(17px, 4vw, 22px);
    }

    .tbh-home .home-offer-card__eyebrow {
        font-size: 8px;
        letter-spacing: .10em;
    }
}

@media (max-width: 420px) {
    .tbh-home .home-offers-grid {
        grid-template-columns: 1fr;
    }

    .tbh-home .home-offer-card {
        min-height: 180px;
    }

    .tbh-home .home-category-card__cta {
        gap: 6px;
        padding: 7px 9px !important;
        font-size: 10.5px !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    .tbh-home .home-category-card__cta,
    .tbh-home .home-category-card__cta b,
    .tbh-home .home-category-card__image,
    .tbh-home .home-banner-art__custom-image,
    .tbh-home .home-offer-card,
    .tbh-home .home-offer-card::after,
    .tbh-home .home-offer-card__image,
    .tbh-home .home-offer-card__cta b {
        transition: none !important;
    }
}
