/* ========================================================================
   TBH INDIA — CATEGORIES PAGE THEME
   Version: 1.0
   Scope:
   - categories.php only
   - Uses existing global/customer design tokens
   - No PHP/backend logic
   ======================================================================== */

.tbh-categories-page {
    --cat-ink: #111111;
    --cat-soft-ink: #5f5a52;
    --cat-gold: #d4af37;
    --cat-paper: #fffdf8;
    --cat-cream: #f5f1e8;
    --cat-border: rgba(17, 17, 17, .09);
    --cat-shadow: 0 24px 70px rgba(17, 17, 17, .10);
    background: var(--cat-paper);
}

.tbh-categories-page * {
    box-sizing: border-box;
}

/* ========================================================================
   HERO
   ======================================================================== */

.categories-hero {
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(circle at 82% 22%, rgba(212,175,55,.15), transparent 31%),
        radial-gradient(circle at 15% 88%, rgba(212,175,55,.08), transparent 27%),
        linear-gradient(135deg, #111111 0%, #191919 56%, #25231f 100%);
    color: #ffffff;
}

.categories-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    opacity: .30;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px);
    background-size: 42px 42px;
    mask-image: linear-gradient(to bottom, rgba(0,0,0,1), transparent 88%);
}

.categories-hero__inner {
    position: relative;
    z-index: 1;
    min-height: 590px;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(360px, .95fr);
    align-items: center;
    gap: 48px;
    padding-top: 70px;
    padding-bottom: 76px;
}

.categories-hero__copy {
    max-width: 650px;
}

.categories-eyebrow,
.categories-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    line-height: 1.2;
    letter-spacing: .20em;
    font-weight: 900;
    text-transform: uppercase;
}

.categories-eyebrow {
    color: #e8d18a;
}

.categories-hero h1 {
    margin: 18px 0 18px;
    color: #ffffff;
    font-size: clamp(50px, 6vw, 78px);
    line-height: .98;
    letter-spacing: -.045em;
    font-weight: 900;
}

.categories-hero h1 span {
    color: var(--cat-gold);
}

.categories-hero__copy > p {
    max-width: 610px;
    margin: 0;
    color: rgba(255,255,255,.72);
    font-size: 17px;
    line-height: 1.75;
}

.categories-hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 30px;
}

.categories-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 50px;
    padding: 13px 18px;
    border: 1px solid transparent;
    border-radius: 13px;
    font-size: 14px;
    line-height: 1;
    font-weight: 900;
    text-decoration: none;
    cursor: pointer;
    transition: transform .22s ease, box-shadow .22s ease, background .22s ease, color .22s ease, border-color .22s ease;
}

.categories-btn:hover {
    transform: translateY(-2px);
}

.categories-btn--primary {
    background: #ffffff;
    color: #111111;
    box-shadow: 0 12px 28px rgba(0,0,0,.20);
}

.categories-btn--primary:hover {
    box-shadow: 0 16px 34px rgba(0,0,0,.25);
}

.categories-btn--secondary {
    background: transparent;
    color: #ffffff;
    border-color: rgba(255,255,255,.20);
}

.categories-btn--secondary:hover {
    background: rgba(255,255,255,.07);
    border-color: rgba(255,255,255,.34);
}

.categories-btn--gold {
    background: var(--cat-gold);
    color: #111111;
    box-shadow: 0 14px 30px rgba(212,175,55,.20);
}

.categories-btn--gold:hover {
    background: #e2c25c;
    box-shadow: 0 18px 38px rgba(212,175,55,.28);
}

.categories-hero__visual {
    position: relative;
    min-height: 430px;
    display: grid;
    place-items: center;
}

.categories-hero__orb,
.categories-hero__seal,
.categories-hero__float {
    position: absolute;
}

.categories-hero__orb {
    border: 1px solid rgba(212,175,55,.22);
    border-radius: 999px;
    transform: rotate(-14deg);
}

.categories-hero__orb--one {
    width: 330px;
    height: 330px;
    border-style: solid;
}

.categories-hero__orb--two {
    width: 430px;
    height: 180px;
    border-style: dashed;
    transform: rotate(24deg);
}

.categories-hero__orb--three {
    width: 180px;
    height: 430px;
    border-style: dotted;
    transform: rotate(-34deg);
}

.categories-hero__seal {
    width: 184px;
    height: 184px;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 0;
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 50%;
    background: radial-gradient(circle at 32% 28%, rgba(255,255,255,.09), rgba(255,255,255,.02) 62%);
    box-shadow: 0 30px 80px rgba(0,0,0,.35), inset 0 0 50px rgba(212,175,55,.10);
    backdrop-filter: blur(8px);
}

.categories-hero__seal span {
    color: var(--cat-gold);
    font-size: 48px;
    line-height: .9;
    letter-spacing: -.06em;
    font-weight: 950;
}

.categories-hero__seal small {
    margin-top: 8px;
    color: rgba(255,255,255,.66);
    font-size: 11px;
    letter-spacing: .30em;
    font-weight: 900;
}

.categories-hero__float {
    width: 60px;
    height: 60px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 18px;
    background: rgba(255,255,255,.07);
    box-shadow: 0 16px 36px rgba(0,0,0,.22);
    font-size: 25px;
    backdrop-filter: blur(8px);
}

.categories-hero__float--one { top: 58px; right: 13%; }
.categories-hero__float--two { top: 38%; right: 0; }
.categories-hero__float--three { bottom: 56px; left: 10%; }
.categories-hero__float--four { bottom: 16%; right: 14%; }

/* ========================================================================
   CATEGORY SECTION
   ======================================================================== */

.categories-section {
    padding: 76px 0 82px;
    background: var(--cat-paper);
}

.categories-section__heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 28px;
}

.categories-kicker {
    color: #9a7612;
}

.categories-section__heading h2 {
    margin: 7px 0 8px;
    color: var(--cat-ink);
    font-size: clamp(32px, 4vw, 48px);
    line-height: 1.05;
    letter-spacing: -.035em;
    font-weight: 900;
}

.categories-section__heading p {
    margin: 0;
    max-width: 600px;
    color: var(--cat-soft-ink);
    font-size: 15px;
    line-height: 1.7;
}

.categories-count {
    flex: 0 0 auto;
    padding: 10px 13px;
    border: 1px solid var(--cat-border);
    border-radius: 999px;
    background: #ffffff;
    color: #6a645b;
    font-size: 12px;
    line-height: 1;
    font-weight: 900;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.categories-card {
    position: relative;
    min-height: 320px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 26px;
    border: 1px solid rgba(17,17,17,.08);
    border-radius: 24px;
    color: #111111;
    text-decoration: none;
    isolation: isolate;
    box-shadow: 0 18px 50px rgba(17,17,17,.06);
    transition: transform .24s ease, box-shadow .24s ease, border-color .24s ease;
}

.categories-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--cat-shadow);
    border-color: rgba(17,17,17,.15);
}

.categories-card__glow {
    position: absolute;
    width: 220px;
    height: 220px;
    right: -60px;
    top: -70px;
    border-radius: 50%;
    background: rgba(255,255,255,.30);
    filter: blur(14px);
    z-index: -1;
}

.categories-card__number {
    align-self: flex-end;
    min-width: 42px;
    color: rgba(17,17,17,.42);
    font-size: 12px;
    line-height: 1;
    letter-spacing: .14em;
    font-weight: 900;
}

.categories-card__icon {
    width: 78px;
    height: 78px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(17,17,17,.09);
    border-radius: 22px;
    background: rgba(255,255,255,.62);
    font-size: 34px;
    box-shadow: 0 14px 35px rgba(17,17,17,.08);
    backdrop-filter: blur(8px);
}

.categories-card__body {
    display: flex;
    flex-direction: column;
    margin-top: 32px;
}

.categories-card__label {
    margin-bottom: 7px;
    color: rgba(17,17,17,.50);
    font-size: 10px;
    line-height: 1.2;
    letter-spacing: .18em;
    font-weight: 900;
    text-transform: uppercase;
}

.categories-card__title {
    color: #111111;
    font-size: 28px;
    line-height: 1.04;
    letter-spacing: -.03em;
    font-weight: 900;
}

.categories-card__copy {
    max-width: 320px;
    margin-top: 9px;
    color: rgba(17,17,17,.64);
    font-size: 13px;
    line-height: 1.55;
}

.categories-card__cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 18px;
    color: #111111;
    font-size: 12px;
    font-weight: 900;
}

.categories-card__cta b {
    transition: transform .2s ease;
}

.categories-card:hover .categories-card__cta b {
    transform: translateX(4px);
}

/* Category-specific premium tones */
.categories-card--beauty {
    background: linear-gradient(145deg, #fff7f0 0%, #f5e4d6 100%);
}

.categories-card--electronics {
    background: linear-gradient(145deg, #f5f7f9 0%, #dfe5eb 100%);
}

.categories-card--home {
    background: linear-gradient(145deg, #fbf6eb 0%, #ebe2d0 100%);
}

.categories-card--kids {
    background: linear-gradient(145deg, #faf9ef 0%, #e8edcf 100%);
}

.categories-card--men {
    background: linear-gradient(145deg, #f1f1f0 0%, #d9d8d4 100%);
}

.categories-card--women,
.categories-card--fashion {
    background: linear-gradient(145deg, #fbf3f4 0%, #eadbdd 100%);
}

.categories-card--footwear {
    background: linear-gradient(145deg, #f8f4ee 0%, #e7d8c6 100%);
}

.categories-card--grocery {
    background: linear-gradient(145deg, #f2f8f0 0%, #dbe8d0 100%);
}

.categories-card--sports {
    background: linear-gradient(145deg, #f1f6fa 0%, #d7e5ef 100%);
}

.categories-card--automotive {
    background: linear-gradient(145deg, #f2f2f2 0%, #dadada 100%);
}

.categories-card--books {
    background: linear-gradient(145deg, #f9f4ec 0%, #e9ddcb 100%);
}

.categories-card--toys {
    background: linear-gradient(145deg, #fbf6ee 0%, #eee2cf 100%);
}

.categories-card--jewellery {
    background: linear-gradient(145deg, #fff9e8 0%, #efe0a9 100%);
}

.categories-card--health,
.categories-card--personal-care {
    background: linear-gradient(145deg, #f2f8f6 0%, #d8e8e1 100%);
}

.categories-card--bags {
    background: linear-gradient(145deg, #f7f2ed 0%, #e7d5c5 100%);
}

.categories-card--default {
    background: linear-gradient(145deg, #f8f7f4 0%, #e8e4db 100%);
}

/* ========================================================================
   EMPTY / ERROR
   ======================================================================== */

.categories-empty {
    min-height: 320px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 44px 24px;
    border: 1px dashed rgba(17,17,17,.14);
    border-radius: 24px;
    background: #ffffff;
    text-align: center;
}

.categories-empty__icon {
    width: 64px;
    height: 64px;
    display: grid;
    place-items: center;
    margin-bottom: 14px;
    border-radius: 20px;
    background: var(--cat-cream);
    font-size: 26px;
}

.categories-empty h3 {
    margin: 0 0 8px;
    font-size: 24px;
    line-height: 1.2;
    font-weight: 900;
}

.categories-empty p {
    max-width: 520px;
    margin: 0 0 20px;
    color: var(--cat-soft-ink);
    font-size: 14px;
    line-height: 1.65;
}

.categories-empty--error {
    border-style: solid;
    border-color: rgba(175, 52, 52, .15);
}

/* ========================================================================
   LOWER CTA
   ======================================================================== */

.categories-cta-section {
    padding: 0 0 88px;
    background: var(--cat-paper);
}

.categories-cta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    padding: 34px 38px;
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 24px;
    background:
        radial-gradient(circle at 82% 20%, rgba(212,175,55,.17), transparent 30%),
        linear-gradient(135deg, #151515 0%, #222222 100%);
    box-shadow: 0 24px 70px rgba(17,17,17,.12);
}

.categories-cta__copy {
    max-width: 650px;
}

.categories-cta__copy .categories-kicker {
    color: #e2c15b;
}

.categories-cta__copy h2 {
    margin: 8px 0 8px;
    color: #ffffff;
    font-size: clamp(27px, 4vw, 40px);
    line-height: 1.08;
    letter-spacing: -.035em;
    font-weight: 900;
}

.categories-cta__copy p {
    margin: 0;
    color: rgba(255,255,255,.64);
    font-size: 14px;
    line-height: 1.65;
}

/* ========================================================================
   RESPONSIVE
   ======================================================================== */

@media (max-width: 1050px) {
    .categories-hero__inner {
        grid-template-columns: 1fr .82fr;
        gap: 28px;
    }

    .categories-hero h1 {
        font-size: clamp(46px, 7vw, 68px);
    }

    .categories-hero__visual {
        min-height: 370px;
        transform: scale(.92);
    }

    .categories-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 800px) {
    .categories-hero__inner {
        grid-template-columns: 1fr;
        padding-top: 54px;
        padding-bottom: 42px;
    }

    .categories-hero__copy {
        max-width: 720px;
    }

    .categories-hero__visual {
        min-height: 290px;
        transform: scale(.82);
        margin-top: -14px;
    }

    .categories-hero__float--one { right: 18%; }
    .categories-hero__float--two { right: 3%; }
    .categories-hero__float--three { left: 16%; }
    .categories-hero__float--four { right: 17%; }

    .categories-section {
        padding-top: 58px;
    }

    .categories-section__heading {
        align-items: flex-start;
        flex-direction: column;
        margin-bottom: 22px;
    }

    .categories-count {
        align-self: flex-start;
    }

    .categories-cta {
        flex-direction: column;
        align-items: flex-start;
        padding: 30px 26px;
    }
}

@media (max-width: 620px) {
    .categories-hero h1 {
        font-size: clamp(41px, 13vw, 58px);
        line-height: .98;
    }

    .categories-hero__copy > p {
        font-size: 15px;
    }

    .categories-hero__actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .categories-btn {
        width: 100%;
        min-height: 50px;
    }

    .categories-hero__visual {
        min-height: 245px;
        transform: scale(.70);
        margin-top: -20px;
        margin-bottom: -14px;
    }

    .categories-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .categories-card {
        min-height: 280px;
        padding: 22px;
    }

    .categories-card__title {
        font-size: 26px;
    }

    .categories-card__body {
        margin-top: 24px;
    }

    .categories-cta-section {
        padding-bottom: 60px;
    }

    .categories-cta {
        border-radius: 20px;
    }
}

@media (max-width: 420px) {
    .categories-hero__inner {
        width: min(100% - 24px, var(--tbh-container));
    }

    .categories-hero__visual {
        transform: scale(.60);
        min-height: 220px;
    }

    .categories-section__heading h2 {
        font-size: 31px;
    }

    .categories-card {
        min-height: 265px;
    }

    .categories-card__icon {
        width: 68px;
        height: 68px;
        font-size: 30px;
    }

    .categories-card__title {
        font-size: 24px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .categories-btn,
    .categories-card,
    .categories-card__cta b {
        transition: none;
    }

    .categories-btn:hover,
    .categories-card:hover {
        transform: none;
    }
}
