/* ===== Gastrolux – custom tweaks (J5 migration 2026) ===== */
/* Menu: keep all items on one line on desktop */
@media (min-width: 992px){
  .sp-megamenu-parent { flex-wrap: nowrap !important; }
  .sp-megamenu-parent > li.sp-menu-item > a{
    padding-left:7px !important; padding-right:7px !important;
    font-size:12px !important; white-space:nowrap !important;
  }
}
/* Header logo size */
#sp-header .logo img, #sp-header img.sp-default-logo{ max-height:58px; width:auto; }
/* Compact, balanced dark footer */
#sp-footer{ background:#23272b; color:#c5ccd3; padding:34px 0 16px; }
#sp-footer a{ color:#c5ccd3; }
#sp-footer a:hover{ color:#fff; }
#sp-footer .sp-copyright{ display:block; width:100%; }
#sp-footer .ed-footer{ display:flex; flex-wrap:wrap; gap:34px; }
#sp-footer .ed-footer-col{ flex:1; min-width:210px; }
#sp-footer .ed-footer-col h4{ color:#fff; font-size:16px; margin:0 0 12px; }
#sp-footer .ed-footer-col p{ font-size:13px; line-height:1.65; margin:0 0 8px; }
#sp-footer .ed-footer-col ul{ list-style:none; padding:0; margin:0; }
#sp-footer .ed-footer-col li{ margin-bottom:6px; font-size:13px; }
#sp-footer .ed-copyline{ font-size:13px; color:#9aa1a8; margin-top:18px; padding-top:14px; border-top:1px solid rgba(255,255,255,.09); }

/* ===== VirtueMart category grid: products N-per-row (Helix3 omits VM grid CSS) ===== */
.productlist .row, .browse-view .row, .productdetails .row,
ul.products, .product-block-wrapper{ display:flex; flex-wrap:wrap; margin-left:-10px; margin-right:-10px; }
.product.vm-col{ float:none; box-sizing:border-box; padding:0 10px 24px; }
@media (min-width:992px){
  .product.vm-col-2{ width:50%; }
  .product.vm-col-3{ width:33.333%; }
  .product.vm-col-4{ width:25%; }
}
@media (min-width:768px) and (max-width:991px){
  .product.vm-col-2,.product.vm-col-3,.product.vm-col-4{ width:50%; }
}
@media (max-width:767px){
  .product.vm-col-2,.product.vm-col-3,.product.vm-col-4{ width:100%; }
}
/* tidy the product card */
.product.vm-col .spacer.product-container{ height:100%; border:1px solid #eee; border-radius:6px; padding:12px; background:#fff; }
.product.vm-col .vm-product-media-container img{ max-width:100%; height:auto; }
.product.vm-col .vertical-separator{ border:0; }

/* ===== Sidebar module menus: clean single-column vertical list ===== */
/* (Bootstrap .nav makes short items wrap 2-per-line; force one item per line) */
.sp-module ul.mod-menu.nav,
#sp-left ul.mod-menu.nav{ display:block !important; flex-wrap:nowrap; list-style:none; padding-left:0; margin:0; }
.sp-module ul.mod-menu.nav > li,
#sp-left ul.mod-menu.nav > li{ display:block !important; width:100% !important; float:none !important; }
.sp-module ul.mod-menu.nav li > a{ display:block; padding:7px 4px; border-bottom:1px solid #f0f0f0; }
.sp-module ul.mod-menu.nav li > a:hover{ background:#f7f7f7; }
.sp-module ul.mod-menu.nav ul{ list-style:none; padding-left:14px; margin:0; }
.sp-module ul.mod-menu.nav .nav-item .nav-item a{ padding-left:14px; font-size:13px; }

/* ===== VirtueMart category blocks: honor width25/width33 (4 or 3 per row) ===== */
/* Helix3 doesn't ship VM's frontend grid CSS, so .width25/.floatleft do nothing by default */
.row:has(> .category.floatleft){ display:flex; flex-wrap:wrap; }
.category.floatleft{ float:none; box-sizing:border-box; padding:0 12px 26px; }
.category.width25{ width:25%; }
.category.width33{ width:33.333%; }
.category.width50{ width:50%; }
.category.width100{ width:100%; }
@media (max-width:991px){ .category.width25, .category.width33{ width:50%; } }
@media (max-width:575px){ .category.width25, .category.width33, .category.width50{ width:100%; } }
.category.vertical-separator{ border:0; }
.category .spacer img, .category img{ max-width:100%; height:auto; }

/* ===== Compact category sort / manufacturer / pagination toolbar ===== */
.orderby-displaynumber{ display:flex; flex-wrap:wrap; align-items:center; gap:8px 18px; font-size:13px; padding:8px 0; border-bottom:1px solid #eee; margin-bottom:14px; }
.orderby-displaynumber .vm-order-list, .orderby-displaynumber .floatright, .orderby-displaynumber .floatleft{ float:none !important; }
.orderlistcontainer{ display:inline-flex; align-items:center; gap:6px; position:relative; }
.orderlistcontainer .title{ font-weight:600; white-space:nowrap; }
.orderlistcontainer .activeOrder>a{ display:inline-block; padding:3px 10px; border:1px solid #ddd; border-radius:4px; background:#fafafa; white-space:nowrap; text-decoration:none; }
.orderlistcontainer .orderlist{ display:none; position:absolute; top:100%; left:0; min-width:180px; background:#fff; border:1px solid #ddd; box-shadow:0 4px 12px rgba(0,0,0,.12); z-index:60; border-radius:4px; }
.orderlistcontainer:hover .orderlist{ display:block; }
.orderlistcontainer .orderlist>div>a{ display:block; padding:6px 12px; white-space:nowrap; text-decoration:none; }
.orderlistcontainer .orderlist>div>a:hover{ background:#f2f2f2; }
.display-number{ font-size:13px; display:inline-flex; align-items:center; gap:6px; }
.display-number select{ font-size:13px; padding:2px 6px; width:auto; height:30px; }
.vm-pagination{ font-size:13px; }
.vm-pagination .pagination{ display:inline-flex; flex-wrap:wrap; gap:3px; margin:8px 0; padding:0; list-style:none; }
.vm-pagination .pagination>li{ list-style:none; }
.vm-pagination .pagination>li>a, .vm-pagination .pagination>li>span{ padding:3px 9px; font-size:13px; border-radius:3px; }

/* ===== Cart: fix Bootstrap-3 leftovers on Helix3/J5 ===== */
/* BS3 .hidden class doesn't exist in BS5 -> vm-preloader.gif was stuck visible/spinning */
.hidden{ display:none !important; }
.vm-preloader.hidden{ display:none !important; }
/* BS3 glyphicons aren't loaded -> render cart button icons via unicode */
.glyphicon{ font-style:normal; font-weight:normal; line-height:1; display:inline-block; }
.glyphicon-refresh:before{ content:"\21BB"; }       /* update quantity */
.glyphicon-remove:before{ content:"\2715"; }        /* remove from cart */
.glyphicon-ok:before{ content:"\2713"; }            /* confirm */
.glyphicon-arrow-right:before{ content:"\2192"; }
.glyphicon-shopping-cart:before{ content:"\1F6D2"; }
.glyphicon-chevron-right:before{ content:"\203A"; }
.glyphicon-chevron-left:before{ content:"\2039"; }

/* ===== Top bar: store contact (left) + login (right) — restored from old FLEX template ===== */
#sp-top-bar, #sp-top1, #sp-top2{ background:#23272b; }
#sp-top1, #sp-top2{ color:#cfd5da; font-size:13px; padding:7px 0; }
#sp-top1 a, #sp-top2 a{ color:#cfd5da; text-decoration:none; }
#sp-top1 a:hover, #sp-top2 a:hover{ color:#fff; }
.ed-topbar-contact{ display:flex; flex-wrap:wrap; gap:4px 16px; align-items:center; }
.ed-topbar-contact .ed-tb{ white-space:nowrap; }
.ed-topbar-contact .ed-tb-ic{ opacity:.85; margin-right:3px; }
/* compact, right-aligned login (username + password + login button) */
#sp-top2{ text-align:right; }
#sp-top2 .mod-login, #sp-top2 form{ display:inline-flex; flex-wrap:wrap; gap:6px; align-items:center; justify-content:flex-end; margin:0; }
#sp-top2 .control-group, #sp-top2 .form-group{ margin:0 !important; }
#sp-top2 input[type=text], #sp-top2 input[type=password]{ height:28px; font-size:12px; padding:2px 8px; width:120px; margin:0; }
#sp-top2 label{ font-size:12px; margin:0; }
#sp-top2 button, #sp-top2 .btn{ height:28px; font-size:12px; padding:3px 12px; line-height:1; }
/* hide the forgot-username/password list + remember checkbox so the bar stays one line */
#sp-top2 .mod-login ul, #sp-top2 form ul, #sp-top2 .checkbox, #sp-top2 [class*="remember"]{ display:none; }
@media (max-width:767px){ #sp-top1, #sp-top2{ text-align:center; } .ed-topbar-contact{ justify-content:center; } #sp-top2 .mod-login,#sp-top2 form{ justify-content:center; } }

/* ===== Popup-style login (replaces inline boxes in top bar) ===== */
#sp-top2 .ed-login-wrap{ position:relative; display:inline-block; }
#sp-top2 .ed-login-trigger{ background:#e8491d; color:#fff; border:0; border-radius:4px; padding:6px 18px; font-size:13px; cursor:pointer; height:auto; }
#sp-top2 .ed-login-trigger:before{ content:"\1F464"; margin-right:7px; }
#sp-top2 .ed-login-trigger:hover{ background:#cf3d16; }
#sp-top2 .ed-login-popup{ display:none; position:absolute; top:calc(100% + 12px); right:0; width:290px; background:#fff; color:#333; border-radius:10px; box-shadow:0 12px 38px rgba(0,0,0,.22); padding:20px; z-index:300; text-align:left; }
#sp-top2 .ed-login-popup:before{ content:""; position:absolute; top:-7px; right:22px; width:14px; height:14px; background:#fff; transform:rotate(45deg); }
#sp-top2 .ed-login-popup.open{ display:block; }
#sp-top2 .ed-login-popup form{ display:block !important; }
#sp-top2 .ed-login-popup .input-group-text{ display:none !important; }   /* drop oversized icon prefixes */
#sp-top2 .ed-login-popup .form-group, #sp-top2 .ed-login-popup .input-group{ display:block !important; width:100% !important; margin:0 0 12px !important; }
#sp-top2 .ed-login-popup input[type=text], #sp-top2 .ed-login-popup input[type=password]{ width:100% !important; box-sizing:border-box; height:40px !important; padding:8px 12px !important; border:1px solid #ddd; border-radius:6px; font-size:14px; color:#333; }
#sp-top2 .ed-login-popup label{ font-size:13px; color:#555; margin:0 0 4px; display:block; text-align:left; }
#sp-top2 .ed-login-popup .btn, #sp-top2 .ed-login-popup button{ width:100% !important; height:40px !important; background:#e8491d; color:#fff; border:0; border-radius:6px; font-size:14px; }
#sp-top2 .ed-login-popup .checkbox, #sp-top2 .ed-login-popup [class*="remember"]{ display:flex !important; align-items:center; gap:6px; margin:4px 0 12px; font-size:13px; }
#sp-top2 .ed-login-popup ul{ display:block !important; list-style:none; padding:0; margin:12px 0 0; font-size:12px; }
#sp-top2 .ed-login-popup ul a{ color:#e8491d; }

/* === Add-to-cart popup (fancybox): box collapses to 0x0 so text overlaps — force it to fit content — 2026-06-30 === */
#fancybox-content {
    width: auto !important;
    height: auto !important;
    overflow: visible !important;
    max-width: 90vw;
}
#fancybox-inner {
    width: auto !important;
    height: auto !important;
    overflow: visible !important;
}
/* === end === */

/* === Cart "Informācija rēķina piestādīšanai" link as red button (match top-right Pieslēgties #e8491d) — 2026-06-30 === */
#sp-component a.details {
    display: inline-block;
    background-color: #e8491d;
    color: #fff !important;
    padding: 6px 18px;
    border-radius: 4px;
    font-size: 13px;
    line-height: 1.3;
    text-decoration: none !important;
    border: 0;
}
#sp-component a.details:hover,
#sp-component a.details:focus { background-color: #cf3d16; color: #fff !important; }

/* === Left category menu: clearly mark the active/selected category — 2026-06-30 === */
#sp-left ul.menu li.active a,
#sp-left ul.menu li.current a,
.sp-module ul.menu li.active a {
    color: #e8491d !important;
    font-weight: 700 !important;
}
#sp-left ul.menu li.active,
.sp-module ul.menu li.active {
    background-color: rgba(232, 73, 29, 0.08);
    border-left: 3px solid #e8491d;
}
/* === end === */
