/* ==========================================================================
   Khazanay theme — global design tokens
   Loaded last so these overrides win the cascade against custom.css /
   eshop-bundle*.css / colors/*.css without needing !important.
   ========================================================================== */

:root {
    /* Typography: headings, section titles, product titles & prices all use
       --font-lexend in custom.css — repoint it to Montserrat. Body text stays
       on Open Sans (--font-open-sans), already loaded by the base theme. */
    --font-lexend: 'Montserrat', sans-serif;

    /* Primary accent: Shop Vault logo navy blue */
    --primary-color: #1f4e79;
    --primary-color-onhover: #163c5e;
    --primary-soft: #eaf1f8;
    --primary-soft-onhover: #d6e5f2;
    --border-focus: solid 1px #1f4e79;

    /* Secondary accent: Shop Vault logo orange — used for the "% off"
       discount badge, so deals pop against the navy Add to Cart button. */
    --kzn-accent-color: #f2871f;
    --kzn-accent-color-onhover: #d9740f;

    /* Price accent colors */
    --kzn-price-color: #ec0101;
    --kzn-price-secondary-color: #878787;

    /* Khazanay-style neutrals, available for new components */
    --kzn-heading-color: #222222;
    --kzn-text-color: #878787;
    --kzn-border-color: #e6e6e6;
}

.btn-outline-primary {
    --bs-btn-color: #1f4e79;
    --bs-btn-border-color: #1f4e79;
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: #1f4e79;
    --bs-btn-hover-border-color: #1f4e79;
    --bs-btn-active-color: #fff;
    --bs-btn-active-bg: #1f4e79;
    --bs-btn-active-border-color: #1f4e79;
    --bs-btn-disabled-color: #1f4e79;
    --bs-btn-disabled-border-color: #1f4e79;
}

/* Product price accents */
.card-price {
    color: var(--kzn-price-color);
}

.offer_price .text-decoration-line-through {
    color: var(--kzn-price-secondary-color);
    text-decoration-color: var(--kzn-price-secondary-color);
}

/* ==========================================================================
   Header — hamburger drawer, centered logo/search, right-side icon group
   ========================================================================== */
.khazanay-header {
    position: sticky;
    top: 0;
    z-index: 1030;
    border-bottom: solid 1px var(--kzn-border-color);
}

.khazanay-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 20px 0;
}

.khazanay-menu-btn {
    flex: 0 0 auto;
    background: transparent;
    border: none;
    padding: 8px;
    font-size: 22px;
    line-height: 1;
    color: var(--kzn-heading-color);
}

.khazanay-logo {
    flex: 1 1 auto;
    justify-content: center;
}

.khazanay-logo img {
    max-height: 52px;
    max-width: 190px;
}

.khazanay-icon-group {
    flex: 0 0 auto;
    gap: 2px;
}

.khazanay-icon-group .shopingicon {
    font-size: 20px;
}

.khazanay-icon-group ion-icon {
    font-size: 20px;
    vertical-align: middle;
}

.khazanay-search-row {
    padding-bottom: 16px;
}

.khazanay-search-form.searchcontainer {
    width: 100%;
    max-width: 640px;
    margin: 0 auto;
}

.khazanay-cat-nav {
    border-top: solid 1px var(--kzn-border-color);
    padding: 4px 0;
}

.khazanay-cat-nav .navbar-nav {
    flex-direction: row;
    flex-wrap: wrap;
}

.khazanay-lang-switch {
    margin-left: 16px;
}

@media (max-width: 575px) {
    .khazanay-logo img {
        max-height: 36px;
    }

    .khazanay-icon-group .shopingicon {
        padding: 14px 8px;
    }
}

/* ==========================================================================
   Footer — 4-column grid
   ========================================================================== */
.khazanay-footer-logo img {
    max-height: 50px;
    max-width: 160px;
    margin-bottom: 16px;
}

.khazanay-footer-title {
    font-size: 16px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--kzn-heading-color);
    margin-bottom: 18px;
}

.khazanay-footer-contact,
.khazanay-footer-links {
    margin: 0;
}

.khazanay-footer-contact li,
.khazanay-footer-links li {
    margin-bottom: 12px;
}

.khazanay-footer-contact li,
.khazanay-footer-contact li a {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    color: var(--kzn-text-color);
    font-size: 14px;
}

.khazanay-footer-contact ion-icon {
    font-size: 18px;
    flex-shrink: 0;
    margin-top: 2px;
    color: var(--kzn-heading-color);
}

.khazanay-footer-links a {
    color: var(--kzn-text-color);
    font-size: 14px;
    transition: var(--transition);
}

.khazanay-footer-links a:hover {
    color: var(--kzn-heading-color);
}

.khazanay-footer-social {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 8px;
}

.khazanay-footer-social .social-media-icon {
    font-size: 22px;
    padding: 0;
    margin: 0;
    background: transparent;
}

/* ==========================================================================
   Homepage — section headings, category/brand tiles, product cards
   ========================================================================== */
.section-title {
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--kzn-heading-color);
}

.viewmorebtn {
    background: transparent;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
    border-radius: 2px;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.5px;
    box-shadow: none;
}

.viewmorebtn:hover,
.viewmorebtn:active {
    color: #fff !important;
    background-color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
}

/* Category & brand image tiles */
.categories-image {
    height: 160px;
    padding: 14px;
    border-radius: 8px;
    background: #fff;
    border: 1px solid var(--kzn-border-color);
}

.categories-image img {
    object-fit: contain;
    border-radius: 0;
}

@media (max-width: 575px) {
    .categories-image {
        height: 100px;
        padding: 8px;
    }
}

.categories-card-text {
    padding: 10px 0 0;
}

.categories-card-text h4 {
    font-weight: 500;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.brands-image {
    border-radius: 4px;
    border: 1px solid var(--kzn-border-color);
    background: #fff;
}

/* Product cards */
.product-card,
.card-temp,
.card6,
.card5 {
    width: 100%;
    border: 1px solid var(--kzn-border-color);
    border-radius: 4px;
    box-shadow: none;
}

.card-title {
    font-weight: 500;
    font-size: 14px;
    color: var(--kzn-heading-color);
}

.card-text {
    color: var(--kzn-text-color);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.offer_price .text-success {
    color: var(--kzn-accent-color) !important;
}

/* Add to Cart — logo navy, matching the header/nav branding as the
   primary action color. */
.add-in-cart-btn {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.add-in-cart-btn:hover,
.add-in-cart-btn:focus,
.add-in-cart-btn:active {
    background-color: var(--primary-color-onhover);
    border-color: var(--primary-color-onhover);
}

/* Center product details under the image on every card style */
.product-card .card-body,
.card-temp .card-body,
.card6 .card-body,
.card5 .card-body {
    text-align: center;
}

.product-card .card-body .d-flex.gap-1,
.card-temp .card-body .d-flex.gap-1,
.card6 .card-body .d-flex.gap-1,
.card5 .card-body .d-flex.gap-1 {
    justify-content: center;
}

/* ==========================================================================
   Product sections (Feature Products, Bags, Electronics, Toy Character,
   Bottles & Tumbler, Toy Cars, Flash Sale) — converted from horizontal
   list cards / swiper carousels into khazanay-style grid tiles (image
   fills the top, details centered below).
   ========================================================================== */
/* Swiper's own CSS gives .swiper-wrapper "height:100%; overflow:auto" and
   .swiper-slide "overflow:hidden" for carousel scrolling — once converted to
   a multi-row grid, those rules can clip or scroll-hide the lower rows
   (e.g. price/Add to Cart on row 2+). Force everything to size to its
   content and stay visible. */
.mySwiper3,
.mySwiper4,
.mySwiper5 {
    height: auto !important;
    overflow: visible !important;
}

.mySwiper3 .swiper-wrapper,
.mySwiper4 .swiper-wrapper,
.mySwiper5 .swiper-wrapper {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
    transform: none !important;
    height: auto !important;
    overflow: visible !important;
}

@media (min-width: 576px) {

    .mySwiper3 .swiper-wrapper,
    .mySwiper4 .swiper-wrapper,
    .mySwiper5 .swiper-wrapper {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 1024px) {

    .mySwiper3 .swiper-wrapper,
    .mySwiper4 .swiper-wrapper,
    .mySwiper5 .swiper-wrapper {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (min-width: 1440px) {

    .mySwiper3 .swiper-wrapper,
    .mySwiper4 .swiper-wrapper,
    .mySwiper5 .swiper-wrapper {
        grid-template-columns: repeat(5, 1fr);
    }
}

.mySwiper3 .swiper-slide,
.mySwiper4 .swiper-slide,
.mySwiper5 .swiper-slide {
    width: auto !important;
    height: auto !important;
    margin: 0 !important;
    overflow: visible !important;
    display: flex;
}

.mySwiper3 .card {
    margin: 0;
}

/* Equal-height cards per row, with Add to Cart pinned to the bottom
   regardless of how many lines the title/category take up. */
.mySwiper3 .swiper-slide>a,
.mySwiper4 .swiper-slide>a,
.mySwiper5 .swiper-slide>a {
    display: flex;
    width: 100%;
}

/* style_1 / style_2 sections (.card-temp) aren't swiper carousels — they're
   plain Bootstrap grid columns, which already stretch to equal height per
   row. Make the <a> wrapper and card fill that height too, so Add to Cart
   pins to the bottom here as well. */
a:has(>.product-card),
a:has(>.card-temp),
a:has(>.card5) {
    display: flex;
    width: 100%;
    height: 100%;
}

.mySwiper3 .swiper-slide .card,
.mySwiper4 .swiper-slide .card,
.mySwiper5 .swiper-slide .card {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.product-card .card-body,
.card-temp .card-body,
.card6 .card-body,
.card5 .card-body {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.product-card .card-body .add-in-cart-btn,
.card-temp .card-body .add-in-cart-btn,
.card6 .card-body .add-in-cart-btn,
.card5 .card-body .add-in-cart-btn {
    margin-top: auto;
}

.mySwiper3 .swiper-button-next,
.mySwiper3 .swiper-button-prev,
.mySwiper4 .swiper-button-next,
.mySwiper4 .swiper-button-prev,
.mySwiper5 .swiper-button-next,
.mySwiper5 .swiper-button-prev {
    display: none !important;
}

/* default style cards (.card-h-418): square product image, like card5/card6 */
.product-img-style3 {
    height: auto;
    aspect-ratio: 1 / 1;
    padding: 16px;
}

.product-img-style3 img {
    width: 100% !important;
    height: 100% !important;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* style_1 / style_2 cards (.card-temp): same square, padded, "contain" image
   treatment as the default-style cards above, for a consistent look across
   every product section. */
.product-image-1 {
    height: auto;
    aspect-ratio: 1 / 1;
    padding: 16px;
}

.product-image-1 img {
    width: 100% !important;
    height: 100% !important;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* style_4 cards (.card6): force the image+body row to stack vertically */
.card6 {
    display: flex;
    flex-direction: column;
    width: 100%;
    margin: 0;
}

.card6>.d-flex {
    flex-direction: column;
    flex: 1;
}

.card6-img {
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 1 / 1;
    padding: 16px;
    border-radius: 0;
}

.card6-img img {
    width: 100% !important;
    height: 100% !important;
    padding: 0;
    object-fit: contain;
}

.card-body-6 .product-disc {
    display: none;
}

/* style_3 & flash sale cards (.card5): stack image on top of details */
.card5 {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    margin: 0;
    min-height: 0;
}

.card5 img {
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 1 / 1;
    padding: 16px;
    border-radius: 0;
    object-fit: contain;
}

/* ==========================================================================
   Wishlist heart — float over the top-left corner of the product image at
   every screen size (khazanay.pk style), instead of sitting in its own row
   above the image on desktop.
   ========================================================================== */
.product-card,
.card-temp,
.card5,
.card6 {
    position: relative;
}

.product-card>.product-icon-spacebtw,
.card-temp>.product-icon-spacebtw,
.card5>.product-icon-spacebtw,
.card6>.product-icon-spacebtw {
    position: absolute;
    top: 8px;
    left: 8px;
    margin: 0;
    z-index: 2;
}

.product-card>.product-icon-spacebtw .add-to-fav-btn,
.card-temp>.product-icon-spacebtw .add-to-fav-btn,
.card5>.product-icon-spacebtw .add-to-fav-btn,
.card6>.product-icon-spacebtw .add-to-fav-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

