div#container
{
   width: 1250px;
   position: relative;
   margin: 0 auto 0 auto;
   text-align: left;
}
body
{
   background-color: #FFFFFF;
   color: #000000;
   font-family: Arial;
   font-weight: normal;
   font-size: 13px;
   line-height: 1.1875;
   margin: 0;
   text-align: center;
}
#wb_Text33 
{
   background-color: transparent;
   background-image: none;
   border: 0px solid #000000;
   border-radius: 0px;
   padding: 0;
   margin: 0;
   text-align: left;
}
#wb_Text33 div
{
   text-align: left;
}
#Shape3
{
   border-width: 0;
   vertical-align: top;
}
#wb_Text53 
{
   background-color: transparent;
   background-image: none;
   border: 0px solid #000000;
   border-radius: 0px;
   padding: 0;
   margin: 0;
   text-align: left;
}
#wb_Text53 div
{
   text-align: left;
}
#wb_Text160 
{
   background-color: transparent;
   background-image: none;
   border: 0px solid #000000;
   border-radius: 0px;
   padding: 0;
   margin: 0;
   text-align: left;
}
#wb_Text160 div
{
   text-align: left;
}
#wb_Text161 
{
   background-color: transparent;
   background-image: none;
   border: 0px solid #000000;
   border-radius: 0px;
   padding: 0;
   margin: 0;
   text-align: left;
}
#wb_Text161 div
{
   text-align: left;
}
#wb_Text162 
{
   background-color: transparent;
   background-image: none;
   border: 0px solid #000000;
   border-radius: 0px;
   padding: 0;
   margin: 0;
   text-align: left;
}
#wb_Text162 div
{
   text-align: left;
}
#wb_Text163 
{
   background-color: transparent;
   background-image: none;
   border: 0px solid #000000;
   border-radius: 0px;
   padding: 0;
   margin: 0;
   text-align: left;
}
#wb_Text163 div
{
   text-align: left;
}
#wb_Image252
{
   vertical-align: top;
}
#Image252
{
   border: 0px solid #000000;
   border-radius: 0px;
   box-sizing: border-box;
   padding: 0;
   margin: 0;
   left: 0;
   top: 0;
   width: 100%;
   height: 100%;
}
#wb_Image259
{
   vertical-align: top;
}
#Image259
{
   border: 0px solid #000000;
   border-radius: 0px;
   box-sizing: border-box;
   padding: 0;
   margin: 0;
   left: 0;
   top: 0;
   width: 100%;
   height: 100%;
}
#wb_Image264
{
   vertical-align: top;
}
#Image264
{
   border: 0px solid #000000;
   border-radius: 0px;
   box-sizing: border-box;
   padding: 0;
   margin: 0;
   left: 0;
   top: 0;
   width: 100%;
   height: 100%;
}
#wb_Text164 
{
   background-color: transparent;
   background-image: none;
   border: 0px solid #000000;
   border-radius: 0px;
   padding: 0;
   margin: 0;
   text-align: left;
}
#wb_Text164 div
{
   text-align: left;
}
#wb_Image265
{
   vertical-align: top;
}
#Image265
{
   border: 0px solid #000000;
   border-radius: 0px;
   box-sizing: border-box;
   padding: 0;
   margin: 0;
   left: 0;
   top: 0;
   width: 100%;
   height: 100%;
}
#wb_Text166 
{
   background-color: transparent;
   background-image: none;
   border: 0px solid #000000;
   border-radius: 0px;
   padding: 0;
   margin: 0;
   text-align: left;
}
#wb_Text166 div
{
   text-align: left;
}
#wb_Text167 
{
   background-color: transparent;
   background-image: none;
   border: 0px solid #000000;
   border-radius: 0px;
   padding: 0;
   margin: 0;
   text-align: left;
}
#wb_Text167 div
{
   text-align: left;
}
#wb_Image267
{
   vertical-align: top;
}
#Image267
{
   border: 0px solid #000000;
   border-radius: 0px;
   box-sizing: border-box;
   padding: 0;
   margin: 0;
   left: 0;
   top: 0;
   width: 100%;
   height: 100%;
}
#wb_Text165 
{
   background-color: transparent;
   background-image: none;
   border: 0px solid #000000;
   border-radius: 0px;
   padding: 0;
   margin: 0;
   text-align: left;
}
#wb_Text165 div
{
   text-align: left;
}
#wb_Text2 
{
   background-color: transparent;
   background-image: none;
   border: 0px solid #000000;
   border-radius: 0px;
   padding: 0;
   margin: 0;
   text-align: left;
}
#wb_Text2 div
{
   text-align: left;
}
#wb_Image13
{
   vertical-align: top;
}
#Image13
{
   border: 0px solid #000000;
   border-radius: 0px;
   box-sizing: border-box;
   padding: 0;
   margin: 0;
   left: 0;
   top: 0;
   width: 100%;
   height: 100%;
}
#PhotoGallery1
{
   box-sizing: border-box;
   font-size: 0;
   width: 100%;
   height: 100%;
   table-layout: fixed;
   display: table;
   margin: 0;
}
#PhotoGallery1 .thumbnails
{
   margin: 0;
}
#PhotoGallery1 .thumbnail
{
   position: relative;
   min-height: 1px;
   box-sizing: border-box;
   float: left;
   padding: 3px 3px 3px 3px;
   width: 11.11111111%;
   text-align: center;
   vertical-align: top;
}
#PhotoGallery1 .thumbnail img
{
   border: 0px solid #000000;
   display: block;
   width: 100%;
   height: auto;
   max-width: 100%;
   box-sizing: border-box;
   border-radius: 0px;
}
#PhotoGallery1 .clearfix:before,
#PhotoGallery1 .clearfix:after,
#PhotoGallery1 .thumbnails:before,
#PhotoGallery1 .thumbnails:after
{
   display: table;
   content: " ";
}
#PhotoGallery1 .clearfix:after,
#PhotoGallery1 .thumbnails:after
{
   clear: both;
}
#PhotoGallery1 .visible-col9
{
   display: block;
}
#wb_TextMenu1
{
   background-color: transparent;
   background-image: none;
   color: #FFFFFF;
   font-family: Arial;
   font-weight: normal;
   font-style: normal;
   text-decoration: none;
   text-transform: none;
   font-size: 16px;
   margin: 0;
   text-align: center;
   overflow: hidden;
}
#wb_TextMenu1 span
{
   margin: 0 8px 0 0px;
}
#wb_TextMenu1 a
{
   color: inherit;
   text-decoration: inherit;
}
#wb_Pagination1
{
   text-align: center;
}
#Pagination1
{
   display: inline-block;
   list-style: none;
   padding: 0;
   border-radius: 0px;
   font-family: Arial;
   font-weight: normal;
   font-style: normal;
   font-size: 0;
   margin: 0;
}
#Pagination1 > li
{
   display: inline;
   font-size: 13px;
}
#Pagination1 > li > a, #Pagination1 > li > span
{
   position: relative;
   float: left;
   padding: 6px 12px 6px 12px;
   text-decoration: none;
   text-transform: none;
   background-color: #F6F6F6;
   background-image: none;
   border: 1px solid #C5C5C5;
   color: #454545;
   margin-left: -1px;
}
#Pagination1 > li:first-child > a, #Pagination1 > li:first-child > span
{
   margin-left: 0;
   border-bottom-left-radius: 0px;
   border-top-left-radius: 0px;
}
#Pagination1 > li:last-child > a, #Pagination1 > li:last-child > span
{
   border-bottom-right-radius: 0px;
   border-top-right-radius: 0px;
}
#Pagination1 > li > a:hover, #Pagination1 > li > span:hover, #Pagination1 > li > a:focus, #Pagination1 > li > span:focus 
{
   background-color: #CCCCCC;
   color: #23527C;
}
#Pagination1 > .active > a, #Pagination1 > .active > span, #Pagination1 > .active > a:hover, #Pagination1 > .active > span:hover, #Pagination1 > .active > a:focus, #Pagination1 > .active > span:focus
{
   z-index: 2;
   background-color: #337AB7;
   border-color: #337AB7;
   color: #FFFFFF;
   cursor: default;
}
#Pagination1 > .disabled > span, #Pagination1 > .disabled > span:hover, #Pagination1 > .disabled > span:focus, #Pagination1 > .disabled > a, #Pagination1 > .disabled > a:hover, #Pagination1 > .disabled > a:focus
{
   background-color: #FFFFFF;
   color: #777777;
   cursor: not-allowed;
   pointer-events: none;
}
#wb_Image17
{
   vertical-align: top;
}
#Image17
{
   border: 0px solid #000000;
   border-radius: 0px;
   box-sizing: border-box;
   padding: 0;
   margin: 0;
   left: 0;
   top: 0;
   width: 100%;
   height: 100%;
}
#Image17:hover
{
   transform: rotate(0deg) scale(1.08,1.08) ;
   transition: transform 500ms linear 0ms;
}
  :root {
    --tups-primary: #f36c21;       /* สีส้มหลักประจำแบรนด์ */
    --tups-primary-hover: #d9560c; /* สีส้มเข้มตอน Hover */
    --tups-dark: #222222;          /* สีดำ/เทาเข้ม */
    --tups-bg: #ffffff;            /* ปรับเป็นสีขาว */
    --tups-card-bg: #ffffff;
    --tups-text: #333333;
    --tups-accent: #28a745;        /* สีเขียวเน้นผลลัพธ์ */
    --tups-radius: 12px;
  }

  /* ปุ่มกดเปิด Pop-up บนหน้าเว็บ */
  .btn-open-ups-modal {
    font-family: 'Kanit', 'Prompt', 'Segoe UI', Tahoma, sans-serif;
    background-color: var(--tups-primary);
    color: #ffffff;
    border: none;
    padding: 14px 28px;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(243, 108, 33, 0.3);
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
  }

  .btn-open-ups-modal:hover {
    background-color: var(--tups-primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(243, 108, 33, 0.4);
  }

  /* Modal Background Overlay */
  .ups-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(4px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    padding: 15px;
    box-sizing: border-box;
    opacity: 0;
    transition: opacity 0.3s ease;
  }

  .ups-modal-overlay.active {
    display: flex;
    opacity: 1;
  }

  /* Modal Content Box */
  .ups-calc-wrapper {
    position: relative;
    font-family: 'Kanit', 'Prompt', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    width: 100%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    background: var(--tups-card-bg);
    padding: 30px;
    border-radius: var(--tups-radius);
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    color: var(--tups-text);
    border-top: 5px solid var(--tups-primary);
    box-sizing: border-box;
    transform: translateY(-20px);
    transition: transform 0.3s ease;
  }

  .ups-modal-overlay.active .ups-calc-wrapper {
    transform: translateY(0);
  }

  .ups-calc-wrapper * {
    box-sizing: border-box;
  }

  /* Close Button (X) top right */
  .btn-modal-close-x {
    position: absolute;
    top: 15px;
    right: 20px;
    background: transparent;
    border: none;
    font-size: 1.8rem;
    font-weight: bold;
    color: #999;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s;
  }

  .btn-modal-close-x:hover {
    color: var(--tups-primary);
  }

  .ups-calc-header {
    text-align: center;
    margin-bottom: 25px;
    padding-right: 20px;
  }

  .ups-calc-header h2 {
    color: var(--tups-dark);
    margin: 0 0 8px 0;
    font-size: 1.6rem;
    font-weight: 700;
  }

  .ups-calc-header h2 span {
    color: var(--tups-primary);
  }

  .ups-calc-header p {
    color: #666;
    margin: 0;
    font-size: 0.9rem;
  }

  /* 3 Navigation Tabs */
  .ups-calc-nav {
    display: flex;
    gap: 8px;
    margin-bottom: 25px;
    background: #f1f3f5;
    padding: 6px;
    border-radius: 10px;
  }

  .ups-nav-btn {
    flex: 1;
    padding: 10px 6px;
    border: none;
    background: transparent;
    color: #555;
    font-weight: 600;
    font-size: 0.9rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    line-height: 1.3;
  }

  .ups-nav-btn.active {
    background: var(--tups-primary);
    color: white;
    box-shadow: 0 3px 10px rgba(243, 108, 33, 0.3);
  }

  .ups-tab-pane {
    display: none;
  }

  .ups-tab-pane.active {
    display: block;
  }

  /* Form Elements */
  .form-group {
    margin-bottom: 18px;
  }

  .form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--tups-dark);
    font-size: 0.95rem;
  }

  .input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
  }

  .input-wrapper input, .input-wrapper select {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ced4da;
    border-radius: 8px;
    font-size: 0.95rem;
    outline: none;
    transition: all 0.2s ease;
  }

  .input-wrapper input:focus, .input-wrapper select:focus {
    border-color: var(--tups-primary);
    box-shadow: 0 0 0 3px rgba(243, 108, 33, 0.15);
  }

  .unit-text {
    position: absolute;
    right: 15px;
    color: #888;
    font-weight: 500;
    pointer-events: none;
  }

  .time-input-group {
    display: flex;
    gap: 10px;
  }

  /* Dynamic Device List */
  .device-row {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
    align-items: center;
  }

  .device-row input {
    padding: 10px 12px;
    border: 1px solid #ced4da;
    border-radius: 6px;
    font-size: 0.9rem;
  }

  .device-name { flex: 2; }
  .device-watts { flex: 1; }
  .device-qty { flex: 0.8; }

  .btn-remove {
    background: #dc3545;
    color: white;
    border: none;
    padding: 10px 14px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.2s;
  }

  .btn-remove:hover {
    background: #bd2130;
  }

  .btn-add {
    background: var(--tups-dark);
    color: white;
    border: none;
    padding: 10px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    margin-top: 5px;
    transition: background 0.2s;
  }

  .btn-add:hover {
    background: #000000;
  }

  .btn-calculate {
    width: 100%;
    background: var(--tups-primary);
    color: white;
    border: none;
    padding: 14px;
    font-size: 1rem;
    font-weight: bold;
    border-radius: 8px;
    cursor: pointer;
    margin-top: 15px;
    transition: background 0.3s ease;
  }

  .btn-calculate:hover {
    background: var(--tups-primary-hover);
  }

  /* Result Box */
  .result-container {
    margin-top: 25px;
    background: #fff8f4;
    border: 1px solid #ffe2d1;
    border-left: 5px solid var(--tups-primary);
    padding: 20px;
    border-radius: 0 8px 8px 0;
    display: none;
  }

  .result-container h3 {
    margin: 0 0 15px 0;
    color: var(--tups-dark);
    font-size: 1.1rem;
  }

  .result-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
  }

  .result-card {
    background: white;
    padding: 12px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 2px 6px rgba(0,0,0,0.04);
    border: 1px solid #eee;
  }

  .result-card .val {
    font-size: 1.4rem;
    font-weight: bold;
    color: var(--tups-primary);
    margin: 5px 0;
  }

  .result-card .lbl {
    font-size: 0.8rem;
    color: #666;
  }

  .note-info {
    font-size: 0.8rem;
    color: #666;
    margin-top: 15px;
    line-height: 1.5;
  }

  .cta-box {
    margin-top: 15px;
    padding: 12px;
    background: var(--tups-dark);
    color: white;
    border-radius: 6px;
    font-size: 0.85rem;
    text-align: center;
  }

  /* Bottom Close Button */
  .btn-modal-close-bottom {
    width: 100%;
    background: #e9ecef;
    color: #495057;
    border: none;
    padding: 12px;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    margin-top: 20px;
    transition: background 0.2s;
  }

  .btn-modal-close-bottom:hover {
    background: #dee2e6;
  }

  @media (max-width: 650px) {
    .ups-calc-nav {
      flex-direction: column;
    }
    .device-row {
      flex-direction: column;
      align-items: stretch;
    }
    .time-input-group {
      flex-direction: column;
    }
  }
