/*
 Theme Name:   XStore Child
 Theme URI:    http://8theme.com/
 Description:  XStore Child Theme
 Author:       8theme
 Author URI:   http://8theme.com
 Template:     xstore
 Version:      1.2.0
 Text Domain:  xstore-child
*//* ============================================
   E-MAGAZIN STILOVI — apotekaweb.com
   Figma pixel-perfect v1.0.0
   ============================================ */

/* --- BRANDED "e" in heading --- */
.page-id-208339 h1 .emagazin-brand-e, .single-post.category-e-magazin h1 .emagazin-brand-e {
  position: relative;
  display: inline-block;
  color: #e05a4f !important;
  font-style: italic;
  font-weight: 800;
}
.emagazin-brand-e::before { display: none; }

/* --- LISTING PAGE: Post card styles (scoped to e-magazin page) --- */
.page-id-208339 .elementor-widget-posts .elementor-post {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border-radius: 12px;
  overflow: hidden;
}
.page-id-208339 .elementor-widget-posts .elementor-post:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}
.page-id-208339 .elementor-widget-posts .elementor-post__thumbnail img {
  transition: transform 0.3s ease;
  border-radius: 12px;
}
.page-id-208339 .elementor-widget-posts .elementor-post:hover .elementor-post__thumbnail img {
  transform: scale(1.03);
}
.page-id-208339 .elementor-widget-posts .elementor-post__title a {
  text-decoration: none;
  color: #222;
  transition: color 0.2s ease;
}
.page-id-208339 .elementor-widget-posts .elementor-post__title a:hover {
  color: #e05a4f !important;
}
.page-id-208339 .elementor-widget-posts .elementor-post__excerpt {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* "PROČITAJTE VIŠE" button */
.page-id-208339 .elementor-widget-posts .elementor-post__read-more {
  display: inline-block;
  border: 2px solid #333;
  background: transparent;
  color: #333;
  border-radius: 8px;
  padding: 10px 20px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-decoration: none;
  transition: all 0.2s ease;
  font-size: 14px;
}
.page-id-208339 .elementor-widget-posts .elementor-post__read-more:hover {
  background: #333;
  color: #fff;
}

/* --- SINGLE POST: E-magazin category --- */
.single-post.category-e-magazin .entry-title,
.single-post.category-e-magazin .post-heading h2 {
  color: #00ae93 !important;
  font-size: 36px;
  font-weight: 700;
  line-height: 1.2;
}
.single-post.category-e-magazin .content-article h2 {
  color: #333;
  margin-top: 32px;
  margin-bottom: 16px;
  text-transform: none !important;
}
.single-post.category-e-magazin .content-article h3 {
  text-transform: none !important;
}
.single-post.category-e-magazin .content-article p {
  line-height: 1.75;
  color: #444;
}
.single-post.category-e-magazin .wp-post-image {
  border-radius: 12px;
}

/* --- PROIZVOD PREPORUKA kartica --- */
.emagazin-proizvod-preporuka {
  float: right;
  clear: right;
  width: 200px;
  margin: 0 0 16px 24px;
  padding: 16px;
  background: #f8f9fa;
  border-radius: 12px;
  border: 1px solid #eee;
  text-align: center;
}
.emagazin-proizvod-preporuka img {
  width: 160px;
  height: 160px;
  object-fit: contain;
  margin: 0 auto 12px;
  display: block;
}
.emagazin-proizvod-preporuka h4 {
  margin: 0 0 6px;
  font-size: 13px;
  color: #333;
  line-height: 1.3;
  text-transform: none !important;
}
.emagazin-proizvod-preporuka .cijena {
  font-size: 16px;
  font-weight: 700;
  color: #e05a4f !important;
  margin-bottom: 10px;
}
.emagazin-proizvod-preporuka .btn-dodaj-u-korpu {
  display: inline-block;
  padding: 8px 16px;
  background: #00ae93;
  color: #fff !important;
  text-decoration: none !important;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: background 0.2s ease;
}
.emagazin-proizvod-preporuka .btn-dodaj-u-korpu:hover {
  background: #008a75;
}

/* Clearfix for floated product card */
.single-post.category-e-magazin .content-article::after {
  content: "";
  display: table;
  clear: both;
}

/* --- NAJČITANIJE SIDEBAR (shortcode) --- */
.emagazin-najcitanije-sidebar {
  margin-top: 20px;
}
.najcitanije-heading {
  font-size: 28px !important;
  font-weight: 700;
  color: #222 !important;
  margin-bottom: 20px !important;
  text-transform: none !important;
}
.najcitanije-item {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 0 12px;
  align-items: start;
  text-decoration: none !important;
  margin-bottom: 15px;
  transition: transform 0.2s ease;
}
.najcitanije-item:hover {
  transform: translateX(4px);
}
.najcitanije-img img {
  width: 120px !important;
  height: 100px !important;
  object-fit: cover;
  border-radius: 12px !important;
}
.najcitanije-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.najcitanije-date {
  font-size: 13px;
  color: #666;
}
.najcitanije-title {
  font-size: 16px;
  font-weight: 600;
  color: #222;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.najcitanije-author {
  font-size: 13px;
  color: #888;
}

/* --- PITAJ FARMACEUTA overlay card --- */
.pitaj-farmaceuta-card {
  position: relative;
  display: block;
  text-decoration: none !important;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border-radius: 12px;
  overflow: hidden;
}
.pitaj-farmaceuta-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

/* --- PITAJ FARMACEUTA FORM page --- */
.pitaj-farmaceuta-form .wpcf7-form {
  max-width: 800px;
  background: #f5f5f5;
  border-radius: 12px;
  padding: 32px 28px;
}
.pitaj-farmaceuta-form .wpcf7-form input[type="text"],
.pitaj-farmaceuta-form .wpcf7-form input[type="email"],
.pitaj-farmaceuta-form .wpcf7-form textarea {
  border: 1px solid #ddd;
  border-radius: 8px;
  transition: border-color 0.2s ease;
  width: 100%;
  padding: 10px 14px;
  font-size: 15px;
}
.pitaj-farmaceuta-form .wpcf7-form input:focus,
.pitaj-farmaceuta-form .wpcf7-form textarea:focus {
  border-color: #e05a4f !important;
  outline: none;
}
.pitaj-farmaceuta-form .wpcf7-form input[type="submit"] {
  background: transparent;
  border: 2px solid #333;
  color: #333;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 600;
  padding: 12px 24px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.pitaj-farmaceuta-form .wpcf7-form input[type="submit"]:hover {
  background: #333;
  color: #fff;
}

/* --- Q&A PAGE --- */
.qa-item h3 {
  text-transform: none !important;
}


/* --- PITAJ FARMACEUTA card in najcitanije shortcode --- */
.pf-card-shortcode {
  margin-top: 30px;
}
.pf-card-image {  display: none;}
.pf-card-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 20px;
  background: linear-gradient(transparent, rgba(0,0,0,0.7));
  color: #fff;
}
.pf-card-label {
  font-size: 13px;
  opacity: 0.9;
  display: block;
  margin-bottom: 4px;
}
.pf-card-title {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 1px;
}
/* --- RESPONSIVE --- */
@media (max-width: 768px) {
  .emagazin-proizvod-preporuka {
    float: none;
    width: 100%;
    margin: 16px 0;
  }
  .emagazin-proizvod-preporuka img {
    width: 120px;
    height: 130px;
  }
  .najcitanije-item {
    grid-template-columns: 100px 1fr;
  }
  .najcitanije-img img {
    width: 100px !important;
    height: 85px !important;
  }
}

@media (max-width: 640px) {
  .single-post.category-e-magazin .entry-title,
  .single-post.category-e-magazin .post-heading h2 {
    font-size: 24px;
    line-height: 1.3;
  }
  .single-post.category-e-magazin .content-article h2 {
    font-size: 20px;
  }
  .pitaj-farmaceuta-card div:last-child span:last-child {
    font-size: 16px !important;
  }
}

/* ============================================
   FIGMA MATCHING FIXES v1.2.0
   ============================================ */

/* --- FIX: Remove terrible image hover zoom, add subtle Figma-style hover --- */
.elementor-widget-posts .elementor-post__thumbnail img {
  transition: transform 0.4s ease !important;
  transform: scale(1) !important;
}
.elementor-widget-posts .elementor-post:hover .elementor-post__thumbnail img {
  transform: scale(1.03) !important;
}
.elementor-widget-posts .elementor-post__thumbnail {
  border-radius: 16px !important;
  overflow: hidden !important;
}

/* --- FIX: Card-level hover lift (Figma) --- */
.page-id-208339 .elementor-widget-posts .elementor-post {
  transition: transform 0.3s ease, box-shadow 0.3s ease !important;
  border-radius: 12px !important;
  overflow: hidden !important;
}
.page-id-208339 .elementor-widget-posts .elementor-post:hover {
  transform: translateY(-4px) !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12) !important;
}

/* --- FIX: "Read More »" → "PROČITAJTE VIŠE >" outlined button (Figma) --- */
.page-id-208339 .elementor-widget-posts .elementor-post__read-more {
  font-size: 0 !important; /* hide original text */
  display: inline-block !important;
  border: 2px solid #333 !important;
  background: transparent !important;
  color: #333 !important;
  border-radius: 8px !important;
  padding: 10px 20px !important;
  font-weight: 600 !important;
  letter-spacing: 0.5px !important;
  text-decoration: none !important;
  transition: all 0.2s ease !important;
  margin-top: 12px !important;
}
.page-id-208339 .elementor-widget-posts .elementor-post__read-more::after {
  content: "PROČITAJTE VIŠE  >" !important;
  font-size: 13px !important;
  letter-spacing: 0.5px !important;
}
.page-id-208339 .elementor-widget-posts .elementor-post__read-more:hover {
  background: #333 !important;
  color: #fff !important;
}

/* --- FIX: Hide "/// Nema komentara" in meta, show only date --- */
.page-id-208339 .elementor-post__meta-data .elementor-post-avatar,
.page-id-208339 .elementor-post__meta-data span + span::before {
  display: none !important;
}
.page-id-208339 .elementor-post__meta-data {
  font-size: 14px !important;
  color: #888 !important;
}

/* --- FIX: Post title styling (Figma: 22px bold, dark, no transform) --- */
.page-id-208339 .elementor-post__title {
  font-size: 22px !important;
  font-weight: 700 !important;
  line-height: 1.3 !important;
  margin-bottom: 8px !important;
  text-transform: none !important;
}
.page-id-208339 .elementor-post__title a {
  color: #222 !important;
  text-decoration: none !important;
}
.page-id-208339 .elementor-post__title a:hover {
  color: #00ae93 !important;
}

/* --- FIX: Excerpt styling --- */
.page-id-208339 .elementor-post__excerpt p {
  font-size: 15px !important;
  line-height: 1.6 !important;
  color: #666 !important;
  display: -webkit-box !important;
  -webkit-line-clamp: 3 !important;
  -webkit-box-orient: vertical !important;
  overflow: hidden !important;
}

/* --- FIX: SIDEBAR — compact card layout (Figma: thumbnail left, text right) --- */
/* Target only the sidebar column's Posts widget */
.elementor-208339 .elementor-element[data-element_type="column"]:last-child .elementor-widget-posts .elementor-post {
  border-radius: 0 !important;
  box-shadow: none !important;
  margin-bottom: 0 !important;
}
.elementor-208339 .elementor-element[data-element_type="column"]:last-child .elementor-widget-posts .elementor-post:hover {
  transform: translateX(4px) !important;
  box-shadow: none !important;
}
/* Hide excerpts and read-more in sidebar */
.elementor-208339 .elementor-element[data-element_type="column"]:last-child .elementor-post__excerpt,
.elementor-208339 .elementor-element[data-element_type="column"]:last-child .elementor-post__read-more {
  display: none !important;
}
/* Smaller titles in sidebar */
.elementor-208339 .elementor-element[data-element_type="column"]:last-child .elementor-post__title {
  font-size: 16px !important;
  font-weight: 600 !important;
  line-height: 1.35 !important;
  display: -webkit-box !important;
  -webkit-line-clamp: 2 !important;
  -webkit-box-orient: vertical !important;
  overflow: hidden !important;
}
/* Sidebar thumbnail border-radius */
.elementor-208339 .elementor-element[data-element_type="column"]:last-child .elementor-post__thumbnail {
  border-radius: 12px !important;
}
.elementor-208339 .elementor-element[data-element_type="column"]:last-child .elementor-post__thumbnail img {
  border-radius: 12px !important;
}

/* --- FIX: Single post image hover — disable XStore's ugly zoom --- */
.single-post.category-e-magazin .wp-picture img,
.single-post.category-e-magazin .blog-post img,
.single-post.category-e-magazin .post-thumbnail img {
  transition: none !important;
  transform: none !important;
}
.single-post.category-e-magazin .blog-hover-zoom img {
  transform: none !important;
  transition: none !important;
}
.single-post.category-e-magazin .wp-picture.blog-hover-zoom:hover img {
  transform: none !important;
}

/* --- FIX: Single post "Slični postovi" (related posts) hover fix --- */
.single-post.category-e-magazin .related-posts .wp-picture img {
  transition: transform 0.4s ease !important;
  border-radius: 12px !important;
}
.single-post.category-e-magazin .related-posts .wp-picture:hover img {
  transform: scale(1.03) !important;
}

/* --- FIX: Pitaj farmaceuta page sidebar — same compact treatment --- */
.page-id-208340 .elementor-element[data-element_type="column"]:last-child .elementor-post__excerpt,
.page-id-208340 .elementor-element[data-element_type="column"]:last-child .elementor-post__read-more {
  display: none !important;
}
.page-id-208340 .elementor-element[data-element_type="column"]:last-child .elementor-post__title {
  font-size: 16px !important;
  font-weight: 600 !important;
  line-height: 1.35 !important;
}
.page-id-208340 .elementor-post__meta-data .elementor-post-avatar,
.page-id-208340 .elementor-post__meta-data span + span::before {
  display: none !important;
}

/* ============================================
   E-MAGAZIN SINGLE POST SIDEBAR (Step 3)
   ============================================ */

/* Single post sidebar: Figma spec */
.single-post.category-e-magazin .sidebar {
    background: #f5f5f5;
    border-radius: 8px;
    padding: 24px !important;
}

/* Hide category label on featured image */
.single-post.category-e-magazin .post-categories,
.single-post.category-e-magazin .category-label {
    display: none !important;
}

/* Hide ugly default meta, replace with clean format */
.single-post.category-e-magazin .post-heading .meta-post {
    display: none !important;
}

/* Hide sections not in Figma: about author, comments, share, tags */
.single-post.category-e-magazin .about-author-title,
.single-post.category-e-magazin .author-info,
.single-post.category-e-magazin .share-post,
.single-post.category-e-magazin .single-tags,
.single-post.category-e-magazin .posts-navigation,
.single-post.category-e-magazin .related-posts,
.single-post.category-e-magazin #comments,
.single-post.category-e-magazin #respond {
    display: none !important;
}

/* Clean meta format: "Farmaceut · Mar 6, 2026" */
.emagazin-clean-meta {
    font-size: 14px;
    color: #888;
    margin-bottom: 24px;
}


/* Pagination — larger font, top spacing, styled like Figma */
.page-id-208339 .elementor-pagination {
  margin-top: 32px !important;
  padding-top: 16px !important;
  font-size: 18px !important;
  gap: 8px !important;
}
.page-id-208339 .elementor-pagination .page-numbers {
  font-size: 18px !important;
  min-width: 40px !important;
  min-height: 40px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}
.page-id-208339 .elementor-pagination .page-numbers.current {
  background: #00ae93 !important;
  color: #fff !important;
  border-radius: 50% !important;
}

/* ==========================================================================
   FiboSearch UX Improvements (2026-03-26)
   ========================================================================== */

/* --- Popular Sections Container --- */
.dgwt-wcas-popular-section {
    padding: 0 16px;
    margin-bottom: 12px;
}

.dgwt-wcas-popular-section:first-child {
    padding-top: 16px;
}

/* --- Section Titles --- */
.dgwt-wcas-popular-section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 700;
    color: #96b416;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid #96b416;
}

.dgwt-wcas-popular-section-title svg {
    stroke: #96b416;
    flex-shrink: 0;
}

/* --- Category Pills --- */
.dgwt-wcas-popular-cats-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.dgwt-wcas-popular-cat-item {
    display: inline-block !important;
    padding: 10px 18px !important;
    background: #f5f5f5 !important;
    border: 1px solid #e0e0e0 !important;
    border-radius: 25px !important;
    color: #333 !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    transition: all 0.2s ease !important;
}

.dgwt-wcas-popular-cat-item:hover,
.dgwt-wcas-popular-cat-item:focus {
    background: #96b416 !important;
    border-color: #96b416 !important;
    color: #fff !important;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(150, 180, 22, 0.3);
}

/* --- Trending Products List --- */
.dgwt-wcas-popular-products-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.dgwt-wcas-popular-product-item {
    display: flex !important;
    align-items: center;
    gap: 14px;
    padding: 12px 4px !important;
    text-decoration: none !important;
    color: #333 !important;
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.15s ease;
}

.dgwt-wcas-popular-product-item:last-child {
    border-bottom: none;
}

.dgwt-wcas-popular-product-item:hover {
    background: #f9f9f9;
}

.dgwt-wcas-popular-product-img {
    width: 56px;
    height: 56px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid #eee;
    flex-shrink: 0;
}

.dgwt-wcas-popular-product-info {
    flex: 1;
    min-width: 0;
}

.dgwt-wcas-popular-product-name {
    font-size: 14px;
    font-weight: 500;
    color: #222;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.dgwt-wcas-popular-product-price {
    font-size: 14px;
    font-weight: 700;
    color: #96b416;
    margin-top: 4px;
}

.dgwt-wcas-popular-product-price del {
    color: #999;
    font-weight: 400;
    font-size: 12px;
}

.dgwt-wcas-popular-product-price ins {
    text-decoration: none;
    color: #96b416;
}

/* --- Force suggestions wrapper visible when popular content injected --- */
.dgwt-wcas-overlay-mobile .dgwt-wcas-suggestions-wrapp:has(.dgwt-wcas-popular-section) {
    display: block !important;
}

/* --- Mobile overlay improvements --- */
.dgwt-wcas-overlay-mobile .dgwt-wcas-suggestions-wrapp {
    padding-top: 0;
}

@media (max-width: 992px) {
    .dgwt-wcas-overlay-mobile .dgwt-wcas-om-bar input {
        font-size: 16px !important;
    }
}
/* === E-magazin Pagination === */
.elementor-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 40px !important;
    padding: 20px 0;
}
.elementor-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 16px;
    font-weight: 600;
    color: #333;
    text-decoration: none;
    transition: all 0.2s ease;
    border: none !important;
}
.elementor-pagination .page-numbers:hover {
    background-color: #e8f5f2;
    color: #00ae93;
}
.elementor-pagination .page-numbers.current {
    background-color: #00ae93;
    color: #fff !important;
}
.elementor-pagination .page-numbers.prev,
.elementor-pagination .page-numbers.next {
    width: auto;
    padding: 0 12px;
    border-radius: 20px;
    font-size: 14px;
}

/* ============================================
   E-MAGAZIN BUGFIXES — 2026-04-29
   ============================================ */

/* --- FIX: Hide author ("ADMINISTRACIJA") in Najčitanije sidebar --- */
.elementor-element-1c8b6f1 .elementor-post-author {
  display: none !important;
}

/* --- FIX: Consistent thumbnail sizing in sidebar --- */
.elementor-element-1c8b6f1 .elementor-post__thumbnail img {
  width: 100% !important;
  aspect-ratio: 300 / 210;
  object-fit: cover !important;
}

/* --- FIX: Links in e-magazin articles — always visible --- */
.single-post.category-e-magazin .content-article a:not(.btn-dodaj-u-korpu) {
  color: #00ae93 !important;
  text-decoration: underline !important;
}
.single-post.category-e-magazin .content-article a:not(.btn-dodaj-u-korpu):hover {
  color: #008a75 !important;
}

/* --- FIX: Hide author in listing page meta --- */
.page-id-208339 .elementor-post__meta-data .elementor-post-author {
  display: none !important;
}

/* === Homepage H1 for SEO (Trello #20) === */
.apotekaweb-homepage-h1-wrapper {
    text-align: center;
    padding: 30px 15px 10px;
    max-width: 800px;
    margin: 0 auto;
}
.apotekaweb-homepage-h1 {
    font-family: "Dosis", sans-serif;
    font-weight: 600;
    font-size: 32px;
    line-height: 1.31em;
    color: #222;
    margin: 0 0 8px;
}
.apotekaweb-homepage-subtitle {
    font-family: "Dosis", sans-serif;
    font-weight: 600;
    font-size: 18px;
    line-height: 1.26em;
    color: #222;
    margin: 0;
}
@media (max-width: 767px) {
    .apotekaweb-homepage-h1 { font-size: 24px; }
    .apotekaweb-homepage-subtitle { font-size: 16px; }
    .apotekaweb-homepage-h1-wrapper { padding: 20px 15px 8px; }
}
/* --- SITE-WIDE: Product card redesign on WooCommerce loops (Figma #18) --- */
/* product_view = "standart" so add-to-cart is always visible in .product-details.
   Homepage uses Elementor (.etheme-product-grid-*) and is unaffected.
   !important on layout props to override XStore theme specificity. */

.content-product {
  border-radius: 8px !important;
  border: 1px solid rgba(0,0,0,0.1) !important;
  overflow: hidden;
  background: #fff;
  display: flex !important;
  flex-direction: column !important;
  height: 100% !important;
}
.content-product .images-slider-wrapper {
  flex-shrink: 0;
  height: 220px !important;
  display: flex !important;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.content-product .images-slider-wrapper img {
  max-height: 100%;
  width: auto !important;
  object-fit: contain;
}
.content-product .product-details,
.content-product .product-details.text-center {
  text-align: left !important;
  padding: 10px !important;
  border-top: 1px solid rgba(0,0,0,0.1);
  flex: 1 1 auto !important;
  display: flex !important;
  flex-direction: column !important;
}
.content-product .product-details .products-page-cats,
.content-product .product-details .products-page-cats a {
  font-family: Inter, sans-serif;
  font-size: 13px;
  font-weight: 400;
  color: #666 !important;
  text-transform: uppercase;
  text-decoration: none;
}
.content-product .product-details .product-title,
.content-product .product-details .product-title a {
  font-family: Dosis, sans-serif;
  font-weight: 600;
  font-size: 15px;
  color: #222 !important;
  line-height: 1.4;
}
.content-product .star-rating,
.content-product .product-details .star-rating-wrapper,
.content-product .product-details .quantity-wrapper {
  display: none !important;
}
.content-product .product-details .price {
  display: flex !important;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: flex-start;
  margin: 4px 0 8px !important;
}
.content-product .product-details .price del,
.content-product .product-details .price del .amount {
  color: #000 !important;
  font-family: Inter, sans-serif;
  font-weight: 700;
  font-size: 16px;
}
.content-product .product-details .price ins,
.content-product .product-details .price ins .amount {
  color: #96B416 !important;
  font-family: Inter, sans-serif;
  font-weight: 700;
  font-size: 16px;
  text-decoration: none;
}
.content-product .product-details .price > .amount {
  color: #96B416 !important;
  font-family: Inter, sans-serif;
  font-weight: 700;
  font-size: 16px;
}
.content-product .product-details .add_to_cart_button,
.content-product .product-details .button.product_type_simple,
.content-product .product-details .added_to_cart {
  background: #96B416 !important;
  border-radius: 6px !important;
  color: #fff !important;
  font-family: Roboto, sans-serif;
  font-weight: 700;
  font-size: 14px;
  width: 100% !important;
  text-align: center;
  display: flex !important;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px !important;
  margin-top: auto !important;
  border: none !important;
  cursor: pointer;
  line-height: 1.7;
}
.content-product .product-details .add_to_cart_button:hover,
.content-product .product-details .button.product_type_simple:hover {
  background: #87a213 !important;
}

/* --- SHOP: rounded corners on top banner (Figma #18, Boris 16px) --- */
.elementor-element-7c78a8e6 {
  border-radius: 16px !important;
  overflow: hidden !important;
}

/* Card text clamps (Figma: single category line, max 2-line title) */
.content-product .product-details .products-page-cats {
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 4px;
}
.content-product .product-details .product-title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Cart icon in shop add-to-cart button (parity with homepage cards) */
.content-product .product-details .add_to_cart_button::before,
.content-product .product-details .button.product_type_simple::before {
  content: "";
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  background-color: #fff;
  -webkit-mask: url("data:image/svg+xml,%3Csvg%20xmlns=%27http://www.w3.org/2000/svg%27%20viewBox=%270%200%2024%2024%27%3E%3Cpath%20d=%27M7%2018c-1.1%200-1.99.9-1.99%202S5.9%2022%207%2022s2-.9%202-2-.9-2-2-2zM1%202v2h2l3.6%207.59-1.35%202.45c-.16.28-.25.61-.25.96%200%201.1.9%202%202%202h12v-2H7.42c-.14%200-.25-.11-.25-.25l.03-.12.9-1.63h7.45c.75%200%201.41-.41%201.75-1.03l3.58-6.49c.08-.14.12-.31.12-.48%200-.55-.45-1-1-1H5.21l-.94-2H1zm16%2016c-1.1%200-1.99.9-1.99%202s.89%202%201.99%202%202-.9%202-2-.9-2-2-2z%27/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg%20xmlns=%27http://www.w3.org/2000/svg%27%20viewBox=%270%200%2024%2024%27%3E%3Cpath%20d=%27M7%2018c-1.1%200-1.99.9-1.99%202S5.9%2022%207%2022s2-.9%202-2-.9-2-2-2zM1%202v2h2l3.6%207.59-1.35%202.45c-.16.28-.25.61-.25.96%200%201.1.9%202%202%202h12v-2H7.42c-.14%200-.25-.11-.25-.25l.03-.12.9-1.63h7.45c.75%200%201.41-.41%201.75-1.03l3.58-6.49c.08-.14.12-.31.12-.48%200-.55-.45-1-1-1H5.21l-.94-2H1zm16%2016c-1.1%200-1.99.9-1.99%202s.89%202%201.99%202%202-.9%202-2-.9-2-2-2z%27/%3E%3C/svg%3E") center / contain no-repeat;
}

/* === Mobile fixevi #18 (Boris 22.05.2026) === */

/* Fix 4: pozadina sajta (svi viewportovi) */
body.apotekaweb,
body {
  background-color: #F4F6F8 !important;
}

@media (max-width: 767px) {

  /* Fix 1: shop grid bez granicnika, 2 kolone + 16px gap.
     Pravi kontejner proizvoda je .ajax-content (XStore ajax paginacija drzi
     .product kartice unutra), pa grid ide na njega; minmax(0,1fr) -> jednake kolone. */
  .products.products-grid .ajax-content {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 16px !important;
  }
  /* .ajax-content ima .clearfix -> ::before/::after postaju grid celije i prave
     prazno polje gore lijevo; ugasiti ih */
  .products.products-grid .ajax-content::before,
  .products.products-grid .ajax-content::after {
    display: none !important;
  }
  .products.products-grid {
    margin: 0 !important;
  }
  /* ugasi XStore bordered-layout granicnike + col-xs-6 sirine/float na karticama */
  .products.products-bordered-layout .product {
    border: 0 !important;
    box-shadow: none !important;
    margin: 0 !important;
    padding: 0 !important;
    width: auto !important;
    max-width: none !important;
    float: none !important;
  }
  .products.products-bordered-layout {
    border: 0 !important;
  }

  /* Fix 2: H1 lijevo, 32px (override ranijeg 24px/center) */
  .apotekaweb-homepage-h1 {
    font-size: 32px !important;
    text-align: left !important;
  }
  .apotekaweb-homepage-h1-wrapper {
    text-align: left !important;
  }

  /* Fix 3: Akcije mjeseca karusel - slajd 300px za peek/swipe.
     functions.php (apotekaweb_akcije_carousel_peek_js) prebacuje ovaj karusel
     na Swiper slidesPerView:'auto' na mobilnom, pa Swiper cita ovu sirinu i
     racuna ispravan snap (cist swipe + peek iduce kartice). */
  .elementor-element-e528c00 .swiper-slide {
    width: 300px !important;
  }
}
/* --- HOMEPAGE: Product card redesign (Figma #18) --- */

/* Card container */
.page-id-14 .etheme-product-grid-item {
  border-radius: 8px;
  border: 1px solid rgba(0,0,0,0.1);
  overflow: hidden;
  background: #fff;
}

/* Image area */
.page-id-14 .etheme-product-grid-image {
  position: relative;
}

/* Content area — left-align, padding, top border */
.page-id-14 .etheme-product-grid-content {
  text-align: left;
  padding: 8px;
  border-top: 1px solid rgba(0,0,0,0.1);
}

/* Category */
.page-id-14 .etheme-product-grid-categories,
.page-id-14 .etheme-product-grid-categories a {
  font-family: Inter, sans-serif;
  font-size: 13px;
  font-weight: 400;
  color: #666666;
  text-transform: uppercase;
  text-decoration: none;
}

/* Product title */
.page-id-14 .etheme-product-grid-title a {
  font-family: Dosis, sans-serif;
  font-weight: 600;
  font-size: 15px;
  color: #222222;
  line-height: 1.4;
}

/* Hide star rating wrapper */
.page-id-14 .etheme-product-grid-content .star-rating-wrapper {
  display: none;
}

/* Price row — side by side */
.page-id-14 .etheme-product-grid-content .price {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: flex-start;
}
.page-id-14 .etheme-product-grid-content .price del {
  color: #000000;
  font-family: Inter, sans-serif;
  font-weight: 700;
  font-size: 16px;
}
.page-id-14 .etheme-product-grid-content .price ins {
  color: #96B416;
  font-family: Inter, sans-serif;
  font-weight: 700;
  font-size: 16px;
  text-decoration: none;
}
.page-id-14 .etheme-product-grid-content .price > .amount,
.page-id-14 .etheme-product-grid-content .price > span > .amount {
  color: #96B416;
  font-family: Inter, sans-serif;
  font-weight: 700;
  font-size: 16px;
}

/* Add-to-cart button */
.page-id-14 .etheme-product-grid-content .etheme-product-grid-button {
  background: #96B416 !important;
  border-radius: 6px !important;
  color: white !important;
  font-family: Roboto, sans-serif;
  font-weight: 700;
  font-size: 14px;
  width: 100%;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px;
  margin-top: 8px;
  border: none;
  cursor: pointer;
  line-height: 1.7;
}
.page-id-14 .etheme-product-grid-content .etheme-product-grid-button:hover {
  background: #87a213 !important;
}
.page-id-14 .etheme-product-grid-content .etheme-product-grid-button .button-text {
  color: white !important;
}

/* Badge: PREPORUČUJEMO */
.page-id-14 .badge-preporucujemo {
  position: absolute;
  bottom: 8px;
  right: 8px;
  display: flex;
  align-items: center;
  gap: 4px;
  background: white;
  border-radius: 20px;
  padding: 4px 10px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.15);
  z-index: 3;
}
.page-id-14 .badge-preporucujemo .badge-icon {
  width: 20px;
  height: 20px;
  background: #3BB0C9;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
}
.page-id-14 .badge-preporucujemo .badge-text {
  font-size: 9px;
  font-weight: 700;
  color: #333;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Cart icon SVG in button */
.page-id-14 .etheme-product-grid-content .cart-icon-svg {
  width: 16px;
  height: 16px;
  fill: white;
  flex-shrink: 0;
}


/* --- FIX #2: Equal-height product cards --- */

/* Swiper slides stretch to match tallest card */
.page-id-14 .etheme-product-grid-item {
  display: flex;
  flex-direction: column;
  height: 100%;
}

/* Fixed-height image area for consistency */
.page-id-14 .etheme-product-grid-image {
  flex-shrink: 0;
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.page-id-14 .etheme-product-grid-image img {
  max-height: 100%;
  width: auto;
  object-fit: contain;
}

/* Content area fills remaining space, pushes button to bottom */
.page-id-14 .etheme-product-grid-content {
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* Button always at the bottom */
.page-id-14 .etheme-product-grid-content .etheme-product-grid-button {
  margin-top: auto;
}


/* --- FIX #3: Force equal-height cards (specificity override) --- */

/* Swiper wrapper must stretch slides to tallest */
.page-id-14 .elementor-widget-etheme_product_carousel .swiper-wrapper {
  align-items: stretch !important;
}

/* Swiper slides fill height */
.page-id-14 .elementor-widget-etheme_product_carousel .swiper-slide {
  height: auto !important;
}

/* Card fills slide and uses flex column */
.page-id-14 .etheme-product-grid-item.product {
  display: flex !important;
  flex-direction: column !important;
  height: 100% !important;
}

/* Content area fills remaining space */
.page-id-14 .etheme-product-grid-content {
  flex: 1 !important;
  display: flex !important;
  flex-direction: column !important;
}

/* Button always at the bottom */
.page-id-14 .etheme-product-grid-content > .etheme-product-grid-button {
  margin-top: auto !important;
}



/* === AKCIJA / [products] shortcode grid — mobilni 2-kolonski grid (Trello #18 follow-up, 2026-06-01) ===
   [products] shortcode (akcijske landing stranice, npr. /hemofarm-thiomucase/) renderuje
   .products.products-grid BEZ .ajax-content wrappera (taj postoji samo na shop/kategorija arhivama
   sa ajax paginacijom). Zato mobilni grid fix iz 2026-05-24 (cilja .ajax-content) NE hvata ove grid-ove
   -> kartice padaju na XStore bootstrap float (col-xs-6, 15px padding, neujednacene visine = "spljosteno").
   Arhive nose klasu .with-ajax; shortcode grid je nema -> :not(.with-ajax) precizno razdvaja. */
@media (max-width: 767px) {
  .products.products-grid:not(.with-ajax) {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 16px !important;
  }
  .products.products-grid:not(.with-ajax) > .product {
    width: auto !important;
    max-width: none !important;
    float: none !important;
    left: auto !important;
    padding: 0 !important;
    margin: 0 !important;
  }
  .products.products-grid:not(.with-ajax)::before,
  .products.products-grid:not(.with-ajax)::after {
    content: none !important;
    display: none !important;
  }
}

/* === AKCIJA grid — uniformno sa homepage .akcije-grid (komentar 2026-06-01) ===
   Vanjski lijevi/desni razmak svesti sa 25px na 10px (25px = 15px Elementor container + 10px
   widget-wrap padding). Negativna margina -15px povuče grid na 10px → kolone 177px, gap 16px =
   identično homepage .akcije-grid. Gap je već 16px (isti kao referenca). Mobilni-only. */
@media (max-width: 767px) {
  .products.products-grid:not(.with-ajax) {
    margin-left: -15px !important;
    margin-right: -15px !important;
  }
}

/* === Povezani proizvodi (related) carousel — jednaka visina kartica (2026-06-01) ===
   Swiper slajdovi su sadržaj-bazirani → kartica s akcijskom (precrtanom) cijenom je viša od one bez
   (npr. GLORIA bez akcije niža od VICHY/THIOMUCASE) → neporavnate. Stretch slajdove na najvišu u redu +
   content-product 100% visine (dugme već ide margin-top:auto). Scope samo related, ne dira ostale carousele. */
.related-products-wrapper .swiper-wrapper { align-items: stretch !important; }
.related-products-wrapper .swiper-slide { height: auto !important; }
.related-products-wrapper .swiper-slide > .product,
.related-products-wrapper .swiper-slide .content-product { height: 100% !important; }

/* === STICKY HEADER (position:fixed) — 2026-06-01 ===
   XStore native sticky NE radi (fixedHeader.min.js u WP Rocket delay-JS bucketu); position:sticky blokira
   .template-container{overflow:hidden}. Rješenje: position:fixed + padding-top kompenzacija
   (mobilni header <1200px = 111px, desktop ≥1200px = 145px). */
.site-header {
  position: fixed !important;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 999;
}
.template-container { padding-top: 111px; }
@media (min-width: 1200px) {
  .template-container { padding-top: 145px; }
}
.admin-bar .site-header { top: 32px; }
@media screen and (max-width: 782px) {
  .admin-bar .site-header { top: 46px; }
}

/* === Single product / korpa (2026-06-01): redizajn quantity steppera + sakrij "X ljudi gledaju" ===
   "Ljudi gledaju" = XStore Sales Booster live-viewing → sakriveno.
   Stepper: zeleni +/- dugmići (#96B416), bijele +/- prečke crtane CSS-om (3px, centrirane); wrapper i djeca
   iste visine (stretch) da overflow:hidden ne siječe; label "Količina:" povećan (XStore default 13px presitan). */
.quantity .quantity-wrapper.type-square {
  display: flex !important;
  align-items: stretch !important;
  height: 46px !important;
  border: 1px solid #96B416 !important;
  border-radius: 10px !important;
  overflow: hidden !important;
  background: #fff !important;
}
.quantity .quantity-wrapper.type-square::before {
  font-size: 16px !important;
  font-weight: 600 !important;
  color: #333 !important;
}
.sales-booster-live-viewing { display: none !important; }
.quantity .quantity-wrapper .minus,
.quantity .quantity-wrapper .plus {
  position: relative !important;
  width: 46px !important;
  min-width: 46px !important;
  height: auto !important;
  align-self: stretch !important;
  background: #96B416 !important;
  cursor: pointer !important;
  transition: background .15s !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 0 !important;
  padding: 0 !important;
}
.quantity .quantity-wrapper .minus:hover,
.quantity .quantity-wrapper .plus:hover { background: #86a113 !important; }
.quantity .quantity-wrapper .minus svg,
.quantity .quantity-wrapper .plus svg { display: none !important; }
.quantity .quantity-wrapper .minus::before,
.quantity .quantity-wrapper .plus::before {
  content: "" !important;
  position: absolute !important;
  top: 50% !important;
  left: 50% !important;
  width: 16px !important;
  height: 3px !important;
  background: #fff !important;
  border-radius: 2px !important;
  transform: translate(-50%, -50%) !important;
}
.quantity .quantity-wrapper .plus::after {
  content: "" !important;
  position: absolute !important;
  top: 50% !important;
  left: 50% !important;
  width: 3px !important;
  height: 16px !important;
  background: #fff !important;
  border-radius: 2px !important;
  transform: translate(-50%, -50%) !important;
}
.quantity .quantity-wrapper input.qty {
  height: auto !important;
  align-self: stretch !important;
  width: 48px !important;
  border: 0 !important;
  font-size: 16px !important;
  font-weight: 600 !important;
  color: #222 !important;
  text-align: center !important;
}

/* Single product "Dodaj u korpu" — veći tekst (bio 13px, presitan za veliko dugme).
   NE dira dugmad u karticama (.add_to_cart_button u loopovima) — ovo cilja samo .single_add_to_cart_button. */
.single_add_to_cart_button { font-size: 18px !important; }
.single_add_to_cart_button { text-transform: none !important; }  /* "Dodaj u korpu" sentence case (bilo capitalize -> "Dodaj U Korpu") */
.quantity .quantity-wrapper .minus,
.quantity .quantity-wrapper .plus { border: 0 !important; }  /* ukloni XStore sivi #e1e1e1 border na dugmićima */

/* KORPA: kompaktniji stepper — XStore cart .quantity-wrapper ima max-width:110px, pa 46px dugmići sijeku "+".
   34/30/34 = 98px stane bez sječenja. (Single product ostaje 46px — ima prostora.) */
.woocommerce-cart .quantity .quantity-wrapper .minus,
.woocommerce-cart .quantity .quantity-wrapper .plus { width: 34px !important; min-width: 34px !important; }
.woocommerce-cart .quantity .quantity-wrapper input.qty { width: 30px !important; }

/* STICKY ADD-TO-CART BAR (single product, mobilni): stepper + "Dodaj u korpu" dijele JEDAN red.
   46/36/46 stepper (130px) gura dugme van ekrana (~23px) i pod Tidio chat bubble.
   Suzi stepper na 32/28/32 (92px) -> dugme se pomjeri ulijevo i stane. (2026-06-14, Boris) */
@media (max-width: 1024px) {
  .etheme-sticky-cart .quantity .quantity-wrapper .minus,
  .etheme-sticky-cart .quantity .quantity-wrapper .plus { width: 32px !important; min-width: 32px !important; }
  .etheme-sticky-cart .quantity .quantity-wrapper input.qty { width: 28px !important; }
  /* Dugme nikad ne smije prebiti viewport: dopusti mu da se skupi prije nego predje ivicu. */
  .etheme-sticky-cart form.cart { max-width: 100% !important; }
  .etheme-sticky-cart .single_add_to_cart_button { min-width: 0 !important; }
}

/* "Dodaj u korpu" POPUP (XStore .popup-added-to-cart) stepper.
   VAŽNO: WooCommerce koristi class="quantity" za DVIJE stvari u popup-u:
     - stepper = DIV.quantity (.minus / input / .plus)  -> stiliziraj
     - cijena "× 39.87 KM" = SPAN.quantity              -> NE diraj (inace ruzan okvir oko cijene)
   Zato sve scope-ovano na `div.quantity`. +/- prečke crtane CSS-om (DEBELE 3px, kao na product
   stranici) jer et-icon font ikona je pretanka. (2026-06-14, Boris) */
.popup-added-to-cart div.quantity {
  display: inline-flex !important;
  align-items: stretch !important;
  border: 1px solid #96B416 !important;
  border-radius: 10px !important;
  overflow: hidden !important;
  height: 40px !important;
}
.popup-added-to-cart div.quantity .minus,
.popup-added-to-cart div.quantity .plus {
  position: relative !important;
  width: 38px !important;
  min-width: 38px !important;
  background: #96B416 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  border: 0 !important;
  transition: background .15s !important;
}
.popup-added-to-cart div.quantity .minus:hover,
.popup-added-to-cart div.quantity .plus:hover { background: #86a113 !important; }
/* sakrij tanku font-ikonu, nacrtaj debele bijele prečke */
.popup-added-to-cart div.quantity .minus i,
.popup-added-to-cart div.quantity .plus i { display: none !important; }
.popup-added-to-cart div.quantity .minus::before,
.popup-added-to-cart div.quantity .plus::before {
  content: "" !important; position: absolute !important; top: 50% !important; left: 50% !important;
  width: 14px !important; height: 3px !important; background: #fff !important; border-radius: 2px !important;
  transform: translate(-50%, -50%) !important;
}
.popup-added-to-cart div.quantity .plus::after {
  content: "" !important; position: absolute !important; top: 50% !important; left: 50% !important;
  width: 3px !important; height: 14px !important; background: #fff !important; border-radius: 2px !important;
  transform: translate(-50%, -50%) !important;
}
.popup-added-to-cart div.quantity input.qty {
  align-self: stretch !important;
  width: 46px !important;
  border: 0 !important;
  text-align: center !important;
  font-weight: 600 !important;
  color: #222 !important;
  -moz-appearance: textfield !important;
}

/* === Single product: akcijska cijena bold + status zalihe kao bedž (2026-06-02, Boris) ===
   Cilja SAMO glavni proizvod (direktno dijete .et_product-block); kartice u loopu su .content-product (dublje) → netaknute. */
.et_product-block > .price ins,
.et_product-block > .price ins .amount { font-weight: 700 !important; text-decoration: none !important; }
.et_product-block > .stock {
  display: inline-flex !important; align-items: center !important; gap: 6px !important;
  padding: 5px 14px !important; border-radius: 20px !important;
  font-size: 14px !important; font-weight: 600 !important; width: auto !important;
}
.et_product-block > .stock.in-stock { background: #e7f3d4 !important; color: #5b8a00 !important; }
.et_product-block > .stock.out-of-stock { background: #fde4e1 !important; color: #c0392b !important; }
.et_product-block > .stock.available-on-backorder { background: #fef0cd !important; color: #b07d00 !important; }
/* stepper: input padding 0 (centriraj broj) */
.quantity .quantity-wrapper input.qty { padding: 0 !important; }

/* HEADER KORPA (mini-cart drawer, XStore): close (X) je na `.et-close.full-right { right:100% }`
   = IZVAN panela, u lijevom 64px gapu -> na Androidu djeluje odsječeno/odvojeno s lijeve strane.
   Premjesti X UNUTAR panela (gore desno) da nikad ne klizi van ekrana. (2026-06-14, Boris) */
.et_b_header-cart .et-mini-content .et-close.full-right,
.et_b_header-cart .et-mini-content .et-close {
  right: 8px !important;
  left: auto !important;
  top: 8px !important;
  z-index: 6 !important;
}
