/*
| Trendiva brand identity, loaded last over the 6valley default theme.
| Ink (primary) and bronze (secondary) come from the admin colour settings;
| the rest of the palette, the type and the component shapes live here.
*/
:root {
    --tv-ink: #1C1B19;
    --tv-ivory: #FAF8F5;
    --tv-sand: #F1ECE4;
    --tv-photo: #EFE9E1;
    --tv-line: #E4DDD2;
    --tv-muted: #6B6660;
    --tv-sale: #B42318;
    --tv-radius: 6px;
    --tv-radius-sm: 4px;
    --tv-font-body: RiyalSymbol, "IBM Plex Sans Arabic", "Open Sans", sans-serif;
    --tv-font-display: "Noto Kufi Arabic", "IBM Plex Sans Arabic", sans-serif;
}

body {
    background: var(--tv-ivory);
    color: var(--tv-ink);
}

/* Type: Kufi for page and section titles; Plex everywhere else, prices included. */
h1, h2 {
    font-family: var(--tv-font-display);
    font-weight: 700 !important;
    letter-spacing: 0 !important;
}

.product-price,
.product-price *,
.text-accent,
del {
    font-family: var(--tv-font-body) !important;
}

/* Top bar: a slim ink strip. */
.topbar {
    background: var(--tv-ink) !important;
}

.topbar,
.topbar a,
.topbar .topbar-link,
.topbar i {
    color: var(--tv-ivory) !important;
}

/* Navigation bar: white with ink links, instead of a heavy coloured band. */
.navbar-stuck-menu {
    background: #FFFFFF !important;
    border-bottom: 1px solid var(--tv-line);
}

.navbar-stuck-menu .nav-link,
.navbar-stuck-menu .navbar-nav > li > a,
.navbar-stuck-menu .text-white {
    color: var(--tv-ink) !important;
}

/* Header: the search row and the menu row share one white block. */
.navbar-sticky.mobile-head,
.navbar-sticky.mobile-head > .navbar {
    background: #FFFFFF !important;
}

.navbar-tool-icon-box.bg-secondary {
    background: var(--tv-sand) !important;
}

/* "View all" links in the accent (the admin secondary colour). */
.view-all-btn-text,
.view-all-btn-text span,
.view-all-btn-text i {
    color: var(--web-secondary) !important;
    font-weight: 500;
}

/* Home categories: 3:4 photo cards instead of small circles. */
.__cate-item .__img {
    width: 132px;
    height: 176px;
    max-width: 100%;
    border-radius: var(--tv-radius) !important;
    background: var(--tv-photo) !important;
    overflow: hidden;
    padding: 0 !important;
}

.categories--slider .__cate-item .__img {
    width: 100%;
    height: auto !important;
    aspect-ratio: 3 / 4;
}

.__cate-item .__img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0 !important;
}

.__cate-item h3 {
    font-size: 15px !important;
    font-weight: 700 !important;
    max-width: none !important;
}

/* Search: 16px text so iPhone does not zoom in when it is tapped. */
.search-bar-input {
    font-size: 16px !important;
}

/* Buttons and inputs share one corner radius. */
.btn,
.form-control {
    border-radius: var(--tv-radius);
}

/* One strong action per product: "Add to cart" is ink, "Buy now" an ink outline. */
.product-buy-now-button {
    background: transparent !important;
    color: var(--tv-ink) !important;
    border: 1.5px solid var(--tv-ink) !important;
}

.product-buy-now-button:hover {
    background: var(--tv-ink) !important;
    color: #FFFFFF !important;
}

/* Product cards: the photo leads, on a uniform sand ground at 3:4. */
.product-single-hover.style--card {
    background: transparent;
    border: 0;
    box-shadow: none;
}

.product-single-hover .inline_product {
    background: var(--tv-photo);
    border-radius: var(--tv-radius-sm);
    overflow: hidden;
}

.product-single-hover .inline_product img {
    width: 100%;
    aspect-ratio: 3 / 4;
    height: auto !important;
    object-fit: cover;
    border: 0 !important;
}

.product-single-hover .single-product-details {
    padding-inline: 2px;
}

.product-single-hover .single-product-details h3,
.product-single-hover .product-price {
    text-align: start !important;
    justify-content: flex-start !important;
}

.product-single-hover .single-product-details h3 a {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    white-space: normal;
    font-size: 14px;
    font-weight: 400 !important;
    line-height: 1.6;
    color: var(--tv-ink);
}

/* Prices: ink; a discounted price turns sale red, the list price is muted. */
.product-price .text-accent {
    color: var(--tv-ink) !important;
    font-weight: 700;
}

.product-price del {
    color: var(--tv-muted) !important;
}

.product-price del + .text-accent {
    color: var(--tv-sale) !important;
}

/* Discount label: sale red, never the brand colour (cards, product page, quick view). */
.for-discount-value,
.discount-badge {
    background: var(--tv-sale) !important;
    color: #FFFFFF !important;
    border-radius: var(--tv-radius-sm) !important;
    font-weight: 700;
}

/* Brand logos fit inside their circle instead of being cropped. */
.__brand-item img {
    object-fit: contain !important;
    padding: 10px;
    box-sizing: border-box;
    background: #FFFFFF;
}

/* Footer: ink, matching the top bar. */
.page-footer {
    background: var(--tv-ink) !important;
}

/* Phone bottom navigation (partials/_mobile-bottom-nav). */
.mobile-bottom-nav {
    position: fixed;
    inset-inline: 0;
    bottom: 0;
    z-index: 1030;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    height: calc(64px + env(safe-area-inset-bottom));
    padding-bottom: env(safe-area-inset-bottom);
    background: #FFFFFF;
    border-top: 1px solid var(--tv-line);
}

.mobile-bottom-nav a {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    font-size: 11px;
    color: var(--tv-muted);
    text-decoration: none;
}

.mobile-bottom-nav a.active {
    color: var(--tv-ink);
    font-weight: 700;
}

.mobile-bottom-nav i {
    font-size: 20px;
    line-height: 1;
}

.mobile-bottom-nav-icon {
    position: relative;
    line-height: 1;
}

.mobile-bottom-nav-count {
    position: absolute;
    top: -6px;
    inset-inline-end: -10px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 8px;
    background: var(--tv-ink);
    color: #FFFFFF;
    font-size: 10px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-bottom-nav-count[hidden] {
    display: none;
}

@media (max-width: 767.98px) {
    /* Room for the bar, and the floating WhatsApp / back-to-top buttons above it. */
    body:has(.mobile-bottom-nav) {
        padding-bottom: calc(64px + env(safe-area-inset-bottom));
    }

    body:has(.mobile-bottom-nav) .floating-btn-grp {
        bottom: calc(80px + env(safe-area-inset-bottom)) !important;
    }
}
