/* Just Flowers — justflowers.pl — nowy CSS */
@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700&family=Playfair+Display:wght@400;700&family=Montserrat:wght@400;500;600&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --accent: #434343;
  --accent-hover: #602bb7;
  --text: #3a3a3a;
  --bg: #f9f9f9;
  --white: #ffffff;
  --footer-bg: #e8e8e8;
  --border: #e0e0e0;
  --light-gray: #f3f3f4;
}

html { font-size: 93.75%; }
body {
  font-family: 'Nunito', Arial, sans-serif;
  font-weight: 400;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
}

a { color: var(--accent); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--accent-hover); }

h1, h2, h3, h4, h5, h6 {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 400;
  color: var(--text);
  line-height: 1.3;
}
h1 { font-size: 2.4rem; margin-bottom: 0.8rem; }
h2 { font-size: 2rem; margin-bottom: 0.6rem; }
h3 { font-size: 1.6rem; margin-bottom: 0.5rem; }
h4 { font-size: 1.3rem; margin-bottom: 0.4rem; }

img { max-width: 100%; height: auto; }

/* Container */
.ast-container, .site-content .ast-container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}
.main-header-bar {
  padding: 12px 0;
}
.main-header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 20px;
}
.site-branding { flex-shrink: 0; }
.site-branding img, .custom-logo { max-height: 50px; width: auto; }
.site-logo-text {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0.02em;
}
.custom-logo-link { text-decoration: none; }
.custom-logo-link:hover .site-logo-text { color: var(--accent-hover); }

/* Navigation */
.main-header-bar-navigation { display: block; }
.main-navigation { display: block; }
.main-header-menu {
  display: flex;
  list-style: none;
  gap: 0;
  flex-wrap: wrap;
  align-items: center;
}
.main-header-menu li { position: relative; }
.main-header-menu > li > a {
  display: block;
  padding: 10px 16px;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  transition: color 0.2s;
}
.main-header-menu > li > a:hover,
.main-header-menu > li.current-menu-item > a {
  color: var(--accent-hover);
}
/* Submenu */
.main-header-menu .sub-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--white);
  border: 1px solid var(--border);
  min-width: 220px;
  list-style: none;
  z-index: 200;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}
.main-header-menu li:hover > .sub-menu { display: block; }
.main-header-menu .sub-menu li a {
  display: block;
  padding: 8px 16px;
  font-size: 0.9rem;
  color: var(--text);
}
.main-header-menu .sub-menu li a:hover { color: var(--accent-hover); background: var(--light-gray); }

/* Mobile menu */
.menu-toggle, .ast-mobile-menu-buttons { display: none; }
@media (max-width: 680px) {
  .main-header-container { flex-wrap: wrap; }
  .main-header-bar-navigation { width: 100%; }
  .main-header-menu { flex-direction: column; }
  .main-header-menu .sub-menu { position: static; box-shadow: none; border: none; padding-left: 20px; display: block; }
}

/* Content area */
.site-content { padding: 30px 0; }
#primary { width: 100%; }

/* WooCommerce products grid */
.products {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 24px;
  list-style: none;
  padding: 0;
}
.products .product {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
  transition: box-shadow 0.2s;
}
.products .product:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.08); }
.products .product a { display: block; }
.products .product img {
  width: 100%;
  height: 250px;
  object-fit: cover;
}
.products .product .woocommerce-loop-product__title,
.products .product h2 {
  font-family: 'Nunito', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  padding: 12px 16px 4px;
  margin: 0;
}
.products .product .price {
  padding: 0 16px 12px;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--accent);
}
.woocommerce-result-count, .woocommerce-ordering { display: none; }

/* Related products section */
section.related.products { margin-top: 40px; clear: both; grid-column: 1 / -1; display: block; }
section.related.products > h2 { margin-bottom: 20px; }
.related.products > .products {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
@media (max-width: 768px) {
  .related.products > .products { grid-template-columns: 1fr; }
}
.related.products .product {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
}
.related.products .product img {
  width: 100%;
  height: 220px;
  object-fit: cover;
}
/* Product description full also spans both columns */
.product-description-full { grid-column: 1 / -1; }

/* Single product */
.single-product .product[id^="product-"] {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  background: var(--white);
  padding: 30px;
  border-radius: 4px;
}
@media (max-width: 768px) {
  .single-product .product[id^="product-"] { grid-template-columns: 1fr; }
}
/* Related product cards - override single-product grid */
.related.products .product {
  display: block;
}
.woocommerce-product-gallery { border-radius: 4px; overflow: hidden; opacity: 1 !important; }
.woocommerce-product-gallery img { width: 100%; height: auto; }
.product_title { font-size: 2rem; margin-bottom: 16px; }
.price { font-size: 1.4rem; font-weight: 700; color: var(--accent); margin-bottom: 16px; }
.woocommerce-product-details__short-description { margin-bottom: 20px; line-height: 1.7; }
.product_meta { font-size: 0.9rem; color: #888; margin-top: 20px; }
.product_meta a { color: var(--accent); }

/* Category archive */
.woocommerce-products-header__title { margin-bottom: 24px; }
.term-description { margin-bottom: 24px; line-height: 1.7; }

/* Elementor sections (homepage, about) */
.elementor-section { padding: 40px 0; }
.elementor-section-wrap { max-width: 1240px; margin: 0 auto; }
.elementor-container {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 20px;
}
.elementor-column { flex: 1; min-width: 280px; }
.elementor-text-editor { line-height: 1.7; }
.elementor-text-editor p { margin-bottom: 1rem; }
.elementor-heading-title {
  font-family: 'Playfair Display', Georgia, serif;
}
.elementor-widget-image img { border-radius: 4px; }

/* Info pages (regulamin, etc.) */
.entry-content {
  background: var(--white);
  padding: 30px;
  border-radius: 4px;
  line-height: 1.7;
}
.entry-content p { margin-bottom: 1rem; }
.entry-content h2, .entry-content h3 { margin-top: 1.5rem; }
.entry-content ul, .entry-content ol { margin: 1rem 0; padding-left: 2rem; }
.entry-content li { margin-bottom: 0.4rem; }
.entry-content table { width: 100%; border-collapse: collapse; margin: 1rem 0; }
.entry-content td, .entry-content th { padding: 8px 12px; border: 1px solid var(--border); }

/* Hero section (homepage) */
.hero-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
  background: var(--white);
  padding: 60px 40px;
  border-radius: 4px;
  margin-bottom: 40px;
}
.hero-content h1 { font-size: 3rem; margin-bottom: 16px; }
.hero-subtitle { font-size: 1.3rem; color: #666; margin-bottom: 24px; }
.hero-image img { width: 100%; border-radius: 8px; }
@media (max-width: 768px) {
  .hero-section { grid-template-columns: 1fr; padding: 30px 20px; }
  .hero-content h1 { font-size: 2.2rem; }
}

/* Categories section (homepage) */
.categories-section { margin-bottom: 40px; }
.categories-section h2 { text-align: center; margin-bottom: 30px; }
.categories-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.category-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
  text-align: center;
  transition: box-shadow 0.2s;
}
.category-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.08); }
.category-card img { width: 100%; height: 240px; object-fit: cover; }
.category-card h3 { padding: 16px 16px 8px; font-size: 1.2rem; }
.category-card .button { margin: 8px 16px 20px; font-size: 0.85rem; padding: 8px 24px; }
@media (max-width: 768px) {
  .categories-grid { grid-template-columns: 1fr; }
}

/* Page title */
.page-title, .ast-archive-title, .entry-title {
  font-size: 2rem;
  margin-bottom: 24px;
}

/* Footer advanced (widgets) */
.footer-adv {
  background: var(--light-gray);
  padding: 40px 0;
  color: var(--accent);
}
.footer-adv .ast-container {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
}
@media (max-width: 768px) {
  .footer-adv .ast-container { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
  .footer-adv .ast-container { grid-template-columns: 1fr; }
}
.footer-adv .widget { }
.footer-adv .widget-title, .footer-adv h4 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.1rem;
  margin-bottom: 12px;
  color: #000;
}
.footer-adv ul { list-style: none; padding: 0; }
.footer-adv ul li { margin-bottom: 6px; }
.footer-adv ul li a { color: var(--accent); font-size: 0.9rem; }
.footer-adv ul li a:hover { color: var(--accent-hover); }

/* Small footer (copyright) */
.ast-small-footer {
  background: var(--footer-bg);
  padding: 16px 0;
  text-align: center;
  font-size: 0.85rem;
  color: #000;
}
.ast-small-footer a { color: var(--accent); }
.ast-small-footer a:hover { color: var(--accent-hover); }

/* Breadcrumbs */
.woocommerce-breadcrumb {
  font-size: 0.85rem;
  color: #888;
  margin-bottom: 20px;
}
.woocommerce-breadcrumb a { color: var(--accent); }

/* Sale badge */
.onsale {
  background: var(--accent);
  color: var(--white);
  padding: 4px 10px;
  border-radius: 3px;
  font-size: 0.8rem;
  font-weight: 700;
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 10;
}

/* Buttons */
.button, .woocommerce a.button {
  display: inline-block;
  padding: 10px 30px;
  background: var(--accent);
  color: var(--white);
  border: none;
  border-radius: 0;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}
.button:hover { background: #2d2d2d; color: var(--white); }

/* Tabs (product) */
.woocommerce-tabs { margin-top: 40px; }
.woocommerce-tabs ul.tabs {
  display: flex;
  list-style: none;
  border-bottom: 2px solid var(--border);
  gap: 0;
}
.woocommerce-tabs ul.tabs li a {
  display: block;
  padding: 10px 20px;
  font-weight: 600;
  color: #888;
}
.woocommerce-tabs ul.tabs li.active a { color: var(--accent); border-bottom: 2px solid var(--accent); }
.woocommerce-Tabs-panel { padding: 20px 0; line-height: 1.7; }

/* Utility */
.screen-reader-text { clip: rect(1px,1px,1px,1px); position: absolute; height: 1px; width: 1px; overflow: hidden; }
.ast-flex { display: flex; }
.ast-justify-content-flex-end { justify-content: flex-end; }
.ast-flex-grow-1 { flex-grow: 1; }

/* WooCommerce specifics hidden on static */
.cart-container, .ast-site-header-cart, .woocommerce-cart-menu { display: none; }
.add_to_cart_button, .single_add_to_cart_button, .cart { display: none; }
.quantity { display: none; }

/* Social icons in about */
.elementor-social-icons-wrapper {
  display: flex;
  gap: 12px;
}
.elementor-social-icon {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-size: 1.1rem;
  transition: background 0.2s;
}
.elementor-social-icon:hover { background: var(--accent-hover); }

/* Responsive images placeholder */
.product-image-placeholder {
  width: 100%;
  aspect-ratio: 1;
  background: linear-gradient(135deg, #f0e6f6 0%, #e8dae8 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #999;
  font-size: 0.9rem;
}
