﻿/*
Theme Name: tko2024
Theme URI: https://www.outtheboxthemes.com/wordpress-themes/shopstar/
Version: 1.0
Description: A customized version of Divi which adds a number of tiny features I need.
Author: Ake
Author URI: https://www.outtheboxthemes.com/
Template: shopstar
*/ 



/*.site-header {
    position: fixed;
    width: 100%;
    z-index: 99;
    top: 0;
	background-color: rgba(255, 255, 255, 1);
}

*/

@import url('https://fonts.googleapis.com/css2?family=Prompt&display=swap');

html {
	font-family: 'Prompt', sans-serif;
	-webkit-text-size-adjust: 100%;
	-ms-text-size-adjust:     100%;
	scroll-behavior: smooth;
}

/*--------------------------------------------------------------
# Typography
--------------------------------------------------------------*/
body,
div.wpforms-container form.wpforms-form input[type="text"],
div.wpforms-container form.wpforms-form input[type="email"],
div.wpforms-container form.wpforms-form input[type="tel"],
div.wpforms-container form.wpforms-form input[type="number"],
div.wpforms-container form.wpforms-form input[type="url"],
div.wpforms-container form.wpforms-form input[type="password"],
div.wpforms-container form.wpforms-form input[type="search"],
div.wpforms-container form.wpforms-form select,
div.wpforms-container form.wpforms-form textarea,
input,
select,
textarea {
	color: #404040;
	font-family: 'Prompt', sans-serif;	
	font-size: 1rem;
	line-height: 1.5;
	font-weight:200;
}

button {
	color: #FFF;
	font-family: 'Prompt', sans-serif;	
	font-size: 1rem;
	line-height: 1.5;
	font-weight:200;
}

h1,
h2,
h3,
h4,
h5,
h6 {
	font-family: 'Prompt', sans-serif;	
	clear: both;
}




.site-header .branding img {
    width: 120px;
    height: auto;
}

.site-header .branding {
    padding: 20px 0 20px 0;
}



.main-navigation li {
    float: left;
    position: relative;
    padding: 0 80px 0 0;
    display: block;
}

.toppromotion { color:#FFF; padding:5px;}
.top-bar {
    vertical-align: top;
    z-index: 10;
    height: 40px;
    display: inline-block;
    width: 100%; 
	padding:5px 15px;
	
	}


/* Site Header */

.top-bar .container,
.site-header .container,
.search-slidedown .container,
.site-content .container,
.site-footer .container {
	max-width: 1420px;
	margin: 0 auto;
	/*padding: 0 22px;*/
	position: relative;
	box-shadow: none;
	background-color: transparent;
	
}

footer { border-top: 1px solid #d1d1d1; }

.container {
	position: relative;
   max-width: 1420px;
    margin: 0 auto;
}




.site-footer .widgets ul li h2.widgettitle, .site-footer .widgets {
 background-color:#000; padding:6% 0 1%; text-align:left; }
 
 .site-footer .widgets .container .padder > ul > li:first-child {
    padding: 10px 18px 20px 18px;
 }
 
 
 .site-footer .widgets ul li h2.widgettitle {

    background: none !important;
}



.footer-sub { 
 background-color:#282425;
 width:100%;
 float:left;
 padding:1% 0;

}

.footer-sub li { width:25%;  float:left; text-align:center; list-style:none; border-right:1px solid #666;}



.carousel-slider .woocommerce-loop-product__title {
    color: var(--cs-product-text, #333);
    font-size: 1em !important;
    margin: 1rem;
    padding: 0;
    text-align: center; }
	
	
/**********   menu ********/	
.padder2 {
  display: flex;
  justify-content: space-between; /* หรือ space-around / space-evenly */
  align-items: center;
  height: 100px;
}

.padder3 {
  /*display: flex;
  align-items: center;*/
  width:100%;
  height: 20px;
  /*margin-top:20px;*/
 
  position:fixed; 
  z-index: 100; 
}

.main-navigation,
.branding,
.right-icon {
  width: 100%;
  display: flex;
  align-items: center;
}

/*
.branding,
.right-icon {
  width: 50%;
  display: flex;
  align-items: center;
}

*/

.left-icon,
.branding,
.right-icon {
  width: 33%;
  display: flex;
  align-items: center;
}

/* ตำแหน่งแต่ละกล่อง */
.main-navigation {
  justify-content: flex-start;
}
.branding {
  justify-content: center; z-index:101;
}
.right-icon {
  justify-content: flex-end;  padding-right:3%; z-index:101;
}



.right-icon li {
  list-style: none;
}

.right-icon {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  height: 100px;
}

.right-icon .icon-list {
  display: flex;            /* ✅ ให้ไอคอนเรียงในแนวนอน */
  flex-direction: row;      /* หรือไม่ใส่ก็ได้ เพราะเป็นค่าดีฟอลต์ */
  gap: 1.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.right-icon .icon-list li {
  display: flex;
  align-items: center;
}


	

.main-navigation ul ul a {
    width: 100%;
    font-weight: 400;
    text-transform: none;
    font-size: 15px;
    line-height: 28px;
    line-height: 17px;
    padding: 7px 10px 15px 10px;
    text-align: left;
    min-width: 260px;
    border-bottom: 0.2px solid #ccc;
}	

.site-header .container.bottom-border, .site-header .main-navigation.bottom-border, .site-header .main-navigation .container.bottom-border, .home .site-header.bottom-border, .main-navigation ul ul {
    border-bottom: 0px solid #000000;
}

.main-navigation .site-header.centered {
  justify-content: flex-start;
}


/* Smart Sticky Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 998;
  background: white;
  transition: transform 0.3s ease, opacity 0.3s ease;
  will-change: transform;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  backdrop-filter: blur(10px);
   width: 100%;
}

.site-header.hide-header {
  transform: translateY(-100%);
  opacity: 0;
}

.site-footer .widgets ul li h2.widgettitle, .site-footer .widgets {
    background-color: #FFF;
    padding: 6% 0 1%;
    text-align: left;
}

.site-footer .widgets ul li h2.widgettitle {
    color: #000000; font-weight:400;
}

footer .widgets  {background-color: #fff; }

.site-footer .bottom-bar{ background-color: #fff !important;
}


.site-footer .bottom-bar {
    color: #000;
    padding: 30px 0 30px;
    font-size: 12px;
    line-height: 22px;
    font-weight: 300;
    text-align: center; }
	
	
	.custom-cart-icon {
  position: relative;
  display: flex;
}

.custom-html-widget img { width:30px; height:auto;}



/*.custom-cart-icon i {
  font-size: 24px;
  stroke-width: 2px;
}*/

.custom-cart-icon .cart-count {
  position: absolute;
  top: -6px;
  right: -6px;
  background: red;
  color: white;
  font-size: 12px;
  font-weight: bold;
  padding: 2px 6px;
  border-radius: 50%;
}

/*custom-tab product desc************
.custom-tab-columns {
  display: flex;
  justify-content: space-between;
  gap: 40px;
  margin-top: 20px;
}
.custom-tab-columns .column {
  flex: 1;
  min-width: 200px;
}
.custom-tab-columns h4 {
  font-weight: bold;
  margin-bottom: 10px;
}
.custom-tab-columns ul {
  padding-left: 20px;
  list-style: none;
}
.custom-tab-columns ul li::before {
  content: '› ';
  color: #000;
  margin-right: 5px;
}
.custom-tab-columns img {
  margin-bottom: 10px;
}
*/
	
.alignwide,
.page-template-template-gutenberg .alignwide {
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
	padding-left: 0;
	padding-right: 0;
}
	

/* form ใน checkout*/	
.wc-block-components-text-input input[type=text], .wc-block-components-form .wc-block-components-text-input input[type=email], 
.wc-block-components-text-input input[type=email], .wc-blocks-components-select .wc-blocks-components-select__select, .wc-block-components-form .wc-block-components-text-input input[type=tel] { 
		border-top:0px !important;
		border-left:0px !important;
		border-right:0px !important;
		border-bottom: 1px solid hsla(0, 0%, 7%, .4) !important;
        border-radius: 0px !important;
}

.wc-block-components-totals-coupon .wc-block-components-panel__button { color:rgba(153,0,0,1); font-weight:500;}	

.wc-block-components-radio-control--highlight-checked label.wc-block-components-radio-control__option--checked-option-highlighted {
    border-radius: 0px;
    box-shadow: none !important;
	border:0px !important;
	
	 }
	

/* สำหรับ mega menu container */
#mega-menu-wrap-main-menu {
    position: relative;
    z-index: 10000 !important;
}

/* สำหรับตัว submenu */
#mega-menu-main-menu ul.mega-sub-menu {
    position: relative;
    z-index: 10001 !important;
    background-color: white; /* เผื่อซ้อนก็ยังเห็นเมนูชัดเจน */
}

ul.mega-sub-menu {
    background-color: white !important;
}


	
/* สำหรับตัว custom tab style กรณีทำโครงสร้างแสดง tab ใหม่*/
.custom-tabs {
  display: flex;
  border-bottom: 1px solid #ccc;
  list-style: none;
  margin-bottom: 20px;
  padding: 0;
}

.custom-tabs .tab-item {
  margin-right: 30px;
}

.custom-tabs .tab-item a {
  text-decoration: none;
  color: #666;
  font-weight: 500;
  padding: 8px 0;
  display: inline-block;
  border-bottom: 2px solid transparent;
  transition: 0.3s;
}

.custom-tabs .tab-item a.active,
.custom-tabs .tab-item a:hover {
  color: #000;
  border-color: #000;
}

.custom-tab-content .tab-panel {
  display: none;
}

.custom-tab-content .tab-panel.active {
  display: block;
}



/* plugin sale*/
.wpfront-notification-bar div.wpfront-close {
    top: 3.5px;
    font-size: 15px;
    padding: 8px 2px;
   

}



/* บีบความกว้างของเมนูภาษา */
li.gtranslate-menu {
  display: inline-flex !important;
  align-items: center;
  padding: 0 10px !important;
  margin: 0;
  white-space: nowrap;
  width: auto !important;
  max-width: none !important;
  flex: 0 0 auto !important;
}

/* ป้องกัน wrapper ดันบรรทัด */
li.gtranslate-menu .gtranslate_wrapper {
  display: inline-flex !important;
  width: auto !important;
  padding: 0 !important;
  margin: 0 !important;
}

/* ปรับสไตล์ลิงก์ภาษาให้เรียงในบรรทัดเดียว */
li.gtranslate-menu a {
  font-size: 13px;
  padding: 0 4px !important;
  margin: 0;
  display: inline-block;
  text-decoration: none;
  color: inherit;
}


li.gtranslate-menu a:hover {
  text-decoration: underline;
}


.site-footer .widgets a {
    text-decoration: none;


}



/* Select2 dropdown ให้เหมือน input แบบเส้นล่าง */

.select2-container--default .select2-selection--single {
    border: none !important;
    border-bottom: 1px solid #ccc !important;
    border-radius: 0 !important;
    background: transparent !important;
    height: 40px;
    padding-left: 0;
	
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 40px;
    padding-left: 0;

}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 40px;
}

.woocommerce form .form-row .select2-container {
    margin-bottom: 20px;
}



/************** TABLET  *******************************/
@media (max-width: 1023px) and (min-width: 768px) {

  .padder2 {
    position: relative;
    height: 80px;
  }

 .padder3 {
    position: static !important;
    height: auto;
    z-index: auto;
  }



  /* เลิก fix width แบบ % */
  .left-icon,
  .branding,
  .right-icon {
    width: auto;
  }

  /* LOGO center จริง */
  .branding {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    z-index: 90;
  }

  .site-header .branding img {
    width: 90px;
  }

  /* LEFT */
  .left-icon {
    display: flex;
    align-items: center;
    gap: 12px;
  }

  /* RIGHT */
  .right-icon {
    margin-left: auto;
    display: flex;
    gap: 14px;
  }
  
.branding {
  z-index:888;
}
.right-icon {
 z-index:88;
}


.site-footer .widgets ul li.widget {

padding: 0 0 15px !important; }



.site-footer .widgets ul li h2.widgettitle {

margin: 0 0 20px 0; }


}


	
	

/************** MOBILE  *******************************/
	@media screen and (max-width: 430px) { 


.site-header .branding img {
    width: 80px;
    height: auto;
}


/**
.site-header.centered .branding {
    text-align: left; }
	

.branding {
    justify-content: normal;   
}


.padder3 {
    top: 20px;
	width:auto;
   
}


.left-icon
{
  width: 18%;
  display: flex;
  align-items: center;
}


.branding
 {
  width: 52%;
  display: flex;
  align-items: start;
}


.right-icon {
  width: 30%;
  display: flex;
  align-items: center;
}

***********/

  .padder2 {
    position: relative;
    display: flex;
    align-items: center;
    height: 64px;
  }

  /* ยกเลิก width เดิม */
  .left-icon,
  .branding,
  .right-icon {
    width: auto;
  }

  /* LEFT: toggle + heart + search */
  .left-icon {
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 90;
  }

  /* LOGO center จริง */
  .branding {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    justify-content: center;
    z-index: 88;
  }

  .site-header .branding img {
    width: 80px;
  }

  /* RIGHT */
  .right-icon {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 90;
  }
  .right-icon .icon-list {
   
    gap: 0.5rem;
  }
  
  

  /* ป้องกัน Mega Menu ชน toggle bar */
  .padder3 {
    position: static;
    height: auto;
  }



/*  ขยับ icon 2 อันไปซ้าย*/

 /* icon wrapper ไม่ต้องเป็น reference */
  .right-icon {
    position: static;
  }

  /* ❤️ */
  .icon-heart {
    position: absolute;
    left: 48px;   /* ต่อจาก hamburger */
    top: 50%;
    transform: translateY(-50%);
    z-index: 300;
  }

  /* 🔍 */
  .icon-search {
    position: absolute;
    left: 55px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 300;
  }

  /* 👤 + 🛒 ยังอยู่ขวา */
  .icon-user,
  .icon-cart {
    position: relative;
    z-index: 300;
  }


  .left-icon,
  .right-icon,
  .icon-heart,
  .icon-search {
    z-index: 300;
  }

  



.branding {
  z-index:888;
}
/*
.right-icon {
 z-index:88;
}
*/	



  /* ถ้า mega menu อยู่ในสถานะ open */
  .padder2:has(.mega-menu-toggle.mega-menu-open) .icon-heart,
  .padder2:has(.mega-menu-toggle.mega-menu-open) .icon-search,
  .padder2:has(.mega-menu-toggle.mega-menu-open) .icon-user,
  .padder2:has(.mega-menu-toggle.mega-menu-open) .icon-cart, 
  .padder2:has(.mega-menu-toggle.mega-menu-open) .branding
   {
    opacity: 0;
    pointer-events: none;
  }


.site-footer .widgets ul li.widget {
              text-align: left !important;
    }	
	

}