/*
Theme Name: Robosef Theme
Theme URI: https://robosef.cz/
Author: Robosef Team
Author URI: https://robosef.cz/
Description: Kompletní WordPress šablona pro e-shop Robošéf s důrazem na SEO, výkon, přehlednost a responzivitu.
Version: 1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: robosef-theme
Tags: custom, seo, woocommerce, responsive
*/

body {
  background-color: #F3F6F4;
  font-family: sans-serif;
  color: #000;
  margin: 0;
  padding: 0;
}

a {
  text-decoration: none;
  color: #000;
}

a:hover {
  color: #555;
  transition: color 0.3s ease-in-out;
}

header, footer {
  width: 100%;
}

img[loading="lazy"],
img[data-lazy-type="image"] {
  max-width: 100%;
  height: auto;
  display: block;
  filter: brightness(1);
  transition: filter 0.3s ease-in-out;
}

img[data-lazy-type="image"]:hover {
  filter: brightness(1.1);
}

/* === PRODUKTOVÉ KARTY === */
.custom-product-card,
li.product {
  position: relative;
  width: 240px;
  min-width: 240px;
  max-width: 240px;
  min-height: 380px;
  padding: 1rem;
  background: #fff;
  margin: 1rem;
  text-align: center;
  border-radius: 1rem;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  transition: all 0.3s ease;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.custom-product-card:hover,
li.product:hover {
  box-shadow: 0 0 0 4px rgba(0,0,0,0.2);
  transform: translateY(-5px);
  z-index: 1;
}

.custom-product-image-wrapper img,
li.product img {
  width: 100%;
  height: auto;
  border-radius: 0.5rem;
  object-fit: contain;
  display: block;
}

.custom-product-title,
li.product h2.woocommerce-loop-product__title {
  font-weight: bold;
  font-size: 1rem;
  margin: 0.5rem 0;
  color: #000;
  display: block;
}

.custom-product-meta,
li.product .price-stock {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
  color: #555;
  margin-top: 0.5rem;
  align-items: center;
}

.custom-product-price,
li.product .price,
li.product .price ins {
  color: #c4a24b;
  font-weight: bold;
}

.availability,
li.product .availability {
  margin-left: auto;
  text-decoration: underline;
  font-weight: normal;
  color: #666;
}

.availability.in-stock {
  color: #555;
}

.availability.on-order {
  color: #ccc;
}

li.product .button {
  margin-top: 1rem;
  background-color: #ece8ef;
  color: #333;
  padding: 0.5rem 1rem;
  border-radius: 0.3rem;
  font-weight: bold;
}

/* === ZAJIŠTĚNÍ PRODUKTŮ V JEDNOM ŘÁDKU === */
.product-list-wrapper {
  display: flex !important;
  flex-wrap: nowrap !important;
  gap: 1rem;
  width: 100%;
}

.product-list-wrapper .products {
  display: flex !important;
  flex-wrap: nowrap !important;
  justify-content: flex-start;
  gap: 1rem;
  width: 100%;
}

.product-list-wrapper .products .product {
  flex: 0 0 auto;
  width: 240px;
}

.product-list-wrapper .products ul {
  display: flex !important;
  flex-wrap: nowrap !important;
  justify-content: flex-start;
  gap: 1rem;
}

.product-carousel {
  display: flex !important;
  overflow-x: auto !important;
  scroll-snap-type: x mandatory;
  padding: 0 2.5rem;
  -webkit-overflow-scrolling: touch;
  gap: 1rem;
  align-items: flex-start;
}

@media (max-width: 768px) {
  .product-list-wrapper {
    overflow-x: scroll;
  }
  .product-list-wrapper .products {
    display: flex;
    flex-wrap: nowrap;
  }
  .product-list-wrapper .products .product {
    width: 80vw;
    flex: 0 0 auto;
  }
}

.woocommerce-breadcrumb a {
  text-decoration: underline !important;
  color: inherit;
}

.woocommerce-breadcrumb {
  margin-left: 40px !important;
}

.carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  height: 25px;
  width: auto;
  z-index: 10;
  cursor: pointer;
}

.left-arrow {
  left: -30px !important;
}

.right-arrow {
  right: -30px !important;
}

.shop-sidebar .filter-header h2 {
  margin: 0 0 10px;
  font-size: 1.5rem;
  color: #333;
}

.shop-sidebar .price_slider_wrapper h3 {
  margin: 0 0 10px;
  font-size: 1.2rem;
  color: #333;
}

.custom-price-slider {
  background-color: #ccc;
  height: 4px;
  border-radius: 2px;
  position: relative;
  margin-bottom: 15px;
}

.price_slider_amount {
  margin-top: 1.5em;
}

.price_slider_amount .price_label {
  margin-bottom: 1em;
}

.ui-slider .ui-slider-handle {
  width: 16px !important;
  height: 16px !important;
  background: #ddd !important;
  border: 2px solid #555 !important;
  border-radius: 50% !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  margin-left: -8px !important;
  cursor: pointer !important;
  z-index: 1000 !important;
}

.price-input {
  background: #f0f0f0;
  color: #000;
  border: 1px solid #ccc;
  padding: 5px;
  width: 60px;
  margin: 5px;
}

.currency {
  font-size: 0.9rem;
  color: #000;
}

.filter-submit {
  border-radius: 8px;
  background-color: #FFD700;
  color: #333333;
  border: none;
  padding: 10px 20px;
  font-size: 1rem;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.filter-submit:hover {
  background-color: #FFC107;
}

.reset-filters {
  border-radius: 8px;
  background-color: #FFD700;
  color: #333333;
  border: none;
  padding: 10px 20px;
  font-size: 1rem;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.3s ease;
  display: inline-block;
  margin-top: 10px;
}

.reset-filters:hover {
  background-color: #FFC107;
}

.filter-options label {
  display: block;
  margin-bottom: 5px;
  color: #333;
}

.filter-options input[type="checkbox"] {
  margin-right: 5px;
}

.woocommerce-ordering {
  margin-top: 10px !important;
  text-align: right;
}

.woocommerce-ordering::before {
  content: "Řazení:" !important;
  font-size: 1rem !important;
  color: #333333 !important;
  display: inline-block !important;
  margin-right: 10px !important;
  vertical-align: middle !important;
}

.woocommerce-ordering .orderby {
  display: inline-block !important;
  border-radius: 8px !important;
  background-color: #FFD700 !important;
  color: #333333 !important;
  border: none !important;
  padding: 10px 20px !important;
  font-size: 1rem !important;
  cursor: pointer !important;
  transition: background-color 0.3s ease !important;
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  appearance: none !important;
  vertical-align: middle !important;
}

.woocommerce-ordering .orderby:hover {
  background-color: #FFC107 !important;
}

.single-product form.cart .quantity {
  display: none !important;
}

.single_add_to_cart_button {
  background-color: #333333 !important;
  border-color: #333333 !important;
}

.single_add_to_cart_button:hover {
  background-color: #555555 !important;
}

.single-product .product_meta a {
  text-decoration: underline !important;
}

.shop-main {
  display: flex;
  flex-wrap: nowrap;
}

.shop-sidebar {
  flex: 0 0 300px;
  padding: 20px;
  box-sizing: border-box;
}

.shop-products {
  flex: 1;
  padding: 20px;
  box-sizing: border-box;
  position: relative;
}

.shop-products::before {
  content: "";
  position: absolute;
  left: -5px;
  top: 50px;
  bottom: 20px;
  border-left: 1px solid #000;
}

@media (max-width: 768px) {
  .shop-main {
    flex-direction: column;
  }
  .shop-sidebar,
  .shop-products {
    width: 100%;
  }
  
  .shop-sidebar {
    order: 1;
  }
  
  .woocommerce-ordering {
    order: 2;
    text-align: left;
    margin: 10px 0;
  }
  
  .shop-products {
    order: 3;
    padding: 10px 20px;
    position: static;
  }
  
  .shop-products::before {
    display: none;
  }
  
  .woocommerce-ordering::after {
    content: "";
    display: block;
    width: 100%;
    border-top: 1px solid #000;
    margin-top: 10px;
    margin-bottom: 10px;
  }
  
  .product-list-wrapper {
    flex-wrap: wrap !important;
    gap: 10px;
  }
  
  .ui-slider .ui-slider-handle {
    z-index: 1000 !important;
  }
}

.wc-block-cart__submit-button {
    background-color: #000 !important;
    color: #fff !important;
    border: none !important;
    border-radius: 8px !important;
    padding: 12px 20px !important;
    text-transform: uppercase !important;
    font-weight: bold !important;
}

.wc-block-cart__submit-button:hover {
    background-color: #333 !important;
}

.wc-block-components-button.wc-block-components-checkout-place-order-button.contained {
    background-color: #000 !important;
    color: #fff !important;
    border: none !important;
    border-radius: 8px !important;
    padding: 12px 20px !important;
    text-transform: uppercase !important;
    font-weight: bold !important;
    cursor: pointer;
}

.wc-block-components-button.wc-block-components-checkout-place-order-button.contained:hover {
    background-color: #333 !important;
}

.add_to_cart_button,
.button.product_type_simple.add_to_cart_button {
    background-color: #000 !important;
    color: #fff !important;
    border: none !important;
    border-radius: 8px !important;
    padding: 12px 20px !important;
    text-transform: uppercase !important;
    font-weight: bold !important;
    cursor: pointer !important;
    transition: background-color 0.3s ease-in-out !important;
}

.add_to_cart_button:hover,
.button.product_type_simple.add_to_cart_button:hover {
    background-color: #333 !important;
}

.product .product_meta .tagged_as {
    display: none;
}

.search-wrapper {
    display: flex;
    align-items: center;
    position: relative;
}

.search-input {
    width: 250px;
    padding: 8px;
    font-size: 16px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.search-button {
    padding: 8px 12px;
    margin-left: 10px;
    background: #000;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

#search-results {
    position: absolute;
    top: 35px;
    left: 0;
    width: 100%;
    background: white;
    border: 1px solid #ccc;
    max-height: 300px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
}

.search-result {
    display: flex;
    align-items: center;
    padding: 8px;
    border-bottom: 1px solid #f1f1f1;
    flex-wrap: nowrap;
}

.search-result-thumbnail {
    margin-right: 10px;
    flex-shrink: 0;
}

.search-result-info {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.search-result-title {
    font-size: 14px;
    color: #777;
    margin-bottom: 5px;
    white-space: nowrap;
}

.search-result-title:hover {
    color: #000;
}

.search-result-price {
    font-weight: bold;
    color: #000;
    white-space: nowrap;
}

.search-result-link {
    text-decoration: none;
    color: inherit;
}

.search-result-link:hover {
    color: #0073e6;
}

.search-result-thumbnail img {
    width: 50px;
    height: auto;
}

/* === HEADER IKONY - LUPA A KOŠÍK === */
.header-icons {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.header-icons img {
  width: 32px;
  height: 32px;
  object-fit: contain;
  display: block;
}

.header-icons .search-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: none;
  background: #000;
  border-radius: 4px;
  cursor: pointer;
}

.header-icons .search-button img {
  width: 20px;
  height: 20px;
}

.header-icons .cart-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  position: relative;
}

.header-icons .cart-icon img {
  width: 24px;
  height: 24px;
}

.header-icons .cart-icon:hover img,
.header-icons .search-button:hover img {
  transform: scale(1.2);
  transition: transform 0.2s ease-in-out;
}

/* --- Přepis stylů dostupnosti tak, aby se nezdědila zlatá barva ceny --- */
.single-product .product p.stock,
.single-product .product .stock,
.woocommerce div.product .availability {
    color: inherit !important;
    font-weight: normal !important;
    font-size: 16px !important;
    margin-top: 0.5rem;
    display: block;
}

/* Skladem - zelená barva */
.single-product .product .availability .in-stock-custom,
.woocommerce div.product .availability .in-stock-custom,
.woocommerce div.product p.stock .in-stock-custom {
    color: #2e7d32 !important; /* zelená */
    font-weight: 600 !important;
    font-size: 16px !important;
}

/* Na objednání - zvýrazněné, ale barva stejná jako ostatní texty */
.woocommerce div.product .availability .on-order-custom {
    color: inherit !important;
    font-weight: 600 !important;
    font-size: 16px !important;
}

/* zobrazení vyhledávacího pole pro malé displeje */
@media (max-width: 440px) {
  .site-header .header-icons {
    display: flex;
    justify-content: space-between; /* rozdělí vyhledávání vlevo a ikony vpravo */
    align-items: center;
    gap: 0.5rem; /* menší mezery mezi ikonami */
    width: 100%;
  }

  .site-header .search-wrapper {
    flex: 0 0 auto;      /* nenechá se roztahovat */
    margin-left: 1rem;   /* stejné odsazení jako menu */
  }

  .site-header .search-wrapper .search-input {
    width: 130px !important; /* pevně natvrdo pro malé displeje */
  }
}

/* odsazení zobrazení textu produktu o kousek */
.single-product .product {
    padding: 0 15px;
}