html {
  font-size: 14px;
  overflow-x: hidden;
}

body {
  overflow-x: hidden;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 0;
}

.checkout-delivery-card {
  background: #fff;
  border: 1px solid var(--card-border, #e8e0d6);
  border-radius: 8px;
  box-shadow: 0 6px 18px rgba(26, 26, 30, 0.06);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.checkout-delivery-card:hover,
.checkout-delivery-card.is-selected {
  border-color: var(--accent, #c8a96e);
  box-shadow: 0 10px 26px rgba(26, 26, 30, 0.1);
}

.checkout-delivery-card.is-selected {
  transform: translateY(-1px);
}

.checkout-delivery-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.delivery-option-main {
  display: flex;
  align-items: center;
  gap: 18px;
  min-width: 0;
}

.delivery-radio {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  margin: 0 !important;
}

.delivery-label {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  margin: 0;
  line-height: 1.25;
  cursor: pointer;
}

.delivery-label span:last-child {
  overflow-wrap: anywhere;
}

.delivery-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  font-size: 1.25rem;
}

.delivery-icon-courier {
  color: #2f6df6;
  background: rgba(47, 109, 246, 0.1);
}

.delivery-icon-paczkomat {
  color: #1a1a1e;
  background: #ffcb05;
  border: 1px solid rgba(26, 26, 30, 0.12);
}

.delivery-icon-cod {
  color: #198754;
  background: rgba(25, 135, 84, 0.12);
}

.delivery-icon-pickup {
  color: #0aa2c0;
  background: rgba(10, 162, 192, 0.12);
}

.delivery-price {
  flex: 0 0 auto;
  white-space: nowrap;
}

.paczkomat-selector {
  border-top: 1px solid var(--card-border, #e8e0d6);
  padding-top: 16px;
}

.selected-paczkomat-box {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 10px 14px;
  border: 1px solid rgba(25, 135, 84, 0.18);
  border-radius: 8px;
  background: rgba(25, 135, 84, 0.08);
}

.selected-paczkomat-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 30px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  color: #198754;
  background: #fff;
}

#selectedPaczkomatName {
  overflow-wrap: anywhere;
}

.easypack-widget {
  z-index: 2050 !important;
}

.easypack-widget .modal,
.easypack-widget .modal-dialog,
.easypack-widget .modal-content {
  z-index: 2051 !important;
}

.easypack-widget .modal-content {
  border-radius: 8px !important;
  overflow: hidden;
}

.geowidget-map-container {
  width: 100%;
  height: 520px;
  min-height: 520px;
  margin-top: 16px;
  border: 1px solid var(--card-border, #e8e0d6);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}

.geowidget-map-container inpost-geowidget {
  display: block;
  width: 100%;
  height: 100%;
  min-height: inherit;
}

/* ============================================================
   RESPONSIVE FIXES — MOBILE FIRST
   ============================================================ */

/* ===== SMALL PHONES (<576px) ===== */
@media (max-width: 575.98px) {

  /* --- Navbar --- */
  .navbar-brand img {
    height: 85% !important;
    width: 85% !important;
  }
  .navbar-brand > div:first-child {
    width: 44px !important;
    height: 44px !important;
    padding: 7px !important;
    margin-right: 8px !important;
  }
  .navbar-brand span {
    font-size: 1.15rem !important;
  }

  /* --- Search bar in collapsed navbar --- */
  .search-group {
    margin: 10px 0 !important;
  }

  /* --- Hero section --- */
  .hero-section {
    min-height: 60vh !important;
  }
  .hero-section .display-2 {
    font-size: 2rem !important;
    line-height: 1.15 !important;
  }
  .hero-section .lead {
    font-size: 0.95rem !important;
  }
  .hero-section .btn-lg {
    padding: 12px 28px !important;
    font-size: 0.8rem !important;
  }

  /* --- Carousel controls --- */
  .carousel-control-prev,
  .carousel-control-next {
    width: 12% !important;
    padding-left: 0.5rem !important;
    padding-right: 0.5rem !important;
  }
  .carousel-control-prev-icon,
  .carousel-control-next-icon {
    width: 2rem !important;
    height: 2rem !important;
  }

  /* --- Category circles --- */
  .category-item-circle {
    width: 120px !important;
  }
  .category-item-circle .cat-circle {
    width: 110px !important;
    height: 110px !important;
    margin-bottom: 12px !important;
  }
  .category-item-circle h6 {
    font-size: 0.85rem !important;
  }

  /* --- Section headings --- */
  .display-5 {
    font-size: 1.5rem !important;
  }
  .display-6 {
    font-size: 1.3rem !important;
  }

  /* --- Product slider cards --- */
  .prod-slide {
    min-width: 220px !important;
    width: 220px !important;
  }

  /* --- Slider arrow buttons --- */
  .slider-btn {
    width: 36px !important;
    height: 36px !important;
  }

  /* --- Offcanvas Login/Register --- */
  .offcanvas-login {
    width: 100% !important;
    max-width: 380px !important;
  }

  /* --- Footer --- */
  .footer-bg .col-md-4 {
    text-align: center !important;
  }
  .footer-bg .col-md-4:last-child {
    text-align: center !important;
  }

  /* --- Floating cart button --- */
  .floating-cart-btn {
    width: 56px !important;
    height: 56px !important;
    margin: 12px !important;
  }
  .floating-cart-btn .bi-bag-fill {
    font-size: 1.3rem !important;
  }

  /* --- Product Details --- */
  .product-gallery-img,
  #productGallery .carousel-inner {
    min-height: 300px !important;
    max-height: 380px !important;
  }
  #productGallery .carousel-item img {
    height: 350px !important;
  }

  /* --- Product Details sticky buy bar --- */
  #stickyBar .container {
    flex-direction: column !important;
    gap: 10px !important;
    padding-top: 8px !important;
    padding-bottom: 8px !important;
  }
  #stickyBar .container > div:first-child {
    display: none !important;
  }
  #stickyBar .container > div:last-child {
    width: 100% !important;
    justify-content: center !important;
  }
  #stickyBar .btn-accent {
    font-size: 0.8rem !important;
    padding: 10px 20px !important;
  }

  /* --- Trust badges --- */
  .trust-badge-text {
    font-size: 0.6rem !important;
  }

  /* --- Cart items --- */
  .cart-item-row {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 12px !important;
  }
  .cart-item-row .text-end {
    width: 100% !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
  }

  /* --- Checkout --- */
  .checkout-delivery-option {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 12px !important;
  }
  .delivery-option-main {
    align-items: flex-start !important;
    gap: 14px !important;
  }
  .delivery-price {
    align-self: flex-end;
  }
  .selected-paczkomat-box,
  #openPaczkomatMapBtn {
    width: 100%;
  }
  .geowidget-map-container,
  .geowidget-map-container inpost-geowidget {
    height: 460px;
    min-height: 460px;
  }

  /* --- Checkout Summary total price --- */
  .checkout-total-price {
    font-size: 2rem !important;
  }

  /* --- MyAccount order accordion --- */
  .order-accordion-header {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 6px !important;
  }

  /* --- Privacy / Terms padding --- */
  .legal-content-card {
    padding: 20px !important;
  }

  /* --- Contact header --- */
  .contact-header .display-4 {
    font-size: 1.6rem !important;
  }

  /* --- Cookie banner --- */
  #cookieBanner {
    padding: 12px !important;
  }
  #cookieBanner > div:first-child {
    font-size: 0.75rem !important;
  }
}

/* ===== TABLETS (<768px) ===== */
@media (max-width: 767.98px) {

  /* --- Hero adjustments for tablets --- */
  .hero-section {
    min-height: 55vh !important;
  }

  /* --- Footer center everything --- */
  .footer-bg .row {
    text-align: center;
  }
  .footer-bg .col-md-4 {
    text-align: center !important;
  }

  /* --- Category circles tablet --- */
  .category-item-circle {
    width: 140px !important;
  }
  .category-item-circle .cat-circle {
    width: 130px !important;
    height: 130px !important;
  }

  /* --- Product details buy buttons stack --- */
  .buy-buttons-row {
    flex-direction: column !important;
  }
  .buy-buttons-row .btn {
    width: 100% !important;
    min-width: unset !important;
  }

  /* --- Product gallery height tablet --- */
  #productGallery .carousel-item img {
    height: 420px !important;
  }

  /* --- Shop sidebar mobile toggle --- */
  .shop-filters-card {
    position: static !important;
  }
}

/* ===== MEDIUM SCREENS (768px-991px) ===== */
@media (min-width: 768px) and (max-width: 991.98px) {
  .category-item-circle {
    width: 160px !important;
  }
  .category-item-circle .cat-circle {
    width: 150px !important;
    height: 150px !important;
  }
}

/* ===== Gap categories responsive ===== */
@media (max-width: 575.98px) {
  .categories-container {
    gap: 20px !important;
  }
}
@media (min-width: 576px) and (max-width: 991.98px) {
  .categories-container {
    gap: 30px !important;
  }
}
