/* Automatic shop/category archive repair. */
body.post-type-archive-product ul.products,
body.tax-product_cat ul.products,
body.tax-product_tag ul.products {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 18px !important;
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
}

body.post-type-archive-product ul.products::before,
body.post-type-archive-product ul.products::after,
body.tax-product_cat ul.products::before,
body.tax-product_cat ul.products::after,
body.tax-product_tag ul.products::before,
body.tax-product_tag ul.products::after {
    display: none !important;
    content: none !important;
}

body.post-type-archive-product ul.products li.product,
body.tax-product_cat ul.products li.product,
body.tax-product_tag ul.products li.product {
    float: none !important;
    clear: none !important;
    width: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
    background: #fff !important;
    border: 0 !important;
    position: relative !important;
    overflow: hidden !important;
}

.cagdas-auto-product-image-link,
.cagdas-auto-product-title a {
    color: inherit !important;
    text-decoration: none !important;
}

.cagdas-auto-product-image {
    position: relative;
    height: 420px;
    overflow: hidden;
    background: #ebe7df;
}

.cagdas-auto-product-image img {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    object-fit: cover !important;
    transition: transform .45s ease;
}

.cagdas-auto-product-card:hover .cagdas-auto-product-image img { transform: scale(1.025); }

.cagdas-auto-product-badge {
    position: absolute;
    left: 12px;
    bottom: 12px;
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 0 10px;
    background: #050505;
    color: #fff;
    font-size: 8px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: .09em;
    text-transform: uppercase;
}

.cagdas-auto-product-content { padding: 15px 12px 20px; min-height: 132px; box-sizing: border-box; }
.cagdas-auto-product-category { margin-bottom: 7px; color: #a36513; font-size: 9px; font-weight: 700; line-height: 1.2; letter-spacing: .21em; text-transform: uppercase; }
.cagdas-auto-product-title { margin: 0 0 12px !important; padding: 0 !important; font-family: Georgia, "Times New Roman", serif !important; font-size: 19px !important; font-weight: 400 !important; line-height: 1.25 !important; color: #171410 !important; }
.cagdas-auto-product-title a { font: inherit !important; color: inherit !important; }
.cagdas-auto-product-price { color: #171410; font-size: 13px; line-height: 1.35; }
.cagdas-auto-product-price del { margin-right: 5px; opacity: .5; }
.cagdas-auto-product-price ins { text-decoration: none; }

/* Extra safety: archive cards must never show variation/swatch/plugin controls. */
body.post-type-archive-product ul.products li.product form,
body.tax-product_cat ul.products li.product form,
body.tax-product_tag ul.products li.product form,
body.post-type-archive-product ul.products li.product .variations,
body.tax-product_cat ul.products li.product .variations,
body.tax-product_tag ul.products li.product .variations,
body.post-type-archive-product ul.products li.product .variable-items-wrapper,
body.tax-product_cat ul.products li.product .variable-items-wrapper,
body.tax-product_tag ul.products li.product .variable-items-wrapper,
body.post-type-archive-product ul.products li.product .woo-variation-items-wrapper,
body.tax-product_cat ul.products li.product .woo-variation-items-wrapper,
body.tax-product_tag ul.products li.product .woo-variation-items-wrapper,
body.post-type-archive-product ul.products li.product .compare,
body.tax-product_cat ul.products li.product .compare,
body.tax-product_tag ul.products li.product .compare,
body.post-type-archive-product ul.products li.product .quick-view,
body.tax-product_cat ul.products li.product .quick-view,
body.tax-product_tag ul.products li.product .quick-view,
body.post-type-archive-product ul.products li.product .button,
body.tax-product_cat ul.products li.product .button,
body.tax-product_tag ul.products li.product .button {
    display: none !important;
}

@media (max-width: 1024px) {
    body.post-type-archive-product ul.products,
    body.tax-product_cat ul.products,
    body.tax-product_tag ul.products { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
    .cagdas-auto-product-image { height: 390px; }
}

@media (max-width: 767px) {
    body.post-type-archive-product ul.products,
    body.tax-product_cat ul.products,
    body.tax-product_tag ul.products { grid-template-columns: 1fr !important; gap: 18px !important; }
    .cagdas-auto-product-image { height: min(118vw, 520px); }
}
