/*
 * Venture custom styles
 *
 * Keep project-specific overrides in this file so the original theme files
 * can be updated without losing local changes.
 */

:root {
    --venture-logo-desktop-max-width: 210px;
    --venture-logo-desktop-max-height: 52px;
    --venture-logo-mobile-max-width: 145px;
    --venture-logo-mobile-max-height: 34px;
}

/* Header logo */
.header-logo .logo img {
    width: auto !important;
    height: auto !important;
    max-width: var(--venture-logo-desktop-max-width) !important;
    max-height: var(--venture-logo-desktop-max-height) !important;
    object-fit: contain;
}

/* Header and menu logos on mobile */
@media (max-width: 1200px) {
    .responsive-nav-wrapper .mobile-logo .logo img,
    .close-menu .mobile-logo .logo img {
        width: auto !important;
        height: auto !important;
        max-width: var(--venture-logo-mobile-max-width) !important;
        max-height: var(--venture-logo-mobile-max-height) !important;
        object-fit: contain;
    }
}

/* Electronic trust badges */
.footer-trust-badges {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin: 10px auto 30px;
}

.footer-trust-badges a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    border-radius: 8px;
    background-color: #fff;
}

.footer-trust-badges img {
    display: block;
    width: auto;
    max-width: 100px;
    height: 100px;
    object-fit: contain;
}

/* Mobile bottom navigation */
.mobile-bottom-nav {
    display: none;
}

@media (max-width: 1200px) {
    .master-wrapper-page {
        padding-bottom: calc(92px + env(safe-area-inset-bottom));
    }

    .mobile-bottom-nav {
        direction: rtl;
        position: fixed;
        right: 10px;
        bottom: max(8px, env(safe-area-inset-bottom));
        left: 10px;
        z-index: 1050;
        display: flex !important;
        align-items: stretch;
        justify-content: space-around;
        height: 68px;
        padding: 5px 4px;
        border: 1px solid rgba(44, 44, 44, 0.08);
        border-radius: 20px;
        background: rgba(255, 255, 255, 0.96);
        box-shadow: 0 12px 36px rgba(24, 24, 24, 0.18), 0 2px 8px rgba(24, 24, 24, 0.08);
        -webkit-backdrop-filter: blur(14px);
        backdrop-filter: blur(14px);
    }

    .mobile-bottom-nav__item {
        position: relative;
        display: flex;
        flex: 1 1 20%;
        align-items: center;
        justify-content: center;
        min-width: 0;
    }

    .mobile-bottom-nav__content {
        appearance: none;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        width: 100%;
        height: 100%;
        margin: 0;
        padding: 5px 2px;
        border: 0;
        color: #686868;
        background: transparent;
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
        transition: color 0.2s ease, transform 0.2s ease;
    }

    .mobile-bottom-nav__content:focus-visible {
        outline: 2px solid var(--venture-primary-color, #f3cc2e);
        outline-offset: 2px;
        border-radius: 12px;
    }

    .mobile-bottom-nav__icon {
        width: 23px;
        height: 23px;
        margin-bottom: 4px;
        fill: none;
        stroke: currentColor;
        stroke-width: 1.8;
        stroke-linecap: round;
        stroke-linejoin: round;
        transition: transform 0.2s ease;
    }

    .mobile-bottom-nav__label {
        overflow: hidden;
        max-width: 100%;
        color: inherit;
        font-size: 10px;
        font-weight: 500;
        line-height: 1.2;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .mobile-bottom-nav__item--active .mobile-bottom-nav__content,
    .mobile-bottom-nav__content:hover {
        color: var(--venture-primary-color, #f3cc2e);
    }

    .mobile-bottom-nav__item--active:not(.mobile-bottom-nav__item--cart):after {
        content: '';
        position: absolute;
        right: 50%;
        bottom: 1px;
        width: 15px;
        height: 3px;
        border-radius: 3px;
        background: var(--venture-primary-color, #f3cc2e);
        transform: translateX(50%);
    }

    .mobile-bottom-nav__content:active .mobile-bottom-nav__icon {
        transform: scale(0.88);
    }

    .mobile-bottom-nav__item--cart {
        align-self: stretch;
        height: auto;
    }

    .mobile-bottom-nav__cart {
        position: absolute;
        top: -24px;
        right: 50%;
        width: 62px;
        height: 62px;
        padding: 0;
        border: 5px solid #fff;
        border-radius: 50%;
        color: var(--venture-primary-color, #f3cc2e);
        background: linear-gradient(145deg, #383838, #202020);
        box-shadow: 0 9px 20px rgba(25, 25, 25, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.12);
        transform: translateX(50%);
    }

    .mobile-bottom-nav__cart:hover {
        color: var(--venture-primary-color, #f3cc2e);
        filter: brightness(1.08);
        transform: translateX(50%) translateY(-2px);
    }

    .mobile-bottom-nav__cart .mobile-bottom-nav__icon {
        width: 25px;
        height: 25px;
        margin: 0;
    }

    .mobile-bottom-nav__cart-count {
        position: absolute;
        top: -5px;
        left: -4px;
        display: flex;
        align-items: center;
        justify-content: center;
        min-width: 21px;
        height: 21px;
        padding: 0 5px;
        border: 2px solid #fff;
        border-radius: 12px;
        color: #2c2c2c;
        background: var(--venture-primary-color, #f3cc2e);
        font-size: 10px;
        font-weight: 700;
        line-height: 17px;
        box-shadow: 0 3px 8px rgba(25, 25, 25, 0.22);
    }

    .mobile-bottom-nav__cart-count.is-empty {
        opacity: 0.85;
    }

    .mobile-bottom-nav__cart-label {
        position: absolute;
        right: 0;
        bottom: 8px;
        left: 0;
        z-index: 1;
        color: #686868;
        line-height: 1.2;
        text-align: center;
        pointer-events: none;
    }

    .shopping-cart-page-body .mobile-bottom-nav__cart-label {
        color: var(--venture-primary-color, #f3cc2e);
    }

    .checkout-pages-body .master-wrapper-page {
        padding-bottom: 0;
    }

    .checkout-pages-body .mobile-bottom-nav {
        display: none !important;
    }
}

@media (max-width: 360px) {
    .mobile-bottom-nav {
        right: 6px;
        left: 6px;
    }

    .mobile-bottom-nav__label {
        font-size: 9px;
    }
}

/* Add future Venture overrides below this line. */

/* Keep text readable when the configurable primary color is used as a background. */
.category-item .title a {
    color: var(--venture-primary-contrast, #202020) !important;
}

.mobile-bottom-nav__cart-count {
    color: var(--venture-primary-contrast, #202020);
}

@media (min-width: 769px) {
    .sub-categories-wrapper .title a,
    .light-theme .sub-categories-wrapper .title a,
    .light-theme .sub-categories-wrapper .title a:hover {
        color: var(--venture-primary-contrast, #202020) !important;
    }

    .sub-categories-wrapper .title a {
        opacity: 0.82;
    }

    .sub-categories-wrapper .title a:hover {
        opacity: 1;
    }
}

@media (min-width: 1201px) {
    #topcartlink a,
    #topcartlink span,
    .light-theme #topcartlink a,
    .light-theme #topcartlink span {
        color: var(--venture-primary-contrast, #202020) !important;
    }
}

/* Modern homepage category showcase. */
.home-page-category-grid {
    width: calc(100% - 48px);
    max-width: 1560px;
    margin: clamp(44px, 5vw, 76px) auto 90px;
}

.home-page-category-heading {
    position: relative;
    margin-bottom: 28px;
    padding-right: 18px;
    text-align: right;
}

.home-page-category-heading:before {
    content: '';
    position: absolute;
    top: 4px;
    right: 0;
    width: 5px;
    height: 48px;
    border-radius: 5px;
    background: var(--venture-primary-color, #f3cc2e);
}

.home-page-category-heading h2 {
    margin: 0 0 6px;
    color: #292929;
    font-size: clamp(24px, 2vw, 32px);
    font-weight: 700;
    line-height: 1.25;
}

.home-page-category-heading p {
    margin: 0;
    color: #777;
    font-size: 14px;
    line-height: 1.7;
}

.home-page-category-grid .item-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: clamp(16px, 1.4vw, 24px);
}

.home-page-category-grid .item-box {
    float: none !important;
    width: auto !important;
    min-width: 0;
}

.home-page-category-grid .category-item {
    isolation: isolate;
    border-radius: 18px;
    background: #eee;
    box-shadow: 0 10px 30px rgba(20, 20, 20, 0.12);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.home-page-category-grid .category-item:after {
    content: '';
    position: absolute;
    z-index: 2;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(to top, rgba(14, 14, 14, 0.78) 0%, rgba(14, 14, 14, 0.25) 42%, transparent 70%);
    pointer-events: none;
}

.home-page-category-grid .category-item:hover {
    box-shadow: 0 18px 42px rgba(20, 20, 20, 0.2);
    transform: translateY(-6px);
}

.home-page-category-grid .category-item .title {
    right: 18px;
    bottom: 18px;
    left: 18px;
    z-index: 3;
    border-radius: 11px;
    text-align: right;
}

.home-page-category-grid .category-item .title:before {
    display: none;
}

.home-page-category-grid .category-item .title a {
    height: auto;
    min-height: 46px;
    padding: 12px 14px;
    border-right: 4px solid var(--venture-primary-color, #f3cc2e);
    border-radius: 10px;
    color: #fff !important;
    background: rgba(18, 18, 18, 0.48);
    font-size: 16px;
    font-weight: 600;
    line-height: 22px;
    text-align: right;
    -webkit-backdrop-filter: blur(7px);
    backdrop-filter: blur(7px);
}

.home-page-category-grid .category-item .picture img {
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    max-width: none;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transform: none;
    transition: transform 0.55s ease;
}

.home-page-category-grid .category-item:hover .picture img {
    transform: scale(1.045);
}

@media (max-width: 1200px) {
    .home-page-category-grid {
        width: calc(100% - 32px);
        margin-top: 42px;
    }

    .home-page-category-grid .item-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 16px;
    }
}

@media (max-width: 600px) {
    .home-page-category-grid {
        width: calc(100% - 20px);
        margin-top: 34px;
        margin-bottom: 55px;
    }

    .home-page-category-heading {
        margin-bottom: 20px;
    }

    .home-page-category-grid .item-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 14px;
    }

    .home-page-category-grid .category-item .title {
        right: 12px;
        bottom: 12px;
        left: 12px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .home-page-category-grid .category-item {
        transition: none;
    }

    .home-page-category-grid .category-item .picture img {
        transition: none;
    }

    .home-page-category-grid .category-item:hover {
        transform: none;
    }

    .home-page-category-grid .category-item:hover .picture img {
        transform: none;
    }
}
