#footer {
  background-color: #fff !important;
  width: 1000px !important;
}

#footer .item_footer {
  width: 1000px !important;
}

#maingallery .listimg {
  margin: 0 -4px;
  width: calc(100% + 8px);
}

#maingallery .listimg tbody {
  display: block;
  box-sizing: border-box;
}

#maingallery .listimg tr {
  display: flex;
  flex-wrap: wrap;
  box-sizing: border-box;
}

#maingallery .listimg td {
  flex: 0 0 33.3333%;
  max-width: 33.3333%;
  padding: 4px !important;
  box-sizing: border-box;
}

#maingallery .listimg td > div:first-child {
  background-color: #04a5db;
  font-size: 12px;
  padding: 0 !important;
  line-height: 24px;
  color: #fff;
  box-sizing: border-box;
}

#maingallery .listimg img {
  display: block;
  width: 100%;
  height: 120px;
  object-fit: cover;
  object-position: 50% 50%;
}

.detail-table img {
  max-width: 100%;
}

#main_image,
#main_image2,
#main_image img {
  width: 100% !important;
  height: auto !important;
}

#main_image img {
  max-height: 350px;
  object-fit: contain;
  object-position: 50% 50%;
}

#main_image2 + div {
  width: 13px !important;
  margin: 0 !important;
}

#main_image2 ~ .gallery_demo {
  width: calc(100% - 46px) !important;
}

#main_image2 ~ .gallery_demo + div {
  width: 13px !important;
  margin: 0 !important;
}

@media (max-width: 991px) {
  #main,
  #head,
  #baner_under,
  #content,
  #left,
  #components,
  #components .new_products,
  #right,
  #footer,
  #footer .item_footer {
    max-width: 100% !important;
    box-sizing: border-box;
    overflow: hidden;
  }

  #content {
    display: flex;
    flex-direction: column;
  }

  #components {
    width: 100%;
    order: -1;
    float: none;
    box-sizing: border-box;
    margin: 0;
    padding: 0 10px;
  }

  #components .new_products {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-gap: 8px;
    width: 100%;
  }

  #components .new_products .top {
    width: 100%;
    grid-column: span 2;
  }

  #components .new_products .products,
  #components .new_products .products_r {
    width: unset;
    float: none;
    margin: 0;
    padding: 8px;
    background: 0;
    border: 1px solid #ededed;
    border-radius: 4px;
    box-sizing: border-box;
    height: auto;
  }

  #components .new_products .products img,
  #components .new_products .products_r img {
    display: block;
    width: 100%;
    padding: 0;
    margin: 0;
    box-sizing: border-box;
    float: none;
    object-fit: cover;
    object-position: 50% 50%;
  }

  #components .new_products .products br,
  #components .new_products .products_r br {
    display: none;
  }

  #components .new_products span.giaco {
    display: block;
    float: none;
    width: 100%;
    height: auto;
    box-sizing: border-box;
    padding: 10px 0 2px;
  }

  #components .new_products .products .pice_by,
  #components .new_products .products_r .pice_by {
    height: auto;
    float: none;
    width: 100%;
    box-sizing: border-box;
    padding: 0;
    font-size: 12px;
    font-weight: 700;
    position: relative;
    padding-bottom: 20px;
  }

  #components .new_products .products_r .pice_by a,
  #components .new_products .products .pice_by a {
    display: inline-flex;
    width: 80px;
    position: absolute;
    bottom: 0;
    left: 0;
  }

  #components .new_products .products_r .pice_by img,
  #components .new_products .products .pice_by img {
    float: none;
    width: 100%;
    height: auto;
  }

  #left {
    display: flex;
    flex-direction: column;
    width: 100%;
    float: none;
    margin-top: 10px;
    box-sizing: border-box;
    padding: 0 10px;
  }

  #left .boxA,
  #left .box2A {
    width: 100%;
    float: none;
    box-sizing: border-box;
  }

  .glossymenu,
  .glossymenu li ul {
    width: 100% !important;
  }

  .glossymenu li a {
    width: 100%;
    box-sizing: border-box;
  }

  #right {
    display: flex;
    flex-direction: column;
    width: 100%;
    float: none;
    margin-top: 10px;
    box-sizing: border-box;
    padding: 0 10px;
  }

  .News_box_list,
  .bottom_left_box,
  .top_left_box,
  #List_News,
  #List_News .row {
    width: unset !important;
    float: none !important;
  }

  .News_box_list .bottom_left_box .top_left_box {
    padding-bottom: 0;
  }

  #List_News {
    padding: 8px;
  }

  #List_News .row {
    display: flex;
    margin: 0;
  }

  #List_News .row:not(:last-child) {
    margin-bottom: 8px;
  }

  #List_News .row .image {
    width: 64px;
    margin-right: 16px;
  }

  #List_News .row .image img {
    float: none;
    width: 100%;
    display: block;
    box-sizing: border-box;
    padding: 0;
  }

  #List_News .row .text {
    flex: 1;
  }

  .sidebar-block {
    width: 100% !important;
    float: none;
  }

  .sidebar-block .title {
    width: 100%;
  }

  .sidebar-partners {
    display: flex;
    flex-wrap: wrap;
    padding: 4px;
  }

  .sidebar-partner-item {
    float: none !important;
    width: auto !important;
    flex: 0 0 50%;
    max-width: 50%;
    box-sizing: border-box;
    padding: 4px !important;
  }

  .sidebar-partner-item img {
    width: 100% !important;
    height: auto !important;
    min-height: 100%;
  }

  .sidebar-cart {
    width: 100% !important;
    padding: 8px !important;
    box-sizing: border-box;
    font-size: 14px !important;
    line-height: 30px !important;
  }

  .sidebar-cart img {
    width: 33px;
    height: 30px;
    margin-right: 8px;
  }

  #sphot .row {
    display: flex;
    width: 100%;
    flex-wrap: wrap;
    float: none;
    box-sizing: border-box;
    padding: 4px;
    margin: 0 !important;
  }

  #sphot .image {
    flex: 0 0 25%;
    max-width: 25%;
    margin: 0;
    padding: 4px;
    float: none;
    box-sizing: border-box;
  }

  #sphot .row .image img {
    width: 100% !important;
    float: none !important;
    margin: 0 !important;
    height: 80px !important;
    padding: 0 !important;
    object-fit: cover;
    object-position: 50% 50%;
    margin: 0 !important;
    box-sizing: border-box;
  }

  .left-sidebar-adver {
    display: flex;
    flex-wrap: wrap;
    width: 100% !important;
    box-sizing: border-box;
    padding: 8px 4px;
    align-items: flex-start;
  }

  .left-sidebar-adver a {
    display: flex;
    flex: 0 0 50%;
    max-width: 50%;
    padding: 0 4px;
    box-sizing: border-box;
  }

  .left-sidebar-adver img {
    display: block;
    width: 100% !important;
    margin-top: 8px;
    box-sizing: border-box;
  }

  #left .boxB {
    width: 100%;
    float: none;
  }

  #left .box2B {
    width: 100%;
    float: none;
    box-sizing: border-box;
    padding: 4px;
    display: flex;
    flex-wrap: wrap;
  }

  #left .box2B .img_bg {
    flex: 0 0 50%;
    max-width: 50%;
    padding: 4px;
  }

  #left .box2B .img_bg img {
    display: block;
    width: 100% !important;
    min-height: 100%;
    object-fit: cover;
    object-position: 50% 50%;
  }

  #footer .item_footer {
    padding: 0 15px;
    box-sizing: border-box;
  }

  /* products page */
  #Hightlight_products,
  #tabs_products,
  #sp_moi,
  #sp_noibat,
  #sp_banchay {
    width: 100% !important;
    float: none !important;
  }

  #tabs_products {
    height: 35px;
  }

  #tabs_products ul {
    display: block !important;
    white-space: nowrap !important;
    overflow: auto !important;
    padding-bottom: 8px !important;
  }

  #tabs_products ul li {
    display: inline-block !important;
    float: none !important;
  }

  #tabs_products ul li:after {
    content: '';
    display: table;
    clear: both;
  }

  .product-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-gap: 8px;
    width: 100%;
  }

  .product-grid .products,
  .product-grid .products_r {
    width: unset !important;
    float: none !important;
    margin: 0 !important;
    padding: 8px !important;
    background: 0 !important;
    border: 1px solid #ededed !important;
    border-radius: 4px !important;
    box-sizing: border-box !important;
    height: auto !important;
  }

  .product-grid .products img,
  .product-grid .products_r img {
    display: block !important;
    width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    box-sizing: border-box !important;
    float: none !important;
    object-fit: cover !important;
    object-position: 50% 50% !important;
  }

  .product-grid .products br,
  .product-grid .products_r br {
    display: none !important;
  }

  .product-grid span.giaco {
    display: block !important;
    float: none !important;
    width: 100% !important;
    height: auto !important;
    box-sizing: border-box !important;
    padding: 10px 0 2px !important;
  }

  .product-grid .products .pice_by,
  .product-grid .products_r .pice_by {
    height: auto !important;
    float: none !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding: 0 !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    position: relative !important;
    padding-bottom: 20px !important;
  }

  .product-grid .products_r .pice_by a,
  .product-grid .products .pice_by a {
    display: inline-flex !important;
    width: 80px !important;
    position: absolute !important;
    bottom: 0 !important;
    left: 0 !important;
  }

  .product-grid .products_r .pice_by img,
  .product-grid .products .pice_by img {
    float: none !important;
    width: 100% !important;
    height: auto !important;
  }

  #maingallery .listimg td {
    flex: 0 0 50%;
    max-width: 50%;
  }

  .product_tbl > tbody,
  .product_tbl > tbody > tr,
  .product_tbl > tbody > tr > td {
    display: block;
  }

  .product_tbl > tbody > tr {
    margin-bottom: 20px;
  }

  .product_tbl > tbody > tr > td:first-child {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 8px;
  }

  .order-table tbody,
  .order-table tr,
  .order-table td {
    display: block;
  }

  .order-table tr {
    margin-bottom: 16px;
  }

  .order-table td.content {
    margin-bottom: 8px;
    font-weight: 700;
  }
}
