Copyright © 2020 Hmart. All Rights Reserved.

require(['jquery'],function($){
$(document).ready(function() {
$('.top-banner .close-btn').click(function(){
$('.top-banner').css('display','none');
})
})
})
.top-banner {position: relative; background: url('https://www.hmart.com/media/wysiwyg/hmart/main/030420_casamaru_top_eng.jpg')center; background-size: cover; background-repeat: no-repeat; cursor: pointer; }
.top-banner .close-btn {position: absolute; top: 50%; transform: translateY(-50%); right: 20px; font-size: 15px; font-weight: bold; cursor: pointer;}
.top-banner .close-btn:before {content: '\e92e'; font-family: 'icons'; vertical-align: text-bottom;}
@media screen and (min-width: 768px) {
.top-banner {height: 43px;}
}
@media screen and (max-width: 767px) {
.top-banner {height: 25px;}
}
@media screen and (max-width: 639px) {
.top-banner .close-btn{right: 15px; font-size: 13px; }
}
@media screen and (max-width: 479px) {
.top-banner .close-btn{right: 10px; font-size: 10px; }
}
.site-link {padding: 8px 0;}
.site-link div { cursor: pointer}
.site-link div img {display: block; width: auto; height: 30px; margin: 0 30px;}
@media screen and (max-width: 767px) {
.site-link div img {width: 220px; height: auto; margin: 0;}
}
require(['jquery','bxslider'],function($){
$(document).ready(function() {
$('.main-slides .main-slider').bxSlider({
auto:true,
pause: 10000,
touchEnabled:true,
oneToOneTouch:true,
swipeThreshold:10,
preventDefaultSwipeX: true,
maxSlides: 5,
slideMargin : 0,
moveSlides: 1,
minSlides: 2,
pager: true,
controls: false
});
slideHeight();
});
$(window).on('resizeEnd', function() {
slideHeight();
});
function slideHeight()
{
if($('.main-slides .main-slider').offset()) {
var slideHeight = 445;
if($('body').width() <= 1200){
var percent = 445/1200 * 100;
slideHeight = percent * $(window).width() / 100;
}
$(".main-slides .bx-viewport").css('height',slideHeight+'px');
$(".main-slides .main-slider .banner-slide").each(function( index ) {
$(this).css('height',slideHeight+'px');
});
}
}
});
.main-slides .bx-clone {display: none;}
.main-slides .bx-wrapper .bx-controls .bx-pager {bottom: 4%;}
.main-slides .bx-wrapper .bx-controls .bx-pager-item a {width: 12px; height: 12px; line-height: 12px;}
.main-slides .banner-slide {background-size: cover; background-repeat: no-repeat; background-position: center center; cursor: pointer;}
require(['jquery','bxslider'],function($){
$(document).ready(function() {
if(jQuery(window).width() < 768 ) {
$('.product-slider .product-items').bxSlider({
auto: false,
touchEnabled: true,
oneToOneTouch: true,
swipeThreshold: 10,
preventDefaultSwipeX: true,
maxSlides: 6,
slideWidth: 200,
slideMargin: 0,
moveSlides: 1,
minSlides: 2,
pager: false,
controls: true,
prevText: '<span class="icon fa fa-angle-left">',
nextText: '<span class="icon fa fa-angle-right">'
});
}else {
$('.product-slider .product-items').bxSlider({
auto: false,
touchEnabled: true,
oneToOneTouch: true,
swipeThreshold: 10,
preventDefaultSwipeX: true,
maxSlides: 6,
slideWidth: 200,
slideMargin: 0,
moveSlides: 6,
minSlides: 6,
pager: false,
controls: true,
prevText: '<span class="icon fa fa-angle-left">',
nextText: '<span class="icon fa fa-angle-right">'
});
}
});
});
.products-slider span {vertical-align: middle;}
.main-online-specials {position: relative; display: inline-block; margin-right: -15px; margin-left: -15px;}
.main-online-specials .item {float: left; width: 33.3333%; padding: 0 15px; box-sizing: border-box;}
.main-online-specials .item a {display:block;}
.main-online-specials .item a:hover {opacity: .9;}
.main-online-specials .item.two a:last-child {position: absolute; bottom: 0; width: calc(33.3333% - 30px);}
.main-online-specials .item a span.text {display: none;}
.main-online-specials .item a img {display:block;}
.main-online-specials.mobile {display: none;}
@media screen and (max-width: 768px) and (min-width: 480px){
.main-online-specials {margin-right: -5px; margin-left: -5px;}
.main-online-specials .item {padding: 0 5px;}
.main-online-specials .item.two a:last-child {width: calc(33.3333% - 10px);}
}
@media screen and (max-width: 479px) {
.main-online-specials {margin-right: -10px; margin-left: -10px;}
.main-online-specials .item {width: 100%; padding: 0 10px;}
.main-online-specials .item a {margin-bottom: 10px;}
.main-online-specials .item:last-child a:last-child {margin-bottom: 0;}
.main-online-specials .item a img {width: 100%}
.main-online-specials .item.two a:last-child {position: static; width: 100%;}
}
.products-slider span {vertical-align: middle;}
.featured .main-title span {vertical-align: middle;}
.featured .banners {display: flex; border-top: 1px solid #ddd;}
.featured .small-banner-wrapper {display: flex;}
.featured .small-banner-wrapper .small-banner {border-right: 1px solid #ddd;}
.featured .banners img {display: block; width: 100%;}
@media screen and (max-width: 479px) {
.featured .banners {display: block; border-top: none;}
.featured .big-banner {width: 100%;}
.featured .small-banner-wrapper {display: block; overflow: hidden; border-right: 1px solid #ddd;}
.featured .small-banner-wrapper .small-banner {width: 50%; float: left; border-top: 1px solid #ddd; border-left: 1px solid #ddd; border-right: none; box-sizing: border-box;}
}
.health-beauty-product .main-title span {vertical-align: middle;}
.health-beauty-product .banners {display: flex; border-top: 1px solid #ddd;}
.health-beauty-product .small-banner-wrapper {display: flex;}
.health-beauty-product .small-banner-wrapper .small-banner {border-right: 1px solid #ddd;}
.health-beauty-product .banners img {display: block; width: 100%;}
@media screen and (max-width: 479px) {
.health-beauty-product .banners {display: block; border-top: none;}
.health-beauty-product .big-banner {width: 100%;}
.health-beauty-product .small-banner-wrapper {display: block; overflow: hidden; border-right: 1px solid #ddd;}
.health-beauty-product .small-banner-wrapper .small-banner {width: 50%; float: left; border-top: 1px solid #ddd; border-left: 1px solid #ddd; border-right: none; box-sizing: border-box;}
}
.home-kitchen-product .main-title span {vertical-align: middle;}
.home-kitchen-product .banners {display: flex; border-top: 1px solid #ddd;}
.home-kitchen-product .small-banner-wrapper {display: flex;}
.home-kitchen-product .small-banner-wrapper .small-banner {border-right: 1px solid #ddd;}
.home-kitchen-product .banners img {display: block; width: 100%;}
@media screen and (max-width: 479px) {
.home-kitchen-product .banners {display: block; border-top: none;}
.home-kitchen-product .big-banner {width: 100%;}
.home-kitchen-product .small-banner-wrapper {display: block; overflow: hidden; border-right: 1px solid #ddd;}
.home-kitchen-product .small-banner-wrapper .small-banner {width: 50%; float: left; border-top: 1px solid #ddd; border-left: 1px solid #ddd; border-right: none; box-sizing: border-box;}
}
Copyright © 2020 Hmart. All Rights Reserved.

