/*
 Theme Name:   Bricks Child Theme
 Theme URI:    https://bricksbuilder.io/
 Description:  Use this child theme to extend Bricks.
 Author:       Bricks
 Author URI:   https://bricksbuilder.io/
 Template:     bricks
 Version:      1.1
 Text Domain:  bricks
*/

/* ==========================================================================
   Shop/Category Page - 4 Column Product Grid (product cards only)
   ========================================================================== */

/* Target only grids containing product-card items */
.brx-grid:has(.product-card),
.brx-grid:has(.featured-product) {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 20px !important;
}

/* Standard WooCommerce fallback */
.woocommerce ul.products {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 20px !important;
}

.woocommerce ul.products li.product {
    width: 100% !important;
    margin: 0 !important;
}

/* Responsive - 3 columns on tablet */
@media (max-width: 991px) {
    .brx-grid:has(.product-card),
    .brx-grid:has(.featured-product),
    .woocommerce ul.products {
        grid-template-columns: repeat(3, 1fr) !important;
    }
}

/* Responsive - 2 columns on mobile */
@media (max-width: 767px) {
    .brx-grid:has(.product-card),
    .brx-grid:has(.featured-product),
    .woocommerce ul.products {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

/* ==========================================================================
   Responsive Logo
   ========================================================================== */

.bricks-site-logo {
    max-width: 100%;
    height: auto !important;
    width: clamp(160px, 15vw, 200px);
    object-fit: contain;
}

/* ==========================================================================
   Checkout — Select2 dropdowns styled to match text input fields
   ========================================================================== */

/* Hide country field — shop delivers to Bulgaria only; value defaults to BG via PHP.
   Uses visibility+position instead of display:none so Select2 and Econt JS still initialise. */
.woocommerce-checkout p.billing_country_field,
.woocommerce-checkout p.shipping_country_field {
    position: absolute !important;
    visibility: hidden !important;
    height: 0 !important;
    overflow: hidden !important;
    margin: 0 !important;
    padding: 0 !important;
    pointer-events: none !important;
}

/* The visible selection box */
.woocommerce-checkout .select2-container--default .select2-selection--single {
    background-color: rgb(242, 242, 242);
    border: 1.82px solid rgb(221, 222, 223);
    border-radius: 33.75px;
    height: 36.5px;
    padding: 4px 11px;
    display: flex;
    align-items: center;
}

/* The rendered text value */
.woocommerce-checkout .select2-container--default .select2-selection--single .select2-selection__rendered {
    padding: 0;
    line-height: normal;
    font-family: Nunito, sans-serif;
    font-size: 17.64px;
    color: rgb(0, 0, 0);
}

/* Placeholder text (unselected state) */
.woocommerce-checkout .select2-container--default .select2-selection--single .select2-selection__placeholder {
    color: rgb(153, 153, 153);
}

/* Dropdown arrow */
.woocommerce-checkout .select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 36.5px;
    top: 0;
    right: 11px;
}

/* Dropdown panel */
.woocommerce-checkout .select2-dropdown {
    background-color: rgb(242, 242, 242);
    border: 1.82px solid rgb(221, 222, 223);
    border-radius: 12px;
    overflow: hidden;
    font-family: Nunito, sans-serif;
    font-size: 17.64px;
}

/* Search box inside dropdown */
.woocommerce-checkout .select2-search--dropdown .select2-search__field {
    background-color: rgb(255, 255, 255);
    border: 1.82px solid rgb(221, 222, 223);
    border-radius: 33.75px;
    padding: 4px 11px;
    font-family: Nunito, sans-serif;
    font-size: 17.64px;
}

/* Dropdown options */
.woocommerce-checkout .select2-results__option {
    padding: 6px 11px;
    font-family: Nunito, sans-serif;
    font-size: 17.64px;
}

/* Highlighted option */
.woocommerce-checkout .select2-container--default .select2-results__option--highlighted[aria-selected] {
    background-color: rgb(148, 54, 52);
    color: #fff;
}

/* ==========================================================================
   Checkout — Remove "(по избор)" from Country and State field labels
   WooCommerce auto-appends .optional to non-required fields; hide it for
   these two fields since the optional state is intentional and implicit.
   ========================================================================== */
#billing_country_field label .optional,
#billing_state_field label .optional {
    display: none;
}
