/* ============================================================
   ForNails — /koszyk/ (Cart page) — brand design
   Zakres: WYŁĄCZNIE strona koszyka (WooCommerce Cart block).
   NIE dotyka nagłówka / mini-koszyka (drawer) — te robi inny agent.
   Selektory potwierdzone na żywym DOM (WooCommerce Blocks 10.9 + Woodmart 8.5.5).
   ============================================================ */

:root{
  --fnc-primary: #A34B65;
  --fnc-primary-dark: #7E3A4F;
  --fnc-secondary: #2E2321;
  --fnc-accent: #C9A15A;
  --fnc-accent-light: #E4C989;
  --fnc-bg: #FBF7F5;
  --fnc-bg-soft: #F3E9E5;
  --fnc-bg-section: #F5EBE7;
  --fnc-border: #DDD0CB;
  --fnc-border-light: #E7DAD4;
  --fnc-border-lighter: #F0E6E1;
  --fnc-muted: #8B7D77;
  --fnc-success: #6B8F71;
  --fnc-error: #B3423F;
  --fnc-font-heading: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --fnc-font-body: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ------------------------------------------------------------
   0. Kontener strony + nagłówek H1
   ------------------------------------------------------------ */
.wc-block-cart{
  font-family: var(--fnc-font-body);
  color: var(--fnc-secondary);
}
.entry-title,
.page-title,
h1.wp-block-post-title{
  font-family: var(--fnc-font-heading);
}

/* ------------------------------------------------------------
   1. PASEK POSTĘPU DO DARMOWEJ DOSTAWY (Woodmart wd-shipping-progress-bar)
   ------------------------------------------------------------ */
.wd-shipping-progress-bar{
  background: #fff;
  border: 1px solid var(--fnc-border-light);
  padding: 18px 22px;
  margin-bottom: 24px;
}
.wd-shipping-progress-bar .wd-progress-bar{
  padding: 0;
}
.wd-shipping-progress-bar .progress-msg{
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 11px;
}
.wd-shipping-progress-bar .progress-msg::before{
  content: "";
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  background-color: var(--fnc-accent);
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 18V6a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v11a1 1 0 0 0 1 1h2'/%3E%3Cpath d='M15 18H9'/%3E%3Cpath d='M19 18h2a1 1 0 0 0 1-1v-3.65a1 1 0 0 0-.22-.624l-3.48-4.35A1 1 0 0 0 17.52 8H14'/%3E%3Ccircle cx='17' cy='18' r='2'/%3E%3Ccircle cx='7' cy='18' r='2'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 18V6a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v11a1 1 0 0 0 1 1h2'/%3E%3Cpath d='M15 18H9'/%3E%3Cpath d='M19 18h2a1 1 0 0 0 1-1v-3.65a1 1 0 0 0-.22-.624l-3.48-4.35A1 1 0 0 0 17.52 8H14'/%3E%3Ccircle cx='17' cy='18' r='2'/%3E%3Ccircle cx='7' cy='18' r='2'/%3E%3C/svg%3E");
}
.wd-shipping-progress-bar .progress-msg p{
  margin: 0;
  font-size: 13.5px;
  color: var(--fnc-secondary);
}
.wd-shipping-progress-bar .progress-msg .woocommerce-Price-amount{
  color: var(--fnc-primary) !important;
  font-weight: 600;
}
.wd-shipping-progress-bar .progress-area,
.wd-shipping-progress-bar .progress-area .wd-progress-bar-holder{
  height: 8px !important;
  background: var(--fnc-bg-soft) !important;
  overflow: hidden;
  border-radius: 0;
}
.wd-shipping-progress-bar .progress-area .progress-bar{
  height: 100% !important;
  background-color: var(--fnc-accent) !important;
  background: var(--fnc-accent) !important;
  transition: width .3s ease;
}

/* ------------------------------------------------------------
   2. UPSELL „Dołóż do darmowej dostawy" (shortcode [fn_cart_upsell])
   ------------------------------------------------------------ */
.fn-cart-upsell{
  background: var(--fnc-bg-section);
  border: 1px solid var(--fnc-border-light);
  padding: 20px 22px;
  margin-bottom: 24px;
}
.fn-cart-upsell__intro{
  font-size: 13.5px;
  font-weight: 500;
  margin: 0 0 14px;
  color: #3a2d29;
}
.fn-cart-upsell__intro strong{
  color: var(--fnc-primary);
}
.fn-cart-upsell__grid{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.fn-cart-upsell__item{
  background: #fff;
  border: 1px solid var(--fnc-border-light);
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px;
}
.fn-cart-upsell__thumb{
  width: 48px;
  height: 48px;
  overflow: hidden;
  background: var(--fnc-bg-soft);
  flex-shrink: 0;
  display: block;
}
.fn-cart-upsell__thumb img{
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.fn-cart-upsell__info{
  min-width: 0;
  flex: 1;
}
.fn-cart-upsell__name{
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 11.5px;
  line-height: 1.3;
  color: var(--fnc-secondary) !important;
  text-decoration: none;
}
.fn-cart-upsell__price{
  display: block;
  font-family: var(--fnc-font-heading);
  font-weight: 600;
  font-size: 13px;
  margin-top: 2px;
  color: var(--fnc-secondary);
}
.fn-cart-upsell__add{
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  background-color: var(--fnc-accent) !important;
  color: var(--fnc-secondary) !important;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 19px;
  line-height: 1;
  text-decoration: none !important;
  font-weight: 400;
}
.fn-cart-upsell__add:hover{
  background-color: var(--fnc-accent-light) !important;
}

/* Natywny blok cross-sell Woo (jeśli kiedyś zostaną skonfigurowane cross-sells) — spójny styl na wypadek pojawienia się produktów */
.wc-block-cart-items-block .wp-block-woocommerce-product-collection{
  background: var(--fnc-bg-section);
  border: 1px solid var(--fnc-border-light);
  padding: 20px 22px;
  margin-top: 24px;
}
.wc-block-cart-items-block .wp-block-woocommerce-product-collection h2{
  font-size: 15px;
  margin-bottom: 14px;
}
.wc-block-cart-items-block .wp-block-woocommerce-product-collection h2::after{
  display: none;
}

/* ------------------------------------------------------------
   3. TABELA POZYCJI KOSZYKA
   ------------------------------------------------------------ */
.wc-block-cart-items,
table.wc-block-cart-items{
  background: #fff;
  border: 1px solid var(--fnc-border-light);
  border-collapse: collapse;
  width: 100%;
}
.wc-block-cart-items__header{
  border-bottom: 1px solid var(--fnc-border-light);
}
.wc-block-cart-items__header th span{
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--fnc-muted);
  font-weight: 600;
}
.wc-block-cart-items__row{
  border-bottom: 1px solid var(--fnc-border-lighter);
}
.wc-block-cart-items__row:last-child{
  border-bottom: none;
}
.wc-block-cart-item__image{
  padding: 20px 0 20px 22px !important;
}
.wc-block-cart-item__image img{
  width: 84px;
  height: 84px;
  object-fit: cover;
  background: var(--fnc-bg-soft);
}
.wc-block-cart-item__product{
  padding: 20px 18px !important;
}
.wc-block-cart-item__total{
  padding: 20px 22px !important;
  text-align: right;
}

/* wrap: kolejność marka -> nazwa -> cena mobile -> ilość/usuń, przez flex+order */
.wc-block-cart-item__wrap{
  display: flex;
  flex-direction: column;
}
.wc-block-cart-item__wrap .wc-block-components-product-metadata{
  order: -1;
}
.wc-block-cart-item__wrap .wc-block-components-product-name{
  order: 0;
  margin-bottom: 2px;
}
.wc-block-cart-item__wrap .wc-block-cart-item__prices{
  order: 1;
}
.wc-block-cart-item__wrap .wc-block-cart-item__quantity{
  order: 2;
}

a.wc-block-components-product-name{
  font-size: 14px;
  line-height: 1.4;
  color: var(--fnc-secondary) !important;
  text-decoration: none;
  font-weight: 400;
  font-family: var(--fnc-font-body);
}
a.wc-block-components-product-name:hover{
  color: var(--fnc-primary) !important;
}

/* opis (short_description) automatycznie dodawany przez WooCommerce Blocks — w makiecie go nie ma, ukrywamy dla czystej karty */
.wc-block-components-product-metadata__description{
  display: none !important;
}

/* marka nad nazwą — wstrzykiwana filtrem woocommerce_get_item_data (klasa fn-cart-item-brand), patrz fn-design-cart.php */
.fn-cart-item-brand .wc-block-components-product-details__name{
  display: none;
}
.fn-cart-item-brand .wc-block-components-product-details__value{
  font-size: 10.5px;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--fnc-primary);
  font-weight: 600;
}
.wc-block-cart-item__wrap .wc-block-components-product-details{
  margin-bottom: 4px;
}

.wc-block-cart-item__prices .wc-block-components-product-price__value{
  font-family: var(--fnc-font-heading);
  font-weight: 600;
  color: var(--fnc-secondary);
}
.wc-block-cart-item__total .wc-block-components-product-price__value{
  font-family: var(--fnc-font-heading);
  font-weight: 600;
  font-size: 18px;
  color: var(--fnc-secondary);
}

/* ------------------------------------------------------------
   4. STEPPER ILOŚCI
   ------------------------------------------------------------ */
.wc-block-components-quantity-selector{
  display: flex;
  align-items: center;
  border: 1px solid var(--fnc-border);
  width: -moz-fit-content;
  width: fit-content;
  background: #fff;
}
.wc-block-components-quantity-selector__input{
  order: 1;
  width: 34px;
  text-align: center;
  font-weight: 600;
  font-size: 14px;
  border: none !important;
  background: transparent !important;
  padding: 0 !important;
  height: 34px;
  color: var(--fnc-secondary);
}
.wc-block-components-quantity-selector__button{
  width: 32px;
  height: 34px;
  background: none !important;
  border: none !important;
  cursor: pointer;
  font-size: 16px;
  color: var(--fnc-secondary) !important;
  box-shadow: none !important;
}
.wc-block-components-quantity-selector__button:hover{
  background: var(--fnc-bg-soft) !important;
}
.wc-block-components-quantity-selector__button--minus{
  order: 0;
}
.wc-block-components-quantity-selector__button--plus{
  order: 2;
}

/* ------------------------------------------------------------
   5. USUŃ pozycję
   ------------------------------------------------------------ */
.wc-block-cart-item__remove-link{
  display: inline-flex !important;
  align-items: center;
  gap: 5px;
  color: var(--fnc-muted) !important;
  font-size: 12.5px;
  font-family: var(--fnc-font-body);
  margin-top: 10px;
}
.wc-block-cart-item__remove-link::after{
  content: "Usuń";
}
.wc-block-cart-item__remove-link:hover{
  color: var(--fnc-error) !important;
}
.wc-block-cart-item__remove-link svg{
  width: 14px;
  height: 14px;
}

/* ------------------------------------------------------------
   6. KUPON RABATOWY (panel/accordion natywny Woo Blocks)
   ------------------------------------------------------------ */
.wc-block-components-totals-coupon{
  border-top: 1px solid var(--fnc-border-light);
  padding-top: 14px;
  margin-bottom: 4px;
}
.wc-block-components-panel__button{
  font-family: var(--fnc-font-body);
  font-size: 13px;
  color: var(--fnc-secondary);
  font-weight: 500;
}
.wc-block-components-panel__button:hover{
  color: var(--fnc-primary);
}
.wc-block-components-totals-coupon .wc-block-components-panel__button-icon{
  color: var(--fnc-primary);
}
.wc-block-components-totals-coupon input[type="text"]{
  border: 1px solid var(--fnc-border) !important;
  font-family: var(--fnc-font-body);
  font-size: 13px;
}
.wc-block-components-totals-coupon input[type="text"]:focus{
  border-color: var(--fnc-primary) !important;
  box-shadow: 0 0 0 2px rgba(163, 75, 101, .15) !important;
}
.wc-block-components-totals-coupon .wc-block-components-button{
  background-color: var(--fnc-secondary) !important;
  border-color: var(--fnc-secondary) !important;
}
.wc-block-components-totals-coupon .wc-block-components-button:hover{
  background-color: #4a3a35 !important;
}

/* Kontynuuj zakupy — jeśli obecny (link powrotu do sklepu w klasycznych szablonach) */
.woocommerce a.button.wc-backward{
  font-size: 13.5px;
  color: var(--fnc-secondary);
  background: none !important;
  border: none !important;
  padding: 0 !important;
}
.woocommerce a.button.wc-backward:hover{
  color: var(--fnc-primary);
}

/* ------------------------------------------------------------
   7. PODSUMOWANIE (sidebar totals)
   ------------------------------------------------------------ */
.wc-block-cart__sidebar{
  background: #fff;
  border: 1px solid var(--fnc-border-light);
  padding: 26px 24px;
}
@media (min-width: 783px){
  .wc-block-cart__sidebar{
    position: sticky;
    top: 96px;
  }
}
.wc-block-cart__totals-title{
  font-family: var(--fnc-font-heading);
  font-size: 20px;
  font-weight: 600;
  margin: 0 0 18px;
}
.wc-block-cart__totals-title::after{
  display: none;
}
.wc-block-components-totals-item{
  font-size: 14px;
  color: #3a2d29;
  margin-bottom: 4px;
}
.wc-block-components-totals-item__label{
  font-weight: 400;
}
.wc-block-components-totals-item__value{
  font-weight: 500;
  color: var(--fnc-secondary);
}
.wc-block-components-totals-shipping__via{
  color: var(--fnc-muted);
  font-size: 11.5px;
}

/* Wiersz "Razem"/grand total */
.wc-block-components-totals-footer-item{
  border-top: 1px solid var(--fnc-border-light);
  padding-top: 14px;
  margin-top: 10px;
}
.wc-block-components-totals-footer-item .wc-block-components-totals-item__label{
  font-weight: 600;
  font-size: 16px;
  color: var(--fnc-secondary);
}
.wc-block-components-totals-footer-item .wc-block-components-totals-item__value,
.wc-block-components-totals-footer-item-tax-value{
  font-family: var(--fnc-font-heading) !important;
  font-weight: 700 !important;
  font-size: 26px !important;
  color: var(--fnc-secondary) !important;
}
.wc-block-components-totals-footer-item-tax{
  font-size: 11.5px;
  color: var(--fnc-muted);
  text-align: right;
  margin: 4px 0 0;
}

/* Przycisk płatności — kolor już nadaje brand.css (.wc-block-cart__submit-button); tu tylko rozmiar/odstępy pod makietę */
.wc-block-cart__submit-button{
  width: 100%;
  padding: 16px !important;
  font-size: 15.5px !important;
  font-weight: 600 !important;
  margin-top: 16px;
}

/* ------------------------------------------------------------
   8. PUSTY KOSZYK — przyjazny stan
   ------------------------------------------------------------ */
.wp-block-woocommerce-empty-cart-block{
  text-align: center;
  padding: 40px 20px 10px;
}
.wc-block-cart__empty-cart__title{
  font-family: var(--fnc-font-heading);
  font-weight: 600;
  font-size: 26px;
  color: var(--fnc-secondary);
}
.wc-block-cart__empty-cart__title::after{
  display: none;
}
.wc-block-cart__empty-cart__title.with-empty-cart-icon::before{
  color: var(--fnc-border) !important;
  height: 3.2em !important;
  margin: 0 auto 0.6em !important;
}
.wp-block-woocommerce-empty-cart-block p{
  font-size: 13.5px;
  color: var(--fnc-muted);
  max-width: 420px;
  margin: 0 auto 22px;
}
.wc-block-cart__empty-cart__button{
  margin: 0 auto 30px;
  display: inline-block;
}
.wc-block-cart__empty-cart__button .wp-block-button__link{
  background-color: var(--fnc-primary) !important;
  border-color: var(--fnc-primary) !important;
  color: #fff !important;
  padding: 13px 28px !important;
  font-family: var(--fnc-font-body);
  font-weight: 600;
  font-size: 14px;
  border-radius: 4px;
}
.wc-block-cart__empty-cart__button .wp-block-button__link:hover{
  background-color: var(--fnc-primary-dark) !important;
  border-color: var(--fnc-primary-dark) !important;
}
.wp-block-woocommerce-empty-cart-block hr.wp-block-separator{
  border-color: var(--fnc-border);
  max-width: 200px;
  margin: 10px auto 30px;
}
.wp-block-woocommerce-empty-cart-block h2:not(.wc-block-cart__empty-cart__title){
  font-size: 20px;
}

/* ------------------------------------------------------------
   9. RESPONSYWNOŚĆ (mobile)
   ------------------------------------------------------------ */
@media (max-width: 600px){
  .fn-cart-upsell__grid{
    grid-template-columns: 1fr;
  }
  .wc-block-cart-item__image img{
    width: 64px;
    height: 64px;
  }
  .wc-block-cart-item__image{
    padding: 14px 0 14px 14px !important;
  }
  .wc-block-cart-item__product{
    padding: 14px 12px !important;
  }
  .wc-block-cart-item__total{
    padding: 14px !important;
  }
  .wc-block-cart__sidebar{
    padding: 20px 18px;
  }
  .wd-shipping-progress-bar,
  .fn-cart-upsell{
    padding: 16px;
  }
}

/* ============================================================
   KONIEC fn-design-cart.css
   ============================================================ */
