
    
  
/* =============================================================
   COOK MARKET | Compact desktop + six-column shop v3 | 2026-11-21
   Replace the previous compact/shop override blocks in custom.css.
   Based on the actual online site-layout.css and shop.css selectors.
   No global zoom, transform scaling or mobile changes.
   Rollback: remove this entire block.
   ============================================================= */
@media (min-width: 1024px) {
  /* 1. Shared header: less vertical whitespace; preserve logo clarity */
  .cm-header.cm-header--source-v2 .cm-trustbar-inner {
    min-height: 30px;
    padding-block: 2px;
  }
  .cm-header.cm-header--source-v2 .cm-header-row {
    min-height: 64px;
    padding-block: 6px;
    gap: clamp(12px, 1.8vw, 22px);
  }
  .cm-header.cm-header--source-v2 .cm-logo {
    max-width: 198px;
  }
  .cm-header.cm-header--source-v2 .cm-logo .cm-brand-img {
    width: 198px;
  }
  .cm-header.cm-header--source-v2 .cm-header-search input {
    padding-block: 10px;
    font-size: 14px;
  }
  .cm-header.cm-header--source-v2 .cm-header-nav {
    min-height: 0;
    padding-block: 2px 6px;
    gap: 16px;
  }
  .cm-header.cm-header--source-v2 .cm-main-links a,
  .cm-header.cm-header--source-v2 .cm-header-categories > div > button {
    font-size: 14px;
  }

  /* 2. Homepage announcement bar */
  body > section[data-home-section="top_bar"] {
    padding-block: 4px !important;
  }
  body > section[data-home-section="top_bar"] > div {
    padding-block: 6px !important;
  }

  /* 3. Shared footer */
  .cm-footer.cm-footer--v2 {
    padding-top: 24px;
    padding-bottom: 18px;
  }
  .cm-footer--v2 > .cm-footer-grid {
    gap: 18px;
  }
  .cm-footer--v2 .cm-footer-bottom {
    margin-top: 12px;
    padding-top: 10px;
  }

  /* 4. Shop list, categories, filters and product cards */
  .cm-shop {
    padding-top: 16px;
    padding-bottom: 32px;
  }
  .cm-shop .cm-breadcrumb {
    margin-bottom: 14px;
  }
  .cm-shop .cm-heading h1 {
    font-size: 28px;
    margin-bottom: 7px;
  }
  .cm-shop .cm-heading p {
    font-size: 14px;
    line-height: 1.8;
  }
  .cm-shop .cm-controls {
    margin-top: 16px;
  }
  .cm-shop .cm-categories {
    padding-block: 11px 8px;
    gap: 7px;
  }
  .cm-shop .cm-categories a {
    padding: 7px 12px;
    font-size: 12px;
  }
  .cm-shop .cm-filter-row {
    gap: 9px 16px;
    padding-block: 10px;
  }
  .cm-shop .cm-sort select,
  .cm-shop .cm-range summary {
    padding-block: 6px;
  }
  .cm-shop .cm-result-summary {
    margin: 13px 0 10px;

  }
}
/* COOK MARKET - SHOP 6 COLUMN GRID */
/* =========================================================
   COOK MARKET - SHOP GRID FINAL COMPACT
   6 columns + shorter, cleaner product cards on desktop
   ========================================================= */

@media screen and (min-width: 1000px) {

  /* گرید اصلی فروشگاه */
  body .cm-shop .cm-results .cm-grid {
    display: grid !important;
    grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
    gap: 10px !important;
  }

  /* خود کارت */
  body .cm-shop .cm-card {
    border-radius: 12px !important;
    overflow: hidden !important;
  }

  /* بخش تصویر: ارتفاع کمتر */
  body .cm-shop .cm-card-image {
    aspect-ratio: 1 / 0.82 !important;
    padding: 8px !important;
  }

  body .cm-shop .cm-card-image img {
    object-fit: contain !important;
  }

  /* بدنه کارت: فشرده‌تر */
  body .cm-shop .cm-card-body {
    padding: 6px 8px 8px !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 4px !important;
  }

  /* دسته‌بندی */
  body .cm-shop .cm-card-category {
    font-size: 10px !important;
    line-height: 1.4 !important;
  }

  /* عنوان محصول */
  body .cm-shop .cm-card h2 {
    font-size: 12px !important;
    line-height: 1.55 !important;
    margin: 2px 0 4px !important;
    min-height: 38px !important;
  }

  body .cm-shop .cm-card h2 a {
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
  }

  /* قیمت */
  body .cm-shop .cm-price {
    font-size: 14px !important;
    margin-top: 2px !important;
    line-height: 1.4 !important;
  }

  body .cm-shop .cm-price small {
    font-size: 10px !important;
  }

  body .cm-shop .cm-unavailable {
    font-size: 12px !important;
    margin-top: 2px !important;
  }

  /* دکمه / اکشن پایین کارت */
  body .cm-shop .cm-card-action {
    margin-top: 6px !important;
    padding-top: 6px !important;
    font-size: 10px !important;
    gap: 4px !important;
    line-height: 1.5 !important;
  }

  body .cm-shop .cm-card-action span {
    font-size: 13px !important;
  }
}

/* ==============================================
   COOK MARKET - PRODUCT DETAIL COMPACT V3
   Desktop only
   ============================================== */

@media screen and (min-width: 1024px) {

  /* Product main layout */
  body .product-purchase {
    max-width: 900px !important;
    padding: 10px 14px !important;
    gap: 16px !important;
    align-items: start !important;
  }

  /* Product title */
  body .product-heading {
    font-size: 19px !important;
    line-height: 1.45 !important;
    margin: 0 0 10px !important;
  }

  /* Main image frame */
  body .product-purchase
  :has(> .product-main-image) {
    width: 100% !important;
    max-width: 320px !important;
    margin-inline: auto !important;
  }

  /* Main image */
  body .product-purchase .product-main-image {
    width: 100% !important;
    height: 270px !important;
    max-height: 270px !important;
    object-fit: contain !important;
  }

  /* General product information */
  body .product-purchase {
    font-size: 13px;
    line-height: 1.55;
  }

  /* Product option labels */
  body .product-purchase label {
    font-size: 12px !important;
    line-height: 1.5 !important;
  }

  /* Purchase box */
  body .product-buy-box {
    padding: 10px !important;
    border-radius: 9px !important;
  }

  /* Avoid inherited oversized strong text */
  body .product-purchase strong {
    font-size: inherit;
  }

  /* Product price */
  body .product-buy-box .product-price {
    font-size: 19px !important;
    line-height: 1.4 !important;
  }

  /* Purchase actions */
  body .product-buy-actions {
    gap: 8px !important;
  }

  /* Add to cart */
  body .product-add-button {
    min-height: 38px !important;
    padding: 7px 12px !important;
    font-size: 13px !important;
    line-height: 1.4 !important;
  }

  /* Quantity */
  body .product-buy-actions input[type="number"] {
    width: 52px !important;
    height: 38px !important;
    padding: 4px !important;
    font-size: 12px !important;
  }

  /* Secondary text inside purchase box */
  body .product-buy-box p,
  body .product-buy-box small {
    font-size: 12px !important;
    line-height: 1.6 !important;
  }

}

/* ==========================================
   COOK MARKET - PRODUCT DESCRIPTION COMPACT
   Desktop only
   ========================================== */


/* ==================================================
   COOK MARKET | PRODUCT CONTENT COMPACT V3
   Product description + Related articles
   Desktop only
   ================================================== */

@media screen and (min-width: 1024px) {

  /* ================================================
     1. PRODUCT DESCRIPTION
     ================================================ */

  body:has(.product-purchase) .editor-content {
    font-size: 0.8rem !important;
    line-height: 1.8 !important;
    overflow-wrap: anywhere;
  }

  body:has(.product-purchase) .editor-content p {
    font-size: inherit !important;
    line-height: 1.8 !important;
    margin: 0 0 9px !important;
  }

  /* Prevent oversized bold text */
  body:has(.product-purchase) .editor-content strong,
  body:has(.product-purchase) .editor-content b {
    font-size: 1em !important;
    font-weight: 700 !important;
  }

  /* Description headings */
  body:has(.product-purchase) .editor-content h2 {
    font-size: 17px !important;
    line-height: 1.5 !important;
    margin: 12px 0 7px !important;
  }

  body:has(.product-purchase) .editor-content h3 {
    font-size: 15px !important;
    line-height: 1.5 !important;
    margin: 10px 0 6px !important;
  }

  /* Description lists */
  body:has(.product-purchase) .editor-content li {
    font-size: inherit !important;
    line-height: 1.8 !important;
    margin-bottom: 4px !important;
  }

    /* ================================================
     2. RELATED ARTICLES
     ================================================ */

  /* Related articles section */
  body:has(.product-purchase)
  section:has(a[href*="/blog/"]) {
    padding: 14px !important;
  }

  /* Related section heading */
  body:has(.product-purchase)
  section:has(a[href*="/blog/"]) > h2 {
    font-size: 17px !important;
    line-height: 1.5 !important;
    margin-bottom: 10px !important;
  }

  /* Make each article card no wider than the image */
  body:has(.product-purchase)
  section:has(a[href*="/blog/"]) a {
    display: block !important;
    width: 250px !important;
    max-width: 250px !important;
    margin-inline: auto !important;
    font-size: 11px !important;
    line-height: 1.45 !important;
    overflow: hidden !important;
  }

  /* Keep original image quality and ratio */
  body:has(.product-purchase)
  section:has(a[href*="/blog/"]) img {
    display: block !important;
    width: 250px !important;
    max-width: 250px !important;
    height: auto !important;
    max-height: 166px !important;
    object-fit: contain !important;
    transform: none !important;
    margin-inline: auto !important;
  }

  /* Clamp long titles to 2 lines */
  body:has(.product-purchase)
  section:has(a[href*="/blog/"]) a :is(h3, h4, span) {
    display: -webkit-box !important;
    -webkit-box-orient: vertical !important;
    -webkit-line-clamp: 2 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: normal !important;
    max-width: 250px !important;
    margin-inline: auto !important;
    font-size: 10px !important;
    line-height: 1.45 !important;
  }
 /* Cook Market product page: tabs, properties, FAQ and related product sidebar.
   Add to asset/css/custom.css. Deliberately scoped to page product UI. */
.cm-product-detail-layout{box-sizing:border-box;display:grid;grid-template-columns:minmax(0,1fr);gap:20px;width:min(1180px,calc(100% - 24px));margin:24px auto 40px;direction:rtl;align-items:start}
.cm-product-detail-layout:has(.cm-product-related-sidebar){grid-template-columns:230px minmax(0,1fr)}
.cm-product-related-sidebar,.cm-product-tabs{min-width:0;background:#fff;border:1px solid #e5e7eb;border-radius:14px;box-shadow:0 2px 10px rgba(25,35,45,.04)}
.cm-product-related-sidebar{grid-column:1;grid-row:1;padding:14px}
.cm-product-tabs{grid-column:2;grid-row:1;overflow:hidden}
.cm-product-detail-layout:not(:has(.cm-product-related-sidebar)) .cm-product-tabs{grid-column:1}
.cm-product-related-sidebar h2{font-size:16px;line-height:1.6;font-weight:750;color:#263b32;margin:0 0 12px}
.cm-product-related-list{display:flex;flex-direction:column;gap:0}
.cm-product-related-item{display:flex;gap:10px;align-items:center;padding:10px 0;border-bottom:1px solid #f1f2f3;text-decoration:none;color:#263238;font-size:12px;line-height:1.6}
.cm-product-related-item:last-child{border-bottom:0}
.cm-product-related-item:hover{color:#bb5e22}
.cm-product-related-item img,.cm-product-related-noimage{width:64px;height:64px;flex:none;object-fit:contain;background:#fafafa;border-radius:8px}
.cm-product-related-item span:last-child{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:3;overflow:hidden}
.cm-product-tablist{display:flex;gap:0;overflow-x:auto;scrollbar-width:thin;white-space:nowrap;border-bottom:1px solid #e7e8e9;background:#fff}
.cm-product-tablist button{font:inherit;flex:0 0 auto;cursor:pointer;background:transparent;color:#505962;border:0;border-bottom:3px solid transparent;padding:16px 17px 13px;font-size:13px;font-weight:700;white-space:nowrap}
.cm-product-tablist button:hover{color:#b55c19;background:#fff9f4}
.cm-product-tablist button.is-active,.cm-product-tablist button[aria-selected=true]{color:#cc6225;border-bottom-color:#e47c3d}
.cm-product-tablist button:focus-visible{outline:2px solid #d97635;outline-offset:-3px}
.cm-product-tabpanel{padding:22px 24px;min-height:150px;line-height:1.9;font-size:13px;color:#334155}
.cm-product-tabpanel[hidden]{display:none!important}
.cm-product-panel-title,.cm-product-education .cm-product-section-heading{font-size:17px!important;font-weight:750;line-height:1.5;color:#263a30;margin:0 0 17px!important}
.cm-product-tabpanel .editor-content{font-size:13px!important;line-height:1.95!important;overflow-wrap:anywhere}
.cm-product-tabpanel .editor-content p,.cm-product-tabpanel .editor-content li{font-size:inherit!important;line-height:inherit!important}
.cm-product-tabpanel .editor-content :is(b,strong){font-size:1em!important;font-weight:700}
.cm-product-tabpanel .editor-content :is(h2,h3){font-size:16px!important;line-height:1.6!important;margin:14px 0 8px!important}
.cm-product-tabpanel :is(.cm-product-benefits,.cm-product-usage){margin-top:24px;padding-top:20px;border-top:1px solid #eceef0}
.cm-product-tabpanel :is(.cm-product-benefits,.cm-product-usage)>h3{font-size:16px;font-weight:750;margin:0 0 12px;color:#243d2f}
/* Benefits: compact icon + one label, no free-text descriptions */
.cm-product-benefits-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(160px,1fr));gap:10px}
.cm-product-benefit{display:flex;gap:10px;align-items:center;min-height:58px;background:#f7faf6;border:1px solid #e3ede3;border-radius:11px;padding:9px 11px}
.cm-product-benefit-icon,.cm-product-usage-icon{flex:0 0 38px;width:38px;height:38px;object-fit:contain;display:block}
.cm-product-icon-placeholder{display:flex;align-items:center;justify-content:center;background:#e6f0e5;border-radius:9px;color:#43844d;font-size:18px;font-weight:700}
.cm-product-benefit-title,.cm-product-usage-title{font-size:12.5px;font-weight:700;line-height:1.7;color:#26372e;overflow-wrap:anywhere}
/* Usage: distinct compact collection, not clickable before usage URLs are implemented */
.cm-product-usage-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(145px,1fr));gap:10px}
.cm-product-usage-item{display:flex;align-items:center;gap:10px;min-height:58px;padding:9px 11px;border:1px solid #f0e6da;border-radius:11px;background:#fffaf5}

.cm-product-specs-table{width:100%;border-collapse:collapse;text-align:right;font-size:13px}
.cm-product-specs-table tr{border-bottom:1px solid #edf0f1}
.cm-product-specs-table th,.cm-product-specs-table td{padding:11px 12px;vertical-align:top;line-height:1.8}
.cm-product-specs-table th{width:32%;font-weight:700;color:#475569;background:#fafbfa}
.cm-product-empty{color:#718096;font-size:13px;padding:10px 0}
.cm-product-faq-item{border:1px solid #e7eaed;border-radius:10px;margin:0 0 10px;padding:0 14px;background:#fff}
.cm-product-faq-item summary{cursor:pointer;padding:14px 0;font-size:13px;font-weight:700;color:#243b30}
.cm-product-faq-item[open]{background:#fcfdfb;border-color:#d9e6db}
.cm-product-faq-item>div{border-top:1px solid #edf0f1;padding:12px 0 14px;font-size:13px;line-height:1.9;white-space:normal}
#product-related-articles.cm-product-education{padding:0!important;margin:0!important;background:transparent!important;border-radius:0!important;max-width:none!important}
.cm-product-education-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(178px,1fr));gap:14px;align-items:start}
.cm-product-education-card{max-width:250px;min-width:0;border:1px solid #eceff1;border-radius:11px;overflow:hidden;background:#fff}
.cm-product-education-card a{display:block;text-decoration:none;color:#374151}
.cm-product-education-card img{display:block;width:auto!important;max-width:100%!important;height:auto!important;max-height:none!important;object-fit:contain!important;margin:0 auto;transform:none!important}
.cm-product-education-placeholder{height:125px;background:#f1f3f5}
.cm-product-education-card h3{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;line-height:1.65!important;font-size:12px!important;height:3.3em;margin:8px 10px 10px!important;font-weight:700!important}
@media(max-width:960px){.cm-product-detail-layout:has(.cm-product-related-sidebar){grid-template-columns:minmax(0,1fr)}.cm-product-tabs{grid-column:1;grid-row:1}.cm-product-related-sidebar{grid-column:1;grid-row:2}.cm-product-related-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.cm-product-related-item{border-bottom:0}}
@media(max-width:600px){.cm-product-detail-layout{width:calc(100% - 16px);gap:12px}.cm-product-tablist button{padding:12px 13px;font-size:12px}.cm-product-tabpanel{padding:16px 12px}.cm-product-benefits-grid{grid-template-columns:minmax(0,1fr)}.cm-product-related-list{grid-template-columns:minmax(0,1fr)}.cm-product-education-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}.cm-product-education-card h3{font-size:11px!important}}

/* Compact visuals and respect the existing shop product design */
.cm-product-benefit-icon,.cm-product-usage-icon{max-width:38px!important;max-height:38px!important;transform:none!important}
@media(max-width:600px){
  .cm-product-benefits-grid,.cm-product-usage-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
  .cm-product-benefit,.cm-product-usage-item{padding:8px;gap:7px}
  .cm-product-benefit-icon,.cm-product-usage-icon{flex-basis:30px;width:30px;height:30px}
  .cm-product-benefit-title,.cm-product-usage-title{font-size:11.5px}
} 