/* orodian – mobilná dlaždica produktu v kategórii (2026-11-20)
   Desktop sa nemení: všetko .vb-m-* je mimo mobilu skryté. */

.vb-m-left, .vb-m-main { display: none; }

@media (max-width: 680px) {

  /* karta: ľavý stĺpec obrázok + sklad, pravý stĺpec obsah */
  li.product .vb-row {
    display: grid !important;
    grid-template-columns: 38% minmax(0, 1fr);
    grid-template-rows: auto 1fr;
    align-items: stretch !important;
    border: 1px solid #e9ecef !important;
    border-radius: 8px !important;
    box-shadow: 0 1px 3px rgba(11, 43, 58, .06);
    overflow: hidden;
    background: #fff;
  }
  li.product .vb-mid, li.product .vb-right, li.product .vb-header, li.product .vb-footer { display: none !important; }

  li.product .vb-thumb {
    grid-column: 1; grid-row: 1;
    width: 100% !important; height: auto !important;
    aspect-ratio: 1 / 1.15;   /* o 15 % vyššia, šírka rovnaká */
    overflow: hidden;
    padding: 0 !important;
    background: #f4f5f6 !important;
    border-right: 1px solid #eef0f2;
  }
  li.product .vb-thumb img {
    width: 100% !important; height: 100% !important;
    object-fit: cover;
    transform: scale(1.15);   /* zoom 15 % */
    transform-origin: center;
  }

  /* --- ľavý stĺpec pod obrázkom: sklad (+ miesto na hviezdičky) --- */
  li.product .vb-m-left {
    grid-column: 1; grid-row: 2;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 2px;
    padding: 14px 6px;
    border-right: 1px solid #eef0f2;
    text-align: center;
  }
  li.product .vb-m-avail {
    display: flex; align-items: center; gap: 6px;
    font-size: 14px; font-weight: 600; line-height: 1.2;
  }
  li.product .vb-m-avail.is-in   { color: #1f9d55; }
  li.product .vb-m-avail.is-back { color: #d97706; }
  li.product .vb-m-avail.is-out  { color: #c0392b; }
  li.product .vb-m-ico {
    flex: 0 0 18px; width: 18px; height: 18px; border-radius: 50%;
    background: currentColor center / 12px no-repeat;
  }
  li.product .is-in .vb-m-ico {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 6.2l2.3 2.3 4.7-5' fill='none' stroke='%23fff' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  }
  li.product .is-back .vb-m-ico {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M6 3v3.2l2 1.3' fill='none' stroke='%23fff' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E");
  }
  li.product .is-out .vb-m-ico {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M3.5 3.5l5 5M8.5 3.5l-5 5' fill='none' stroke='%23fff' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E");
  }
  li.product .vb-m-count { font-size: 13px; color: #6b7680; }
  li.product .vb-m-reviews:empty { display: none; }

  /* --- pravý stĺpec --- */
  li.product .vb-m-main {
    grid-column: 2; grid-row: 1 / 3;
    display: flex; flex-direction: column;
    min-width: 0;
    padding: 12px 10px 10px 12px;
  }
  /* klikateľné bloky (vlastnosti, cenník, sklad) – vzhľad bez zmeny */
  li.product a.vb-m-info,
  li.product a.vb-m-left { text-decoration: none !important; color: inherit !important; -webkit-tap-highlight-color: rgba(11, 43, 58, .06); }
  li.product a.vb-m-info { display: block; }
  li.product a.vb-m-info:hover .vb-m-spec,
  li.product a.vb-m-info:hover td,
  li.product a.vb-m-info:hover .vb-m-excerpt { text-decoration: none; }
  li.product .vb-m-head { display: block; color: #0b2b3a !important; text-decoration: none !important; }
  li.product .vb-m-title {
    display: block;
    font-size: 21px; font-weight: 700; line-height: 1.15;
    color: #0b2b3a; letter-spacing: -.01em;
  }
  li.product .vb-m-sub {
    display: block; margin-top: 3px;
    font-size: 13.5px; line-height: 1.3; color: #33424d;
  }
  li.product .vb-m-spec {
    margin-top: 2px;
    font-size: 13.5px; line-height: 1.3; color: #33424d;
  }
  li.product .vb-m-spec strong { font-weight: 700; color: #0b2b3a; }
  li.product .vb-m-dot { color: #8a959e; padding: 0 1px; }
  li.product .vb-m-spec strong { display: inline !important; width: auto !important; }

  /* cenník */
  li.product .vb-m-tiers {
    margin-top: 9px; padding-top: 8px;
    border-top: 1px solid #eef0f2;
  }
  li.product .vb-m-tiers table.bulk-ceny {
    width: 100% !important; margin: 0 !important;
    border: 0 !important; border-collapse: collapse;
    font-size: 13px; line-height: 1.55;
  }
  li.product .vb-m-tiers table.bulk-ceny td {
    padding: 0 0 0 2px !important; border: 0 !important; background: none !important;
    white-space: nowrap; color: #33424d;
  }
  li.product .vb-m-tiers table.bulk-ceny td.bulk-price-td { text-align: right; padding-right: 2px !important; }
  li.product .vb-m-tiers p.ask-for-quotation {
    display: flex; align-items: center; gap: 6px;
    margin: 8px 0 0 !important; padding-top: 7px;
    border-top: 1px solid #eef0f2;
    font-size: 12px !important; line-height: 1.3; text-align: left !important; color: #4a5762;
  }
  li.product .vb-m-tiers p.ask-for-quotation::before {
    content: "i";
    flex: 0 0 14px; width: 14px; height: 14px; border-radius: 50%;
    border: 1.3px solid #2a9fd6; color: #2a9fd6;
    font: 700 9px/12px Georgia, serif; text-align: center;
  }

  /* produkty bez množstevnej zľavy: popis + cena */
  li.product .vb-m-excerpt {
    margin-top: 9px; padding-top: 8px;
    border-top: 1px solid #eef0f2;
    font-size: 13px; line-height: 1.4; color: #33424d;
  }
  li.product .vb-m-dia { font-family: system-ui, sans-serif; font-size: .78em; font-weight: 500; margin-right: 3px; position: relative; top: -1px; }
  li.product .vb-m-title.is-name { font-size: 18px; line-height: 1.2; }
  li.product .vb-m-title.is-long { font-size: 16px; line-height: 1.25; }
  li.product .vb-m-info > .vb-m-price:first-child,
  li.product .vb-m-spec + .vb-m-price { margin-top: 9px; padding-top: 8px; border-top: 1px solid #eef0f2; }
  li.product .vb-m-price { margin-top: 6px; text-align: right; font-size: 15px; color: #0b2b3a; white-space: nowrap; }
  li.product .vb-m-price del { display: inline !important; color: #6b7680; font-size: 14px; font-weight: 400; margin: 0 5px 0 0 !important; opacity: 1; }
  li.product .vb-m-price strong { display: inline !important; font-weight: 700; }

  /* --- nákup: [− qty +]  medzera  [košík] --- */
  li.product .vb-m-buy { margin-top: auto; padding-top: 10px; }
  li.product .vb-m-buy form.cart { display: block !important; margin: 0 !important; width: 100%; }
  li.product .vb-m-buy table.quantity_input,
  li.product .vb-m-buy table.quantity_input tbody { display: block !important; width: 100% !important; margin: 0 !important; border: 0 !important; }
  /* pomery podľa návrhu: [− | pole | +] ≈ polovica, medzera, košík ≈ polovica */
  li.product .vb-m-buy table.quantity_input tr {
    display: flex !important; align-items: stretch; width: 100%;
    gap: 8px; /* medzera medzi + a košíkom proti omylu */
  }
  li.product .vb-m-buy table.quantity_input td { display: block; padding: 0 !important; border: 0 !important; background: none !important; }
  li.product .vb-m-buy table.quantity_input td:first-child { flex: 0 0 50%; min-width: 0; }
  li.product .vb-m-buy table.quantity_input td:last-child { flex: 1 1 0; min-width: 0; }

  li.product .vb-m-buy .quantity {
    display: flex !important; align-items: stretch; width: 100% !important;
    height: 42px; margin: 0 !important; transform: none !important;
    border: 1px solid #bfdde8 !important; border-radius: 6px; overflow: hidden; background: #fff;
  }
  li.product .vb-m-buy .vb-m-step {
    flex: 0 0 clamp(28px, 24%, 40px); width: auto; height: 100%;
    margin: 0; padding: 0; border: 0; border-radius: 0;
    background: #ddf0f7 !important; background-image: none !important; color: #111 !important;
    line-height: 1;
    cursor: pointer; touch-action: manipulation;
  }
  li.product .vb-m-buy .vb-m-step:first-of-type { border-right: 1px solid #bfdde8 !important; }
  li.product .vb-m-buy .vb-m-step:last-of-type  { border-left: 1px solid #bfdde8 !important; }
  li.product .vb-m-buy .vb-m-step:hover,
  li.product .vb-m-buy .vb-m-step:focus { background: #ddf0f7 !important; color: #111 !important; }
  li.product .vb-m-buy .vb-m-step:active { background: #c9e7f2 !important; }
  li.product .vb-m-buy .vb-m-step svg { display: block; width: 14px; height: 14px; }
  li.product .vb-m-buy .vb-m-step::before, li.product .vb-m-buy .vb-m-step::after { content: none !important; display: none !important; }
  li.product .vb-m-buy .vb-m-step { display: flex !important; align-items: center; justify-content: center; box-shadow: none !important; min-height: 0 !important; }
  li.product .vb-m-buy .quantity input.qty {
    flex: 1 1 auto; width: auto !important; min-width: 0; height: 100% !important;
    margin: 0 !important; padding: 0 !important;
    border: 0 !important; border-radius: 0 !important; box-shadow: none !important; background: #fff !important;
    text-align: center; font-size: 17px; font-weight: 600; color: #111;
    -moz-appearance: textfield; appearance: textfield;
  }
  li.product .vb-m-buy .quantity input.qty::-webkit-outer-spin-button,
  li.product .vb-m-buy .quantity input.qty::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

  li.product .vb-m-buy button.add_to_cart_button,
  li.product .vb-m-buy a.button {
    display: flex !important; align-items: center; justify-content: center;
    width: 100% !important; height: 42px !important;
    margin: 0 !important; padding: 0 4px !important;
    line-height: 1 !important; border-radius: 6px !important;
  }
  li.product .vb-m-buy a.button { font-size: 14px !important; }
  /* ikona ≈ 80 % výšky tlačidla */
  li.product .vb-m-cart-ico { display: block; width: 36px; height: 34px; }
}

/* veľmi úzke telefóny */
@media (max-width: 359px) {
  li.product .vb-m-title { font-size: 18px; }
  li.product .vb-m-cart-ico { width: 30px; height: 28px; }
}

/* 2026-12-02: ťuknutie na dlaždicu = zosivie celý box (nie len zasiahnutá časť) */
@media (max-width: 680px) {
  li.product .vb-row a, li.product .vb-row button, li.product .vb-row input { -webkit-tap-highlight-color: transparent !important; }
  li.product .vb-row { position: relative; }
  li.product .vb-row::after {
    content: ""; position: absolute; inset: 0; z-index: 5; pointer-events: none;
    background: rgba(11, 43, 58, .07); border-radius: inherit;
    opacity: 0; transition: opacity .15s;
  }
  li.product .vb-row.vb-tap::after,
  li.product .vb-row:has(> a.vb-thumb:active, > a.vb-m-left:active, a.vb-m-head:active, a.vb-m-info:active)::after { opacity: 1; transition: none; }
}
