/*
Theme Name: Baske Theme
Theme URI: https://example.com
Author: Baske Team
Author URI: https://example.com
Description: ธีมอีคอมเมิร์ซสมัยใหม่สำหรับร้าน Baske รองรับทุกอุปกรณ์และรวมระบบ WooCommerce
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: baske-theme
Tags: e-commerce, woocommerce, responsive, modern, shop, thai, ไทย

ธีมนี้สร้างขึ้นเพื่อจำลองเว็บไซต์ Baske พร้อมฟังก์ชัน WordPress และ WooCommerce ครบครัน
*/

/* 
==============================================
CSS Variables - Theme Customization
==============================================
*/
:root {
    --nav-bg: #ffffff;
    --menu-color: #000000;
    --main_button_bg: #002655;
    --main_button_color: #ffffff;
    --main_color: #002655;
    --page_background_color: #ffffff;
    --title_color: #000000;
    --title_font_family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    --title_font_size: 28px;
    --title_font_style: normal;
    --title_font_weigth: 700;
    --title_letter_spacing: 0;
    --general_font_size: 16px;
    --general_layout_width: 1280px;
    --general_layout_spacing: 60px;
    --product_font_size: 18px;
    --buying_parice_color: #000000;
    --original_price_color: #999999;
    --detail_color: #666666;
    --button_border_radius: 5px;
    --discount_tag_bg: #ff0000;
    --discount_tag_color: #ffffff;
    --bg-color: #f5f5f5;
    --text-color: #333333;
    --rgb-color: 0, 0, 0;
    --nav_letter_spacing: 0;
    --pc-number: 4;
    --mobile-number: 2;
    --wap-number: 2;
    --padding: 40px 0;
}

/* 
==============================================
Base Styles
==============================================
*/
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    font-size: var(--general_font_size);
    line-height: 1.6;
    color: #333;
    background-color: var(--page_background_color);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

a:hover {
    opacity: 0.8;
}

ul, ol {
    list-style: none;
}

button {
    border: none;
    background: none;
    cursor: pointer;
    font-family: inherit;
}

input, textarea, select {
    font-family: inherit;
    font-size: inherit;
}

/* 
==============================================
Utility Classes
==============================================
*/
.container {
    width: 100%;
    max-width: var(--general_layout_width);
    margin: 0 auto;
    padding: 0 20px;
}

.html_hide {
    overflow: hidden;
}

.hidden {
    display: none !important;
}

.visible {
    visibility: visible;
}

/* 
==============================================
WordPress Core Alignment
==============================================
*/
.alignleft {
    float: left;
    margin-right: 1.5em;
}

.alignright {
    float: right;
    margin-left: 1.5em;
}

.aligncenter {
    clear: both;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

/* 
==============================================
Typography
==============================================
*/
h1, h2, h3, h4, h5, h6 {
    font-family: var(--title_font_family);
    font-style: var(--title_font_style);
    font-weight: var(--title_font_weigth);
    letter-spacing: var(--title_letter_spacing);
    color: var(--title_color);
    line-height: 1.3;
    margin-bottom: 1rem;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

@media (max-width: 767px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.5rem; }
}

/* 
==============================================
Price Styles
==============================================
*/
.general-price {
    color: var(--buying_parice_color);
    font-size: 20px;
    font-weight: 600;
    white-space: nowrap;
}

.general-oldprice {
    color: var(--original_price_color);
    font-size: 14px;
    font-weight: 600;
    margin-left: 5px;
    text-decoration: line-through;
    white-space: nowrap;
}

/* 
==============================================
Block Title Styles
==============================================
*/
.block_title {
    margin-bottom: 30px;
    text-align: center;
}

.block_title h2 {
    font-weight: 700;
    color: var(--title_color);
    font-family: var(--title_font_family);
    font-size: var(--title_font_size);
}

@media (max-width: 767px) {
    .block_title h2 {
        font-size: 22px !important;
    }
}

.block_title .block_detail {
    color: var(--detail_color);
    margin-top: 15px;
}

/* 
==============================================
Navigation Styles
==============================================
*/

/* 移动菜单按钮 - 默认隐藏 */
.mobile_menu_btn {
    display: none;
}

/* 移动导航 - 默认隐藏 */
.mobile-navigation,
#mobile_nav {
    display: none !important;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
}

.mobile-navigation .content {
    position: absolute;
    top: 0;
    left: 0;
    width: 80%;
    max-width: 300px;
    height: 100%;
    background: white;
    overflow-y: auto;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
}

.mobile-navigation.open {
    display: block;
}

.mobile-navigation.open .content {
    transform: translateX(0);
}

/* 
==============================================
Responsive Utilities
==============================================
*/
@media (max-width: 767px) {
    .hide-mobile {
        display: none !important;
    }
    
    /* 在移动端显示移动菜单按钮 */
    .mobile_menu_btn {
        display: block !important;
    }
    
    /* 隐藏桌面菜单 */
    .header_menu {
        display: none !important;
    }
    
    /* 移动端可以显示移动导航（点击后） */
    .mobile-navigation.open,
    #mobile_nav.open {
        display: block !important;
    }
    
    /* 移动端菜单搜索框优化 */
    .mobile_search {
        padding: 15px !important;
    }
    
    .mobile_search .search-form {
        width: 100%;
    }
    
    .mobile_search .search-form > div {
        display: flex !important;
        gap: 8px !important;
        flex-direction: column !important;
    }
    
    .mobile_search .search-field {
        width: 100% !important;
        padding: 10px 15px !important;
        font-size: 14px !important;
        border: 1px solid #ddd !important;
        border-radius: 4px !important;
        box-sizing: border-box !important;
    }
    
    .mobile_search .search-submit {
        width: 100% !important;
        padding: 10px 20px !important;
        font-size: 14px !important;
        background: #333 !important;
        color: white !important;
        border: none !important;
        border-radius: 4px !important;
        cursor: pointer !important;
    }
}

@media (min-width: 768px) {
    .hide-desktop {
        display: none !important;
    }
    
    /* 在桌面端强制隐藏移动导航 */
    .mobile-navigation,
    #mobile_nav,
    .mobile-navigation.open,
    #mobile_nav.open {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        pointer-events: none !important;
    }
    
    /* 隐藏移动菜单按钮 */
    .mobile_menu_btn {
        display: none !important;
        visibility: hidden !important;
    }
}

/* 
==============================================
Loading States
==============================================
*/
.loading {
    opacity: 0.5;
    pointer-events: none;
}

/* 
==============================================
Accessibility
==============================================
*/
.screen-reader-text {
    clip: rect(1px, 1px, 1px, 1px);
    position: absolute !important;
    height: 1px;
    width: 1px;
    overflow: hidden;
    word-wrap: normal !important;
}

.screen-reader-text:focus {
    background-color: #f1f1f1;
    border-radius: 3px;
    box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.6);
    clip: auto !important;
    color: #21759b;
    display: block;
    font-size: 14px;
    font-weight: bold;
    height: auto;
    left: 5px;
    line-height: normal;
    padding: 15px 23px 14px;
    text-decoration: none;
    top: 5px;
    width: auto;
    z-index: 100000;
}

