/*
Theme Name: Astra Child
Theme URI: https://wpastra.com/
Description: Child theme dla Astra - bezpieczne miejsce na własne modyfikacje
Author: Twoja Nazwa
Author URI: https://twoja-strona.pl
Template: astra
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: astra-child
*/

/* ========================================
   WŁASNE MODYFIKACJE CSS
   ========================================

   Tutaj dodawaj własne style CSS.
   Wszystkie modyfikacje tutaj są bezpieczne
   i nie zostaną nadpisane przy aktualizacji Astra.

   Przykład:
   .site-header {
       background-color: #ffffff;
   }

*/

/* Miejsce na własne style CSS */

/* ========================================
   OPTYMALIZACJA ZDJĘĆ PRODUKTÓW
   ======================================== */

/**
 * Wyłączenie powiększania zdjęć produktów na stronie pojedynczego produktu
 * 
 * Zdjęcia zachowają swój oryginalny rozmiar i nie będą powiększane.
 * Jeśli zdjęcie jest za duże, zostanie pomniejszone do max 100% szerokości kontenera.
 */

/* Zdjęcie główne produktu - zachowanie oryginalnego rozmiaru */
.woocommerce div.product div.images img,
.woocommerce div.product div.images .woocommerce-product-gallery__image img {
  max-width: 100% !important;
  width: auto !important;
  height: auto !important;
  object-fit: contain !important;
}

/* Galeria produktu - zachowanie oryginalnego rozmiaru */
.woocommerce div.product div.images .flex-control-thumbs img {
  max-width: 100% !important;
  width: auto !important;
  height: auto !important;
  object-fit: cover !important;
}

/* Zapewnienie że kontener nie wymusza rozmiaru */
.woocommerce div.product div.images .woocommerce-product-gallery__wrapper {
  max-width: 100% !important;
}

/* Responsywność - na małych ekranach */
@media (max-width: 768px) {
  .woocommerce div.product div.images img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }
}

/* ========================================
   UJEDNOLICENIE PRODUKTÓW NA LIŚCIE
   ======================================== */

/**
 * Ujednolicenie wysokości i szerokości produktów na stronie listy produktów
 * 
 * Wszystkie produkty będą miały jednakową wysokość i szerokość.
 * Zdjęcia będą miały jednolity rozmiar 800x800px (kwadrat).
 */

/* Kontener produktu - jednakowa wysokość */
.woocommerce ul.products li.product,
.woocommerce-page ul.products li.product {
  display: flex !important;
  flex-direction: column !important;
  height: 100% !important;
  min-height: 450px !important;
}

/* Wewnętrzny kontener produktu */
.woocommerce ul.products li.product .astra-shop-thumbnail-wrap,
.woocommerce-page ul.products li.product .astra-shop-thumbnail-wrap {
  position: relative !important;
  width: 100% !important;
  padding-bottom: 100% !important; /* Kwadrat 1:1 */
  overflow: hidden !important;
  background-color: #f5f5f5 !important;
  margin-bottom: 15px !important;
}

/* Zdjęcie produktu - skalowanie aby wyświetlało się w całości */
.woocommerce ul.products li.product .astra-shop-thumbnail-wrap img,
.woocommerce-page ul.products li.product .astra-shop-thumbnail-wrap img {
  position: absolute !important;
  top: 50% !important;
  left: 50% !important;
  transform: translate(-50%, -50%) !important;
  max-width: 100% !important;
  max-height: 100% !important;
  width: auto !important;
  height: auto !important;
  object-fit: contain !important;
  object-position: center !important;
}

/* Link do produktu - wypełnienie kontenera */
.woocommerce ul.products li.product .astra-shop-thumbnail-wrap a,
.woocommerce-page ul.products li.product .astra-shop-thumbnail-wrap a {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  display: block !important;
}

/* Tytuł produktu - jednakowa wysokość */
.woocommerce ul.products li.product .woocommerce-loop-product__title,
.woocommerce-page ul.products li.product .woocommerce-loop-product__title {
  min-height: 48px !important;
  display: -webkit-box !important;
  -webkit-line-clamp: 2 !important;
  -webkit-box-orient: vertical !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  margin-bottom: 10px !important;
}

/* Cena produktu */
.woocommerce ul.products li.product .price,
.woocommerce-page ul.products li.product .price {
  margin-bottom: 10px !important;
  min-height: 30px !important;
}

/* Przycisk "Dodaj do koszyka" */
.woocommerce ul.products li.product .button,
.woocommerce-page ul.products li.product .button {
  margin-top: auto !important;
  width: 100% !important;
}

/* Kontener z treścią produktu (tytuł, cena, przycisk) */
.woocommerce ul.products li.product .astra-shop-summary-wrap,
.woocommerce-page ul.products li.product .astra-shop-summary-wrap {
  display: flex !important;
  flex-direction: column !important;
  flex-grow: 1 !important;
  padding: 10px !important;
}

/* Responsywność - tablet */
@media (max-width: 992px) {
  .woocommerce ul.products li.product,
  .woocommerce-page ul.products li.product {
    min-height: 400px !important;
  }
}

/* Responsywność - mobile */
@media (max-width: 768px) {
  .woocommerce ul.products li.product,
  .woocommerce-page ul.products li.product {
    min-height: 350px !important;
  }

  .woocommerce ul.products li.product .woocommerce-loop-product__title,
  .woocommerce-page ul.products li.product .woocommerce-loop-product__title {
    min-height: 40px !important;
  }
}

/* Alternatywne selektory dla różnych motywów WooCommerce */
.woocommerce .products .product,
.woocommerce-page .products .product {
  display: flex !important;
  flex-direction: column !important;
  height: 100% !important;
}

/* Zdjęcie produktu - alternatywne selektory */
.woocommerce .products .product img,
.woocommerce-page .products .product img {
  max-width: 100% !important;
  max-height: 100% !important;
  width: auto !important;
  height: auto !important;
  object-fit: contain !important;
}

/* ========================================
   STRONA KONTAKTU
   ======================================== */

/* Wrapper główny */
.contact-page-wrapper {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px;
}

/* Nagłówek */
.contact-header {
  text-align: center;
  margin-bottom: 50px;
}

.contact-header h1 {
  font-size: 36px;
  margin-bottom: 15px;
  color: #333;
}

.contact-header p {
  font-size: 18px;
  color: #666;
}

/* Kontener główny - 2 kolumny */
.contact-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  margin-bottom: 50px;
}

/* Lewa kolumna - Dane kontaktowe */
.contact-info {
  background: #f9f9f9;
  padding: 30px;
  border-radius: 8px;
}

.contact-info h2 {
  font-size: 24px;
  margin-bottom: 25px;
  color: #333;
  /* border-bottom: 2px solid #007bff; */
  padding-bottom: 10px;
}

.contact-item {
  margin-bottom: 25px;
}

.contact-item h3 {
  font-size: 18px;
  margin-bottom: 10px;
  color: var(--ast-global-color-0);
}

.contact-item p {
  font-size: 16px;
  line-height: 1.6;
  /* color: #555; */
  margin: 0;
}

.contact-item a {
  color: var(--ast-global-color-0);
  text-decoration: none;
  transition: color 0.3s;
}

.contact-item a:hover {
  color: var(--ast-global-color-0);
  text-decoration: underline;
}

/* Prawa kolumna - Formularz */
.contact-form {
  background: #fff;
  padding: 30px;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.contact-form h2 {
  font-size: 24px;
  margin-bottom: 15px;
  color: #333;
}

.contact-form p {
  font-size: 16px;
  color: #666;
  margin-bottom: 25px;
}

/* Mapa Google */
.contact-map {
  margin-top: 50px;
}

.contact-map h2 {
  font-size: 24px;
  margin-bottom: 20px;
  color: #333;
  text-align: center;
}

.contact-map iframe {
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Responsywność - Tablet */
@media (max-width: 992px) {
  .contact-container {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .contact-header h1 {
    font-size: 30px;
  }
}

/* Responsywność - Mobile */
@media (max-width: 768px) {
  .contact-page-wrapper {
    padding: 20px 15px;
  }

  .contact-header h1 {
    font-size: 26px;
  }

  .contact-header p {
    font-size: 16px;
  }

  .contact-info,
  .contact-form {
    padding: 20px;
  }

  .contact-map iframe {
    height: 300px;
  }
}

/* Style dla formularza Forminator */
.forminator-ui .forminator-button {
  /* background-color: #007bff !important; */
  /* border-color: #007bff !important; */
  padding: 12px 30px !important;
  font-size: 16px !important;
  border-radius: 4px !important;
  transition: all 0.3s !important;
}

.forminator-ui .forminator-button:hover {
  /* background-color: #0056b3 !important; */
  /* border-color: #0056b3 !important; */
}

.forminator-ui .forminator-field {
  margin-bottom: 20px !important;
}

.forminator-ui .forminator-input,
.forminator-ui .forminator-textarea {
  border: 1px solid #ddd !important;
  border-radius: 4px !important;
  padding: 10px 15px !important;
  font-size: 15px !important;
}

.forminator-ui .forminator-input:focus,
.forminator-ui .forminator-textarea:focus {
  /* border-color: #007bff !important; */
  outline: none !important;
  box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1) !important;
}

/**
 * Home - accordian
 * */
#seo-opis-silver-stone {
  margin-top: 32px;
  padding: 20px;
  border: 1px solid #e5e5e5;
  border-radius: 10px;
  background: #fff;
	background-color: white;
    padding: 2rem 0;
}
#seo-opis-silver-stone h2 {
  margin-bottom: 12px;
}
#seo-opis-silver-stone details {
  border-top: 1px solid #eee;
  padding: 10px 0;
}
#seo-opis-silver-stone details:first-of-type {
  border-top: 0;
}
#seo-opis-silver-stone summary {
  cursor: pointer;
  list-style: none;
}
#seo-opis-silver-stone summary::-webkit-details-marker {
  display: none;
}
#seo-opis-silver-stone summary::after {
  content: "+";
  float: right;
  font-weight: 700;
}
#seo-opis-silver-stone details[open] summary::after {
  content: "−";
}

/* ========================================
   WOO MOBILE: SIDEBAR NAD LISTĄ PRODUKTÓW
   ======================================== */
@media (max-width: 768px) {
  /* Archiwa Woo: /produkty/ + kategorie/tagi produktów */
  .woocommerce.archive .ast-container,
  .woocommerce-page.archive .ast-container,
  .post-type-archive-product .ast-container,
  .tax-product_cat .ast-container,
  .tax-product_tag .ast-container {
    display: flex !important;
    flex-direction: column !important;
  }

  /* Sidebar na górę */
  .woocommerce.archive .ast-container #secondary,
  .woocommerce-page.archive .ast-container #secondary,
  .post-type-archive-product .ast-container #secondary,
  .tax-product_cat .ast-container #secondary,
  .tax-product_tag .ast-container #secondary {
    order: 1 !important;
    width: 100% !important;
    margin-bottom: 20px !important;
  }

  /* Lista produktów pod sidebar */
  .woocommerce.archive .ast-container #primary,
  .woocommerce-page.archive .ast-container #primary,
  .post-type-archive-product .ast-container #primary,
  .tax-product_cat .ast-container #primary,
  .tax-product_tag .ast-container #primary {
    order: 2 !important;
    width: 100% !important;
  }
}
/* ========================================
   MOBILE: ukryj widget Woo "Product Best Sellers"
   na wszystkich stronach z sidebar
   ======================================== */
@media (max-width: 768px) {
  /* Główny selektor po klasie bloku Woo */
  #secondary .wp-block-woocommerce-product-best-sellers,
  .secondary .wp-block-woocommerce-product-best-sellers {
    display: none !important;
  }

  /* Backup: gdy blok siedzi we wrapperze widgetu Astra */
  #secondary .wp-block-woocommerce-product-best-sellers,
  .secondary .wp-block-woocommerce-product-best-sellers,
  #secondary .wp-block-product-best-sellers,
  .secondary .wp-block-product-best-sellers {
    display: none !important;
  }

  /* Backup dla klasy starszego wrappera Woo */
  #secondary .wp-block-product-best-sellers,
  .secondary .wp-block-product-best-sellers {
    display: none !important;
  }
}

