/* ==========================================
   BLENTREE SHOP  (Prefix: bln-shop-)
   ========================================== */
.elementor-widget-blentree-shop,
.elementor-widget-blentree-shop > .elementor-widget-container {
    width: 100% !important;
    max-width: 100% !important;
    align-self: stretch !important;
    flex: 1 1 100% !important;
}

.bln-shop {
    position: relative;
    width: 100%;
    box-sizing: border-box;
    background-color: transparent;
}
.bln-shop * { box-sizing: border-box; }

.bln-shop.bln-shop-fullwidth {
    width: 100vw;
    max-width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
}

.bln-shop-inner {
    width: 100%;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding: 50px 24px;
}

/* ===== Toolbar ===== */
.bln-shop-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 28px;
}
.bln-shop-heading {
    font-family: 'Poppins', sans-serif;
    font-size: clamp(20px, 2vw, 28px);
    font-weight: 800;
    color: #1A1A1A;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.bln-shop-tools {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1 1 360px;
    justify-content: flex-end;
}

/* Search — light box, teal magnifier (left), blue list icon (right) */
.bln-shop-search {
    position: relative;
    flex: 1 1 auto;
    max-width: 600px;
    display: flex;
    align-items: center;
}
.bln-shop-search-ic {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    color: #15B8CC;            /* teal magnifier */
    display: inline-flex;
    pointer-events: none;
}
.bln-shop-search-ic svg { width: 20px; height: 20px; }
.bln-shop-search-input {
    width: 100%;
    padding: 14px 50px 14px 46px;
    border: 1px solid #E8EDF3;
    border-radius: 10px;
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    color: #333;
    outline: none;
    background: #F4F7FB;        /* light box */
    transition: border-color 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}
.bln-shop-search-input::placeholder { color: #9AA5B1; }
.bln-shop-search-input:focus {
    border-color: #C9D6E5;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(21,184,204,0.10);
}
/* Override theme/WooCommerce input padding (higher specificity + !important)
   so the teal magnifier (left) and list icon (right) never overlap the text */
.bln-shop-search input.bln-shop-search-input {
    padding: 14px 50px 14px 46px !important;
}
.bln-shop-search-filter {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: #3B6FE6;            /* blue list icon */
    cursor: pointer;
    padding: 0;
}
.bln-shop-search-filter svg { width: 20px; height: 20px; }
.bln-shop-search-filter:hover { color: #2554c4; }

/* List icon collapses the category + price filter row */
.bln-shop.bln-shop-filters-collapsed .bln-shop-cats,
.bln-shop.bln-shop-filters-collapsed .bln-shop-pricefilter { display: none; }

/* Sort */
.bln-shop-sort {
    flex: 0 0 auto;
    width: 180px;
    max-width: 180px;
    padding: 13px 14px;
    border: 1px solid #E8EDF3;
    border-radius: 10px;
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    color: #333;
    background: #F4F7FB;
    cursor: pointer;
    outline: none;
}
.bln-shop-sort:focus { border-color: #C9D6E5; }

/* Wishlist toggle */
.bln-shop-wishtoggle {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: 1px solid #E5E5E5;
    border-radius: 50%;
    background: #fff;
    color: #E63946;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.25s ease, color 0.25s ease;
}
.bln-shop-wishtoggle svg { width: 20px; height: 20px; }
.bln-shop-wishtoggle.active { background: #E63946; color: #fff; }
.bln-shop-wishtoggle.active svg { fill: #fff; }
.bln-shop-wishcount {
    position: absolute;
    top: -4px; right: -4px;
    min-width: 18px; height: 18px;
    padding: 0 4px;
    background: #E63946;
    color: #fff;
    border-radius: 9px;
    font-size: 11px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

/* ===== Category chips ===== */
.bln-shop-cats {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 22px;
}
.bln-shop-cat {
    padding: 8px 20px;
    border: 1px solid #E5E5E5;
    border-radius: 30px;
    background: #fff;
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: #555;
    cursor: pointer;
    transition: all 0.25s ease;
}
.bln-shop-cat:hover { border-color: #E63946; color: #E63946; }
.bln-shop-cat.active { background: #E63946; border-color: #E63946; color: #fff; }

/* ===== Price filter ===== */
.bln-shop-pricefilter {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 26px;
    flex-wrap: wrap;
}
.bln-shop-price-label { font-family:'Poppins',sans-serif; font-weight:600; font-size:14px; color:#1A1A1A; }
.bln-shop-price-val {
    font-family:'Poppins',sans-serif; font-size:13px; font-weight:600;
    color:#E63946; min-width:42px; text-align:center;
}
.bln-shop-range { accent-color: #E63946; cursor: pointer; flex: 1 1 120px; max-width: 200px; }

/* ===== Grid ===== */
.bln-shop-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

/* ===== Card ===== */
.bln-shop-card {
    background: #fff;
    border-radius: 10px;
    padding: 14px;
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}
.bln-shop-card:hover {
    box-shadow: 0 12px 34px rgba(0,0,0,0.08);
    transform: translateY(-4px);
}
.bln-shop-card.is-hidden { display: none; }

.bln-shop-card-media {
    position: relative;
    width: 100%;
    height: 210px;
    margin-bottom: 14px;
}
.bln-shop-card-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}
.bln-shop-card-link img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
}

/* Card action icons (wishlist + quick view) */
.bln-shop-card-actions {
    position: absolute;
    top: 6px; right: 6px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.bln-shop-card-icon {
    width: 34px; height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    color: #1A1A1A;
    cursor: pointer;
    transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}
.bln-shop-card-icon svg { width: 17px; height: 17px; flex: 0 0 auto; min-width: 17px; }
.bln-shop-card-icon:hover { color: #E63946; transform: scale(1.08); }
/* active wishlist heart filled */
.bln-shop-wish.active { color: #E63946; }
.bln-shop-wish.active svg { fill: #E63946; }

/* Icon buttons — clearly visible on white product images, strong hover/active.
   High specificity + !important to beat theme button/link overrides. */
.bln-shop .bln-shop-card-icon {
    background: #fff !important;
    border: 1px solid #e6e6e6 !important;
    color: #444 !important;
    box-shadow: 0 3px 10px rgba(0,0,0,0.15) !important;
}
.bln-shop .bln-shop-card-icon:hover {
    background: #E63946 !important;
    color: #fff !important;
    border-color: #E63946 !important;
}
/* Liked: red circle + white filled heart */
.bln-shop .bln-shop-wish.active {
    background: #E63946 !important;
    color: #fff !important;
    border-color: #E63946 !important;
}
.bln-shop .bln-shop-wish.active svg { fill: #fff !important; stroke: #fff !important; }

/* Name */
.bln-shop-card-name {
    font-family: 'Poppins', sans-serif;
    font-size: clamp(15px, 1.2vw, 18px);
    font-weight: 700;
    color: #1A1A1A;
    text-decoration: none;
    line-height: 1.3;
    margin: 0 0 8px;
    display: block;
    transition: color 0.2s ease;
}
.bln-shop-card-name:hover { color: #E63946; }
/* Force name color over theme link-color override (visible dark, red on hover) */
.bln-shop .bln-shop-card-name { color: #1A1A1A !important; }
.bln-shop .bln-shop-card-name:hover { color: #E63946 !important; }

/* Price (WooCommerce price html) */
.bln-shop-card-price {
    font-family: 'Poppins', sans-serif;
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 8px;
    line-height: 1.2;
}
.bln-shop-card-price .amount,
.bln-shop-card-price ins,
.bln-shop-card-price ins .amount { color: #E63946; text-decoration: none; }
.bln-shop-card-price del,
.bln-shop-card-price del .amount {
    color: #9A9A9A;
    font-weight: 500;
    font-size: 14px;
    margin-left: 6px;
    text-decoration: line-through;
}

/* Rating */
.bln-shop-card-rating {
    display: flex;
    align-items: center;
    gap: 6px;
}
.bln-shop-stars { display: inline-flex; }
.bln-shop-star { color: #D9D9D9; font-size: 16px; line-height: 1; }
.bln-shop-star.on { color: #F5A623; }
.bln-shop-reviews { font-size: 13px; color: #888; font-family: 'Poppins', sans-serif; }

/* Empty + load more */
.bln-shop-empty {
    text-align: center;
    padding: 50px 20px;
    font-family: 'Poppins', sans-serif;
    font-size: 16px;
    color: #888;
}
.bln-shop-more-wrap { text-align: center; margin-top: 36px; }
.bln-shop-loadmore {
    padding: 13px 40px;
    background: #E63946;
    color: #fff;
    border: none;
    border-radius: 30px;
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.25s ease;
}
.bln-shop-loadmore:hover { background: #C42E3A; }
.bln-shop-loadmore[hidden] { display: none; }

/* ===== Quick View Modal ===== */
.bln-shop-modal[hidden] { display: none; }
.bln-shop-modal {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.bln-shop-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.55);
}
.bln-shop-modal-box {
    position: relative;
    z-index: 2;
    background: #fff;
    border-radius: 14px;
    width: 100%;
    max-width: 760px;
    max-height: 90vh;
    overflow: auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
}
.bln-shop-modal-close {
    position: absolute;
    top: 10px; right: 14px;
    background: none;
    border: none;
    font-size: 30px;
    line-height: 1;
    color: #888;
    cursor: pointer;
    z-index: 3;
}
.bln-shop-modal-close:hover { color: #E63946; }
.bln-shop-modal-media {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #faf7f2;
    padding: 30px;
    border-radius: 14px 0 0 14px;
}
.bln-shop-modal-media img { max-width: 100%; max-height: 320px; object-fit: contain; }
.bln-shop-modal-body { padding: 36px 32px; }
.bln-shop-modal-name {
    font-family: 'Poppins', sans-serif;
    font-size: 24px;
    font-weight: 800;
    color: #1A1A1A;
    margin: 0 0 12px;
}
.bln-shop-modal-rating { margin-bottom: 12px; }
.bln-shop-modal-price {
    font-family: 'Poppins', sans-serif;
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 16px;
}
.bln-shop-modal-price .amount, .bln-shop-modal-price ins, .bln-shop-modal-price ins .amount { color: #E63946; text-decoration: none; }
.bln-shop-modal-price del, .bln-shop-modal-price del .amount { color: #9A9A9A; font-weight: 500; font-size: 16px; margin-left: 6px; }
.bln-shop-modal-excerpt {
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    line-height: 1.7;
    color: #666;
    margin: 0 0 24px;
}
.bln-shop-modal-link {
    display: inline-flex;
    align-items: center;
    padding: 13px 32px;
    background: #E63946;
    color: #fff;
    border-radius: 30px;
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.25s ease;
}
.bln-shop-modal-link:hover { background: #C42E3A; color:#fff; }
/* Force white button text over theme link-color override (was red on red) */
.bln-shop-modal .bln-shop-modal-link,
.bln-shop-modal .bln-shop-modal-link:hover,
.bln-shop-modal .bln-shop-modal-link:focus { color: #FFFFFF !important; }

/* ===========================================
   RESPONSIVE
   =========================================== */
@media (max-width: 1024px) {
    .bln-shop-grid { grid-template-columns: repeat(2, 1fr); } /* fallback; column control governs */
    .bln-shop-modal-box { grid-template-columns: 1fr; }
    .bln-shop-modal-media { border-radius: 14px 14px 0 0; }
}
/* Mobile: stack toolbar. Reset tools flex-basis so it doesn't force a tall
   360px height (which left a big gap between search and sort). */
@media (max-width: 767px) {
    .bln-shop-toolbar { flex-direction: column; align-items: stretch; gap: 14px; }
    .bln-shop-tools { flex: 0 0 auto; justify-content: flex-start; flex-wrap: wrap; gap: 12px; }
    .bln-shop-search { max-width: none; flex: 1 1 100%; }
    .bln-shop-sort { flex: 1 1 auto; width: auto; max-width: none; }
    .bln-shop-card-media { height: 150px; }
}
@media (max-width: 600px) {
    .bln-shop-grid { gap: 16px; }
    .bln-shop-card { padding: 10px; }
    .bln-shop-card-name { font-size: 14px; }
    .bln-shop-card-price { font-size: 14px; }
}
