/* ==========================================================================
   Kaara Books — Home page redesign skin
   Restyles the existing themeone layout classes to the new design:
   cream palette, Inter / Playfair Display / Noto Sans Tamil fonts, and the
   bordered product-card style. No markup/structure changes — CSS only.
   Loaded last in head so it overrides the base theme.
   ========================================================================== */

:root {
    --primary-color: #141414;
    --hover-color: #000000;
    --secondary-color: #8a2f2f;
    --kb-cream: #f6f4ee;
    --kb-ink: #141414;
    --kb-text: #1c2333;
    --kb-muted: #6b6b6b;
    --kb-border: #e9e2cd;
    --kb-hot:#220b0b;
}

/* ---------- Base typography & background ---------- */
html,
body {
    font-family: 'Inter', 'Noto Sans Tamil', sans-serif;
}

body {
    background: var(--kb-cream);
    color: var(--kb-text);
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Inter', 'Noto Sans Tamil', sans-serif;
}

::selection {
    background: var(--kb-ink);
    color: #ffffff;
}

/* ---------- Section headers ---------- */
.section-header-area .sub-title {
    font-family: 'Inter', sans-serif;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 1.2rem;
    line-height: 1.4;
    font-weight: 500;
    color: var(--kb-muted);
    margin-bottom: .8rem;
}

.section-header-area .section-title {
    font-family: 'Playfair Display', 'Noto Sans Tamil', serif;
    font-size: 2.8rem;
    line-height: 1.2;
    font-weight: 700;
    color: var(--kb-ink);
}

.see-btn {
    color: var(--kb-muted);
    font-weight: 600;
}

.see-btn:hover {
    color: var(--kb-ink);
}

/* ---------- Primary / secondary buttons ---------- */
.primary-btn,
.secondary-btn,
.primary-btn-v2 {
    background: var(--kb-ink) !important;
    color: var(--kb-cream) !important;
    border: 1px solid var(--kb-ink) !important;
    border-radius: 2px !important;
    font-weight: 600 !important;
}

.primary-btn:hover,
.secondary-btn:hover,
.primary-btn-v2:hover {
    background: #000000 !important;
    color: #ffffff !important;
}

/* ---------- Hero slider ---------- */
.hero-section .hero-slider .signle-slide {
    position: relative;
    min-height: 480px;
    display: flex;
    align-items: center;
    background-color: var(--kb-ink);
    background-size: cover;
    background-position: center;
}

.hero-section .hero-slider .signle-slide:before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(20, 20, 20, .78) 0%, rgba(20, 20, 20, .45) 55%, rgba(20, 20, 20, .2) 100%);
}

.hero-section .hero-slider .signle-slide .container {
    position: relative;
    z-index: 1;
}

.hero-section .hero-slider .signle-slide .slider-sub-title {
    font-family: 'Inter', sans-serif;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 1.3rem;
    line-height: 1.4;
    font-weight: 500;
    color: #d4d4d4;
    text-shadow: 0 2px 10px rgba(0, 0, 0, .6);
    margin-bottom: 1rem;
}

.hero-section .hero-slider .signle-slide .slider-title {
    font-family: 'Playfair Display', 'Noto Sans Tamil', serif;
    font-size: 3.6rem;
    line-height: 1.2;
    font-weight: 700;
    text-transform: none;
    color: #ffffff;
    text-shadow: 0 2px 14px rgba(0, 0, 0, .7);
    margin-bottom: 1.2rem;
}

.hero-section .hero-slider .signle-slide .slider-text {
    color: #e8e8e8;
    font-size: 1.4rem;
    line-height: 1.6;
    text-shadow: 0 2px 10px rgba(0, 0, 0, .6);
    margin-bottom: 1.8rem;
}

@media (max-width: 1199px) {
    .hero-section .hero-slider .signle-slide .slider-sub-title {
        font-size: 1.2rem;
    }
    .hero-section .hero-slider .signle-slide .slider-title {
        font-size: 2.6rem;
    }
    .hero-section .hero-slider .signle-slide .slider-text {
        font-size: 1.3rem;
        margin-bottom: 1.5rem;
    }
}

@media (max-width: 767px) {
    .hero-section .hero-slider .signle-slide {
        min-height: 320px;
        background-position: center center;
    }
    .hero-section .hero-slider .signle-slide .slider-title {
        font-size: 2rem;
    }
    .hero-section .hero-slider .signle-slide .slider-text {
        font-size: 1.2rem;
        margin-bottom: 1rem;
    }
}

@media (max-width: 400px) {
    .hero-section .hero-slider .signle-slide {
        min-height: 260px;
    }
}

.hero-section .hero-slider .slick-dots {
    position: absolute;
    bottom: 2rem;
    left: 0;
    right: 0;
    z-index: 2;
    text-align: center;
}

.hero-section .hero-slider .slick-dots li button:before {
    color: #ffffff;
    opacity: .5;
}

.hero-section .hero-slider .slick-dots li.slick-active button:before {
    opacity: 1;
}

/* ---------- Brand / featured authors strip ---------- */
.brads-area {
    padding: 3rem 0;
}

.brads-area .brads-slide .sigle-brad {
    display: flex !important;
    align-items: center;
    justify-content: center;
    padding: 0 1.5rem;
}

.brads-area .brads-slide .sigle-brad img {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--kb-border);
    box-shadow: 0 4px 14px rgba(11, 26, 51, .1);
    filter: grayscale(15%);
    transition: transform .2s ease, filter .2s ease;
}

.brads-area .brads-slide .sigle-brad img:hover {
    transform: translateY(-3px);
    filter: grayscale(0%);
}

/* ---------- Popular category cards ---------- */
.popular-categories-area.section-top {
    padding-top: 3.5rem;
}

.popular-categories-area .single-categorie {
    background: #ffffff;
    border: 1px solid #e6ddc4;
    border-radius: 6px;
    padding: 2rem 2.4rem;
    box-shadow: 0 2px 10px rgba(11, 26, 51, .05);
    transition: box-shadow .2s ease, transform .2s ease;
}

.popular-categories-area .single-categorie:before {
    display: none !important;
}

.popular-categories-area .single-categorie:hover {
    box-shadow: 0 8px 22px rgba(11, 26, 51, .12);
    transform: translateY(-2px);
}

.popular-categories-area .single-categorie .categorie-name {
    font-family: 'Noto Sans Tamil', 'Inter', sans-serif;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--kb-ink);
}

.popular-categories-area .single-categorie .categorie-subtitle {
    color: var(--kb-muted);
    font-size: 1.2rem;
}

.popular-categories-area .single-categorie .arrow,
.popular-categories-area .single-categorie .categorie-icon i {
    color: var(--kb-ink);
}

/* Wishlist/Compare quick-action buttons — visible "clicked" state once added */
.product-btn.MyWishList.active,
.product-btn.CompareList.active {
    background-color: var(--kb-hot) !important;
    color: #ffffff !important;
}

.product-btn.MyWishList.active .icon,
.product-btn.CompareList.active .icon {
    color: #ffffff !important;
}

/* ---------- Product cards (bordered white card) ---------- */
.single-grid-product {
    background: #ffffff;
    border: 1px solid var(--kb-border);
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(11, 26, 51, .06);
    margin-bottom: 2rem;
    transition: box-shadow .2s ease, transform .2s ease;
}

.single-grid-product:hover {
    box-shadow: 0 10px 26px rgba(11, 26, 51, .12);
    transform: translateY(-2px);
}

.single-grid-product .product-top {
    margin-bottom: 0;
    aspect-ratio: 3 / 4;
    background: var(--kb-cream);
}

.single-grid-product .product-top .product-thumbnal {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Graceful placeholder when a product has no uploaded cover image */
.single-grid-product .product-top .product-thumbnal[src*="dummyImg"] {
    object-fit: contain;
    padding: 3rem 3.5rem;
    background: var(--kb-cream);
    opacity: .55;
}

/* Tag badge — top-left, squared */
.single-grid-product .product-top .product-flags {
    top: 1rem;
    left: 1rem;
    right: auto;
    text-align: left;
    z-index: 2;
}

.single-grid-product .product-top .product-flags .product-flag {
    display: inline-block;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: .5px;
    padding: .3rem .9rem;
    border-radius: 2px;
    background-color: var(--kb-ink);
    color: #ffffff;
}

.single-grid-product .product-top .product-flags .product-flag.sale {
    background-color: var(--kb-ink);
}

.single-grid-product .product-top .product-flags .product-flag.discount {
    background-color: var(--kb-hot);
}

.single-grid-product .product-top .product-flags .product-flag.out-of-stock {
    background-color: #6b6b6b;
}

/* Card body */
.single-grid-product .product-info {
    padding: 1.4rem 1.4rem 1.6rem;
    text-align: left !important;
}

.single-grid-product .product-info .product-catagory {
    margin-bottom: .5rem;
    font-size: 1rem;
    line-height: 1.4;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--kb-muted);
}

.single-grid-product .product-info .product-name {
    font-family: 'Noto Sans Tamil', 'Inter', sans-serif;
    margin-bottom: .6rem;
    font-size: 1.4rem;
    line-height: 2rem;
    font-weight: 600;
    color: var(--kb-ink);
    text-transform: none;
    min-height: 3.6rem;
}

.single-grid-product .product-info .product-name .product-link {
    color: var(--kb-ink);
}

.single-grid-product .product-info .product-name .product-link:hover {
    color: var(--kb-hot);
}

/* Star rating */
.single-grid-product .product-info .product-review {
    margin-bottom: .8rem;
}

.single-grid-product .product-info .product-review .review-item.active {
    color: var(--kb-ink);
}

/* Price row */
.single-grid-product .product-info .product-price {
    margin-bottom: 1rem;
}

.single-grid-product .product-info .product-price .price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--kb-ink);
}

.single-grid-product .product-info .product-price .regular-price {
    font-size: 1.2rem;
    font-weight: 500;
    color: #a8a294;
    margin-right: .8rem;
}

/* Full-width dark Add To Cart button */
.single-grid-product .product-info .add-cart {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    justify-content: center;
    gap: .6rem;
    width: 100%;
    padding: .9rem;
    font-size: 1.2rem;
    font-weight: 600;
    border: none;
    border-radius: 2px;
    background-color: var(--kb-ink);
    color: var(--kb-cream);
    transition: background-color .2s ease;
}

.single-grid-product .product-info .add-cart:hover {
    background-color: #000000;
    color: #ffffff;
}

.single-grid-product .product-info .add-cart .icon {
    color: var(--kb-cream);
}

/* ---------- Product cards v2 (used by theme "two" product detail page) ---------- */
.single-grid-product-v2 {
    background: #ffffff;
    border: 1px solid var(--kb-border);
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(11, 26, 51, .06);
    margin-bottom: 2rem;
    transition: box-shadow .2s ease, transform .2s ease;
}

.single-grid-product-v2:hover {
    box-shadow: 0 10px 26px rgba(11, 26, 51, .12);
    transform: translateY(-2px);
}

.single-grid-product-v2 .product-top {
    margin-bottom: 0;
    aspect-ratio: 3 / 4;
    background: var(--kb-cream);
}

.single-grid-product-v2 .product-top .product-thumbnal {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.single-grid-product-v2 .product-top .product-thumbnal[src*="dummyImg"] {
    object-fit: contain;
    padding: 3rem 3.5rem;
    background: var(--kb-cream);
    opacity: .55;
}

.single-grid-product-v2 .product-top .product-flags {
    top: 1rem;
    left: 1rem;
    right: auto;
    text-align: left;
    z-index: 2;
}

.single-grid-product-v2 .product-top .product-flags .product-flag {
    display: inline-block;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: .5px;
    padding: .3rem .9rem;
    border-radius: 2px;
    background-color: var(--kb-ink);
    color: #ffffff;
}

.single-grid-product-v2 .product-top .product-flags .product-flag.sale {
    background-color: var(--kb-ink);
}

.single-grid-product-v2 .product-top .product-flags .product-flag.discount {
    background-color: var(--kb-hot);
}

.single-grid-product-v2 .product-top .product-flags .product-flag.out-of-stock {
    background-color: #6b6b6b;
}

.single-grid-product-v2 .product-info {
    padding: 1.4rem 1.4rem 1.6rem;
}

.single-grid-product-v2 .product-info .product-catagory {
    margin-bottom: .5rem;
    font-size: 1rem;
    line-height: 1.4;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--kb-muted);
}

.single-grid-product-v2 .product-info .product-name {
    font-family: 'Noto Sans Tamil', 'Inter', sans-serif;
    margin-bottom: .6rem;
    font-size: 1.4rem;
    line-height: 2rem;
    font-weight: 600;
    color: var(--kb-ink);
    text-transform: none;
    min-height: 3.6rem;
}

.single-grid-product-v2 .product-info .product-name .product-link {
    color: var(--kb-ink);
}

.single-grid-product-v2 .product-info .product-name .product-link:hover {
    color: var(--kb-hot);
}

.single-grid-product-v2 .product-info .product-review {
    margin-bottom: .8rem;
}

.single-grid-product-v2 .product-info .product-review .review-item.active {
    color: var(--kb-ink);
}

.single-grid-product-v2 .product-info .product-price {
    margin-bottom: 1rem;
}

.single-grid-product-v2 .product-info .product-price .price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--kb-ink);
}

.single-grid-product-v2 .product-info .product-price .regular-price {
    font-size: 1.2rem;
    font-weight: 500;
    color: #a8a294;
    margin-right: .8rem;
}

.single-grid-product-v2 .product-info .add-cart {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .6rem;
    width: 100%;
    padding: .9rem;
    font-size: 1.2rem;
    font-weight: 600;
    border: none;
    border-radius: 2px;
    background-color: var(--kb-ink);
    color: var(--kb-cream);
    transition: background-color .2s ease;
}

.single-grid-product-v2 .product-info .add-cart:hover {
    background-color: #000000;
    color: #ffffff;
}

.single-grid-product-v2 .product-info .add-cart .icon {
    color: var(--kb-cream);
}

/* ---------- Logo styling ---------- */
.header-middle .brand-area {
    display: flex;
    align-items: center;
}

.brand-area .brand-logo img {
    width: auto;
    height: 64px;
    max-width: 130px;
    object-fit: contain;
    display: block;
}

.footer-brand-logo img {
    width: auto;
    height: 48px;
    max-width: 100px;
    object-fit: contain;
    display: block;
}

/* ---------- Header ---------- */
.header-area .header-top {
    background: var(--kb-hot);
}

.header-area .header-top .header-top-left .contact-info,
.header-area .header-top .top-bar-menu .menu-link,
.header-area .header-top .lang-switcher .lang,
.header-area .header-top .account-switcher .lang,
.header-area .header-top a {
    color: #f1e4e4 !important;
}

.header-area .header-middle {
    background: var(--kb-cream);
    border-bottom: 1px solid var(--kb-border);
}

.header-area .header-middle .header-right .header-btn .btn-text,
.header-area .header-middle .header-right .header-btn .item-count,
.header-area .header-middle .header-right .header-btn .price,
.header-area .header-middle .header-right .header-btn .btn-icon {
    color: var(--kb-ink) !important;
}

/* Rounded pill search */
.header-area .header-middle .search-area .search-wrap {
    background: #ffffff;
    border: 1px solid var(--kb-ink);
    border-radius: 26px;
    overflow: hidden;
    -webkit-box-shadow: 0 4px 16px rgba(0, 0, 0, .08);
    box-shadow: 0 4px 16px rgba(0, 0, 0, .08);
}

.header-area .header-middle .search-area .search-wrap .search-btn {
    background: var(--kb-ink);
    color: #ffffff;
}

.header-area .header-bottom {
    background: #ffffff;
    border-bottom: 1px solid #e4e4e4;
}

.header-area .header-bottom .menu-area .main-menu .menu-item .menu-link {
    color: var(--kb-ink) !important;
    font-weight: 700;
}

.header-area .header-bottom .menu-area .main-menu .menu-item.active .menu-link {
    color: var(--kb-ink) !important;
}

/* ---------- Footer ---------- */
.footer-area {
    background: var(--kb-ink);
    color: #d4d4d4;
}

.footer-area .single-widget .widget-title {
    color: var(--kb-cream);
}

.footer-area .single-widget .widget-menu .menu-item .menu-link,
.footer-area .single-widget .address-text,
.footer-area .single-widget .block-content .contact,
.footer-area .single-widget .newsletter-text {
    color: #a3a3a3 !important;
}

.footer-area .single-widget .social-media .social-media-item .social-media-link {
    background: #1f1f1f;
    color: #ffffff;
}

.footer-area .footer-widget-area .newsletter-widget .newsletter-form .form-group .subscribe-btn {
    background: #ffffff;
    color: var(--kb-ink);
    font-weight: 700;
}

.footer-area .footer-widget-area .newsletter-widget .newsletter-form .form-group .subscribe-btn:hover {
    background: var(--kb-cream);
    color: var(--kb-ink);
}

.footer-area .footer-bottom {
    color: #7a7a7a;
    border-top: 1px solid #333333;
}

/* ---------- Toast / alert notifications ---------- */
/* SweetAlert2 toast (add to cart / wishlist / compare) — force bottom-right, fix contrast */
.swal2-container.swal2-bottom-end,
.swal2-container.swal2-bottom-start,
.swal2-container.swal2-bottom,
.swal2-container.swal2-top-start {
    top: auto !important;
    left: auto !important;
    bottom: 0 !important;
    right: 0 !important;
    align-items: flex-end !important;
    justify-content: flex-end !important;
    z-index: 100000 !important;
}

.swal2-popup.swal2-toast {
    background: var(--kb-ink) !important;
    -webkit-box-shadow: 0 4px 16px rgba(0, 0, 0, .25) !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, .25) !important;
}

.swal2-popup.swal2-toast .swal2-title,
.swal2-popup.swal2-toast .swal2-html-container {
    color: #ffffff !important;
}

/* toastr (session / form messages) — force top-right */
#toast-container.toast-bottom-left,
#toast-container.toast-bottom-right,
#toast-container.toast-top-left {
    bottom: auto !important;
    left: auto !important;
    top: 110px !important;
    right: 12px !important;
    z-index: 100000 !important;
}

/* Full opacity by default (toastr dims to .8 at rest); auto-dismiss timer still runs and pauses on hover */
#toast-container > div,
#toast-container > div:hover {
    opacity: 1 !important;
    filter: none !important;
}

/* Out-of-stock "Not Available" label shown in place of the Add to Cart button */
.add-cart.out-of-stock-label {
    background-color: #e9e9e9 !important;
    color: #6b6b6b !important;
    cursor: not-allowed;
    pointer-events: none;
}

.add-cart.out-of-stock-label:hover {
    background-color: #e9e9e9 !important;
    color: #6b6b6b !important;
}
