/*
Theme Name:   Bootscore Child
Theme URI:    https://example.com/
Description:  Child theme of Bootscore (https://bootscore.me) for custom layouts and templates. Edit this description with your own project details.
Author:       Your Name
Author URI:   https://example.com/
Template:     bootscore
Version:      1.0.0
Text Domain:  bootscore-child
*/

/*
 * Brand color variables, used by the mega-menu / promo-banner /
 * subfilter styles below. Mapped to the existing green brand palette
 * used elsewhere in this theme (#254334 / #97bda6). Adjust freely.
 */
:root {
    --primary: #254334;
    --secondary: #1b3327;
    --accent: #97bda6;
    --danger: #dc2626;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
    letter-spacing: -0.01em;
}

/*
 * Top-level navbar links.
 * A touch smaller and tighter than Bootstrap's default nav-link size,
 * to match the finer type scale used in the mega-menu below.
 */
.navbar .nav-link {
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.01em;
}

/*
 * Mega-menu support for the custom navbar in header.php.
 * Bootstrap has no built-in "mega menu" — these rules turn a normal
 * .dropdown-menu into a full-width multi-column panel.
 */
.mega-menu {
    position: absolute;
    left: 0;
    width: 100vw;
    max-width: 1400px;
    margin: 0 auto;
    right: 0;
    background: #fff;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    border-radius: 0 0 12px 12px;
    padding: 30px 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

.mega-column {
    min-height: 300px;
}

.mega-title {
    color: var(--secondary);
    font-weight: 500;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    margin-bottom: 18px;
    border-bottom: 2px solid var(--accent);
    padding-bottom: 8px;
}

.mega-link {
    display: flex;
    align-items: center;
    padding: 7px 0;
    color: #475569;
    text-decoration: none;
    font-size: 0.8925rem;
    font-weight: 400;
    line-height: 1.5;
    letter-spacing: 0.005em;
    transition: color 0.15s ease, padding-left 0.15s ease;
}

.mega-link:hover {
    color: var(--primary);
    font-weight: 500;
    background: rgba(30, 58, 138, 0.05);
    padding-left: 10px;
}

.mega-link i {
    width: 20px;
    margin-right: 12px;
    color: var(--accent);
    font-size: 0.8rem;
}

.promo-banner {
    height: 100%;
    background: linear-gradient(135deg, var(--primary), #3b82f6);
    border-radius: 12px;
    color: white;
    padding: 25px;
    position: relative;
    overflow: hidden;
}

.promo-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--danger);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

/* SUBFILTER STYLES */
.subfilter-section {
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
    border-bottom: 1px solid #e2e8f0;
    padding: 25px 0;
    margin: 0;
}

.filter-label {
    font-weight: 600;
    color: var(--secondary);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-bottom: 8px;
}

.filter-select {
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 0.95rem;
    transition: all 0.2s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.filter-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 0.2rem rgba(30, 58, 138, 0.15);
    outline: none;
}

.filter-group {
    position: relative;
}

.filter-icon {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--accent);
    font-size: 1rem;
    z-index: 0;
    pointer-events: none;
}

.filter-clear {
    position: absolute;
    right: 45px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--danger);
    color: white;
    border: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    font-size: 0.75rem;
    cursor: pointer;
    display: none;
    z-index: 1;
}

.filter-clear:hover {
    background: #b91c1c;
}

.filter-selected {
    border-color: var(--primary) !important;
}

.btn-apply-filters {
    background: var(--primary);
    border: none;
    padding: 12px 30px;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.2s;
}

.btn-apply-filters:hover {
    background: #1e40af;
    transform: translateY(-1px);
}

@media (max-width: 992px) {
    .mega-menu {
        width: 100% !important;
        border-radius: 0;
    }

    .subfilter-section {
        padding: 5px 0;
    }
}

/*
 * Announcement bar (#woodstore-section-announcement), shown above the header.
 */
#woodstore-section-announcement {
    background: #97bda6;
    color: #254334;
    font-size: 0.85rem;
    font-weight: 500;
    text-align: center;
    padding: 0.5rem 1rem;
}

#woodstore-section-announcement .ann-inner {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 0.6rem;
    max-width: 1200px;
    margin: 0 auto;
}

#woodstore-section-announcement .ann-item {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    color: inherit;
    text-decoration: none;
    white-space: nowrap;
}

#woodstore-section-announcement .ann-item:hover {
    text-decoration: underline;
}

#woodstore-section-announcement .ann-icon {
    width: 14px;
    height: 14px;
    fill: none;
    stroke: currentColor;
    flex-shrink: 0;
}

#woodstore-section-announcement .ann-dot {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: currentColor;
    opacity: 0.6;
    flex-shrink: 0;
}

/*
 * 3-column header block: logo | search | account & cart.
 * Sits between the announcement bar and the navbar.
 */
.header-block-brand img {
    max-height: 48px;
    width: auto;
}

/* the_custom_logo() output (Site Identity / Site Logo block) */
.custom-logo-link img {
    max-height: 48px;
    width: auto;
}

.header-block-search {
    max-width: 100%;
    width: 100%;
    margin: 0 auto;
}

.header-block-search input[type="search"] {
    flex: 1 1 auto;
}

/* FiboSearch widget: fill the wider column */
.header-block-search-col .dgwt-wcas-search-wrapp {
    max-width: 100%;
    width: 100%;
    margin: 0 auto;
}

.header-action-link {
    color: #254334;
    display: inline-flex;
    align-items: center;
}

.header-action-link:hover {
    color: #97bda6;
}

.cart-count-badge {
    position: absolute;
    top: -6px;
    right: -8px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 999px;
    background: #254334;
    color: #fff;
    font-size: 0.65rem;
    line-height: 16px;
    text-align: center;
}

/*
 * Offcanvas cart (Bootscore's native #offcanvas-cart, rendered via
 * template-parts/header/offcanvas-woocommerce.php + woocommerce_mini_cart()).
 * Only "View cart" remains since the checkout button was unhooked
 * in functions.php.
 */
#offcanvas-cart .woocommerce-mini-cart {
    list-style: none;
    margin: 0 0 1rem;
    padding: 0;
}

#offcanvas-cart .woocommerce-mini-cart-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid #e2e8f0;
    position: relative;
}

#offcanvas-cart .woocommerce-mini-cart-item img {
    width: 56px;
    height: 56px;
    object-fit: cover;
    border-radius: 6px;
}

#offcanvas-cart .woocommerce-mini-cart-item a.remove {
    color: #dc2626 !important;
    text-decoration: none;
}

#offcanvas-cart .woocommerce-mini-cart__empty-message {
    margin: 0;
    color: #64748b;
    text-align: center;
}

#offcanvas-cart .woocommerce-mini-cart__total {
    display: flex;
    justify-content: space-between;
    font-weight: 600;
    border-top: 1px solid #e2e8f0;
    padding-top: 0.75rem;
    margin-bottom: 0.75rem;
}

#offcanvas-cart .woocommerce-mini-cart__buttons a.wc-forward {
    display: block;
    text-align: center;
    padding: 0.6rem 0.75rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    border: 1px solid #254334;
    color: #254334;
}

/*
 * Modern breadcrumb, matching the navbar's green.
 * Targets Bootscore's default breadcrumb markup directly
 * (nav[aria-label="breadcrumb"] > ol.breadcrumb > li.breadcrumb-item),
 * so no functions.php filter/class change is required. Applies to
 * both the regular and WooCommerce breadcrumbs, since they share
 * this same structure.
 */
nav[aria-label="breadcrumb"] {
    background: #eef3f0 !important;
    border-radius: 50rem;
    box-shadow: none;
}

nav[aria-label="breadcrumb"] .breadcrumb-item {
    --bs-breadcrumb-divider: '›';
    font-size: 0.85rem;
    color: #5b7568 !important;
}

nav[aria-label="breadcrumb"] .breadcrumb-item::before {
    color: #97bda6;
    font-weight: 600;
    padding-right: 0.6rem;
}

nav[aria-label="breadcrumb"] .breadcrumb-item a {
    color: #5b7568 !important;
    text-decoration: none;
    transition: color 0.15s ease;
}

nav[aria-label="breadcrumb"] .breadcrumb-item a:hover {
    color: #254334 !important;
}

nav[aria-label="breadcrumb"] .breadcrumb-item.active {
    color: #254334 !important;
    font-weight: 600;
}

/*
 * "Login to see prices" box, shown to guests in place of the price
 * (shop/category/single product pages and cart line items).
 * Rendered by RWP_Guest_Filter::maybe_hide() in
 * inc/class-rwp-guest-filter.php.
 */
.guest-price-box {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 0.85rem 1rem;
    background: #eef3f0;
    border-radius: 10px;
    max-width: 260px;
}

.guest-price-box__text {
    margin: 0;
    font-size: 0.85rem;
    color: #5b7568;
    line-height: 1.4;
}

.guest-price-box__btn {
    display: inline-block;
    padding: 0.45rem 1.1rem;
    background: #254334;
    color: #fff !important;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 999px;
    transition: background 0.15s ease;
}

.guest-price-box__btn:hover {
    background: #1b3327;
}
