/* ==========================================================================
   HEADER IMPROVEMENTS — swiezopalona.pl
   Plik: header-improvements.css
   Wersja: 2.0 (poprawiona)
   ========================================================================== */


/* ==========================================================================
   1. UTILITY BAR — KONTAKT
   ========================================================================== */

.top-menu-contact {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  margin: 0;
  list-style: none;
  white-space: nowrap;
}

.top-contact-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #555;
  text-decoration: none;
  transition: color 0.2s;
  font-size: 12px;
  text-transform: none;
}

.top-contact-link:hover {
  color: #157F38;
  text-decoration: none;
}

.top-contact-link svg {
  flex-shrink: 0;
  display: block;
}

.top-contact-sep {
  color: #ddd;
  margin: 0 2px;
  user-select: none;
}

.top-contact-hours {
  color: #888;
  font-size: 11px;
}

@media (max-width: 1024px) {
  .top-menu-contact {
    display: none;
  }
}

@media (min-width: 1025px) and (max-width: 1300px) {
  .top-menu-contact {
    font-size: 11px;
    gap: 5px;
  }
  .top-contact-hours {
    display: none;
  }
}


/* ==========================================================================
   2. TRUST SIGNALS BAR
   ========================================================================== */

.trust-bar {
  background: #f9faf9;
  border-top: 1px solid #f0f0f0;
  border-bottom: 1px solid #eaeaea;
  padding: 6px 0;
}

.trust-bar-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 12px;
  color: #555;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Inter", sans-serif;
  white-space: nowrap;
  flex-wrap: wrap;
}

.trust-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #444;
  text-decoration: none;
}

a.trust-item:hover {
  color: #157F38;
}

.trust-count {
  color: #888;
}

.trust-divider {
  color: #ccc;
  margin: 0 4px;
  user-select: none;
}

@media (max-width: 768px) {
  .trust-bar {
    padding: 5px 15px;
    margin-bottom: 5px;
  }
  .trust-bar-inner {
    font-size: 11px;
    gap: 4px;
  }
  .trust-divider {
    margin: 0 2px;
  }
}

@media (max-width: 450px) {
  .trust-bar-inner {
    font-size: 10px;
  }
}


/* ==========================================================================
   3. STICKY NAVBAR — SEARCH + CART
   ========================================================================== */

.sticky-search-li,
.sticky-cart-li {
  display: none !important;
}

@media (min-width: 992px) {
  .main-navbar.is-sticky .sticky-search-li,
  .main-navbar.is-sticky .sticky-cart-li {
    display: flex !important;
    align-items: center;
  }

  .main-navbar ul.level-1-desktop > li.sticky-search-li,
  .main-navbar ul.level-1-desktop > li.sticky-cart-li {
    flex-grow: 0;
    flex-shrink: 0;
  }

  .sticky-search-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    background: none;
    border: 1px solid #495057;
    border-radius: 5px;
    cursor: pointer;
    padding: 0;
    transition: background 0.2s;
    margin: 0 4px;
  }

  .sticky-search-btn svg { display: block; }
  .sticky-search-btn:hover { background: #495057; }
  .sticky-search-btn:hover svg { stroke: #fff; }

  .sticky-cart-link {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px !important;
    margin: 0 4px;
    background: #cf0a2c !important;
    border-radius: 5px;
    color: #fff !important;
    text-decoration: none;
    font-size: 13px !important;
    font-weight: 600;
    white-space: nowrap;
    transition: background 0.2s;
    border-right: none !important;
  }

  .sticky-cart-link:hover {
    background: #e76f51 !important;
    color: #fff !important;
  }

  .sticky-cart-link svg { flex-shrink: 0; display: block; }
  .sticky-cart-amount { font-weight: 700; }
}


/* ==========================================================================
   4. MINI PODGLĄD KOSZYKA (HOVER)
   ========================================================================== */

/* WAŻNE: position relative na KONTENERZE koszyka, nie na .top-basket
   — .top-basket jest wewnątrz #column-cart który ma grid positioning */
#column-cart {
  position: relative;
}

.cart-mini-preview {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  width: 320px;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
  border: 1px solid #e5e7eb;
  z-index: 9999;
  padding: 0;
  overflow: hidden;
  margin-top: 4px;
}

/* Pokaż na hover — cały #column-cart jako trigger (większy hit area) */
@media (min-width: 992px) {
  #column-cart:hover .cart-mini-preview {
    display: block;
  }
}

/* Strzałka */
.cmp-arrow {
  position: absolute;
  top: -6px;
  right: 30px;
  width: 12px;
  height: 12px;
  background: #fff;
  border-left: 1px solid #e5e7eb;
  border-top: 1px solid #e5e7eb;
  transform: rotate(45deg);
  z-index: 1;
}

/* Lista produktów */
.cmp-products {
  padding: 12px 14px 0;
  max-height: 220px;
  overflow-y: auto;
}

.cmp-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid #f3f4f6;
}

.cmp-item:last-child {
  border-bottom: none;
}

.cmp-item img {
  width: 46px !important;
  height: 46px !important;
  border-radius: 6px;
  object-fit: cover !important;
  flex-shrink: 0;
  background: #f5f5f5;
  display: block !important;
}

.cmp-item-info {
  flex: 1;
  min-width: 0;
}

.cmp-item-name {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: #333;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cmp-item-meta {
  display: block;
  font-size: 11px;
  color: #888;
  margin-top: 2px;
}

.cmp-more {
  font-size: 11px;
  color: #888;
  text-align: center;
  padding: 6px 0 2px;
}

/* Fallback summary (gdy brak listy produktów — pierwsze załadowanie) */
.cmp-summary {
  padding: 14px;
  text-align: center;
}

.cmp-summary-text {
  font-size: 13px;
  font-weight: 600;
  color: #333;
}

/* Pasek dostawy */
.cmp-delivery {
  padding: 10px 14px;
  background: #f9fafb;
  border-top: 1px solid #f3f4f6;
}

.cmp-delivery-text {
  font-size: 12px;
  color: #555;
  margin-bottom: 6px;
}

.cmp-delivery-text strong {
  color: #333;
}

.cmp-bar-wrap {
  background: #e5e7eb;
  border-radius: 99px;
  height: 5px;
  overflow: hidden;
}

.cmp-bar-fill {
  background: linear-gradient(90deg, #5a9e4b, #8bc34a);
  height: 100%;
  border-radius: 99px;
  transition: width 0.3s ease;
}

.cmp-delivery-free {
  font-size: 13px;
  color: #2e7d32;
  font-weight: 600;
  padding: 10px 14px;
  background: #f4fbf4;
  border-top: 1px solid #e8f5e9;
}

/* Footer */
.cmp-footer {
  padding: 12px 14px;
  border-top: 1px solid #e5e7eb;
}

.cmp-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  color: #333;
  margin-bottom: 10px;
}

.cmp-total strong {
  font-size: 16px;
  color: #111;
}

.cmp-btn {
  display: block;
  text-align: center;
  padding: 10px;
  background: #2e7d32;
  color: #fff !important;
  border-radius: 8px;
  font-weight: 700;
  font-size: 14px;
  text-decoration: none !important;
  transition: background 0.2s;
}

.cmp-btn:hover {
  background: #1b5e20;
  color: #fff !important;
}

/* Na mobile — NIGDY nie pokazuj */
@media (max-width: 991px) {
  .cart-mini-preview {
    display: none !important;
  }
}