/* Suma Shop Flash Deals — polished header and swipeable product rail */
.suma-v3-flash{box-sizing:border-box;width:100%;max-width:100%;background:#f31355;border-radius:28px;padding:clamp(14px,3vw,26px);direction:rtl;overflow:hidden}
.suma-v3-flash *{box-sizing:border-box}
.suma-v3-flash .suma-v3-head{color:#fff;display:grid;grid-template-columns:minmax(0,1fr) auto;grid-template-areas:"title discount" "timer discount";align-items:center;gap:7px 14px;font-size:clamp(16px,2.5vw,25px);line-height:1.45;font-weight:800;margin:0 0 18px}
.suma-v3-flash .suma-v3-head>div:first-child{grid-area:title;min-width:0}
.suma-v3-flash .suma-v3-head > span{grid-area:discount;display:inline-flex;align-items:center;justify-content:center;background:#fff;color:#f31355;padding:10px 15px;border-radius:16px;white-space:nowrap;font-size:clamp(15px,2.2vw,23px);min-height:48px}
.suma-v3-flash .suma-timer{grid-area:timer;color:#fff;font-size:clamp(17px,2.3vw,23px);direction:ltr;text-align:right;white-space:nowrap;font-variant-numeric:tabular-nums;letter-spacing:.4px}
.suma-v3-flash .suma-v3-row{display:flex!important;flex-flow:row nowrap;gap:clamp(8px,1.7vw,15px);width:100%;max-width:100%;overflow-x:auto;overflow-y:hidden;align-items:stretch;padding:0 0 5px;scroll-snap-type:x mandatory;-webkit-overflow-scrolling:touch;scrollbar-width:thin;scrollbar-color:rgba(255,255,255,.75) rgba(255,255,255,.2)}
.suma-v3-flash .suma-v3-row::-webkit-scrollbar{height:5px}
.suma-v3-flash .suma-v3-row::-webkit-scrollbar-track{background:rgba(255,255,255,.2);border-radius:10px}
.suma-v3-flash .suma-v3-row::-webkit-scrollbar-thumb{background:rgba(255,255,255,.85);border-radius:10px}
.suma-v3-flash .suma-v3-card{display:flex;flex:0 0 calc((100% - 2 * clamp(8px,1.7vw,15px))/3);flex-direction:column;align-items:stretch;min-width:0!important;width:calc((100% - 2 * clamp(8px,1.7vw,15px))/3);max-width:calc((100% - 2 * clamp(8px,1.7vw,15px))/3);padding:clamp(7px,1.6vw,15px);margin:0;background:#fff;border-radius:clamp(14px,2.5vw,22px);text-align:center;overflow:hidden;scroll-snap-align:start}
.suma-v3-flash .suma-v3-card img{display:block;width:100%;height:clamp(76px,16vw,155px);object-fit:contain;margin:0 auto}
.suma-v3-flash .suma-v3-card h3{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:3;overflow:hidden;min-height:4.5em;height:auto;margin:8px 0;color:#10234d;font-size:clamp(10px,1.65vw,16px);line-height:1.5;overflow-wrap:anywhere}
.suma-v3-flash .suma-v3-card .off{align-self:center;display:inline-block;margin:4px 0 7px;background:#f31355;color:#fff;border-radius:999px;padding:5px 10px;font-size:clamp(10px,1.5vw,15px);line-height:1.5;white-space:nowrap}
.suma-v3-flash .suma-v3-card .price{min-height:2.8em;display:flex;align-items:center;justify-content:center;margin:4px 0 9px;font-size:clamp(10px,1.5vw,15px);line-height:1.5;overflow-wrap:anywhere}
.suma-v3-flash .suma-v3-card a{display:block;width:100%;margin-top:auto;padding:8px 3px;border-radius:12px;background:#f31355;color:#fff;font-size:clamp(10px,1.5vw,15px);line-height:1.5;text-decoration:none;white-space:normal}
.suma-personal-v3{margin:30px 0;direction:rtl}
.suma-personal-v3 .suma-v3-row{display:flex;gap:15px;overflow:auto;-webkit-overflow-scrolling:touch}
.suma-personal-v3 .suma-v3-card{min-width:190px;text-align:center}
@media(max-width:480px){
 .suma-v3-flash{border-radius:24px;padding:15px 10px}
 .suma-v3-flash .suma-v3-head{grid-template-columns:minmax(0,1fr) auto;gap:5px 8px;margin-bottom:13px;font-size:16px}
 .suma-v3-flash .suma-v3-head > span{padding:7px 9px;border-radius:13px;min-height:42px;font-size:15px}
 .suma-v3-flash .suma-timer{font-size:17px;text-align:right}
 .suma-v3-flash .suma-v3-row{gap:7px;padding-bottom:6px}
 .suma-v3-flash .suma-v3-card{flex-basis:calc((100% - 14px)/3);width:calc((100% - 14px)/3);max-width:calc((100% - 14px)/3);padding:7px 5px;border-radius:16px}
 .suma-v3-flash .suma-v3-card img{height:76px}
 .suma-v3-flash .suma-v3-card h3{font-size:10px;min-height:4.65em;margin:6px 0;line-height:1.5}
 .suma-v3-flash .suma-v3-card .off{font-size:10px;padding:4px 7px}
 .suma-v3-flash .suma-v3-card .price{font-size:10px;min-height:3.2em;margin:3px 0 7px}
 .suma-v3-flash .suma-v3-card a{font-size:10px;padding:7px 2px;border-radius:10px}
}

/* Genuine WooCommerce sale price presentation */
.suma-v3-flash .suma-v3-card .price del{color:#777;opacity:.9;font-size:.82em;margin-inline-end:4px}
.suma-v3-flash .suma-v3-card .price del .amount{text-decoration:line-through}
.suma-v3-flash .suma-v3-card .price ins{color:#c81045;text-decoration:none;font-weight:800}
.suma-v3-flash .suma-v3-card .price ins .amount{font-weight:800}
.suma-v3-flash .suma-v3-card .suma-v3-image-link{display:block;background:transparent;padding:0;margin:0;border-radius:0}
.suma-v3-flash .suma-v3-card .suma-v3-image-link img{margin:0 auto}
.suma-v3-flash .suma-v3-card .suma-v3-view-product{margin-top:auto}
.suma-v3-flash .suma-v3-no-deals{color:#fff;font-weight:700;padding:12px;text-align:center;min-width:100%}


/* Desktop-only hard override: six compact cards in one horizontal row. Mobile styles above remain unchanged. */
@media screen and (min-width: 1025px) {
  .suma-v3-flash .suma-v3-row {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    justify-content: flex-start !important;
    gap: 12px !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    width: 100% !important;
    max-width: 100% !important;
    white-space: normal !important;
    scroll-snap-type: x proximity !important;
  }
  .suma-v3-flash .suma-v3-row > .suma-v3-card {
    box-sizing: border-box !important;
    flex: 0 0 calc((100% - 60px) / 6) !important;
    width: calc((100% - 60px) / 6) !important;
    min-width: 0 !important;
    max-width: calc((100% - 60px) / 6) !important;
  }
}


/* Height refinement only: preserve all text sizes/content; reduce image and spacing height. */
.suma-v3-flash {
  padding: clamp(10px, 1.8vw, 18px) !important;
}
.suma-v3-flash .suma-v3-head {
  gap: 5px 12px !important;
  margin-bottom: 10px !important;
}
.suma-v3-flash .suma-v3-head span {
  padding-top: 7px !important;
  padding-bottom: 7px !important;
  min-height: 42px !important;
}
.suma-v3-flash .suma-v3-card {
  padding-top: 9px !important;
  padding-bottom: 9px !important;
}
.suma-v3-flash .suma-v3-card img {
  height: clamp(68px, 10vw, 108px) !important;
}
.suma-v3-flash .suma-v3-card h3 {
  margin-top: 6px !important;
  margin-bottom: 5px !important;
}
.suma-v3-flash .suma-v3-card .off {
  margin-top: 3px !important;
  margin-bottom: 4px !important;
}
.suma-v3-flash .suma-v3-card .price {
  margin-top: 3px !important;
  margin-bottom: 5px !important;
}
@media (max-width: 480px) {
  .suma-v3-flash {
    padding: 11px 8px !important;
  }
  .suma-v3-flash .suma-v3-head {
    margin-bottom: 9px !important;
  }
  .suma-v3-flash .suma-v3-head span {
    padding-top: 6px !important;
    padding-bottom: 6px !important;
    min-height: 38px !important;
  }
  .suma-v3-flash .suma-v3-card {
    padding-top: 6px !important;
    padding-bottom: 6px !important;
  }
  .suma-v3-flash .suma-v3-card img {
    height: 62px !important;
  }
}


/* Mobile category layout refinement: scoped to common WooCommerce/Elementor category widgets.
   Does not alter desktop or the existing flash-deals/product carousel. */
@media (max-width: 767px) {
  /* WooCommerce product category lists */
  .woocommerce ul.products li.product-category,
  .woocommerce-page ul.products li.product-category,
  ul.products li.product-category {
    margin: 0 !important;
    padding: 8px 6px 10px !important;
    border-radius: 16px !important;
    background: #fff !important;
    box-shadow: 0 3px 14px rgba(25, 35, 70, .07) !important;
    text-align: center !important;
    min-width: 0 !important;
  }
  .woocommerce ul.products li.product-category a,
  ul.products li.product-category a {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 7px !important;
    text-decoration: none !important;
  }
  .woocommerce ul.products li.product-category img,
  ul.products li.product-category img {
    width: 100% !important;
    max-width: 112px !important;
    height: 92px !important;
    object-fit: contain !important;
    margin: 0 auto !important;
  }
  .woocommerce ul.products li.product-category h2,
  ul.products li.product-category h2,
  .woocommerce ul.products li.product-category h3,
  ul.products li.product-category h3 {
    margin: 0 !important;
    padding: 0 2px !important;
    color: #10234d !important;
    font-size: 12px !important;
    line-height: 1.5 !important;
    font-weight: 700 !important;
    min-height: 3em !important;
  }
  .woocommerce ul.products li.product-category h2 mark,
  ul.products li.product-category h2 mark {
    background: transparent !important;
    color: #f31355 !important;
  }

  /* Elementor WooCommerce product categories widget */
  .elementor-widget-wc-categories ul.products,
  .elementor-widget-product-categories ul.products,
  .elementor-widget-wc-categories .products,
  .elementor-widget-product-categories .products {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 10px !important;
    margin: 0 !important;
  }
  .elementor-widget-wc-categories ul.products::before,
  .elementor-widget-wc-categories ul.products::after,
  .elementor-widget-product-categories ul.products::before,
  .elementor-widget-product-categories ul.products::after {
    display: none !important;
    content: none !important;
  }
  .elementor-widget-wc-categories ul.products li.product-category,
  .elementor-widget-product-categories ul.products li.product-category {
    width: auto !important;
    float: none !important;
  }

  /* WooCommerce blocks category grid */
  .wc-block-product-categories-list {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 10px !important;
    padding: 0 !important;
  }
  .wc-block-product-categories-list-item {
    min-width: 0 !important;
    margin: 0 !important;
    padding: 8px 6px !important;
    border-radius: 16px !important;
    background: #fff !important;
    box-shadow: 0 3px 14px rgba(25, 35, 70, .07) !important;
    text-align: center !important;
  }
  .wc-block-product-categories-list-item__image img {
    width: 100% !important;
    height: 88px !important;
    object-fit: contain !important;
  }
  .wc-block-product-categories-list-item__name {
    display: block !important;
    color: #10234d !important;
    font-size: 12px !important;
    line-height: 1.5 !important;
    font-weight: 700 !important;
  }
}


/* Suma Shop category image repair v3.1.0 */
@media (max-width: 767px) {
  .product-category img,
  .wc-block-product-categories-list-item__image img,
  .elementor-widget-wc-categories .product-category img,
  .elementor-widget-product-categories .product-category img {
    display: block !important;
    width: 100% !important;
    max-width: 190px !important;
    height: 150px !important;
    min-height: 0 !important;
    object-fit: contain !important;
    object-position: center center !important;
    margin: 0 auto !important;
    padding: 0 !important;
    border: 0 !important;
    box-shadow: none !important;
  }

  li.product-category,
  .wc-block-product-categories-list-item,
  .elementor-widget-image-box:has(a[href*="/product-category/"]),
  .elementor-widget-image-box:has(a[href*="product_cat="]) {
    text-align: center !important;
    min-width: 0 !important;
  }

  li.product-category > a,
  .wc-block-product-categories-list-item > a,
  .elementor-widget-image-box:has(a[href*="/product-category/"]) .elementor-image-box-wrapper,
  .elementor-widget-image-box:has(a[href*="product_cat="]) .elementor-image-box-wrapper {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 8px !important;
  }

  li.product-category h2,
  li.product-category h3,
  .wc-block-product-categories-list-item__name,
  .elementor-widget-image-box:has(a[href*="/product-category/"]) .elementor-image-box-title,
  .elementor-widget-image-box:has(a[href*="product_cat="]) .elementor-image-box-title {
    display: block !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 3px !important;
    font-size: clamp(12px, 3.4vw, 16px) !important;
    line-height: 1.55 !important;
    font-weight: 700 !important;
    text-align: center !important;
    overflow-wrap: anywhere !important;
  }

  .woocommerce ul.products,
  .woocommerce-page ul.products,
  .elementor-widget-wc-categories ul.products,
  .elementor-widget-product-categories ul.products,
  .wc-block-product-categories-list {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    column-gap: 10px !important;
    row-gap: 22px !important;
  }

  .woocommerce ul.products li.product-category,
  .woocommerce-page ul.products li.product-category,
  ul.products li.product-category {
    width: auto !important;
    float: none !important;
    clear: none !important;
    background: transparent !important;
    box-shadow: none !important;
    padding: 4px 2px !important;
    border-radius: 0 !important;
  }
}
@media (min-width: 768px) {
  a[href*="/product-category/"],
  a[href*="product_cat="] { text-decoration: none; }
}


/* v3.1.1: tighter category tiles matching the supplied Suma Shop mobile screenshot */
@media (max-width: 767px) {
  li.product-category img,
  .product-category img,
  .wc-block-product-categories-list-item__image img,
  .elementor-widget-wc-categories img,
  .elementor-widget-product-categories img {
    width: 100% !important;
    max-width: 145px !important;
    height: 122px !important;
    object-fit: contain !important;
    object-position: center !important;
    margin: 0 auto !important;
  }

  ul.products:has(li.product-category),
  .woocommerce ul.products:has(li.product-category),
  .woocommerce-page ul.products:has(li.product-category),
  .wc-block-product-categories-list,
  .elementor-widget-wc-categories ul,
  .elementor-widget-product-categories ul {
    row-gap: 24px !important;
    column-gap: 8px !important;
    align-content: start !important;
  }

  li.product-category,
  .wc-block-product-categories-list-item {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
  }

  li.product-category h2,
  li.product-category h3,
  .wc-block-product-categories-list-item__name {
    margin-top: 5px !important;
    line-height: 1.45 !important;
  }
}


/* v3.1.2: ensure the home hero/banner image is never resized by category rules */
@media (max-width: 767px) {
  .elementor-widget-image a:not(:has(img[src*="category"])) img,
  .elementor-widget-image-box:not(:has(a[href*="/product-category/"])) img,
  .wp-block-image img,
  .wp-block-cover img,
  .home .custom-banner img,
  .home .hero img,
  .home .banner img {
    max-width: 100%;
    height: auto;
  }
}


/* Suma Shop v3.1.3 — category tiles + flash-deal banner polish.
   Intentionally scoped: never applies image sizing rules to the homepage hero/banner. */
@media (max-width: 767px) {
  /* WooCommerce category tiles: consistent compact images, aligned labels */
  .woocommerce ul.products li.product-category,
  .woocommerce-page ul.products li.product-category,
  ul.products li.product-category,
  .elementor-widget-wc-categories ul.products li.product-category,
  .elementor-widget-product-categories ul.products li.product-category,
  .wc-block-product-categories-list-item {
    box-sizing: border-box !important;
    min-width: 0 !important;
    padding: 8px 5px 10px !important;
    margin: 0 !important;
    border: 1px solid rgba(16,35,77,.07) !important;
    border-radius: 15px !important;
    background: #fff !important;
    box-shadow: 0 4px 14px rgba(16,35,77,.07) !important;
    text-align: center !important;
  }

  .woocommerce ul.products li.product-category > a,
  ul.products li.product-category > a,
  .wc-block-product-categories-list-item > a {
    display: flex !important;
    height: 100% !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 7px !important;
    text-decoration: none !important;
  }

  .woocommerce ul.products li.product-category img,
  ul.products li.product-category img,
  .wc-block-product-categories-list-item__image img {
    display: block !important;
    width: 100% !important;
    max-width: 112px !important;
    height: 94px !important;
    object-fit: contain !important;
    object-position: center !important;
    margin: 0 auto !important;
    border-radius: 10px !important;
  }

  .woocommerce ul.products li.product-category h2,
  ul.products li.product-category h2,
  .woocommerce ul.products li.product-category h3,
  ul.products li.product-category h3,
  .wc-block-product-categories-list-item__name {
    display: block !important;
    width: 100% !important;
    min-height: 3em !important;
    margin: 0 !important;
    padding: 0 2px !important;
    color: #10234d !important;
    font-size: 12px !important;
    line-height: 1.5 !important;
    font-weight: 800 !important;
    overflow-wrap: anywhere !important;
    text-align: center !important;
  }

  .elementor-widget-wc-categories ul.products,
  .elementor-widget-product-categories ul.products,
  .wc-block-product-categories-list {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 10px !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  /* Image-box category links only; preserve the separate hero/banner image. */
  .elementor-widget-image-box:has(a[href*="/product-category/"]) .elementor-image-box-wrapper,
  .elementor-widget-image-box:has(a[href*="product_cat="]) .elementor-image-box-wrapper {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 7px !important;
    height: 100% !important;
    padding: 8px 5px 10px !important;
    border: 1px solid rgba(16,35,77,.07) !important;
    border-radius: 15px !important;
    background: #fff !important;
    box-shadow: 0 4px 14px rgba(16,35,77,.07) !important;
    text-align: center !important;
  }
  .elementor-widget-image-box:has(a[href*="/product-category/"]) img,
  .elementor-widget-image-box:has(a[href*="product_cat="]) img {
    width: 100% !important;
    max-width: 112px !important;
    height: 94px !important;
    object-fit: contain !important;
    object-position: center !important;
    margin: 0 auto !important;
  }
  .elementor-widget-image-box:has(a[href*="/product-category/"]) .elementor-image-box-title,
  .elementor-widget-image-box:has(a[href*="product_cat="]) .elementor-image-box-title {
    margin: 0 !important;
    color: #10234d !important;
    font-size: 12px !important;
    font-weight: 800 !important;
    line-height: 1.5 !important;
    overflow-wrap: anywhere !important;
    text-align: center !important;
  }
}

/* More polished sale/deal panel, scoped to the plugin's own section only. */
.suma-v3-flash {
  position: relative !important;
  background: linear-gradient(135deg, #f31355 0%, #e90b4d 58%, #c90b43 100%) !important;
  box-shadow: 0 12px 28px rgba(243,19,85,.16) !important;
  border: 1px solid rgba(255,255,255,.22) !important;
}
.suma-v3-flash .suma-v3-head > div:first-child {
  text-shadow: 0 2px 10px rgba(80,0,30,.18) !important;
}
.suma-v3-flash .suma-v3-head span {
  box-shadow: 0 5px 14px rgba(80,0,30,.12) !important;
}
.suma-v3-flash .suma-v3-card {
  border: 1px solid rgba(255,255,255,.85) !important;
  box-shadow: 0 5px 16px rgba(80,0,30,.10) !important;
  transition: transform .2s ease, box-shadow .2s ease !important;
}
.suma-v3-flash .suma-v3-card .suma-v3-view-product {
  box-shadow: 0 3px 8px rgba(243,19,85,.18) !important;
}
@media (hover:hover) {
  .suma-v3-flash .suma-v3-card:hover {
    transform: translateY(-3px) !important;
    box-shadow: 0 10px 22px rgba(80,0,30,.16) !important;
  }
}


/* v3.1.4: JS-tagged category section only; never style the hero banner. */
@media (max-width: 767px) {
  .suma-category-grid-fixed {
    --suma-category-radius: 14px;
  }
  .suma-category-grid-fixed img {
    max-width: 112px !important;
    height: 94px !important;
    object-fit: contain !important;
    object-position: center !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }
  .suma-category-grid-fixed a,
  .suma-category-grid-fixed li,
  .suma-category-grid-fixed article,
  .suma-category-grid-fixed .elementor-widget {
    box-sizing: border-box !important;
    text-align: center !important;
  }
  .suma-category-grid-fixed a {
    text-decoration: none !important;
  }
  .suma-category-grid-fixed .elementor-widget-image,
  .suma-category-grid-fixed .elementor-widget-image-box,
  .suma-category-grid-fixed li,
  .suma-category-grid-fixed article {
    padding: 7px 5px !important;
    border-radius: var(--suma-category-radius) !important;
    background: #fff !important;
    box-shadow: 0 3px 12px rgba(16,35,77,.07) !important;
  }
  .suma-category-grid-fixed h2,
  .suma-category-grid-fixed h3,
  .suma-category-grid-fixed h4,
  .suma-category-grid-fixed .elementor-image-box-title {
    color: #10234d !important;
    font-size: 12px !important;
    font-weight: 800 !important;
    line-height: 1.5 !important;
    overflow-wrap: anywhere !important;
    text-align: center !important;
  }
}
/* Clean, calm deal panel styling while keeping the site's existing product content. */
.suma-v3-flash {
  background: linear-gradient(120deg,#f52c61 0%,#ef174f 65%,#d90e46 100%) !important;
  border-radius: 22px !important;
  box-shadow: 0 10px 24px rgba(239,23,79,.13) !important;
}
.suma-v3-flash .suma-v3-card {
  border-radius: 16px !important;
  overflow: hidden !important;
  box-shadow: 0 4px 12px rgba(16,35,77,.08) !important;
}


/* v3.1.8: keep the flash-deal title icon compact and the mobile product rail evenly sized. */
.suma-v3-flash .suma-v3-head > .suma-v3-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.suma-v3-flash .suma-v3-heading-text {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
}
.suma-v3-flash .suma-v3-bolt {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  max-width: 40px;
  max-height: 40px;
  padding: 0;
  margin: 0;
  border-radius: 12px;
  font-size: 24px !important;
  line-height: 1 !important;
  font-weight: 400;
}
@media (max-width: 600px) {
  .suma-v3-flash .suma-v3-bolt {
    flex-basis: 34px;
    width: 34px;
    height: 34px;
    max-width: 34px;
    max-height: 34px;
    font-size: 21px !important;
  }
}
