/* Collection Page Improvements - Antiquely.in */

/* Center and improve collection title */
.collection-hero__title,
.collection-hero h1,
h1[class*="collection"] {
    text-align: center !important;
    margin: 0 auto 2rem !important;
    max-width: 800px !important;
}

/* Center collection description text */
.collection-hero__description,
.collection__description,
.collection-description {
    text-align: center !important;
    margin: 0 auto 2rem !important;
    max-width: 800px !important;
    line-height: 1.6 !important;
}

/* Improve product grid layout */
.product-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)) !important;
    gap: 2rem !important;
    padding: 1rem !important;
    margin: 0 auto !important;
    max-width: 1400px !important;
}

/* Mobile: 2 columns */
@media (max-width: 768px) {
    .product-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 1rem !important;
    }
}

/* Tablet: 3 columns */
@media (min-width: 769px) and (max-width: 1024px) {
    .product-grid {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 1.5rem !important;
    }
}

/* Desktop: 4 columns */
@media (min-width: 1025px) {
    .product-grid {
        grid-template-columns: repeat(4, 1fr) !important;
        gap: 2rem !important;
    }
}

/* Product card improvements */
.product-card,
.product-grid__card,
.product-grid__item {
    background: #ffffff !important;
    border: 1px solid #e5e5e5 !important;
    border-radius: 12px !important;
    overflow: hidden !important;
    transition: transform 0.3s ease, box-shadow 0.3s ease !important;
}

.product-card:hover,
.product-grid__card:hover {
    transform: translateY(-5px) !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1) !important;
}

/* Product card image */
.product-card__image,
.product-grid__card img {
    width: 100% !important;
    aspect-ratio: 1 / 1 !important;
    object-fit: cover !important;
}

/* Product card content */
.product-card__content,
.product-card__info {
    padding: 1rem !important;
    text-align: center !important;
}

/* Product title */
.product-card__title,
.product-card h3,
.product-card h4 {
    font-size: 1rem !important;
    font-weight: 600 !important;
    margin: 0.5rem 0 !important;
    color: #372104 !important;
    line-height: 1.4 !important;
    min-height: 2.8em !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
}

/* Product price */
.product-card__price,
.product-price,
.price {
    font-size: 1.1rem !important;
    font-weight: 700 !important;
    color: #5c401b !important;
    margin: 0.5rem 0 !important;
}

/* Filter section improvements */
.facets-container,
.collection-filters,
.facets {
    background: #f7f4ed !important;
    padding: 1.5rem !important;
    border-radius: 12px !important;
    margin-bottom: 2rem !important;
}

/* Collection header section */
.collection-hero,
.collection-header {
    background: #fdf1e6 !important;
    padding: 3rem 1.5rem !important;
    margin-bottom: 3rem !important;
    border-radius: 16px !important;
    text-align: center !important;
}

/* Breadcrumbs */
.breadcrumb,
.breadcrumbs {
    display: flex !important;
    justify-content: center !important;
    margin-bottom: 1.5rem !important;
    font-size: 0.9rem !important;
}

/* Sort dropdown */
.collection-sort,
.sort-by,
select[name="sort_by"] {
    padding: 0.75rem 1rem !important;
    border: 2px solid #7d736a !important;
    border-radius: 8px !important;
    background: white !important;
    font-size: 0.95rem !important;
}

/* View more / Load more button */
.view-more,
.load-more,
.pagination {
    text-align: center !important;
    margin: 3rem auto !important;
}

.view-more button,
.load-more button {
    background: #372104 !important;
    color: white !important;
    padding: 1rem 3rem !important;
    border: none !important;
    border-radius: 8px !important;
    font-size: 1rem !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: background 0.3s ease !important;
}

.view-more button:hover,
.load-more button:hover {
    background: #5c401b !important;
}

/* Product badge */
.product-badge,
.badge {
    position: absolute !important;
    top: 1rem !important;
    right: 1rem !important;
    background: #372104 !important;
    color: white !important;
    padding: 0.35rem 0.75rem !important;
    border-radius: 6px !important;
    font-size: 0.75rem !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    z-index: 10 !important;
}

/* Quick view button */
.quick-view,
.quick-add {
    display: inline-block !important;
    margin-top: 0.75rem !important;
    padding: 0.65rem 1.5rem !important;
    background: #372104 !important;
    color: white !important;
    border: none !important;
    border-radius: 6px !important;
    font-size: 0.9rem !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    transition: background 0.3s ease !important;
    cursor: pointer !important;
}

.quick-view:hover,
.quick-add:hover {
    background: #5c401b !important;
    color: white !important;
}

/* Empty state */
.collection-empty,
.no-results {
    text-align: center !important;
    padding: 4rem 2rem !important;
}

.collection-empty h2,
.no-results h2 {
    font-size: 1.5rem !important;
    margin-bottom: 1rem !important;
    color: #372104 !important;
}

/* Collection count */
.collection-count,
.product-count {
    text-align: center !important;
    font-size: 0.95rem !important;
    color: #7d736a !important;
    margin-bottom: 1.5rem !important;
}

/* Fix for specific Shopify/Genzopia theme elements */
.template-collection .collection,
.collection-template-wrapper {
    max-width: 1400px !important;
    margin: 0 auto !important;
    padding: 1rem !important;
}

/* Remove unwanted margins on collection page */
.main-collection,
.collection-main {
    margin-top: 0 !important;
}

/* Ensure proper spacing */
.shopify-section {
    margin-bottom: 0 !important;
}

/* Fix for title/description wrapper */
.collection__title-wrapper,
.collection-hero__inner {
    max-width: 800px !important;
    margin: 0 auto !important;
    text-align: center !important;
}

/* Improve filter chip/pill styling */
.active-filters,
.filter-pill {
    background: #5c401b !important;
    color: white !important;
    border-radius: 20px !important;
    padding: 0.5rem 1rem !important;
    font-size: 0.85rem !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.5rem !important;
}

/* Remove filters button */
.active-filters__remove,
.filter-pill__remove {
    background: none !important;
    border: none !important;
    color: white !important;
    cursor: pointer !important;
    padding: 0 !important;
    margin-left: 0.25rem !important;
}

/* Responsive text sizing */
@media (max-width: 768px) {
    .collection-hero__title,
    .collection-hero h1 {
        font-size: 1.75rem !important;
    }
    
    .collection-hero__description {
        font-size: 0.95rem !important;
    }
    
    .product-card__title {
        font-size: 0.9rem !important;
    }
}

/* === Overlay & placeholder fixes === */
/* Remove global dark overlays that hide product images */
.product-card .overlay,
.product-card .background-overlay::after,
.product-media__overlay,
.resource-card--overlay:before,
.background-overlay:after,
.hero__blurred-image,
.resource-card--overlay:before {
    background: transparent !important;
    background-image: none !important;
    mix-blend-mode: normal !important;
    opacity: 1 !important;
    display: none !important;
}

/* Make sure product images show clearly with a subtle neutral background */
.product-card img,
.product-media__image,
.placeholder-image img,
.deferred-media__poster-button img {
    background: #f8f4ef !important;
    object-fit: cover !important;
}

/* Light placeholder for missing images */
.product-card .product-media__fallback,
.placeholder-image,
.product-card__image--fallback {
    background: #f7f4ed !important;
    min-height: 220px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: #7d736a !important;
}

/* Ensure card inner elements don't get cropped by overlays */
.product-card * { z-index: auto !important; }

