/* =========================
   GLOBALNE ZWIĘKSZENIE CZCIONEK
   14px → 16px, 12px → 14px
   ========================= */
html {
  font-size: 16px !important;
}

body {
  font-size: 1rem !important;
  /* 16px */
}

/* Elementy które miały 14px - teraz 16px */
.btn,
.form-control,
.form-select,
input,
select,
textarea,
.product-miniature,
.product-miniature__title,
.product-miniature__price,
.cart-summary,
.cart-item,
.checkout-step,
label,
p,
li,
td,
th {
  font-size: 1rem !important;
  /* 16px */
}

/* Elementy które miały 12px - teraz 14px */
small,
.small,
.text-muted,
.help-block,
.form-text,
.breadcrumb,
.pagination,
.badge,
.cart-summary-line,
figcaption {
  font-size: 0.875rem !important;
  /* 14px */
}

/* Tło i tekst bazowy stopy */
#footer {
  background-color: var(--dz-footer-background-color);
  color: var(--dz-footer-text-color);
}

/* Jeśli theme używa .footer__main na tło – wyrównujemy */
#footer .footer__main {
  background: var(--dz-footer-background-color);
}

/* Nagłówki i linki */
#footer h4,
#footer h5,
#footer h6 {
  color: var(--dz-footer-heading-color);
}

#footer a {
  color: var(--dz-footer-link-color);
  text-decoration: none;
}

#footer a:hover,
#footer a:focus {
  color: var(--dz-footer-link-hover-color);
}

/* Ikony i linie */
#footer .material-icons,
#footer i {
  color: var(--dz-footer-icon-color);
}

/* Linki w stopce */
#footer a,
#footer p,
#footer .footer__block a {
  color: var(--dz-footer-link-color) !important;
}

#footer a:hover,
#footer .footer__block a:hover {
  color: var(--dz-footer-link-hover-color) !important;
}

/* Ikony w stopce */
#footer .material-icons,
#footer i {
  color: var(--dz-footer-icon-color) !important;
}

#footer hr,
#footer .divider {
  border-color: var(--dz-footer-border-color);
}

/* Podniesienie specyficzności – mobile i ogólnie */
#footer,
#footer .footer__main,
#footer .footer__block,
#footer .footer__block__title,
#footer .footer__block_content {
  color: var(--dz-footer-text-color) !important;
}

#footer .footer__block__title {
  color: var(--dz-footer-heading-color) !important;
}

#footer .footer__block__toggle,
#footer .footer__block__toggle .footer__block__title,
#footer .footer__block__toggle i {
  color: var(--dz-footer-heading-color) !important;
}

#footer .footer__block a {
  color: var(--dz-footer-link-color) !important;
}

#footer .footer__block a:hover {
  color: var(--dz-footer-link-hover-color) !important;
}

#footer .material-icons,
#footer i {
  color: var(--dz-footer-icon-color) !important;
}

/* Blok „Informacja o sklepie” (kontakt) */
#footer #contact-infos,
#footer #contact-infos a,
#footer #contact-infos i {
  color: var(--dz-footer-text-color) !important;
}

#footer #contact-infos .material-icons {
  color: var(--dz-footer-icon-color) !important;
}

#footer #contact-infos a:hover {
  color: var(--dz-footer-link-hover-color) !important;
}

/* Mikro layout bloku kontaktowego */
#footer .contact__infos div {
  margin-bottom: 0.25rem;
  font-weight: 400;
}

#footer .contact__phone,
#footer .contact__email {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

#footer .contact__phone i,
#footer .contact__email i {
  font-size: 1.2rem;
  line-height: 1;
}

/* Dodatkowy „młotek” na bardzo wąskich ekranach (gdy theme coś nadpisuje) */
@media (max-width: 768px) {

  #footer,
  #footer .footer__main,
  #footer .footer__block,
  #footer .footer__block_content {
    color: var(--dz-footer-text-color) !important;
  }
}

/* ===============================
   FOOTER – poprawka dla mobile (<768px)
   =============================== */
@media (max-width: 767px) {

  #footer .footer__block__title,
  #footer p.footer__block__title,
  #footer span.footer__block__title {
    color: var(--dz-footer-heading-color) !important;
  }

  #footer .footer__block_content,
  #footer .footer__block {
    color: var(--dz-footer-text-color) !important;
  }

  #footer a,
  #footer .footer__block a {
    color: var(--dz-footer-link-color) !important;
  }

  #footer a:hover,
  #footer .footer__block a:hover {
    color: var(--dz-footer-link-hover-color) !important;
  }

  #footer .material-icons,
  #footer i {
    color: var(--dz-footer-icon-color) !important;
  }
}


/* =========================
   HEADER layout (full width)
   ========================= */

.header-top__left:empty {
  display: none !important;
}

.header-bottom>.container-md {
  max-width: 100% !important;
  width: 100% !important;
  padding-left: 1rem !important;
  padding-right: 1rem !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

.header-bottom .logo {
  margin-left: 0.5rem !important;
  margin-right: 0.5rem !important;
}

/* CUSTOM TEXT – pełna szerokość + marginesy jak w produktach */
#custom-text .container {
  max-width: 100%;
  width: 100%;
  padding-left: 1rem;
  padding-right: 1rem;
  margin-left: auto;
  margin-right: auto;
}

#custom-text .rich-text {
  padding-top: 1rem;
  padding-bottom: 1rem;
}

/* Kafle produktów na home */
.page-home .featured-products .container,
.page-home .featured-products .row,
.page-home .featured-products .products {
  max-width: 100%;
  width: 100%;
  padding-left: 1rem;
  padding-right: 1rem;
  margin-left: auto;
  margin-right: auto;
}

.page-home .product-miniature {
  padding: 0.5rem;
}

/* Opcjonalnie 5 kolumn na dużych ekranach */
@media (min-width: 1400px) {
  .page-home .products .col-lg-3 {
    flex: 0 0 20%;
    max-width: 20%;
  }
}

/* Produkt w jednej kolumnie na wąskich ekranach */
@media (max-width: 787.98px) {
  .products .product-miniature {
    flex: 0 0 100% !important;
    max-width: 100% !important;
  }
}

/* Modal podglądu produktu - większe zdjęcia */
.js-product-images-modal .modal-dialog {
  max-width: min(100vw - 2rem, 1100px);
  margin: 1rem auto;
}

.js-product-images-modal .modal-content {
  border: 0;
  border-radius: 12px;
}

.js-product-images-modal .modal-body {
  padding: 1.5rem 1.5rem 0;
}

.js-product-images-modal .carousel-inner {
  margin: 0 auto;
}

.js-product-images-modal .carousel-item {
  display: flex;
  justify-content: center;
}

.js-product-images-modal .carousel-item img {
  width: 100%;
  max-width: 1000px;
  max-height: calc(100vh - 12rem);
  object-fit: contain;
}

.js-product-images-modal .thumbnails__container {
  padding: 1.5rem 1.5rem 0;
}

/* Modal scroll fix */
.modal-dialog-scrollable .modal-content {
  max-height: 100%;
  overflow: hidden;
}

/* Carousel controls adjustments */
.carousel .carousel-control-next,
.carousel .carousel-control-prev {
  background: #dddddd;
  border-radius: var(--slider-control-radius);
  height: var(--slider-control-height);
  top: 50%;
  transform: translateY(-50%);
}

/* =========================
   MAINPAGE 
   ========================= */
.product-miniature__title {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
  width: 100%;
  color: #000000cc;
}

.product-miniature .product-miniature__price {
  font-weight: lighter;
}

/* Product Variants - Sizes */
.radio-variants {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  list-style: none;
  padding: 0;
  margin-top: 0.5rem;
}

.radio-variant {
  margin: 0;
}

.radio-variant label {
  cursor: pointer;
  position: relative;
  margin: 0;
}

.radio-variant input.input-radio {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.radio-variant .radio-label {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 0.5rem;
  border: 1px solid #e5e5e5;
  background-color: #fff;
  color: #333;
  font-weight: 400;
  transition: all 0.2s ease;
  user-select: none;
}

.radio-variant input.input-radio:checked+.radio-label {
  border: 2px solid #000;
  font-weight: 700;
  color: #000;
}

.radio-variant input.input-radio:hover+.radio-label {
  border-color: #999;
}

/* Unavailable / Out of stock styling */
.radio-variant.unavailable .radio-label {
  color: #ccc;
  border-color: #f0f0f0;
  cursor: not-allowed;
  background: linear-gradient(to top left, transparent calc(50% - 1px), #000 calc(50% - 1px), #000 calc(50% + 1px), transparent calc(50% + 1px));
}

.radio-variant.unavailable input.input-radio:checked+.radio-label {
  border-color: #ccc;
}

/* =========================
   SLIDER - CLS Optimization
   ========================= */
#home-slider {
  height: 500px;
  /* Fixed height to prevent CLS */
  overflow: hidden;
}

#home-slider .carousel-item {
  height: 100%;
}

#home-slider .carousel-item img {
  height: 100%;
  width: 100%;
  object-fit: cover;
  /* Ensure image covers the area without distortion */
}

@media (max-width: 767px) {
  #home-slider {
    height: 300px;
    /* Smaller height for mobile */
  }
}

/* =========================
   MODAL FIX - Z-INDEX
   ========================= */
.modal-backdrop {
  z-index: 8000 !important;
}

.modal {
  z-index: 9000 !important;
}

/* =========================
   BLOCKCART MODAL - Fixes
   ========================= */
/* Desktop: center the checkout button */
.blockcart-modal .cart-footer-actions {
  justify-content: center !important;
}

/* Mobile: auto height, no fixed modal height */
@media (max-width: 767px) {

  #blockcart-modal.modal-fullscreen-sm-down .modal-body,
  .blockcart-modal.modal-fullscreen-sm-down .modal-body,
  .blockcart-modal .modal-body {
    flex: 0 1 auto !important;
    overflow: visible !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
  }

  #blockcart-modal.modal-fullscreen-sm-down .modal-content,
  .blockcart-modal.modal-fullscreen-sm-down .modal-content,
  .blockcart-modal .modal-content {
    height: auto !important;
    min-height: auto !important;
    max-height: none !important;
  }

  #blockcart-modal.modal-fullscreen-sm-down .modal-dialog,
  .blockcart-modal.modal-fullscreen-sm-down .modal-dialog,
  .blockcart-modal .modal-dialog {
    height: auto !important;
    min-height: auto !important;
    margin: 1rem !important;
  }

  #blockcart-modal.modal-fullscreen-sm-down,
  .blockcart-modal.modal-fullscreen-sm-down {
    padding: 0 !important;
  }
}