/* =========================================================
   Go4x4 Warehouses – Storefront Styling
   Target markup: .go4x4-warehouses-box > ul > li > .product-stock.stock.{in|out}-stock.go4x4-wh-row
   With children:
     .go4x4-wh-badge   (warehouse pill)
     .go4x4-wh-main    ("9 szt.")
     .go4x4-wh-meta    ("(wysyłka w 3 dni)")
     .go4x4-wh-tail    (right-aligned extras, e.g., transfer fee pill)
     .go4x4-fee-badge  (red fee pill)
   ========================================================= */

/* Themeable tokens (override in theme if needed) */
:root {
  --go4x4-radius: 8px;
  --go4x4-gap: .75rem;

  /* Mint in-stock pill */
  --go4x4-green-bg: #EAFBF5;
  --go4x4-green-fg: #4C907C;
  --go4x4-green-br: #EAFBF5;

  /* Soft red out-of-stock pill + fee pill */
  --go4x4-red-bg: #F8E7E6;
  --go4x4-red-fg: #D52E21;
  --go4x4-red-br: #F8E7E6;

  /* Neutral pill (optional use) */
  --go4x4-gray-bg: #f2f4f7;
  --go4x4-gray-fg: #212529;
  --go4x4-gray-br: #f2f4f7;

  --go4x4-box-bg: #fff;
  --go4x4-box-br: #e5e5e5;

  --go4x4-text: #292529;
  --go4x4-meta: #212529;
}

/* Box container */
.go4x4-warehouses-box{
  margin: 12px 0;
  padding: 12px 0;
  background: var(--go4x4-box-bg);
}

.go4x4-warehouses-box > P{
  display:block;
  font-size: .75rem;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--go4x4-text);
}

/* List reset */
.go4x4-warehouses-box ul{
  margin: 0 0 0 0;
  padding: 0;
  list-style: none;
}

/* Row layout */
.go4x4-wh-row{
  display: flex;
  align-items: center;
  gap: var(--go4x4-gap);
  padding: .2rem 0;
  /* keep the existing inline style="display:block !important;" intact */
}

.go4x4-wh-option{
  display: flex;
  align-items: center;
  gap: .75rem;
  width: 100%;
  cursor: pointer;
}

.go4x4-wh-option[aria-disabled="true"]{
  cursor: not-allowed;
  opacity: .55;
}

.go4x4-wh-option__input{
  flex: 0 0 auto;
  margin: 0;
}

.go4x4-wh-row::before {
  display: none!important; /* hide the default stock icon */
}

/* Warehouse name badge (left) */
.go4x4-wh-badge{
  display: inline-block;
  width: 150px;
  text-align: center;
  box-sizing: border-box;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-size: .75rem;
  line-height: 1;
  font-weight: 600;
  white-space: nowrap;
  background: var(--go4x4-green-bg);
  color: var(--go4x4-green-fg);
  border: 1px solid var(--go4x4-green-br);
}

/* When the parent has "out-of-stock", render the badge red */
.product-stock.stock.out-of-stock .go4x4-wh-badge{
  background: var(--go4x4-red-bg);
  color: var(--go4x4-red-fg);
  border-color: var(--go4x4-red-br);
}

/* Main text: "9 szt." */
.go4x4-wh-main{
  font-size: .75rem;
  color: var(--go4x4-text);
}

/* Meta text: "(wysyłka w 3 dni)" */
.go4x4-wh-meta{
  color: var(--go4x4-meta);
  font-size: .75rem;
  margin-left: 0 !important;
}

/* Tail area (right side) e.g., fee pill */
.go4x4-wh-tail{
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  min-height: 1.75rem; /* aligns with pill height */
}


.go4x4-wh-price {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  font-size: .75rem;
  font-weight: 600;
  color: var(--go4x4-meta);
  margin-left: 0 !important;
}

.amount-sale SPAN {
    color: var(--go4x4-red-fg)!important;


.go4x4-wh-price--promo {
  color: var(--go4x4-green-fg);
}

.go4x4-wh-price--promo .woocommerce-Price-amount,
.go4x4-wh-price--promo .woocommerce-Price-currencySymbol {
  color: var(--go4x4-green-fg);
}

.go4x4-wh-price--regular .woocommerce-Price-amount,
.go4x4-wh-price--regular .woocommerce-Price-currencySymbol {
  color: var(--go4x4-meta);
}

.go4x4-wh-info {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1rem;
  height: 1rem;
  border-radius: 999px;
  background: var(--go4x4-gray-bg);
  color: var(--go4x4-meta);
  font-size: .65rem;
  font-weight: 700;
  cursor: help;
  line-height: 1;
}

.go4x4-wh-info:focus {
  outline: 1px solid var(--go4x4-meta);
  outline-offset: 2px;
}

/* Transfer fee pill */
.go4x4-fee-badge{
  display:inline-block;
  padding: 0.375rem 0.8125rem;
  border-radius: 8px;
  font-size: .75rem;
  line-height: 1;
  font-weight: 600;
  white-space: nowrap;
  background: var(--go4x4-red-bg);
  color: var(--go4x4-red-fg);
  border:1px solid var(--go4x4-red-br);
  margin-left: .5rem;
}

.go4x4-warehouses-box .woocommerce-Price-amount, 
.go4x4-warehouses-box .woocommerce-Price-currencySymbol {
  font-weight: 600;
  margin-left: 0.0rem;
  color: var(--go4x4-meta);
  font-size: .75rem;
}

.go4x4-fee-badge .woocommerce-Price-amount,
.go4x4-fee-badge .woocommerce-Price-currencySymbol {

  color: var(--go4x4-red-fg);
}


/* Subtle hover for better affordance when rows are clickable (optional) */
.go4x4-wh-row:hover{
  filter: brightness(0.98);
}

/* Compact mode on very narrow screens */
@media (max-width: 420px){
  .go4x4-wh-row{
    flex-wrap: wrap;
    gap: .5rem .6rem;
  }
  .go4x4-wh-tail{
    margin-left: 0;
    width: 100%;
    justify-content: flex-start;
  }
}
