/* =========================================
   Stone360 – Archive Common
   File: assets/css/layout/archive-common.css
   Date: 2025-09-27
   Scope: .tc-archives (tax archívumok + brand-hub)
   ========================================= */
/* = Archívum & Hub közös stílusok = */

/* Common archive & hub styles (replaces old taxonomy-cimkecsoport.css).
   Scoped to .tc-archives to avoid affecting other pages. */

body.tc-archives {
    --tc-maxw: 1200px;
    --tc-gap: 2rem;
    --tc-list-gap: 1.5rem;
    /* (Define any CSS variables used for layout) */
}

/* Hero section */
.tc-archives .tc-hero {
    max-width: var(--tc-maxw);
    margin: 0 auto 2rem;
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    align-items: center;
    padding: 1rem var(--tc-gap);
}
.tc-archives .tc-hero-image-wrapper {
    flex: 1 1 300px;
}
.tc-archives .tc-hero-img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    object-fit: cover;
}
.tc-archives .tc-hero-text {
    flex: 1 1 300px;
}
.tc-archives .tc-hero-title {
    font-family: 'Poppins', sans-serif;
    font-size: 2rem;
    font-weight: 600;
    margin: 0 0 0.5rem;
}
.tc-archives .tc-term-desc {
    font-size: 1rem;
    line-height: 1.6;
    color: #555;
}
/* Ensure taxonomy-specific old classes (if any exist in markup) don't break layout: */
.tc-archives .tc-hero-title-wrapper,
.tc-archives .tc-hero-image-wrapper {
    /* these just map to .tc-hero styles if needed, or we can leave empty to override defaults */
}

/* Term scroller */
.tc-archives .tc-term-scroller {
    position: relative;
    padding: 1rem var(--tc-gap);
    margin-bottom: 2rem;
    overflow-x: auto;
    scroll-behavior: smooth;
    display: flex;
    gap: 1rem;
}
/* Hide scrollbar but allow scrolling */
.tc-archives .tc-term-scroller::-webkit-scrollbar {
    display: none;
}
.tc-archives .tc-term-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 1rem;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    min-width: 200px;
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    text-align: center;
}
.tc-archives .tc-term-card-img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 4px;
    margin-bottom: 0.5rem;
}
.tc-archives .tc-term-card-title {
    font-family: 'Poppins', sans-serif;
    font-size: 1.1rem;
    font-weight: 500;
    margin: 0.5rem 0;
}
.tc-archives .tc-term-card-excerpt {
    font-size: 0.9rem;
    color: #666;
    margin: 0;
}
/* Scroll buttons */
.tc-archives .tc-term-scroll-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.8);
    border: 1px solid #ccc;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    cursor: pointer;
}
.tc-archives .tc-term-scroll-btn--left {
    left: 10px;
}
.tc-archives .tc-term-scroll-btn--right {
    right: 10px;
}
/* Hide buttons on small screens (user can swipe) */
@media (max-width: 767px) {
    .tc-archives .tc-term-scroll-btn {
        display: none;
    }
}

/* Products grid */
.tc-archives ul.products {
    max-width: var(--tc-maxw);
    margin: 0 auto 2rem;
    padding: 0 var(--tc-gap);
}
/* Use CSS grid for product cards if needed, but Astra may handle columns via classes.
   We'll ensure a gap and responsive behavior: */
.tc-archives ul.products.columns-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--tc-gap);
}
.tc-archives ul.products.columns-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--tc-gap);
}
@media (max-width: 1024px) {
    .tc-archives ul.products.columns-4,
    .tc-archives ul.products.columns-3 {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 767px) {
    .tc-archives ul.products.columns-4,
    .tc-archives ul.products.columns-3 {
        grid-template-columns: 1fr;
    }
}
/* Style WooCommerce product items to look like cards */
.tc-archives ul.products li.product {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 1rem;
    position: relative;
    display: flex;
    flex-direction: column;
    text-align: left;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.tc-archives ul.products li.product:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
    border-color: #aaa;
}
.tc-archives ul.products li.product .woocommerce-LoopProduct-link {
    /* Make the whole product <li> act as container; Woo link encloses content */
    display: block;
    text-decoration: none;
    color: inherit;
}
.tc-archives ul.products li.product .attachment-woocommerce_thumbnail {
    /* product image styling */
    width: 100%;
    height: auto;
    border-radius: 4px;
    margin-bottom: 0.5rem;
}
/* Product title */
.tc-archives ul.products li.product h2.woocommerce-loop-product__title {
    font-family: 'Poppins', sans-serif;
    font-size: 1.1rem;
    font-weight: 500;
    margin: 0.5rem 0;
}
/* Category/subtitle (if any) */
.tc-archives ul.products li.product .ast-woo-product-category {
    font-size: 0.8rem;
    text-transform: uppercase;
    color: #888;
    margin-bottom: 0.5rem;
}
/* Price */
.tc-archives ul.products li.product .price {
    font-weight: 600;
    color: #333;
    margin-top: auto;
}
/* Sale badge */
.tc-archives ul.products li.product span.onsale {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #e53935;
    color: #fff;
    padding: 0.2em 0.5em;
    font-size: 0.8rem;
    border-radius: 3px;
}
/* Highlight on-sale product card border */
.tc-archives ul.products li.product.on-sale {
    border-color: #ffce00;
    /* add a slight background tint for on-sale */
    background: #f9f5e7;
}

/* Related posts list (post-card styles) */
.tc-archives .tc-grid.tc-grid--list {
    max-width: var(--tc-maxw);
    margin: 0 auto 2rem;
    padding: 0 var(--tc-gap);
    display: grid;
    grid-template-columns: 1fr; /* single column on mobile by default */
    gap: var(--tc-list-gap);
}
@media (min-width: 768px) {
    .tc-archives .tc-grid.tc-grid--list {
        grid-template-columns: 1fr; /* remains single column since .tc-card--media internally handles layout */
    }
}
.tc-archives .tc-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    transition: transform 0.2s, box-shadow 0.2s;
}
.tc-archives .tc-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}
.tc-archives .tc-card--media .tc-card-media {
    flex: 0 0 120px;
    height: 100%;
    overflow: hidden;
    background: #f8f8f8;
}
.tc-archives .tc-card--media .tc-card-thumb {
    width: 100%;
    height: 100%;
    object-fit: contain;
}
/* On small screens, stack media object vertically */
@media (max-width: 767px) {
    .tc-archives .tc-card--media .tc-card-link {
        display: flex;
        flex-direction: column;
    }
    .tc-archives .tc-card--media .tc-card-media {
        width: 100%;
        max-height: 200px;
    }
}
/* Card body (text content) */
.tc-archives .tc-card--media .tc-card-body {
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.tc-archives .tc-card--media .tc-card-title {
    font-family: 'Poppins', sans-serif;
    font-size: clamp(1.05rem, 2vw, 1.2rem);
    font-weight: 500;
    margin: 0 0 0.25rem;
}
.tc-archives .tc-card--media .tc-card-excerpt {
    font-size: 0.9rem;
    line-height: 1.4;
    color: #444;
    /* Limit to 3 lines */
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Pagination styles */
.tc-archives .tc-pagination {
    text-align: center;
    margin: 1rem 0 2rem;
}
.tc-archives .tc-pagination .tc-pagination-links .page-numbers {
    margin: 0 0.25rem;
    display: inline-block;
    padding: 0.3em 0.6em;
    border: 1px solid #ccc;
    color: #333;
    text-decoration: none;
    border-radius: 4px;
}
.tc-archives .tc-pagination .tc-pagination-links .current {
    background: #333;
    color: #fff;
    border-color: #333;
}

/* === 25-09-29. Termék rács – safe default, ha nincs téma-griddel fedve === */
.tc-grid.tc-grid--cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.25rem;
}
.product-card { height: 100%; }
