/*
    Target: Pharmacy-Shop
    Description: Styles for TFC pharmacy-shop and overrides
    Version: 1.0.1
    License:         	TFC 2026
    License URI:     	TFC 2026
*/

.page-template-default .archive-header, .single-post .archive-header {
    padding-bottom: 0 !important;
}

/* subcategory scroller */
.tfc-scroller-btn-wrapper{width: 10%; padding: 20px;}
.tfc-subcat-scroller {
    position: relative;
    width: 100%;
    margin-top: 50px;
}
.tfc-subcat-scroller__header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}
.tfc-subcat-scroller__title {
    margin: 0;
    font-size: 18px;
    line-height: 1.2;
}
.tfc-subcat-scroller__viewport {
    position: relative;
    width: 80%;
}
.tfc-subcat-scroller__track {
    display: flex;
    gap: 18px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    margin: 0;
    list-style: none;
}
/* Hide scrollbar but keep scrolling */
.tfc-subcat-scroller__track::-webkit-scrollbar { height: 0; }
.tfc-subcat-scroller__track { scrollbar-width: none; }
.tfc-subcat-scroller__item {
    flex: 0 0 auto;
    scroll-snap-align: start;
    width: 220px; /* desktop base */
}
.tfc-subcat-scroller__card {
    display: block;
    text-decoration: none;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 1px 0 rgba(0,0,0,.04), 0 8px 24px rgba(0,0,0,.06);
    padding: 14px;
    transition: transform .12s ease;
    height: 100%;
}
.tfc-subcat-scroller__card:focus,
.tfc-subcat-scroller__card:hover {
    transform: translateY(-1px);
}
.tfc-subcat-scroller__imgwrap {
    display: grid;
    place-items: center;
    height: 78px;
    margin-bottom: 10px;
}
.tfc-subcat-scroller__img {
    max-height: 78px;
    width: auto;
    max-width: 100%;
    object-fit: contain;
}
.tfc-subcat-scroller__name {
    margin: 0;
    font-weight: 700;
    font-size: 16px;
    line-height: 1.2;
    color: #111;
    text-align: center;
}
/* Arrows */
.tfc-subcat-scroller__arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 34px;
    height: 34px;
    border-radius: 999px;
    border: 1px solid rgba(0,0,0,.12);
    background: #fff;
    box-shadow: 0 6px 18px rgba(0,0,0,.10);
    display: grid;
    place-items: center;
    cursor: pointer;
    z-index: 2;
}
.tfc-subcat-scroller__arrow[disabled] {
    opacity: .35;
    cursor: not-allowed;
}
.tfc-subcat-scroller__arrow svg {
    width: 16px;
    height: 16px;
}
/* Tablet */
@media (max-width: 1024px) {
    .tfc-subcat-scroller__item { width: 200px; }
}
/* Mobile */
@media (max-width: 640px) {
    .tfc-subcat-scroller__track { padding: 0px; }
    .tfc-subcat-scroller__item { flex: 0 0 47%; max-width: 50%; }
    .tfc-subcat-scroller__title { font-size: 16px; }
    .tfc-subcat-scroller__name{ word-wrap: break-word !important; }
    .tfc-scroller-btn-wrapper{ 
        justify-content: center;
        padding: 0px !important; 
    }
    .tfc-subcat-scroller__arrow{ 
        position: relative;
        transform: none; 
    }
    .tfc-subcat-scroller{ margin: 50px 0px; }
}

/* pharmacy-shop search */
.tfc-swrap{display:flex;align-items:center;gap:12px;justify-content:flex-end;}
.tfc-sbox{position:relative;}
.tfc-sinput{
    border:0 !important;
    background:#f3f3f3 !important;
    border-radius:10px !important;
    padding:5px 16px !important;
    outline:none !important;
}
.tfc-sbtn{
    width:38px;height:38px;
    max-height: 38px;
    min-height: 38px;
    max-width: 38px;
    min-width: 38px;
    border-radius:999px;
    border:0;
    background:#f3f3f3;
    cursor:pointer;
    display:flex;
    align-items:center;
    justify-content:center;
}
.tfc-dd{
    position:absolute;
    top:calc(100% + 8px);
    left:0;
    right:0;
    background:#fff;
    border:1px solid #eee;
    border-radius:14px;
    overflow:hidden;
    box-shadow:0 10px 30px rgba(0,0,0,.06);
    display:none;
    z-index:9999;
}
.tfc-dd a{
    display:flex;
    justify-content:space-between;
    gap:12px;
    padding:12px 14px;
    text-decoration:none;
    color:inherit;
    border-top:1px solid #f2f2f2;
}
.tfc-dd a:first-child{border-top:0}
.tfc-dd a:hover{background:#fafafa}
.tfc-dd small{opacity:.6}
@media (max-width: 600px) {
    .tfc-sbox, .tfc-sinput{ width:100%; }
    .tfc-shop-search-wrapper{ flex-wrap: wrap; gap: 10px !important; padding: 0px 10px; }
}

/* pharmacy-shop product and filters */
input[type="radio"] {accent-color: #275a94;}
input[type="range"] {accent-color: #275a94;}
.tfc-pagination{text-align:center;margin:20px;margin-left:20%;width:80%;}
.tfc-checkbox:checked {accent-color: #275a94;}
.tfc-price-slider{background: #275a94;}
.tfc-acc{display:flex;flex-direction:column;gap:6px; margin-top: 20px;}
.tfc-details{padding-top:10px;margin-top:10px}
.tfc-details:first-child{border-top:0;padding-top:0;margin-top:0}
.tfc-summary{list-style:none;display:flex;align-items:center;justify-content:space-between;cursor:pointer;padding:5px 0;font-weight:600;}
.tfc-summary::-webkit-details-marker{display:none}
.tfc-chevron{width:10px;height:10px;border-right:2px solid #111;border-bottom:2px solid #111;transform:rotate(45deg);transition:transform .15s ease}
.tfc-details[open] .tfc-chevron{transform:rotate(-135deg)}
.tfc-details[open] .tfc-panel { 
    display: flex;
    flex-direction: column;
 }
.tfc-offcanvas-panel .tfc-panel{display: flex; flex-direction: column; padding:4px 0 8px 0}
.tfc-price-row{justify-content:space-between}
.tfc-price-input{width:120px}
.tfc-apply{margin-top:12px;width:100%;padding:10px 12px;border-radius:10px;border:1px solid #275a94;color: #275a94;background:#fff;cursor:pointer}
.tfc-apply:hover{color: white; background-color: #275a94; border: 1px solid #275a94;}
.tfc-wrap{display: flex; flex-direction: row; width: 100%;}
.tfc-sidebar{width: 20%; padding: 20px 0px; padding-right: 20px;}
.tfc-selected-category{flex-shrink: 0;}
.tfc-selected-category a {text-decoration: none; display: inline-block; margin-right: 8px; margin-bottom: 4px; opacity: 0.75; transition: opacity 0.2s;}
.tfc-selected-category a:hover {opacity: 1;}
.tfc-selected-category a > span {display: flex; align-items: center; padding: 4px 10px; background-color: #f3f3f3; border: 1px solid #cbcbcb; border-radius: 4px; color: #333332; font-size: 0.875em; line-height: 1;}
.tfc-selected-category--remove {margin-left: 10px; color: #ddd; font-weight: bold; font-size: 1.2em; line-height: 0;}
.tfc-selected-category a:hover .tfc-selected-category--remove {color:#111;}
.tfc-selected-category-wrap {display: flex; overflow-x: auto; flex-wrap: nowrap;gap:4px;margin-bottom:10px;}
.tfc-selected-category-wrap::-webkit-scrollbar {height: 6px;}
.tfc-selected-category-wrap::-webkit-scrollbar-track {background: transparent;border-radius: 999px;}
.tfc-selected-category-wrap::-webkit-scrollbar-thumb {background: rgba(0,0,0,0.3);border-radius: 999px;transition: background 0.2s ease;}
.tfc-selected-category-wrap::-webkit-scrollbar-thumb:hover {background: rgba(0,0,0,0.5);}

.tfc-products {
    background-color: #F7F5F3;
    padding: 20px;
    width: 80%;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    align-items: stretch;
    align-content: start;
}
.tfc-products > * {
    min-width: 0;
}
.tfc-card {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    height: 100%;
    max-height: none !important;
    min-height: 0 !important;
}
.inner-tfc-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 100%;
    height: 100%;
}

.tfc-product-cat{margin: 0px !important;margin:10px 0 6px 0;font-size:16px;font-weight: 400 !important;}
.tfc-product-cat-title{margin: 0px !important;margin:10px 0 6px 0;font-size:16px;font-weight:400 !important;}
.tfc-btn-link{background-color: white; border: none; color: #275a94;}
.tfc-product-title { margin: 0px !important; margin: 10px 0 6px 0; display: -webkit-box;
    -webkit-box-orient: vertical; font-size: 16px; overflow: hidden; font-weight: bold;
}

/* tablets */
@media (max-width: 1024px) {
    .tfc-products{grid-template-columns: repeat(3, minmax(0, 1fr)) !important;}
}
/* mobile */
@media (max-width: 600px) {
    .tfc-wrap{flex-wrap: wrap;}
    .tfc-products{grid-template-columns: repeat(2, minmax(0, 1fr)) !important; width: 100%; padding: 20px 10px;}
    .tfc-product-image{ width: 100px !important; height: 100px !important; }
    .inner-tfc-card{ width: 100%; }
    .tfc-pagination{ margin: 20px 0px !important; width: 100%; }
    .tfcMobileHide{ display: none !important; }

    /* hide only the desktop sidebar */
    .tfc-sidebar--desktop{display:none !important;}
    /* show the drawer sidebar and its accordion */
    .tfc-offcanvas .tfc-sidebar{
        display:block !important;
        width: 100%;
    }
    .tfc-offcanvas .tfc-acc{display:flex !important;}
    .close-mobile-filer-bar{
        position: relative;
        font-size: 40px;
        margin: 15px;
        margin-left: 20%;
        color:#fff;
        z-index: 2;
    }
}
@keyframes tfcSpin { to { transform: rotate(360deg); } }
.tfc-btn-spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    margin-right: 8px;
    vertical-align: -2px;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: tfcSpin 0.7s linear infinite;
}
/* sr only */
.tfc-sr-only{
    position:absolute;
    width:1px;height:1px;
    padding:0;margin:-1px;
    overflow:hidden;clip:rect(0,0,0,0);
    white-space:nowrap;border:0;
}
/* Mobile sticky bar */
.tfc-mobilebar{display:none;}
@media (max-width: 600px){
    .tfc-mobilebar-spacer{
        display:none;
        height:0;
        width:100%;
    }
    .tfc-mobilebar{
        display:block;
        position:relative;
        width:100%;
        padding:10px;
        box-sizing:border-box;
        background:rgba(255,255,255,.22);
        backdrop-filter:blur(10px);
        -webkit-backdrop-filter:blur(10px);
        border-bottom:1px solid rgba(0,0,0,.08);
        z-index:99;
    }
    .tfc-mobilebar.is-sticky{
        position:fixed;
        left:0;
        right:0;
        top: 61px;
    }
    /* spacer on when sticky */
    .tfc-mobilebar-spacer.is-on{
        display:block;
    }
    .tfc-mobilebar-inner{
        display:flex;
        gap:10px;
        align-items:center;
        justify-content:space-between;
    }
    .tfc-sort-select{
        width:100%;
        min-width:160px;
        padding:10px 12px;
        border-radius:10px;
        border:1px solid #2b5993;
        color:#2b5993;
        background:#fff;
        font-weight:600;
    }
    .tfc-mobile-filters-btn{
        width:50%;
        padding:10px 12px;
        border-radius:10px;
        border:1px solid #2b5993;
        background:#2b5993;
        color:white;
        font-weight:600;
        cursor:pointer;
    }
}
/* Offcanvas */
.tfc-offcanvas{display:none;}
@media (max-width: 600px){
    .tfc-offcanvas{
        display:block;
        position:fixed;
        inset:0;
        z-index:10000; /* top layer, TODO :: can this be edited */
        pointer-events:none;
        opacity:0;
        transition:opacity .15s ease;
    }
    .tfc-offcanvas[aria-hidden="false"]{
        opacity:1;
        pointer-events:auto;
    }
    .tfc-offcanvas-backdrop{
        position: fixed;
        inset:0;
        background: rgba(52,53,55,.4);
        z-index: 1;
    }
    .tfc-offcanvas-panel{
        position:fixed;
        top:0;
        right:0;
        height:100%;
        width: 70%;
        background:#fff;
        transform:translate3d(100%,0,0);
        transition:transform .2s ease;
        display:flex;
        flex-direction:column;
        padding-top:env(safe-area-inset-top);
        box-sizing:border-box;
        will-change:transform;
        z-index: 2;
    }
    .tfc-offcanvas[aria-hidden="false"] .tfc-offcanvas-panel{
        transform:translate3d(0,0,0);
    }
    .tfc-sidebar--inside-offcanvas{
        overflow:auto;
        -webkit-overflow-scrolling:touch;
        padding:14px;
    }
    .tfc-offcanvas-foot{
        padding:14px;
        border-top:1px solid rgba(0,0,0,.08);
        background:#fff;
    }
    /* hide the in-panel apply so you only have footer apply */
    .tfc-offcanvas .tfc-acc .tfc-apply{
        display:none !important;
    }
    .tfc-mobile-sort{
        width: 50%;
        background-color: white;
    }
}
@media (max-width: 600px){
    html.tfc-filters-open header,
    html.tfc-filters-open .site-header,
    html.tfc-filters-open #masthead,
    html.tfc-filters-open .elementor-location-header{
        z-index:1 !important;
    }
}
/* Desktop only sort button (under sort radios) */
.tfc-apply-sort{display:block;margin-top:12px;}
@media (max-width: 600px){ .tfc-apply-sort{display:none;} }

/* Pharmacy-Shop - cub category search */
.tfc-swrap{display:flex;align-items:center;gap:12px;justify-content:flex-end;}
.tfc-sbox{position:relative;}
.tfc-sinput{
    border:0 !important;
    background:#f3f3f3 !important;
    border-radius:10px !important;
    padding:5px 16px !important;
    outline:none !important;
}
.tfc-sbtn{
    width:38px;height:38px;
    border-radius:999px;
    border:0;
    background:#f3f3f3;
    cursor:pointer;
    display:flex;
    align-items:center;
    justify-content:center;
}
.tfc-dd{
    position:absolute;
    top:calc(100% + 8px);
    left:0;
    right:0;
    background:#fff;
    border:1px solid #eee;
    border-radius:14px;
    overflow:hidden;
    box-shadow:0 10px 30px rgba(0,0,0,.06);
    display:none;
    z-index:9999;
}
.tfc-dd a{
    display:flex;
    justify-content:space-between;
    gap:12px;
    padding:12px 14px;
    text-decoration:none;
    color:inherit;
    border-top:1px solid #f2f2f2;
}
.tfc-dd a:first-child{border-top:0}
.tfc-dd a:hover{background:#fafafa}
.tfc-dd small{opacity:.6}
.tfc-result-stats{color: gray;font-size: 14px;}
/* tablets */
@media (max-width: 1024px) {
}
/* mobile */
@media (max-width: 600px) {
    .tfc-sbox, .tfc-sinput{ width:100%; }
    .tfc-swrap{ display: none; }
    .tfc-shop-search-wrapper{ flex-wrap: wrap; gap: 10px !important; padding: 0px 10px; }
    .tfc-result-stats{ text-align: center; float: right; display: contents; width: 45%; }
    .tfc-shopsub-search-wrapper{ justify-content: space-between !important; }
}

/* ══════════════════════════════════════════════════════════════════════════
   PRODUCT CARD — modern redesign
   ══════════════════════════════════════════════════════════════════════════ */

.productCard.infoCard {
    border-radius: 20px;
    box-shadow: 0 4px 24px -8px rgba(30,36,16,.10), 0 1px 0 rgba(30,36,16,.04);
    border: 1px solid rgba(228,234,208,.9);
    background: #fff;
    padding: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: box-shadow .22s ease, transform .22s ease;
    text-align: left;
    font-family: 'Work Sans', sans-serif;
}

.productCard.infoCard:hover {
    box-shadow: 0 12px 40px -12px rgba(30,36,16,.16), 0 1px 0 rgba(30,36,16,.04);
    transform: translateY(-3px);
}

/* ── Glass image area ─────────────────────────────────────────────────────── */

.productCard.infoCard .productImageWrap {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    /* background:
        radial-gradient(ellipse at 80% 10%, rgba(197,206,158,.45) 0%, transparent 55%),
        radial-gradient(ellipse at 10% 90%, rgba(82,112,48,.22) 0%, transparent 50%),
        linear-gradient(140deg, #edf4d8 0%, #f5f8ee 60%, #e8f0da 100%); */
    padding: 28px 24px 22px;
    overflow: hidden;
    min-height: 175px;
}

/* Frosted blobs */
.productCard.infoCard .productImageWrap::before,
.productCard.infoCard .productImageWrap::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}

.productCard.infoCard .productImageWrap::before {
    width: 90px; height: 90px;
    top: -28px; right: -18px;
    background: rgba(65,70,29,.14);
    filter: blur(28px);
}

.productCard.infoCard .productImageWrap::after {
    width: 70px; height: 70px;
    bottom: -20px; left: -14px;
    background: rgba(82,112,48,.18);
    filter: blur(22px);
}

.productCard.infoCard .imageWrap {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 150px;
    padding-bottom: 40%;
}

.productCard.infoCard .imageWrap img {
    filter: drop-shadow(0 8px 18px rgba(30,36,16,.18));
    transition: transform .3s cubic-bezier(.34,1.3,.64,1);
}

.productCard.infoCard:hover .imageWrap img {
    transform: translate(-50%,-54%) scale(1.05);
}

/* ── Product name & "From" price ──────────────────────────────────────────── */

.productCard.infoCard .cardTitle {
  font-size: 18px !important;
  font-weight: 500 !important;
  color: #1e2410 !important;
  margin: 0 0 5px !important;
  letter-spacing: -.02em;
  line-height: 1.3;
}

.productCard.infoCard .cardContent.wysiwyg,
.productCard.infoCard .tfc-prod-card-price {
    font-size: 12.5px;
    color: #65704a;
    font-weight: 500;
    margin: 0;
}

/* ── More info link ───────────────────────────────────────────────────────── */

.productCard.infoCard .moreInfoLink {
    padding: 3px 18px 10px;
}

.productCard.infoCard .moreInfoLink a {
    font-size: 12.5px;
    font-weight: 600;
    color: #527030;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.productCard.infoCard .moreInfoLink a:hover {
    color: #41461d;
    text-decoration: none;
}

/* ── Add-to-basket section ────────────────────────────────────────────────── */

.productCard.infoCard .productAddToCart {
    margin-top: auto;
    padding: 14px 16px 16px;
    border-top: 1px solid #e4ead0;
    background: #fafaf6;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Price inside the ATC section */
.productCard.infoCard .tfc-product-price {
    font-size: 22px;
    font-weight: 800;
    color: #1e2410;
    letter-spacing: -.03em;
    line-height: 1;
    margin-bottom: 0;
}

/* Attribute select wrappers */
.productCard.infoCard .tfc-attr-selects {
    gap: 8px !important;
    margin-bottom: 0 !important;
}

.productCard.infoCard .tfc-attr-selects .qty-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: #65704a;
    margin-bottom: 3px !important;
}

.productCard.infoCard .tfc-attr-select {
    border: 1.5px solid #d8e0be !important;
    border-radius: 10px !important;
    padding: 7px 10px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    font-family: 'Manrope', system-ui, sans-serif !important;
    background: #fff !important;
    color: #1e2410 !important;
    outline: none !important;
    transition: border-color .15s;
    cursor: pointer;
}

.productCard.infoCard .tfc-attr-select:focus {
    border-color: #527030 !important;
    box-shadow: 0 0 0 3px rgba(82,112,48,.12) !important;
}

/* Qty + button row */
.productCard.infoCard .tfc-product-basket-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: nowrap !important;
}

.productCard.infoCard .tfc-qty {
    flex-shrink: 0;
    width: auto !important;
}

.productCard.infoCard .tfc-qty-wrapper {
    display: inline-flex;
    align-items: center;
    background: #fff;
    border: 1.5px solid #d8e0be;
    border-radius: 999px;
    overflow: hidden;
    height: 38px;
    gap: 0;
}

.productCard.infoCard .tfc-qty-action-prev,
.productCard.infoCard .tfc-qty-action-next {
    width: 32px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #65704a;
    font-size: 12px;
    transition: background .12s, color .12s;
    flex-shrink: 0;
    user-select: none;
}

.productCard.infoCard .tfc-qty-action-prev:hover,
.productCard.infoCard .tfc-qty-action-next:hover {
    background: #e4ead0;
    color: #1e2410;
}

.productCard.infoCard .tfc-qty-val {
    min-width: 26px;
    text-align: center;
    font-size: 14px;
    font-weight: 700;
    color: #1e2410;
    font-family: 'Manrope', system-ui, sans-serif;
}

/* Add to basket button */
.productCard.infoCard .tfc-add-to-basket {
    flex: 1;
    background: #41461d;
    color: #fff !important;
    border: none !important;
    border-radius: 10px !important;
    padding: 10px 14px !important;
    font-size: 13.5px !important;
    font-weight: 700 !important;
    font-family: 'Manrope', system-ui, sans-serif !important;
    line-height: 1 !important;
    cursor: pointer;
    transition: background .15s, transform .12s;
    white-space: nowrap;
}

.productCard.infoCard .tfc-add-to-basket:hover {
    background: #3a4728 !important;
}

.productCard.infoCard .tfc-add-to-basket:active {
    transform: scale(.98);
}

/* Stock / max qty note */
.productCard.infoCard .tfc-variation-stock-note {
    font-size: 11.5px !important;
    color: #527030 !important;
    font-weight: 600;
    margin: 0 !important;
    background: rgba(82,112,48,.08);
    border-radius: 6px;
    padding: 4px 8px;
    display: inline-block;
}

/* Error message */
.productCard.infoCard .tfc-add-to-basket-err {
    font-size: 12px;
    color: #dc2626;
    font-weight: 600;
    margin: 0 !important;
}

/* ── brands load more */

/* brands load more */
.tfc-brand-hidden {
    display: none;
}
.tfc-load-more-brands {
    margin-top: 10px;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    text-decoration: underline;
    font: inherit;
}