/*******UP SIDE*******/
  
  /*Container Styles*/
  form.woocommerce-cart-form {
background: white;
padding: 1em;
border-radius: 1em;
padding: 2em;
border-radius: 1em;
box-shadow: 0 0.5em 2em rgb(0 0 0 / 10%);
  }

/*Zmiana stylów lewej kolumny*/
table.shop_table.shop_table_responsive.cart.woocommerce-cart-form__contents{
font-size: 12px;
line-height: 1.7;
text-transform: uppercase !important;
font-weight: 500;
color: #4a4a4a;
margin-bottom: 0.1em;
}

  
  /*Coupon Area Styles*/
  [class*=woocommerce] .cart .actions .coupon > input[type=text] {
      width: 100%;	
      max-width: none;
      margin-bottom: 0px;
  }
  
  input#coupon_code {
      height: 40px;
      margin-right: 2em;
  }

  
/*******RIGHT SIDE*******/
  
  .cart-collaterals {
      padding: 1em;
      background: white;
      border-radius: 1em;
      box-shadow: 0em 0.5em 2em 0em rgb(0 0 0 / 10%);
      margin-top: 3em;
  }
  
/*Zmiana stylów prawej kolumny*/
table.shop_table.shop_table_responsive {
font-size: 13px;
text-transform: uppercase !important;
color: #4a4a4a;
margin-bottom: 0.1em;
}
  
  [class*=woocommerce] .cart-collaterals .cart_totals {
    margin-top: 0;
  }
  
   /*Form Field Focus Color Style*/
   textarea:focus, input[type=text]:focus, input[type=password]:focus, input[type=datetime]:focus, input[type=datetime-local]:focus, input[type=date]:focus, input[type=month]:focus, input[type=time]:focus, input[type=week]:focus, input[type=number]:focus, input[type=email]:focus, input[type=url]:focus, input[type=search]:focus, input[type=tel]:focus, input[type=color]:focus, .uneditable-input:focus {
       border-color: #4e22e9; /*Change this to a color that best suits your design*/
       box-shadow: none;
       outline: 0;
   }
  
  [class*=woocommerce] .cart-collaterals .cart_totals h2 {
    display: none;
  }
  
  table th, table td {
      border-top: none;
      text-transform: uppercase;
      color: #4a4a4a;
  }
  
  [class*=woocommerce] .cart-collaterals table th {
    padding: 1em;
  }
  
  
   /*Order Total Line Item Styles*/
   tr.order-total {
       color: #0049ff; /*Accent color for total if desired*/
       background: #0049ff21; /*Accent background color if desired*/
   }
  
  a.checkout-button.button.alt.wc-forward.wp-element-button {
      width: 100%;
      color: #fff;
       border: none;
       box-shadow: rgba(0, 0, 0, 0.28) 0px 2px 8px 0px;
       padding: 1.5em;
      margin-top: 1em;
      text-transform: uppercase;
      font-size: 1em;
  }
  
  
   /*Order Total Line Item Styles*/
   tr.order-total {
       color: #0049ff; /*Accent color for total if desired*/
       background: #0049ff21; /*Accent background color if desired*/
   }
  
  a.checkout-button.button.alt.wc-forward.wp-element-button {
      width: 100%;
      color: #fff;
       border: none;
       box-shadow: rgba(0, 0, 0, 0.28) 0px 2px 8px 0px;
       padding: 1.5em;
      margin-top: 1em;
      text-transform: uppercase;
      font-size: 1em;
  }

/*******ALERT STYLES*******/
  
  
   /*Error Alert*/
   .woocommerce-error {
       background-color: #ff7e7e;
       border: none;
       color: #761f1f;
   }
   
   .woocommerce-error, .woocommerce-info, .woocommerce-message {
     text-shadow: none;
   }

/*Usuń capitalize basket*/
.woocommerce .cart-collaterals .cart_totals,
.woocommerce .cart-collaterals .cart_totals *,
.woocommerce .cart-collaterals .calculated_shipping,
.woocommerce .cart-collaterals .calculated_shipping * {
  text-transform: none !important;
}

/*******CROSS-SELLS — "Zobacz inne równie interesujące..." *******/

/* Nagłówek sekcji */
body .cross-sells > h2 {
    text-align: center;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #0959ae;
    margin: 0 0 20px;
}

/* Siatka — auto-fit dopasowuje liczbę kolumn do miejsca */
body .woocommerce .cross-sells ul.products {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    grid-auto-rows: 1fr;
    gap: 16px !important;
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
    float: none !important;
}

/* Karta — subtelne wyróżnienie jak w pierwotnym wyglądzie */
body .woocommerce .cross-sells ul.products li.product {
    width: auto !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 14px 12px !important;
    float: none !important;
    display: flex !important;
    flex-direction: column;
    background: #fff !important;
    border: 1px solid #ececec !important;
    border-radius: 6px !important;
    box-sizing: border-box !important;
    position: relative;
    box-shadow: none !important;
}

/* Zlikwiduj wewnętrzne ramki/cienie OceanWP — żeby nie było efektu "ramka w ramce" */
body .cross-sells ul.products li.product .product-inner,
body .cross-sells ul.products li.product .woo-entry-inner,
body .cross-sells ul.products li.product .image-wrap,
body .cross-sells ul.products li.product .woo-entry-image,
body .cross-sells ul.products li.product .image-wrap > .woo-entry-image,
body .cross-sells ul.products li.product .image-wrap > .woo-entry-image > a,
body .cross-sells ul.products li.product .title,
body .cross-sells ul.products li.product .price-wrap,
body .cross-sells ul.products li.product .btn-wrap {
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    outline: 0 !important;
}

/* W cross-sells (koszyk) ukrywamy przycisk "Porównaj" — bez sensu na etapie zakupu.
   Działa dzięki temu, że cart.css ładuje się po dodatki.css (priorytety 22 vs 21
   w functions.php), więc reguła wygrywa kolejnością źródła bez sztuczek ze specyficznością. */
body .cross-sells ul.products li.product .br_compare_button {
    display: none !important;
}

/* Wewnętrzny wraper .product-inner — też flex column */
body .cross-sells ul.products li.product > .product-inner {
    display: flex !important;
    flex-direction: column;
    flex: 1 1 auto;
    width: 100%;
    height: 100%;
    margin: 0 !important;
    padding: 0 !important;
}

/* Ukryj duplikat obrazka renderowany przez OceanWP */
body .cross-sells ul.products li.product > .product-inner > .woo-entry-image {
    display: none !important;
}

/* Zagnieżdżona lista .woo-entry-inner — głowny content */
body .cross-sells ul.products li.product .woo-entry-inner {
    display: flex !important;
    flex-direction: column;
    flex: 1 1 auto;
    width: 100%;
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
}

body .cross-sells ul.products li.product .woo-entry-inner > li {
    list-style: none !important;
    padding: 0 !important;
    width: 100% !important;
    background: transparent !important;
    border: 0 !important;
    /* margin nie resetujemy globalnie — robimy to per element, bo inaczej
       generyczne ".woo-entry-inner > li" wygrywa specyficznością z konkretnymi li */
}

/* Obrazek — stała wysokość dla wyrównania */
body .cross-sells ul.products li.product .image-wrap {
    margin-bottom: 12px !important;
    text-align: center;
    height: 110px;
    display: flex !important;
    align-items: center;
    justify-content: center;
    position: relative;
}

body .cross-sells ul.products li.product .image-wrap img {
    max-height: 110px !important;
    max-width: 100% !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain !important;
}

/* Plakietka "BRAK" */
body .cross-sells ul.products li.product .outofstock-badge {
    position: absolute !important;
    top: 0;
    left: 0;
    z-index: 3;
    background: #d32f2f !important;
    color: #fff !important;
    padding: 2px 8px !important;
    font-size: 10px !important;
    font-weight: 700 !important;
    border-radius: 3px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px;
}

/* Ukryj pustą ocenę */
body .cross-sells ul.products li.product .rating:empty {
    display: none !important;
}

/* Tytuł — sztywne 4 linie z wielokropkiem */
body .cross-sells ul.products li.product .product-inner .woo-entry-inner li.title {
    margin: 0 0 10px !important;
}
body .cross-sells ul.products li.product .product-inner .woo-entry-inner li.title h2 {
    font-size: 12px !important;
    font-weight: 600 !important;
    line-height: 1.4 !important;
    color: #333 !important;
    min-height: 7em !important;
    max-height: 7em !important;
    margin: 0 !important;
    padding: 0 !important;
    text-align: center !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 5 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    word-break: break-word;    
    overflow-wrap: anywhere; 
    hyphens: auto;         
}
body .cross-sells ul.products li.product .title h2 a {
    color: #333 !important;
    text-decoration: none !important;
}
body .cross-sells ul.products li.product .title h2 a:hover {
    color: #0959ae !important;
}

/* Cena — przyklejona do dołu, z OBFITYM oddechem przed przyciskiem.
   Wyższa specyficzność (.product-inner w środku selektora) żeby pokonać
   generyczny ".woo-entry-inner > li" reset. */
body .cross-sells ul.products li.product .product-inner .woo-entry-inner li.price-wrap {
    margin-top: auto !important;
    margin-bottom: 28px !important;
    padding-top: 12px !important;
    text-align: center;
}

body .cross-sells ul.products li.product .price,
body .cross-sells ul.products li.product .price .amount,
body .cross-sells ul.products li.product .price bdi {
    font-size: 17px !important;
    font-weight: 700 !important;
    display: block !important;
    /* color celowo nie ustawiamy — dziedziczy domyślny kolor tekstu */
}

body .cross-sells ul.products li.product .price del {
    display: block;
    font-size: 12px !important;
    color: #999 !important;
    text-decoration: line-through !important;
    margin-bottom: 2px;
    font-weight: 400 !important;
}
body .cross-sells ul.products li.product .price ins {
    display: block;
    text-decoration: none !important;
    background: transparent !important;
}

/* Przycisk — jednakowa wysokość, tekst łamie się na 2 linie.
   Wyższa specyficzność (.product-inner) żeby reguły do li.btn-wrap nie były pokonane resetem. */
body .cross-sells ul.products li.product .product-inner .woo-entry-inner li.btn-wrap {
    width: 100% !important;
    margin: 0 !important;
    padding-top: 8px !important;
}
body .cross-sells ul.products li.product .btn-wrap .button {
    width: 100% !important;
    min-height: 46px !important;
    padding: 8px 6px !important;
    font-size: 12px !important;
    line-height: 1.2 !important;
    white-space: normal !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    word-break: keep-all !important;
    box-sizing: border-box !important;
}

/* Mobile — 2 kolumny */
@media (max-width: 480px) {
    body .woocommerce .cross-sells ul.products {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px !important;
    }
    body .cross-sells ul.products li.product {
        padding: 10px 8px !important;
    }
    body .cross-sells ul.products li.product .image-wrap {
        height: 85px;
    }
    body .cross-sells ul.products li.product .image-wrap img {
        max-height: 85px !important;
    }
}