/*
Theme Name: Ecomus Child
Theme URI: https://wpecomus.com/
Author: DrFuri
Author URI: http://drfuri.com/
Description: Multipurpose WooCommerce WordPress Theme
Version: 1.0.0
Requires at least: 5.0
Tested up to: 5.8
Requires PHP: 7.0
License: GNU General Public License v2+
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: ecomus
Domain Path: /lang/
Tags: one-column, two-columns, left-sidebar, right-sidebar, full-width-template, post-formats, theme-options, threaded-comments, translation-ready
Template: ecomus
*/

/* -------------------------------------------------------------
   Cart Drawer / Modals vs Sticky Add to Cart & Floating Buttons
   ------------------------------------------------------------- */

/* Ensure offscreen panels (Cart Drawer, Mobile Menu) and Modals always sit above sticky bars */
.offscreen-panel,
.modal {
    z-index: 100000 !important;
}

/* When cart panel or any modal is open, completely suppress sticky Add to Cart bar and WhatsApp float */
body.offcanvas-opened .ecomus-sticky-add-to-cart,
body.cart-panel-opened .ecomus-sticky-add-to-cart,
body.modal-opened .ecomus-sticky-add-to-cart {
    z-index: 0 !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

body.offcanvas-opened #custom-whatsapp-float,
body.cart-panel-opened #custom-whatsapp-float,
body.modal-opened #custom-whatsapp-float {
    z-index: 0 !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

/* -------------------------------------------------------------
   Storefront look matching the original TCR store
   ------------------------------------------------------------- */

/* Sharp 3:4 portrait frames for product cards, gallery and thumbnails.
   Set on body so it overrides the theme's :root dynamic CSS; media itself is not cropped or regenerated. */
body {
    --product-image-ratio-percent: 133.3333%;
    --em-image-rounded-product-card: 0px;
    --em-image-rounded-product-gallery: 0px;
    --em-image-rounded-product-thumbnail: 0px;
}

/* 2px card padding (4px between photo frames) on shop, category, brand, tag and New Arrivals grids.
   Carousels are excluded so Swiper keeps computing slide widths. */
body:is(.post-type-archive-product, .tax-product_cat, .tax-product_tag, .tax-product_brand, .page-id-10300) ul.products:not(.swiper-wrapper, .swiper ul) {
    margin-left: -2px;
    margin-right: -2px;
}

body:is(.post-type-archive-product, .tax-product_cat, .tax-product_tag, .tax-product_brand, .page-id-10300) ul.products:not(.swiper-wrapper, .swiper ul) > li.product {
    padding-left: 2px;
    padding-right: 2px;
}

/* The Additional CSS in the database pins New Arrivals gutters with !important (3px / 2px). */
body.page-id-10300 ul.products:not(.swiper-wrapper, .swiper ul) {
    margin-left: -2px !important;
    margin-right: -2px !important;
}

body.page-id-10300 ul.products:not(.swiper-wrapper, .swiper ul) > li.product {
    padding-left: 2px !important;
    padding-right: 2px !important;
}

/* No bullet markers in page and product text; list content and checkbox indicators are unaffected. */
:is(.entry-content, .elementor-widget-text-editor, .woocommerce-product-details__short-description, .woocommerce-Tabs-panel, .custom-accordion-body) ul:not(.products) {
    list-style: none;
}

:is(.entry-content, .elementor-widget-text-editor, .woocommerce-product-details__short-description, .woocommerce-Tabs-panel, .custom-accordion-body) ul:not(.products) > li {
    list-style: none;
}

/* Carousel pagination dots are hidden everywhere; arrows, swiping and numbered shop pagination remain. */
:is(.swiper, .ecomus-carousel--elementor, .elementor-widget) .swiper-pagination.swiper-pagination-bullets {
    display: none;
}

/* Brand link above product card titles (rendered natively by the theme, see inc/storefront.php). */
ul.products li.product .product--cat {
    margin-bottom: 4px;
    font-size: 12px;
    line-height: 1.4;
}

ul.products li.product .product--cat a {
    color: #545454;
}

/* -------------------------------------------------------------
   Single product summary (original TCR reference)
   ------------------------------------------------------------- */

.single-product div.product .product-gallery-summary .entry-summary {
    border: 1px solid #000;
    padding: 20px;
    box-sizing: border-box;
}

.single-product div.product .product-gallery-summary .entry-summary .meta-cat {
    float: none;
    margin: 0 0 6px;
    font-size: 14px;
    line-height: 1.4;
}

.single-product div.product .product-gallery-summary .entry-summary .meta-cat__label {
    display: none;
}

.single-product div.product .product-gallery-summary .entry-summary .meta-cat a {
    color: #000;
    font-weight: 400;
}

.single-product div.product .product-gallery-summary .entry-summary .product_title {
    margin: 0 0 8px;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.5;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #000;
}

.single-product div.product .product-gallery-summary .entry-summary .price {
    font-size: 14px;
    font-weight: 400;
}

.single-product div.product .product-gallery-summary .entry-summary .short-description {
    font-size: 12px;
    line-height: 1.6;
    color: #545454;
}

/* Wishlist/compare controls, breadcrumb and previous/next are not part of the reference product page.
   Stock availability text, variations, gift card fields and Add to cart are unaffected. */
.single-product div.product .entry-summary .product-featured-icons--single-product,
.single-product div.product .entry-summary .wcboost-wishlist-button,
.single-product div.product .entry-summary .wcboost-products-compare-button,
.single-product div.product .ecomus-breadcrumb-navigation-wrapper {
    display: none;
}

/* Product information accordions (markup in functions.php). */
.custom-product-accordions-wrapper {
    margin-top: 25px;
    border-top: 1px solid #EBEBEB;
    width: 100%;
}

.custom-product-accordions-wrapper .custom-accordion-item {
    border-bottom: 1px solid #EBEBEB;
}

.custom-product-accordions-wrapper .custom-accordion-heading {
    margin: 0;
    font-size: inherit;
}

.custom-product-accordions-wrapper .custom-accordion-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    margin: 0;
    padding: 16px 0;
    border: 0;
    border-radius: 0;
    background: none;
    box-shadow: none;
    color: #000;
    font-family: inherit;
    font-size: 15px;
    font-weight: 500;
    line-height: 1.4;
    text-align: left;
    text-transform: none;
    cursor: pointer;
    transition: color 0.2s ease;
}

.custom-product-accordions-wrapper .custom-accordion-header:hover {
    background: none;
    color: #545454;
}

.custom-product-accordions-wrapper .custom-accordion-header:focus-visible {
    outline: 1px solid #000;
    outline-offset: 2px;
}

.custom-product-accordions-wrapper .custom-accordion-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    transition: transform 0.3s ease;
}

.custom-product-accordions-wrapper .custom-accordion-header[aria-expanded="true"] .custom-accordion-icon {
    transform: rotate(180deg);
}

.custom-product-accordions-wrapper .custom-accordion-body {
    padding-bottom: 20px;
    font-size: 14px;
    line-height: 1.7;
    color: #545454;
}

.custom-product-accordions-wrapper .custom-accordion-body[hidden] {
    display: none;
}

/* -------------------------------------------------------------
   Footer and floating WhatsApp (markup in functions.php)
   ------------------------------------------------------------- */

.tcr-footer__inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 30px 20px;
}

.tcr-footer__top {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -15px;
}

.tcr-footer__links,
.tcr-footer__subscribe {
    min-width: min(320px, 100%);
    box-sizing: border-box;
}

.tcr-footer__links {
    flex: 1 1 55%;
    padding: 0 25px 30px 15px;
}

.tcr-footer__subscribe {
    flex: 1 1 45%;
    padding: 0 15px 30px 35px;
    border-left: 1px solid #EBEBEB;
}

.tcr-footer__link-columns {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 40px;
}

#custom-whatsapp-float {
    position: fixed;
    bottom: 25px;
    left: 25px;
    z-index: 99999;
    display: flex;
    align-items: center;
}

@media (max-width: 767px) {
    .tcr-footer__inner {
        padding: 30px 16px 16px;
    }

    .tcr-footer__top {
        margin: 0;
    }

    .tcr-footer__links,
    .tcr-footer__subscribe {
        flex-basis: 100%;
        padding: 0 0 24px;
    }

    .tcr-footer__subscribe {
        padding-top: 24px;
        border-left: 0;
        border-top: 1px solid #EBEBEB;
    }

    .tcr-footer__link-columns {
        gap: 24px;
    }

    /* Icon-only and lifted above the mobile navigation bar / sticky Add to cart. */
    #custom-whatsapp-float {
        left: 12px;
        bottom: calc(80px + env(safe-area-inset-bottom, 0px));
    }

    .single-product #custom-whatsapp-float {
        bottom: calc(96px + env(safe-area-inset-bottom, 0px));
    }

    #custom-whatsapp-float .tcr-whatsapp__label {
        display: none;
    }

    .single-product div.product .product-gallery-summary .entry-summary {
        padding: 16px;
    }
}

/* Figtree for form controls (they do not inherit by default); icon fonts keep their own font-family. */
button,
input,
select,
textarea,
input::placeholder,
textarea::placeholder {
    font-family: 'Figtree', var(--em-font__main, sans-serif);
}

/* Product information tab texts (functions.php). */
.tcr-tab-text p {
    margin: 0 0 10px;
    font-size: 14px;
    line-height: 1.6;
    color: #545454;
}

.tcr-tab-text p:last-child {
    margin-bottom: 0;
}

/* Desktop header: 240px logo in a compact 70px bar. The database Additional CSS pins the logo
   at 28px with !important, so these few declarations need it too. */
@media (min-width: 1025px) {
    body .site-header .header-logo img {
        width: 240px !important;
        max-width: 240px !important;
        height: auto !important;
        max-height: none !important;
    }

    .site-header__desktop .header-main {
        height: 70px;
    }
}

/* -------------------------------------------------------------
   Reference homepage [tcr_reference_home] (inc/reference-home.php)
   ------------------------------------------------------------- */

.tcr-container-full {
    width: 100%;
    padding: 0;
}

.tcr-reference-home {
    color: #545454;
    background: #fff;
    font-family: 'Figtree', var(--em-font__main, sans-serif);
}

.tcr-reference-home a:focus-visible,
.tcr-reference-home button:focus-visible,
.tcr-reference-home [tabindex]:focus-visible {
    outline: 2px solid #000;
    outline-offset: 2px;
}

.tcr-hero {
    position: relative;
}

.tcr-hero__track {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    scrollbar-width: none;
}

.tcr-hero__track::-webkit-scrollbar {
    display: none;
}

.tcr-hero__slide {
    flex: 0 0 100%;
    scroll-snap-align: start;
    aspect-ratio: 16 / 9;
    background: #ebebeb;
}

.tcr-hero__slide a,
.tcr-hero__slide img {
    display: block;
    width: 100%;
    height: 100%;
}

.tcr-hero__slide img {
    object-fit: cover;
}

.tcr-reference-home .tcr-hero__button {
    position: absolute;
    top: 50%;
    width: 40px;
    height: 40px;
    margin-top: -20px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: #fff;
    color: #000;
    font-size: 24px;
    line-height: 40px;
    cursor: pointer;
}

.tcr-hero__button--prev {
    left: 16px;
}

.tcr-hero__button--next {
    right: 16px;
}

.tcr-section {
    padding: 48px 15px 0;
}

.tcr-section:last-child {
    padding-bottom: 48px;
}

.tcr-reference-home .tcr-heading {
    margin: 0 0 8px;
    color: #000;
    font-weight: 500;
    line-height: 1.25;
    text-align: center;
}

.tcr-heading--32 {
    font-size: 32px;
}

.tcr-heading--28 {
    font-size: 28px;
}

.tcr-subtitle {
    margin: 0 0 8px;
    font-size: 14px;
    text-align: center;
}

.tcr-cta {
    margin: 0 0 24px;
    font-size: 14px;
    text-align: center;
}

.tcr-reference-home .tcr-cta a {
    color: #000;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.tcr-grid {
    display: grid;
    gap: 4px;
}

.tcr-grid--4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.tcr-grid--3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.tcr-card {
    display: block;
    color: #000;
    text-decoration: none;
}

.tcr-card__media {
    display: block;
    overflow: hidden;
    background: #ebebeb;
}

.tcr-card__media--portrait {
    aspect-ratio: 3 / 4;
}

.tcr-card__media img {
    display: block;
    width: 100%;
    height: auto;
}

.tcr-card__label {
    display: block;
    padding: 10px 0 0;
    color: #000;
    font-size: 14px;
    text-align: center;
}

.tcr-city__layout {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px;
    align-items: center;
}

.tcr-city__copy {
    min-width: 0;
    padding: 24px 5%;
}

.tcr-city__art {
    display: block;
}

.tcr-blog__post {
    text-align: center;
}

.tcr-reference-home .tcr-blog__title {
    margin: 0 0 8px;
    color: #000;
    font-size: 16px;
    font-weight: 500;
}

/* WooCommerce product grids: 4px gutters, sharp 3:4 frames from the shared card variables. */
.tcr-reference-home ul.products {
    margin-left: -2px;
    margin-right: -2px;
}

.tcr-reference-home ul.products li.product {
    padding-left: 2px;
    padding-right: 2px;
}

@media (max-width: 767px) {
    .tcr-grid--4 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .tcr-grid--3,
    .tcr-city__layout {
        grid-template-columns: minmax(0, 1fr);
    }

    .tcr-section {
        padding: 32px 4px 0;
    }

    .tcr-section:last-child {
        padding-bottom: 32px;
    }

    .tcr-heading--32 {
        font-size: 24px;
    }

    .tcr-heading--28 {
        font-size: 22px;
    }

    .tcr-reference-home .tcr-hero__button {
        width: 32px;
        height: 32px;
        margin-top: -16px;
        line-height: 32px;
    }

    .tcr-hero__button--prev {
        left: 8px;
    }

    .tcr-hero__button--next {
        right: 8px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .tcr-hero__track {
        scroll-behavior: auto;
    }
}

/* -------------------------------------------------------------
   Policy, FAQ and careers pages (content wrapped in .tcr-policy)
   ------------------------------------------------------------- */

.tcr-policy {
    max-width: 760px;
    margin: 0 auto;
    padding-bottom: 48px;
    color: #545454;
    font-size: 14px;
    line-height: 1.7;
}

.tcr-policy :is(h2, h3, h4, h5, h6) {
    margin: 28px 0 10px;
    color: #000;
    font-weight: 500;
    line-height: 1.3;
}

.tcr-policy h2 {
    font-size: 20px;
}

.tcr-policy :is(h3, h4, h5, h6) {
    font-size: 16px;
}

.tcr-policy p {
    margin: 0 0 12px;
}

.tcr-policy a {
    color: #000;
    text-decoration: underline;
}

.tcr-policy details {
    border-bottom: 1px solid #ebebeb;
}

.tcr-policy summary {
    padding: 14px 0;
    color: #000;
    font-weight: 500;
    cursor: pointer;
}

.tcr-policy summary:focus-visible {
    outline: 2px solid #000;
    outline-offset: 2px;
}

.tcr-policy details[open] > :last-child {
    margin-bottom: 14px;
}

/* Geometry verified against the original desktop catalogue and product page. */
body.ecomus-catalog-page .site-content-container.em-container-fluid {
    padding-left: 2px;
    padding-right: 2px;
}
body.ecomus-catalog-page .catalog-toolbar {
    padding: 0 38px 6px;
}
body.single-product .site-content {
    padding-top: 0;
}
.single-product div.product .entry-summary .quantity__label {
    display: none;
}
.custom-product-accordions-wrapper .custom-accordion-header {
    font-size: 12px;
    text-transform: uppercase;
}
@media (min-width: 1200px) {
    .primary-navigation .menu > li:nth-child(3) > .sub-menu {
        max-height: 70vh;
        overflow-y: auto;
    }
}
@media (max-width: 767px) {
    body.ecomus-catalog-page .catalog-toolbar {
        padding-left: 14px;
        padding-right: 14px;
    }
    .tcr-city__copy { padding: 24px 12px; }
}

/* Source homepage uses a separate, high-contrast header and sharp artwork. */
body .campaign-bar {
    --em-campaign-background: #fff;
    --em-campaign-text-color: #000;
}
body .tcr-reference-home img {
    border-radius: 0;
}
body.tcr-reference-front .site-content {
    padding: 0;
}
.tcr-reference-home .tcr-city {
    padding-left: 0;
    padding-right: 0;
}
.tcr-reference-home .tcr-city__layout {
    gap: 0;
}

/* Keep dropdown navigation reachable by keyboard as well as pointer hover. */
.primary-navigation .nav-menu li:focus-within > ul {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translate(-50%, 0);
    z-index: 999;
}
.primary-navigation .nav-menu li > ul.sub-menu li:focus-within > ul {
    top: 0;
    left: 100%;
}
