/* Custom Product Page Styles */

/* 3-Column Product Layout with sticky right column */
.product.js-product-container {
  margin-bottom: 40px;
  max-width: 100%;
  /* IMPORTANT: Must NOT have overflow hidden or sticky won't work */
  overflow: visible !important;
}

/* Smaller product gallery images - much more compact */
.product__left .product-cover img,
.product__left .product-images img,
#product-images img,
.product__left picture img {
  max-height: 300px !important;
  height: auto !important;
  width: auto !important;
  object-fit: contain !important;
  margin: 0 auto !important;
  display: block !important;
}

.product__left .product-cover,
.product__left .images-container,
.product__left #product-images,
.product__left .product-images {
  max-height: 300px !important;
  min-height: auto !important;
  padding: 0 !important;
}

.product__left #product-images > div,
.product__left .product-images > div {
  max-height: 300px !important;
  padding: 0 !important;
  margin: 0 !important;
}

.product__left picture {
  display: block !important;
  max-height: 300px !important;
  padding: 0 !important;
  margin: 0 !important;
}

/* Prevent columns from stretching */
.product__left,
.product__middle,
.product__right {
  align-self: flex-start;
}

/* Sticky right column */
.product__right-sticky {
  position: sticky;
  top: 20px;
  /* Make right column more compact */
  padding: 0;
}

/* Product Attributes - Simple list like lazienkaplus */
.product__attributes {
  font-size: 14px;
  line-height: 1.5;
  max-height: none;
}

.attr-row {
  display: flex;
  padding: 6px 0;
  border-bottom: 1px solid #f0f0f0;
}

.attr-row:last-child {
  border-bottom: none;
}

.attr-row__label {
  font-weight: 600;
  color: #333;
  min-width: 120px;
  flex-shrink: 0;
}

.attr-row__value {
  color: #666;
  flex: 1;
}

.attr-row__value a {
  color: #0066cc;
  text-decoration: none;
}

.attr-row__value a:hover {
  text-decoration: underline;
}

.attr-row__value img {
  vertical-align: middle;
}

/* Product Flags in right column */
.product__right .product-flags {
  margin-bottom: 15px;
}

.product__right .product-flags .badge {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

/* Price section in right column */
.product__right .product__prices {
  margin-bottom: 20px;
}

.product__right .product__current-price {
  font-size: 28px;
  font-weight: 700;
  color: #000;
}

.product__right .product__price-regular {
  font-size: 14px;
  text-decoration: line-through;
  color: #999;
}

/* Shipping Information */
.product__shipping-info {
  background: #f0f8ff;
  border: 2px solid #4a90e2;
  border-radius: 6px;
  padding: 12px 15px;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 15px;
}

.shipping-info__free {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
}

.shipping-info__free-text {
  font-size: 16px;
  color: #2e7d32;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.shipping-info__free i {
  color: #2e7d32;
  font-size: 24px;
}

.shipping-info__standard {
  display: flex;
  align-items: center;
  gap: 10px;
}

.shipping-info__standard i {
  color: #4a90e2;
  font-size: 24px;
}

.shipping-info__standard span {
  font-size: 14px;
  color: #333;
}

/* Additional info in right column */
.availability-info,
.shipping-cost-info,
.phone-order-info,
.installment-info {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  padding: 8px 0;
}

.availability-info i,
.shipping-cost-info i,
.phone-order-info i,
.installment-info i {
  font-size: 18px;
}

.phone-order-info a {
  color: #0066cc;
  text-decoration: none;
}

.phone-order-info a:hover {
  text-decoration: underline;
}

/* Product Details Table - Similar to lazienkaplus.pl */
.product__details-table,
.product__features-table {
  width: 100%;
  margin: 0;
  border-collapse: collapse;
  font-size: 14px;
}

.product__details-table tbody tr,
.product__features-table tbody tr {
  border-bottom: 1px solid #e0e0e0;
}

.product__details-table tbody tr:last-child,
.product__features-table tbody tr:last-child {
  border-bottom: none;
}

.detail-row__label {
  padding: 12px 15px;
  font-weight: 600;
  color: #333;
  width: 40%;
  vertical-align: top;
  background-color: #f8f9fa;
}

.detail-row__value {
  padding: 12px 15px;
  color: #666;
  vertical-align: top;
  background-color: #ffffff;
}

.detail-row__value strong {
  color: #000;
  font-weight: 700;
}

.detail-row__value .text-muted {
  color: #999;
  font-style: italic;
}

.detail-row__value .text-success {
  color: #2e7d32;
  font-weight: 600;
}

.detail-row__value .text-danger {
  color: #d32f2f;
  font-weight: 600;
}

.detail__manufacturer-logo {
  max-width: 120px;
  height: auto;
  vertical-align: middle;
}

/* Table striped effect */
.table-striped tbody tr:nth-of-type(odd) .detail-row__label {
  background-color: #f0f0f0;
}

.table-striped tbody tr:nth-of-type(odd) .detail-row__value {
  background-color: #fafafa;
}

/* Responsive adjustments */
@media (max-width: 991px) {
  .product__right-sticky {
    position: static;
    max-height: none;
  }
  
  .product__middle,
  .product__right {
    order: 2;
  }
  
  .product__left {
    order: 1;
  }

  .detail-row__label,
  .detail-row__value {
    display: block;
    width: 100%;
  }

  .detail-row__label {
    padding-bottom: 5px;
    border-bottom: none;
  }

  .detail-row__value {
    padding-top: 5px;
    padding-bottom: 12px;
  }

  .attr-row {
    flex-direction: column;
  }

  .attr-row__label {
    min-width: auto;
    margin-bottom: 4px;
  }
}

@media (max-width: 576px) {
  .product__right .product__current-price {
    font-size: 24px;
  }
  
  .shipping-info__free-text {
    font-size: 14px;
  }

  .detail-row__label,
  .detail-row__value {
    padding: 10px;
  }
}

/* Move search input into header top bar */
.header-top #search_widget {
  margin-bottom: 0;
  min-width: 16rem;
  position: relative;
  z-index: 1005;
}

.header-top #search_widget form {
  position: relative;
  z-index: 1006;
}

.header-top #search_widget input.js-search-input {
  background: #f1f1f1;
  border: none;
  border-radius: 999px;
  height: 2.25rem;
  padding: 0.4rem 2.5rem 0.4rem 2.25rem;
}

.header-top #search_widget input.js-search-input:focus {
  background: #ffffff;
  outline: 0;
}

.header-top #search_widget .search,
.header-top #search_widget .clear {
  color: #666;
  top: 50%;
  transform: translateY(-50%);
}

.header-top #search_widget .search-widgets__dropdown {
  z-index: 1010;
}

/* ============================================
   HEADER RESTRUCTURE - Logo w top bar, menu na całą szerokość
   ============================================ */

/* Top bar z logo */
.header-top__logo {
  padding: 0.5rem 0;
}

.header-top__logo .navbar-brand {
  max-width: 160px;
  margin: 0;
}

.header-top__logo .logo {
  max-height: 50px;
  width: auto;
}

/* Wyszukiwarka w top bar */
.header-top__search {
  padding: 0.5rem 0;
}

.header-top__search #search_widget {
  width: 100%;
  max-width: 400px;
}

.header-top__search .search-widgets form {
  width: 100%;
}

/* Prawa strona top bar - kontakt + język + login + koszyk */
.header-top__right {
  gap: 1rem;
}

.header-top__right #contact-link,
.header-top__right .user-info,
.header-top__right #_desktop_cart,
.header-top__right .language-selector-wrapper,
.header-top__right .currency-selector {
  display: flex;
  align-items: center;
}

/* Header bottom - menu na całą szerokość */
.header-bottom {
  background-color: #fff;
  border-top: 1px solid #e9ecef;
  border-bottom: 1px solid #e9ecef;
}

/* Wyrównaj gutter z header-top */
.header-bottom .row {
  --bs-gutter-x: 1.5rem;
}

.header-bottom__container {
  /* Usuń nadpisywanie width - container-md ma już odpowiednie wartości */
}

.header-bottom__row {
  min-height: 50px;
}

/* Menu na całą szerokość - padding zgodny z container-md */
.main-menu.col-12 {
  width: 100%;
  flex: 0 0 100%;
  max-width: 100%;
}

.main-menu .main-menu__tree {
  justify-content: flex-start;
  width: 100%;
  padding: 0;
  /* Usunięto negatywne marginesy - menu wyrównane z container-md */
  margin-left: 0;
  margin-right: 0;
}

/* Usunięto dodatkowy padding - nie jest potrzebny */
.main-menu__tree > li:first-child {
  padding-left: 0;
}

.main-menu__tree > li:last-child {
  padding-right: 0;
}

.main-menu__tree > li > a {
  padding: 1rem 1.25rem;
  font-weight: 500;
  text-transform: uppercase;
  font-size: 0.875rem;
}

/* Mobile adjustments */
@media (max-width: 767px) {
  .header-top__logo {
    display: none !important;
  }
  
  .header-top__search {
    display: none !important;
  }
  
  /* Mobile menu button z ps_mainmenu - tylko jeden hamburger */
  .main-menu .header-block.d-xl-none {
    display: flex !important;
  }
}
