/*
    Theme Name: Hello Elementor Child
    Theme URI: https://elementor.com/hello-theme/?utm_source=wp-themes&utm_campaign=theme-uri&utm_medium=wp-dash
    Description: Hello Elementor Child Theme — custom modifications for the Hello Elementor parent theme. Safe space for theme customizations that survive parent theme updates.
    Author: Your Name
    Author URI: https://example.com/
    Template: hello-elementor
    Version: 1.0.0
    Requires at least: 6.0
    Tested up to: 6.8
    Requires PHP: 7.4
    License: GNU General Public License v3 or later.
    License URI: https://www.gnu.org/licenses/gpl-3.0.html
    Text Domain: hello-elementor-child
    Tags: accessibility-ready, flexible-header, custom-colors, custom-menu, custom-logo, featured-images, rtl-language-support, threaded-comments, translation-ready
*/

/* =====================================================
   CUSTOM STYLES START HERE
   ===================================================== */

/* Add your custom CSS below */

/* product catalog css added */
.woocommerce ul.products li.product a img,
.product-catalog .product-card .image-wrapper,
.product-grid img {
    width: 100% !important;
    aspect-ratio: 1 / 1 !important;
    object-fit: contain !important;
    object-position: center center !important;
    background-color: #fff !important;
    border-radius: 4px;
    box-sizing: border-box;
}

.woocommerce ul.products li.product .product-thumbnail-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: transparent;
}

.woocommerce ul.products li.product .price{margin-bottom: 0!important;}

.iksm-term--id-918 { display: none;}

/* CSS for Brands page */

/* =====================================================
   BRANDS GRID SHORTCODE
   ===================================================== */

.wc-brands-wrap {
   --wc-brands-columns: 6; /* fallback if inline var not set */
}

.wc-brands-index {
   display: flex;
   flex-wrap: wrap;
   gap: 6px;
   justify-content: center;
   padding: 16px;
   background: #f9fafb;
   border: 1px solid #e5e7eb;
   border-radius: 10px;
   margin-bottom: 30px;
   position: sticky;
   top: 0;
   z-index: 10;
}

.wc-brands-index-letter {
   display: inline-flex;
   align-items: center;
   justify-content: center;
   min-width: 34px;
   height: 34px;
   padding: 0 8px;
   border-radius: 6px;
   background: #fff;
   border: 1px solid #e5e7eb;
   color: #111;
   text-decoration: none;
   font-weight: 600;
   font-size: 14px;
   transition: background .15s, color .15s, border-color .15s;
}

.wc-brands-index-letter:hover {
   background: #111;
   color: #fff;
   border-color: #111;
}

.wc-brands-index-letter.is-disabled {
   background: transparent;
   color: #cbd5e1;
   cursor: not-allowed;
   pointer-events: none;
}

.wc-brands-section {
   margin-bottom: 40px;
   scroll-margin-top: 80px;
}

.wc-brands-letter-heading {
   font-size: 20px;
   font-weight: 500;
   color: #212f63;
   margin: 0 0 20px;
   padding-bottom: 8px;
   border-bottom: 1px solid #dfdfdf;
}

.wc-brands-grid {
   display: grid;
   grid-template-columns: repeat(var(--wc-brands-columns), 1fr);
   gap: 20px;
}

.wc-brand-card {
   display: flex;
   flex-direction: column;
   align-items: center;
   gap: 16px;
   padding: 16px;
   border: 1px solid #e5e7eb;
   border-radius: 10px;
   text-decoration: none;
   color: inherit;
   background: #fff;
   transition: box-shadow .2s, transform .2s;
}

.wc-brand-card:hover {
   box-shadow: 0 6px 18px rgba(0, 0, 0, .08);
   transform: translateY(-2px);
}

.wc-brand-thumb {
   flex: 0 0 90px;
   width: 90px;
   height: 90px;
   display: flex;
   align-items: center;
   justify-content: center;
   overflow: hidden;
   /*background: #f9fafb;*/
   border-radius: 8px;
}

.wc-brand-thumb img {
   max-width: 100%;
   max-height: 100%;
   object-fit: contain;
}

.wc-brand-info {
   flex: 1;
   min-width: 0;
}

.wc-brand-name {
   font-weight: 600;
   font-size: 16px;
   line-height: 1.3;
   color: #111;
   text-align: center;
}
.products .product .woocommerce-loop-product__title{padding: .5em 0!important; margin: 0!important; font-size: 1em!important; color: #c36!important;}
.woocommerce-Price-amount bdi{ color: #c36; font-size: 18px;}
.product_sidebar h2, .product_sidebar h5{color: #c36;}
.product_sidebar h5{margin-bottom: 0;}
.product_sidebar .elementor-widget-text-editor p a{text-decoration: underline; margin-right: 10px}
.product_sidebar .elementor-widget-text-editor p a:hover{text-decoration: none;}
.woof_container .woof_container_inner input[type="search"]{padding: 10px 5px; font-size: 14px;}
.woof_submit_search_form_container{justify-content: flex-start; gap: 15px;}
.woof_checkbox_instock_container{margin-bottom: 20px; margin-top: 20px;}
.woocommerce ul.products li.product .button{padding: 12px 10px 12px!important; background: #212f63; color: #fff; text-align: center; margin-top: 10px!important;}
.woocommerce ul.products li.product .button:hover{background: #383f58;}

a.button.product_type_simple{padding: 8px 12px!important; margin: 5px 0 0 0 !important;}

@media (max-width: 1024px) {
   .wc-brands-grid { grid-template-columns: repeat(5, 1fr);}
}

@media (max-width: 900px) {
   .wc-brands-grid { grid-template-columns: repeat(4, 1fr);}
}

@media (max-width: 767px) {
   .wc-brands-grid { grid-template-columns: repeat(3, 1fr);}
}

@media (max-width: 480px) {
   .wc-brands-grid { grid-template-columns: repeat(2, 1fr);}
   .wc-brands-index { position: static; }
   .wc-brands-index-letter {
      min-width: 28px;
      height: 28px;
      font-size: 12px;
   }
}


/* ===== Archive: Stock Status Badge ===== */
.archive-qty-add-to-cart {
   display: flex;
   flex-direction: column;
   gap: 0;
   width: 100%;
   order: 3;
   margin-top: 5px;
}


.archive-qty-add-to-cart .qty-controls {
   display: flex;
   align-items: stretch;
   border: 1px solid #d1d5db;
   border-radius: 6px;
   overflow: hidden;
   width: 100%;
   max-width: 120px;
}

.archive-qty-add-to-cart .qty-btn {
   background: #f9fafb;
   border: none;
   width: 30px;
   font-size: 18px;
   font-weight: 600;
   color: #111;
   cursor: pointer;
   line-height: 1;
   transition: background 0.15s;
   padding: 5px 7px;
}

.archive-qty-add-to-cart .qty-btn:hover {
   background: #e5e7eb;
}

.archive-qty-add-to-cart .qty-input {
   flex: 1;
   border: none;
   border-left: 1px solid #d1d5db;
   border-right: 1px solid #d1d5db;
   text-align: center;
   font-size: 14px;
   font-weight: 600;
   color: #111;
   width: 100%;
   min-width: 40px;
   padding: 0;
   -moz-appearance: textfield;
}

.archive-qty-add-to-cart .qty-input::-webkit-outer-spin-button,
.archive-qty-add-to-cart .qty-input::-webkit-inner-spin-button {
   -webkit-appearance: none;
   margin: 0;
}

.archive-qty-add-to-cart .archive-add-btn {
   display: block;
   text-align: center;
   background: #111;
   color: #fff !important;
   padding: 9px 14px;
   border-radius: 6px;
   font-weight: 600;
   font-size: 13px;
   text-decoration: none;
   border: none;
   width: 100%;
}

.archive-qty-add-to-cart .archive-add-btn:hover {
   background: #333;
}

/* Stock badge styling */
.archive-stock-badge {
   display: inline-block;
   padding: 3px 10px;
   border-radius: 4px;
   font-size: 11px;
   font-weight: 700;
   text-transform: uppercase;
   letter-spacing: 0.3px;
   line-height: 1.4;
   white-space: nowrap;
}
.archive-stock-badge.in-stock {
   background: #e6f6ec;
   color: #137333;
}
.archive-stock-badge.low-stock {
   background: #fff4e5;
   color: #b45309;
}
.archive-stock-badge.out-of-stock {
   background: #fce8e8;
   color: #b91c1c;
}
/* ===== Product card layout — force consistent order ===== */
.woocommerce ul.products li.product,
.products li.product,
.e-loop-item.product {
   display: flex !important;
   flex-direction: column !important;
}

/* Order: image (0) → title (1) → price+stock row (2) → qty controls (3) → button (4) */
.woocommerce ul.products li.product a img,
.products li.product a img,
.e-loop-item.product img {
   order: 0;
}

.woocommerce ul.products li.product .woocommerce-loop-product__title,
.products li.product .woocommerce-loop-product__title,
.e-loop-item.product .woocommerce-loop-product__title,
.products li.product h2,
.products li.product h3 {
   order: 1;
}

.price-stock-row {
   order: 2;
   display: flex;
   align-items: center;
   justify-content: space-between;
   gap: 10px;
   margin: 0 0;
   flex-wrap: wrap;
}

.price-stock-row .price {
   margin: 0;
}

.price-stock-row .archive-stock-badge {
   margin-bottom: 0;
}


/* Standalone "Add to cart" / "Read more" buttons fall after everything */
.woocommerce ul.products li.product .button:not(.qty-btn):not(.archive-add-btn),
.products li.product .button:not(.qty-btn):not(.archive-add-btn) {
   order: 4;
}
.price-stock-row .archive-stock-badge {
   order: 1;
}

.price-stock-row .price {
   order: 2;
}

.wpf_links a{color: #212f63;}
.wpf_links a:hover{color: #c11e33;}
.wpf_item li .wpf_selected{color: #c11e33!important;}
.wpf_item li, .wpf_item ul ul li{margin: 0 0 .4em!important;}
.dgwt-wcas-style-pirx .dgwt-wcas-sf-wrapp{padding: 0!important;}
.dgwt-wcas-style-pirx .dgwt-wcas-sf-wrapp button.dgwt-wcas-search-submit{left: 13px!important; top: 11px!important;}
.dgwt-wcas-style-pirx .dgwt-wcas-sf-wrapp input[type=search].dgwt-wcas-search-input{background-color: #fff!important; border: 1px solid #eee!important; border-radius: 5px!important;}
.wpf_item input[type=checkbox]{ border-radius: 5px!important;}
.wpf_item input[type=checkbox]:before{line-height: 1.3!important; font-size: 14px!important;}
.woocommerce .woocommerce-result-count{margin: 10px 0 0 0!important;}
.wpf_reset_btn{padding-left: 1.5em!important; padding-right: 5px!important; border-radius: 5px!important; margin-top: 10px!important; background: #eee!important;}
.wpf_reset_btn:after, .wpf_reset_btn:before{left: 5px!important;}
.wpf_layout_vertical .wpf_instock_wrapp{margin-top: -1px;}
.woocommerce .elementor-element.elementor-products-grid ul.products li.product{border: 1px solid #eee!important; padding: 15px!important; border-radius: 5px!important;}
.wpf_items_grouped .wpf_grouped_label:after{top: 5%!important;}
.woocommerce .woocommerce-ordering select{border: 1px solid rgba(0, 0, 0, .1);}


/* ===== Column Switcher UI ===== */
.column-switcher {
   /*display: flex;*/
   display: none;
   align-items: center;
   gap: 8px;
   margin-bottom: 20px;
   padding: 10px 14px;
   background: #f9fafb;
   border: 1px solid #e5e7eb;
   border-radius: 8px;
   width: fit-content;
   margin-left: auto; /* right-align; change to 0 for left */
}

.column-switcher__label {
   font-size: 13px;
   font-weight: 600;
   color: #374151;
   margin-right: 4px;
}

.column-switcher__btn {
   display: inline-flex;
   align-items: center;
   justify-content: center;
   width: 36px;
   height: 36px;
   background: #fff;
   border: 1px solid #d1d5db;
   border-radius: 6px;
   cursor: pointer;
   padding: 0;
   transition: all 0.15s;
}

.column-switcher__btn:hover {
   border-color: #111;
   background: #f3f4f6;
}

.column-switcher__btn.is-active {
   background: #111;
   border-color: #111;
}

.column-switcher__btn.is-active .cs-icon::before,
.column-switcher__btn.is-active .cs-icon::after,
.column-switcher__btn.is-active .cs-icon {
   background: #fff !important;
}

/* Icon: dot pattern showing column count */
.cs-icon {
   display: inline-block;
   width: 18px;
   height: 14px;
   background-image: linear-gradient(#374151, #374151);
   background-repeat: repeat;
   background-position: 0 0;
}
.cs-icon-2 { background-size: 8px 14px; background-image: linear-gradient(90deg, #374151 50%, transparent 50%); background-size: 8px 14px; }
.cs-icon-3 { background-image: repeating-linear-gradient(90deg, #374151 0 4px, transparent 4px 6px); }
.cs-icon-4 { background-image: repeating-linear-gradient(90deg, #374151 0 3px, transparent 3px 4.5px); }
.cs-icon-5 { background-image: repeating-linear-gradient(90deg, #374151 0 2px, transparent 2px 3.6px); }

/* ===== Product grid column count overrides ===== */
ul.products[data-cols="2"],
.products.elementor-grid[data-cols="2"],
.elementor-loop-container[data-cols="2"] {
   grid-template-columns: repeat(2, 1fr) !important;
   display: grid !important;
}

ul.products[data-cols="3"],
.products.elementor-grid[data-cols="3"],
.elementor-loop-container[data-cols="3"] {
   grid-template-columns: repeat(3, 1fr) !important;
   display: grid !important;
}

ul.products[data-cols="4"],
.products.elementor-grid[data-cols="4"],
.elementor-loop-container[data-cols="4"] {
   grid-template-columns: repeat(4, 1fr) !important;
   display: grid !important;
}

ul.products[data-cols="5"],
.products.elementor-grid[data-cols="5"],
.elementor-loop-container[data-cols="5"] {
   grid-template-columns: repeat(5, 1fr) !important;
   display: grid !important;
}

/* Reset WooCommerce's float-based grid when data-cols is active */
ul.products[data-cols] li.product {
   width: 100% !important;
   float: none !important;
   margin: 0 !important;
}

/* Mobile — force fewer columns regardless of user choice */
@media (max-width: 900px) {
   ul.products[data-cols],
   .products.elementor-grid[data-cols],
   .elementor-loop-container[data-cols] {
      grid-template-columns: repeat(2, 1fr) !important;
   }
}

@media (max-width: 600px) {
   ul.products[data-cols],
   .products.elementor-grid[data-cols],
   .elementor-loop-container[data-cols] {
      grid-template-columns: 1fr !important;
   }
   .column-switcher {
      display: none; /* hide switcher on phones since we force single column */
   }
}