/*
 Theme Name:    Electro Child
 Theme URI:     https://themeforest.net/item/electro-electronics-store-woocommerce-theme/15720624
 Description:   This is the child theme of Electro
 Author:        MadrasThemes
 Author URI:    https://madrasthemes.com/
 Template:      electro
 Version:       3.6.4
 License:       GNU General Public License v2 or later
 License URI:   http://www.gnu.org/licenses/gpl-2.0.html
 Tags:          light, dark, two-columns, right-sidebar, responsive-layout
 Text Domain:   electro-child
*/

/* WooCommerce product thumbnails with fixed height */
.woocommerce ul.products li.product a img, .woocommerce ul.product-loop-categories li.product-category a img, .products-carousel-tabs   a img {
  height: 200px !important;        /* set your preferred thumbnail height */
  width: auto;          /* keep original proportions */
  object-fit: contain;  /* scale the image inside the box without cropping */
  display: block;
  margin: 0 auto;
}

.gutena-forms-field.text-field, .gutena-forms-field.textarea-field, .gutena-forms-field.email-field {
	padding-left: 10px !important;
	border: 1px solid silver !important;
}
.section-product-categories {
  display: none !important;
}

.woocommerce .netto-price {
	font-size: 50%;
}

.woocommerce .netto-price::after {
	content: ":";
}

.product_meta {
   display:none;
}

/* Limit main product image gallery height */
.woocommerce-product-gallery__wrapper,
.woocommerce-product-gallery__image img {
    max-height: 500px; /* change this value as needed */
    width: auto;
    object-fit: contain; /* keeps aspect ratio */
}


.woocommerce .star-rating,
.woocommerce-page .star-rating, .woocommerce .product-rating {
    display: none !important;
}

/* Make wrapper relative to position badges */
.woocommerce-loop-product__link {
    position: relative; /* ensures absolute badges are positioned relative to product image */
}

/* Badge container */
.custom-badge-wrapper {
    position: absolute;
    top: 10px;
    left: 10px;
    display: flex;
    flex-direction: column; /* stack vertically */
    gap: 5px; /* space between badges */
    z-index: 10;
}

/* Individual badges */
.custom-badge {
    background: #ff4c3b;
    color: #fff;
    font-size: 12px;
    font-weight: bold;
    padding: 3px 8px;
    border-radius: 3px;
    text-transform: uppercase;
    white-space: nowrap;
}

/* Optional colors for specific badges */
.polecamy-badge { background: #28a745; }

.single-product-wrapper .custom-badge  {
    margin: 10px 10px 0 10px; /* spacing around the wrapper */
}

/* Shift RevSlider grid 150px right so content is centered in the visible
   area (viewport minus the 300px departments dropdown on the left).
   RevSlider fullwidth layout ignores parent CSS width — it calculates
   rs-module-wrap dimensions via JS — so we use transform instead. */
   @media (min-width: 1200px) {
    .page-template-template-homepage-v2 .home-v2-slider rs-fullwidth-wrap {
        overflow: hidden;
    }

    .page-template-template-homepage-v2 .home-v2-slider rs-module-wrap,
    .page-template-template-homepage-v2 .home-v2-slider .rev_slider_wrapper,
    .page-template-template-homepage-v2 .home-v2-slider .rev_slider_wrapper,
    .page-template-template-homepage-v2 .home-v2-slider .fullwidthbanner-container {
        transform: translateX(220px) !important;
    }
}


@media (max-width: 1200px) {
    .page-template-template-homepage-v2 .home-v2-slider rs-fullwidth-wrap {
        overflow: hidden;
    }

    .page-template-template-homepage-v2 .home-v2-slider rs-module-wrap,
    .page-template-template-homepage-v2 .home-v2-slider .rev_slider_wrapper,
    .page-template-template-homepage-v2 .home-v2-slider .fullwidthbanner-container {
        transform: translateX(90px) !important;
    }
}


.page-template-template-homepage-v2 #sidebar {
	margin-top: 420px !important;
}

div.summary.entry-summary div.brand {
    display: none !important;
}

/* Make cart submit button look like checkout place order button */
.wc-block-cart__submit-button {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    min-height: 48px !important;
    padding: 12px 24px !important;
    font-size: 1rem !important;
    font-weight: 600 !important;
    text-align: center !important;
    text-decoration: none !important;
    border-radius: 4px !important;
    cursor: pointer !important;
    box-sizing: border-box !important;
    background-color: #efecec;
    border-color: #efecec;
    color: #333e48;
}

.wc-block-cart__submit-button .wc-block-components-button__text {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

/* ===================================================
   Products Grid Tabs - 3-row grid instead of carousel
   =================================================== */

/* The grid wrapper replaces the carousel */
.products-grid-tabs .products-grid-wrapper {
    padding: 10px 0;
}

.products-grid-tabs .products-grid-wrapper .woocommerce {
    width: 100%;
}

/* Make products display as a grid (override any carousel/owl styles) */
.products-grid-tabs .products-grid-wrapper ul.products {
    display: grid !important;
    list-style: none;
    padding: 0;
    margin: 0;
    gap: 0;
    /* Default: 2 columns for mobile */
    grid-template-columns: repeat(2, 1fr);
}

/* Responsive grid columns matching original carousel breakpoints */
@media (min-width: 480px) {
    .products-grid-tabs .products-grid-wrapper ul.products {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 768px) {
    .products-grid-tabs .products-grid-wrapper ul.products {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (min-width: 992px) {
    .products-grid-tabs .products-grid-wrapper ul.products {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (min-width: 1200px) {
    .products-grid-tabs .products-grid-wrapper ul.products {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 1480px) {
    .products-grid-tabs .products-grid-wrapper ul.products {
        grid-template-columns: repeat(5, 1fr);
    }
}

/* Product items within the grid */
.products-grid-tabs .products-grid-wrapper ul.products li.product {
    width: 100% !important;
    max-width: 100% !important;
    flex: none !important;
    border: 1px solid #ebebeb;
    margin: -0.5px; /* collapse borders */
}

/* Ensure product inner content fills the cell */
.products-grid-tabs .products-grid-wrapper .product-outer {
    height: 100%;
}

/* Keep the tab navigation styling */
.products-grid-tabs .section-products-carousel {
    margin-bottom: 0;
}

/* ===================================================
   WooCommerce Blocks Cart – compact product list
   =================================================== */

/* Hide product descriptions/metadata in cart – keep only name */
.wc-block-cart-items .wc-block-components-product-metadata,
.wc-block-cart-items .wc-block-components-product-details {
    display: none !important;
}

/* Smaller font for cart product rows */
.wc-block-cart-items .wc-block-components-product-name {
    font-size: 13px !important;
    line-height: 1.3 !important;
}

.wc-block-cart-items .wc-block-cart-items__row {
    font-size: 13px !important;
}

/* Tighter row padding in cart */
.wc-block-cart-items .wc-block-cart-items__row td {
    padding-top: 8px !important;
    padding-bottom: 8px !important;
}

/* Smaller product thumbnail in cart */
.wc-block-cart-items .wc-block-components-product-image,
.wc-block-cart-items .wc-block-cart-item__image {
    max-width: 100px !important;
    width: 100px !important;
}

/* Fixed-height thumbnails in cart so rows are uniform */
.wc-block-cart-items .wc-block-cart-item__image img {
    max-height: 100px !important;
    width: auto !important;
    object-fit: contain !important;
    display: block !important;
    margin: 0 auto !important;
}

/* Hide sale badge in cart */
.wc-block-cart-items .wc-block-components-sale-badge {
    display: none !important;
}

/* Quantity selector and remove link inline */
.wc-block-cart-item__quantity {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 8px !important;
}

/* ===================================================
   WooCommerce Blocks Checkout – layout & compact summary
   =================================================== */

/* Hide only product metadata/description in checkout – keep name & price visible */
.wc-block-components-order-summary-item__description .wc-block-components-product-metadata,
.wc-block-components-order-summary-item__description .wc-block-components-product-details {
    display: none !important;
}

/* Remove padding from checkout summary item description */
.wc-block-components-order-summary-item__description {
    padding: 0 !important;
}

/* Remove border and ::after pseudo-element from product name in checkout summary */
.wc-block-components-order-summary-item__description .wc-block-components-product-name {
    border: none !important;
}

.wc-block-components-order-summary-item__description .wc-block-components-product-name::after {
    display: none !important;
    content: none !important;
}

/* Separate checkout summary items with a bottom border */
.wc-block-components-order-summary .wc-block-components-order-summary-item {
    border-bottom: 1px solid #e0e0e0 !important;
    padding-bottom: 8px !important;
    margin-bottom: 8px !important;
}

/* Hide product image container in checkout order summary */
.wc-block-components-order-summary-item__image {
    display: none !important;
}

/* Quantity display moved by JS into total-price column */
.fouroffice-qty-display {
    font-size: 12px !important;
    color: #666 !important;
    margin-bottom: 2px !important;
    white-space: nowrap !important;
}

/* Total price column: stack quantity + price vertically */
.wc-block-components-order-summary-item__total-price {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-end !important;
    justify-content: center !important;
}

/* Smaller font in checkout order summary product list */
.wc-block-components-order-summary-item__description .wc-block-components-product-name {
    font-size: 13px !important;
    line-height: 1.3 !important;
}

.wc-block-components-order-summary .wc-block-components-order-summary-item {
    font-size: 13px !important;
}

/* Desktop: rebalance columns – narrower forms (45%), wider summary (50%) */
@media (min-width: 992px) {
    .wc-block-checkout .wc-block-checkout__main {
        flex: 0 0 45% !important;
        max-width: 45% !important;
    }

    .wc-block-checkout .wc-block-checkout__sidebar {
        flex: 0 0 50% !important;
        max-width: 50% !important;
    }
}

/* Mobile/tablet: stack vertically – summary below forms */
@media (max-width: 991px) {
    .wc-block-checkout {
        display: flex !important;
        flex-direction: column !important;
    }

    .wc-block-checkout .wc-block-checkout__main,
    .wc-block-checkout .wc-block-checkout__sidebar {
        flex: 0 0 100% !important;
        max-width: 100% !important;
        width: 100% !important;
    }

    .wc-block-checkout .wc-block-checkout__sidebar {
        order: 1 !important;
    }
}

.products > .product .product-loop-body .product-min-qty,
.owl-item > .product .product-loop-body .product-min-qty {
    font-size: 0.857em;
    color: #c0392b;
    font-weight: 600;
}

.product-extra-info .product-min-qty {
    color: #c0392b;
    font-weight: 600;
}

.product-min-qty--grid {
    font-size: 0.857em;
    color: #c0392b;
    font-weight: 600;
    margin-bottom: 4px;
}

ul.products[data-view="grid-extended"] .product-min-qty--grid,
ul.products[data-view="list-view"] .product-min-qty--grid,
ul.products[data-view="list-view-small"] .product-min-qty--grid {
    display: none;
}

/* Search button loading spinner */
.navbar-search .btn-secondary.is-loading {
    position: relative;
    pointer-events: none;
}

.navbar-search .btn-secondary.is-loading .ec-search {
    visibility: hidden;
}

.navbar-search .btn-secondary.is-loading::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 18px;
    height: 18px;
    margin: -9px 0 0 -9px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: search-spin 0.6s linear infinite;
}

@keyframes search-spin {
    to { transform: rotate(360deg); }
}