.dmcf6-catalog{direction:rtl}.dmcf6-grid{display:grid;grid-template-columns:repeat(var(--cols),minmax(0,1fr));gap:var(--gap)}.dmcf6-card{display:block;text-decoration:none;color:inherit;text-align:center}.dmcf6-card-img{overflow:hidden;border-radius:var(--radius);background:#f5f6f7;aspect-ratio:1/1}.dmcf6-card-img img{width:100%;height:100%;object-fit:cover;display:block;transition:.3s ease}.dmcf6-card-count{font-size:var(--count-size);margin-top:12px;line-height:1.4}.dmcf6-card-name{font-size:var(--name-size);font-weight:700;margin-top:4px;line-height:1.5}.dmcf6-card.hover-zoom:hover img{transform:scale(1.06)}.dmcf6-card.hover-lift{transition:.25s ease}.dmcf6-card.hover-lift:hover{transform:translateY(-5px)}.dmcf6-card.hover-gray img{filter:grayscale(1)}.dmcf6-card.hover-gray:hover img{filter:grayscale(0)}@media(max-width:991px){.dmcf6-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}@media(max-width:600px){.dmcf6-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}}
.dmcf6-random-section{direction:rtl;margin:42px auto;max-width:1200px}.dmcf6-section-head{text-align:center;margin-bottom:22px}.dmcf6-section-head h2{margin:0;font-size:28px}.dmcf6-random-grid{display:grid;grid-template-columns:repeat(var(--dmcf6-random-cols),minmax(0,1fr));gap:20px}.dmcf6-product-card{border:1px solid #e5e7eb;border-radius:16px;overflow:hidden;background:#fff;transition:.25s ease}.dmcf6-product-card:hover{transform:translateY(-4px);box-shadow:0 10px 28px rgba(0,0,0,.08)}.dmcf6-product-thumb{display:block;aspect-ratio:1/1;overflow:hidden;background:#f5f6f7}.dmcf6-product-thumb img{width:100%;height:100%;object-fit:cover;display:block;transition:.3s ease}.dmcf6-product-card:hover img{transform:scale(1.04)}.dmcf6-product-body{padding:15px;text-align:center}.dmcf6-product-body h3{font-size:16px;line-height:1.6;margin:0 0 8px}.dmcf6-product-body h3 a{text-decoration:none;color:inherit}.dmcf6-product-meta{display:flex;flex-wrap:wrap;justify-content:center;gap:6px 10px;font-size:12px;color:#6b7280}.dmcf6-price{margin-top:10px;font-weight:700}.dmcf6-view-all{text-align:center;margin-top:24px}.dmcf6-view-all a{display:inline-block;padding:10px 20px;border-radius:10px;text-decoration:none;background:#2271b1;color:#fff}@media(max-width:900px){.dmcf6-random-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}@media(max-width:600px){.dmcf6-random-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.dmcf6-section-head h2{font-size:22px}}

.dmcf6-tax-page{max-width:1200px;margin:30px auto;padding:0 16px;direction:rtl}.dmcf6-tax-head{text-align:center;margin-bottom:26px}.dmcf6-tax-cover img{width:100%;max-height:360px;object-fit:cover;border-radius:18px;margin-bottom:18px}.dmcf6-tax-section-title{text-align:center;margin:34px 0 18px}.dmcf6-empty{text-align:center;padding:30px;border:1px dashed #cbd5e1;border-radius:14px;background:#f8fafc;color:#64748b}

.dmcf6-card-img{height:150px;aspect-ratio:auto!important;display:flex;align-items:center;justify-content:center;background:#fff;padding:14px;box-sizing:border-box}
.dmcf6-card-img img{width:100%;height:100%;object-fit:contain!important;object-position:center}
.dmcf6-model-img,.dmcf6-type-img{height:180px;overflow:hidden;border-radius:var(--radius);background:#f6f7f8}
.dmcf6-model-img img,.dmcf6-type-img img{width:100%;height:100%;object-fit:cover;object-position:center}
.dmcf6-catalog-products{max-width:1200px;margin:35px auto;padding:0 16px;direction:rtl}
.dmcf6-product-stats{display:flex;justify-content:center;gap:12px;font-size:12px;color:#6b7280;margin-top:8px}
.dmcf6-product-button{display:inline-block;margin-top:12px;padding:8px 14px;border-radius:8px;background:#2271b1;color:#fff!important;text-decoration:none}
@media(max-width:600px){
  .dmcf6-card-img{height:110px;padding:10px}
  .dmcf6-model-img,.dmcf6-type-img{height:140px}
}

.dmcf6-template-shell{max-width:1280px;margin:0 auto;padding:0 16px}
.dmcf6-products-wrap.dmcf6-layout-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:20px}
.dmcf6-products-wrap.dmcf6-layout-list{display:flex;flex-direction:column;gap:14px}
.dmcf6-layout-list .dmcf6-product-card{display:grid;grid-template-columns:180px 1fr;align-items:stretch}
.dmcf6-layout-list .dmcf6-product-thumb{aspect-ratio:auto;height:100%;min-height:150px}
.dmcf6-layout-list .dmcf6-product-body{text-align:right;display:flex;flex-direction:column;justify-content:center}
.dmcf6-layout-list .dmcf6-product-meta,.dmcf6-layout-list .dmcf6-product-stats{justify-content:flex-start}
.dmcf6-layout-toggle{display:flex;gap:8px;justify-content:flex-end;margin:0 0 16px}
.dmcf6-layout-toggle button{border:1px solid #d1d5db;background:#fff;border-radius:8px;padding:8px 12px;cursor:pointer}

/* Brand logos */
.dmcf6-card-img{height:150px!important;display:flex!important;align-items:center!important;justify-content:center!important;padding:16px!important;background:#fff!important;overflow:hidden!important}
.dmcf6-card-img img{width:100%!important;height:100%!important;object-fit:contain!important;object-position:center!important}

/* Model/type images */
.dmcf6-model-img,.dmcf6-type-img{height:190px;overflow:hidden;border-radius:14px;background:#f6f7f8}
.dmcf6-model-img img,.dmcf6-type-img img{width:100%;height:100%;object-fit:cover;object-position:center}

@media(max-width:991px){
  .dmcf6-products-wrap.dmcf6-layout-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
  .dmcf6-layout-list .dmcf6-product-card{grid-template-columns:150px 1fr}
}
@media(max-width:700px){
  .dmcf6-products-wrap.dmcf6-layout-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
  .dmcf6-layout-list .dmcf6-product-card{grid-template-columns:120px 1fr}
  .dmcf6-layout-list .dmcf6-product-thumb{min-height:120px}
  .dmcf6-card-img{height:110px!important;padding:10px!important}
  .dmcf6-model-img,.dmcf6-type-img{height:145px}
  .dmcf6-product-body{padding:12px}
}
@media(max-width:420px){
  .dmcf6-products-wrap.dmcf6-layout-grid{grid-template-columns:1fr 1fr}
  .dmcf6-layout-list .dmcf6-product-card{grid-template-columns:100px 1fr}
}


/* 6.8.0 - safe, uniform brand logo rendering */
.dmcf6-card-img{
    width:100%!important;
    height:150px!important;
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    padding:18px!important;
    margin:0!important;
    background:#fff!important;
    overflow:hidden!important;
    box-sizing:border-box!important;
}
.dmcf6-card-img img{
    display:block!important;
    width:100%!important;
    height:100%!important;
    max-width:100%!important;
    max-height:100%!important;
    object-fit:contain!important;
    object-position:center center!important;
    transform:none!important;
    margin:auto!important;
    padding:0!important;
}

/* Equal-height product cards and bottom-aligned actions */
.dmcf6-products-wrap.dmcf6-layout-grid .dmcf6-product-card,
.dmcf6-random-grid .dmcf6-product-card{
    height:100%;
    display:flex;
    flex-direction:column;
}
.dmcf6-product-body{
    display:flex;
    flex-direction:column;
    flex:1 1 auto;
}
.dmcf6-product-body h3{
    min-height:52px;
}
.dmcf6-product-meta{
    min-height:38px;
}
.dmcf6-price{
    margin-top:auto!important;
    padding-top:10px;
}
.dmcf6-product-button{
    margin-top:12px!important;
    align-self:stretch;
    text-align:center;
    min-height:42px;
    display:flex!important;
    align-items:center;
    justify-content:center;
    box-sizing:border-box;
}
.dmcf6-buy-button{background:#0f766e!important}
.dmcf6-download-button{background:#15803d!important}

/* Mobile */
@media(max-width:700px){
    .dmcf6-card-img{height:115px!important;padding:14px!important}
    .dmcf6-product-body h3{min-height:auto}
    .dmcf6-product-meta{min-height:auto}
}


/* 7.2.0 - independent taxonomy grids: no dependency on --cols from catalog */
.dmcf6-template-shell,
.dmcf6-tax-page{
    width:100%;
    max-width:1280px;
    margin:0 auto;
    padding-left:16px;
    padding-right:16px;
    box-sizing:border-box;
}

.dmcf6-tax-page .dmcf6-grid{
    width:100%!important;
    display:grid!important;
    grid-template-columns:repeat(5,minmax(0,1fr))!important;
    gap:20px!important;
    align-items:stretch!important;
    justify-items:stretch!important;
}

.dmcf6-tax-page .dmcf6-card{
    width:100%!important;
    min-width:0!important;
    display:flex!important;
    flex-direction:column!important;
    align-items:stretch!important;
    text-align:center!important;
    box-sizing:border-box!important;
}

.dmcf6-tax-page .dmcf6-model-img,
.dmcf6-tax-page .dmcf6-type-img{
    width:100%!important;
    height:180px!important;
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    overflow:hidden!important;
    background:#fff!important;
    border:1px solid #eef1f5;
    border-radius:14px;
    padding:10px;
    box-sizing:border-box;
}

.dmcf6-tax-page .dmcf6-model-img img,
.dmcf6-tax-page .dmcf6-type-img img{
    width:100%!important;
    height:100%!important;
    object-fit:contain!important;
    object-position:center!important;
    display:block!important;
    transform:none!important;
}

.dmcf6-card-count{
    display:block!important;
    min-height:22px!important;
    margin-top:10px!important;
    font-size:14px!important;
    line-height:1.4!important;
    color:#6b7280!important;
    text-align:center!important;
}

.dmcf6-card-name{
    display:block!important;
    min-height:28px!important;
    margin-top:2px!important;
    font-weight:700!important;
    line-height:1.5!important;
    text-align:center!important;
}

/* Main brand catalog remains uniform */
.dmcf6-catalog .dmcf6-grid{
    width:100%!important;
    display:grid!important;
    grid-template-columns:repeat(5,minmax(0,1fr))!important;
    gap:20px!important;
}
.dmcf6-catalog .dmcf6-card{
    min-width:0!important;
}

/* Tablet */
@media(max-width:1100px){
    .dmcf6-tax-page .dmcf6-grid,
    .dmcf6-catalog .dmcf6-grid{
        grid-template-columns:repeat(4,minmax(0,1fr))!important;
    }
}

/* Small tablet */
@media(max-width:850px){
    .dmcf6-tax-page .dmcf6-grid,
    .dmcf6-catalog .dmcf6-grid{
        grid-template-columns:repeat(3,minmax(0,1fr))!important;
        gap:16px!important;
    }
    .dmcf6-tax-page .dmcf6-model-img,
    .dmcf6-tax-page .dmcf6-type-img{
        height:160px!important;
    }
}

/* Mobile */
@media(max-width:600px){
    .dmcf6-template-shell,
    .dmcf6-tax-page{
        padding-left:10px!important;
        padding-right:10px!important;
    }
    .dmcf6-tax-page .dmcf6-grid,
    .dmcf6-catalog .dmcf6-grid{
        grid-template-columns:repeat(2,minmax(0,1fr))!important;
        gap:12px!important;
    }
    .dmcf6-tax-page .dmcf6-model-img,
    .dmcf6-tax-page .dmcf6-type-img{
        height:125px!important;
        padding:6px!important;
    }
    .dmcf6-card-count{
        font-size:12px!important;
        margin-top:7px!important;
    }
    .dmcf6-card-name{
        font-size:13px!important;
        min-height:24px!important;
    }
}

/* Very small phones */
@media(max-width:360px){
    .dmcf6-tax-page .dmcf6-grid,
    .dmcf6-catalog .dmcf6-grid{
        grid-template-columns:1fr 1fr!important;
        gap:8px!important;
    }
}


/* 7.4.0 - clean hierarchy and consistent model/type cards */
.dmcf6-tax-page{
    width:100%!important;
    max-width:1280px!important;
    margin:0 auto!important;
    padding:28px 16px 50px!important;
    box-sizing:border-box!important;
}
.dmcf6-tax-head{
    text-align:center!important;
    margin-bottom:24px!important;
}
.dmcf6-tax-page .dmcf6-tax-section-title{
    text-align:center!important;
    margin:24px 0 18px!important;
}
.dmcf6-tax-page .dmcf6-grid{
    width:100%!important;
    max-width:none!important;
    margin:0!important;
    grid-template-columns:repeat(5,minmax(0,1fr))!important;
    gap:18px!important;
}
.dmcf6-tax-page .dmcf6-card{
    background:#fff!important;
    border:1px solid #e5eaf0!important;
    border-radius:14px!important;
    padding:10px!important;
    box-sizing:border-box!important;
    overflow:hidden!important;
}
.dmcf6-tax-page .dmcf6-model-img,
.dmcf6-tax-page .dmcf6-type-img{
    height:175px!important;
    border:none!important;
    background:#fff!important;
    padding:8px!important;
}
.dmcf6-tax-page .dmcf6-model-img img,
.dmcf6-tax-page .dmcf6-type-img img{
    object-fit:contain!important;
    transform:none!important;
}
.dmcf6-tax-page .dmcf6-card-count{
    margin-top:8px!important;
    color:#6b7280!important;
}
.dmcf6-tax-page .dmcf6-card-name{
    min-height:28px!important;
    color:#111827!important;
}

/* Ensure model page doesn't retain a product section from theme/plugin duplicates */
body.tax-dmcf6_model .products,
body.tax-dmcf6_model .woocommerce-notices-wrapper + .products{
    display:none!important;
}

@media(max-width:1100px){
    .dmcf6-tax-page .dmcf6-grid{grid-template-columns:repeat(4,minmax(0,1fr))!important}
}
@media(max-width:850px){
    .dmcf6-tax-page .dmcf6-grid{grid-template-columns:repeat(3,minmax(0,1fr))!important}
}
@media(max-width:600px){
    .dmcf6-tax-page{padding:20px 10px 36px!important}
    .dmcf6-tax-page .dmcf6-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:12px!important}
    .dmcf6-tax-page .dmcf6-model-img,
    .dmcf6-tax-page .dmcf6-type-img{height:125px!important}
}


/* DMC 8.6.3 — Smart back button */
.dmcf6-back-wrap{
    width:min(1180px,calc(100% - 30px));
    margin:18px auto 8px;
    direction:rtl;
    display:flex;
    justify-content:flex-start;
}
.dmcf6-back-btn{
    display:inline-flex;
    align-items:center;
    gap:7px;
    min-height:38px;
    padding:8px 14px;
    border:1px solid #d7e3f0;
    border-radius:10px;
    background:#fff;
    color:#173b67!important;
    text-decoration:none!important;
    font-weight:700;
    box-shadow:0 4px 14px rgba(24,59,103,.08);
    transition:transform .15s ease,box-shadow .15s ease,border-color .15s ease;
}
.dmcf6-back-btn:hover{
    transform:translateY(-1px);
    border-color:#8bb8e6;
    box-shadow:0 6px 18px rgba(24,59,103,.13);
}
.dmcf6-back-btn .dashicons{
    width:18px;height:18px;font-size:18px;
}
@media (max-width:600px){
    .dmcf6-back-wrap{width:calc(100% - 20px);margin-top:12px}
    .dmcf6-back-btn{min-height:42px;padding:9px 13px}
}


/* DMC 8.6.6 — Approved back-button placement inside DMC content */
.dmcf6-tax-page > .dmcf6-back-wrap{
    width:100%;
    max-width:none;
    margin:0 0 22px 0;
    padding:0;
    display:flex;
    justify-content:flex-start;
    direction:rtl;
}
.dmcf6-tax-page > .dmcf6-back-wrap .dmcf6-back-btn{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:7px;
    min-height:38px;
    padding:7px 15px;
    border:1px solid #b8d7ef;
    border-radius:9px;
    background:#fff;
    color:#174d78!important;
    font-size:13px;
    font-weight:700;
    line-height:1.4;
    box-shadow:0 2px 8px rgba(25,86,130,.08);
}
.dmcf6-tax-page > .dmcf6-back-wrap .dmcf6-back-btn:hover{
    border-color:#42a9df;
    background:#f7fcff;
}
@media(max-width:600px){
    .dmcf6-tax-page > .dmcf6-back-wrap{
        margin-bottom:16px;
    }
    .dmcf6-tax-page > .dmcf6-back-wrap .dmcf6-back-btn{
        min-height:42px;
        padding:8px 14px;
    }
}

/* DMC 9.3 — theme article metadata is not part of DMC pages */
body.tax-product_brand .entry-meta,body.tax-dmcf6_model .entry-meta,body.tax-dmcf6_manual_type .entry-meta,
body.tax-product_brand .post-meta,body.tax-dmcf6_model .post-meta,body.tax-dmcf6_manual_type .post-meta,
body.tax-product_brand .wd-post-meta,body.tax-dmcf6_model .wd-post-meta,body.tax-dmcf6_manual_type .wd-post-meta{display:none!important}
