Root Styles */ :root {
    --main-heading: 28px;
    /* Reduced from 42px */
    --subheading: 18px;
    /* Reduced from 32px */
    --general-text: 14px;
    /* Reduced from 21px */
    --margin-x: 148px;
    /* Using a visible margin */
    --purple-color: #DACDF6;
    --nav-color: #DACDF6;
    --navbar-height: 4rem;
    /* Define navbar height as a variable */
}

body {
    font-family: 'Sarabun', sans-serif;
    background-color: #f0f0f0;
    /* Changed to light grey background as requested */
    color: black;
    /* Set default font color to black */
    padding-top: var(--navbar-height);
    /* Add padding to body to offset fixed navbar */
}

.headline {
    text-shadow: -1px 0 black, 0 1px black, 1px 0 black, 0 -1px black;
    color: #ffffff;
    font-family: "Prompt", sans-serif;
    font-weight: 700;
    font-style: normal;
}

.content-margin {
    padding-left: var(--margin-x);
    padding-right: var(--margin-x);
}.navbar-custom {
    background-color: #705CA0 !important;
    height: var(--navbar-height);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1030;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.navbar-custom .container-fluid {
    padding-left: var(--margin-x);
    padding-right: var(--margin-x);
}

.navbar-brand {
    font-size: 26px;
    font-weight: bold;
    color: white !important;
}

.navbar-toggler {
    border-color: rgba(255, 255, 255, 0.1);
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.55%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

.navbar-nav .nav-item {
    margin-right: 15px;
}

.navbar-nav .nav-link {
    color: #ffffff !important;
    font-size: var(--general-text);
    margin-right: 6px;
    /* Use transform-origin to control scaling from center */
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    /* Prevent layout shifts by using transform instead of scale */
    transform-origin: center;
    /* Add padding to create space for the scale effect */
    padding: 8px 12px;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    font-weight: normal;
    color: #f0f0f0;
    /* Use a subtle scale that doesn't affect layout */
    transform: scale(1.05);
    /* Alternative: Use text-shadow for emphasis without movement */
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.5);
}

/* Alternative solution: Use only color and shadow changes instead of scale */
.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    font-weight: normal;
    color: #ffffff;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
    /* Remove transform completely to prevent any movement */
    transform: none;
}
/* Custom Category Dropdown in Navbar */
.custom-category-dropdown {
    /* No specific container styles needed based on provided CSS */
}

.custom-dropdown-toggle {
    color: white;
    /* Ensure dropdown button text is white */
    background-color: transparent;
    /* No background */
    border: none;
    /* No border */
    font-size: var(--general-text);
    padding-left: 0;
    /* Remove default button padding on left */
    padding-right: 0;
    /* Remove default button padding on right */
}

.custom-dropdown-toggle:hover,
.custom-dropdown-toggle:focus {
    color: #f0f0f0;
    /* Lighter on hover/focus */
    background-color: transparent;
    box-shadow: none;
}

.custom-category-dropdown .custom-dropdown-menu {
    max-height: 300px;
    /* Adjust as needed */
    overflow-y: auto;
    width: 250px;
    /* Adjust width if needed */
}

.custom-dropdown-menu .dropdown-item {
    color: black;
    /* Default text color for dropdown items */
}

.custom-dropdown-menu .dropdown-item:hover {
    background-color: #f8f9fa;
    /* Light background on hover */
    color: #333;
}

/* Home Section */
.home-section {
    min-height: 54vh;
    border-radius: 0px 0px 8px 8px;
background: linear-gradient(to left, #ffffff00, #705CA0),
            url('G.jpg');   /* ถ้า LINE.jpg อยู่โฟลเดอร์เดียวกับ sigma.css */
    background-position: left, right;
    background-repeat: no-repeat, no-repeat;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    position: relative;
    display: flex;
    align-items: center;
    /* Vertically center content */
    justify-content: center;
    /* Horizontally center content */
    background-color: white;
    /* Section background changed to white */
}

.home-content {
    color: rgb(255, 255, 255);
}

.main-heading {
    font-size: var(--main-heading);
    font-weight: bold;
}

.subheading {
    font-size: var(--subheading);
    font-weight: bold;
    /* Ensure subheading is bold */
}

.btn-custom {
    background-color: #705CA0;
    /* Updated button color */
    border: none;
    color: #ffffff;
    /* Set to white as requested */
    font-size: var(--general-text);
    padding: 15px 30px;
    border-radius: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.btn-custom:hover {
    background-color: #c9b8f2;
    /* A lighter purple for hover */
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
}

.home-section .carousel-img {
    max-height: 400px;
    /* Adjust as needed */
    object-fit: contain;
    /* Ensures the whole image is visible */
}

/* General Section Styles (for #recommended and other content sections) */
.section {
    min-height: 74vh;
    position: relative;
    display: flex;
    align-items: center;
    /* Vertically center content */
    justify-content: center;
    /* Horizontally center content */
}

.type {
    min-height: 6vh;
    position: relative;
    display: flex;
    align-items: center;
    /* Vertically center content */
    justify-content: center;
    /* Horizontally center content */
}

.section .container-fluid {
    padding-left: var(--margin-x);
    padding-right: var(--margin-x);
}

.section-title {
    font-size: var(--subheading);
    font-weight: bold;
    text-align: center;
    margin-bottom: 50px;
    color: black;
}

/* Product Card Styles */
.new-product-card {
    background-color: white;
    /* พื้นหลังสีขาว */
    border-radius: 10px;
    /* มุมโค้งมน */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    /* เงา */
    padding: 10px;
    /* ลด Padding รอบ Card ให้กระชับมากยิ่งขึ้น */
    width: 100%;
    /* ให้ Card กว้างเต็ม Column */
    max-width: 250px;
    /* จำกัดความกว้างสูงสุดของ Card ให้แคบลงอีก (ปรับตามความเหมาะสม) */
    display: flex;
    flex-direction: column;
    align-items: center;
    /* จัดกึ่งกลางเนื้อหาใน Card */
    text-align: left;
    /* จัดข้อความภายใน Card ให้อยู่ชิดซ้าย (ยกเว้นรูปภาพ) */
    margin-bottom: 0px;
    /* ตั้งเป็น 0 เพราะระยะห่างแนวตั้งจะถูกควบคุมโดย Bootstrap row/col */
    position: relative;
    overflow: hidden;
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.new-product-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.new-product-image-wrapper {
    width: 100%;
    height: 140px;
    /* ลดความสูงรูปภาพให้กระชับขึ้น */
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 5px;
    /* ลดระยะห่างใต้รูปภาพให้ชิดขึ้น */
    overflow: hidden;
}

.new-product-image-wrapper img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    display: block;
}

.new-product-details {
    width: 100%;
    text-align: left;
    padding: 0 5px;
    /* ลด padding ด้านข้างภายใน details */
}

.new-product-name {
    font-size: 0.95em;
    font-weight: bold;
    color: #333;
    margin-bottom: 3px;
    line-height: 1.2;
    height: 3.5em;
    /* กำหนดความสูงคงที่สำหรับ 2-3 บรรทัด */
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: normal;
}

.new-product-promo,
.new-product-shipping,
.new-product-views {
    /* รวมคลาสสำหรับข้อความ meta */
    font-size: 0.8em;
    color: #666;
    margin-bottom: 0px;
    /* ลดระยะห่างระหว่างบรรทัด meta ให้ติดกัน */
    line-height: 1.2;
    padding-top: 2px;
}

.new-product-price-section {
    display: flex;
    align-items: baseline;
    margin-top: 8px;
    font-weight: bold;
    justify-content: flex-start;
    gap: 5px;
    flex-wrap: wrap;
}

.old-price {
    font-size: 0.9em;
    color: #999;
    text-decoration: line-through;
}

.discount-percentage {
    background-color: #DC3545;
    color: white;
    padding: 1px 4px;
    border-radius: 3px;
    font-size: 0.7em;
}

.current-price {
    font-size: 1.5em;
    color: #DC3545;
}

/* Footer Section */
.footer-section {
    padding: 40px 0;
    background-color: #f8f9fa;
    margin-top: 80px;
}

.footer-section .container-fluid {
    padding-left: var(--margin-x);
    padding-right: var(--margin-x);
}

.footer-title {
    font-size: var(--general-text);
    font-weight: bold;
    margin-bottom: 20px;
    color: #333;
}

.footer-list {
    padding-left: 0;
    list-style: none;
}

.footer-list li {
    margin-bottom: 10px;
    color: #555;
    font-size: var(--general-text);
    display: flex;
    align-items: center;
}

.footer-list .footer-icon {
    margin-right: 10px;
    color: #705CA0;
}

.footer-list .footer-link {
    color: #555;
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-list .footer-link:hover {
    color: #705CA0;
}

/* Responsive Media Queries */
@media (max-width: 991.98px) {
    .navbar-collapse {
        background-color: #705CA0;
        /* Background for collapsed menu */
        padding: 15px;
    }

    .navbar-custom .navbar-nav .nav-item {
        margin-right: 0;
        margin-bottom: 10px;
        /* Space between items in collapsed view */
    }

    .custom-category-dropdown .custom-dropdown-menu {
        width: 100%;
        /* Full width for collapsed dropdown */
    }
}

@media (max-width: 768px) {
    .new-product-card {
        padding: 8px;
        max-width: 220px;
        /* ลด max-width บนมือถืออีก */
    }

    .new-product-image-wrapper {
        height: 120px;
        margin-bottom: 3px;
    }

    .new-product-name {
        font-size: 0.9em;
        margin-bottom: 2px;
    }

    .new-product-promo,
    .new-product-shipping,
    .new-product-views {
        font-size: 0.75em;
        padding-top: 1px;
    }

    .old-price {
        font-size: 0.8em;
    }

    .current-price {
        font-size: 1.3em;
    }

    .discount-percentage {
        font-size: 0.65em;
        padding: 1px 3px;
    }

    .new-product-price-section {
        margin-top: 5px;
        gap: 3px;
    }
}

.carousel-item img {
    width: 300px;
    /* Set a fixed width */
    height: 300px;
    /* Set a fixed height */
    object-fit: contain;
    /* Key for maintaining aspect ratio and fitting */
    display: block;
    /* Important for centering */
    margin: auto;
    /* Centers the image horizontally */
    padding: 20px;
    /* Optional: adds space around the image */
}

.rounded-section {
    background-color: #f0f0f0;
    /* Light gray background */
    border-radius: 2rem;
    /* Large border radius for the container */
    padding: 1.5rem 1rem;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    /* Subtle shadow for depth */
}

.icon-button {
    background-color: #7b68a8;
    /* The purple color from the image */
    width: 47px;
    /* Adjust size as needed */
    height: 47px;
    border-radius: 1.2rem;
    /* Rounded corners for the buttons */
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.15);
    /* Shadow for button depth */
    transition: all 0.3s ease;
    /* เพิ่ม transition เพื่อให้การเปลี่ยนสถานะดูนุ่มนวล */
    font-size: 1.5rem;
    color: white;
}

.icon-text {
    color: #333;
    /* Dark text color */
    font-size: 0.8rem;
    margin-top: 0.5rem;
    transition: color 0.3s ease;
    /* เพิ่ม transition ให้กับสีข้อความ */
}

/* เพิ่ม CSS สำหรับ hover effect */
.col-2.d-flex.flex-column:hover .icon-button {
    background-color: #5a4b80;
    /* สีม่วงที่เข้มขึ้นเมื่อ hover */
    transform: translateY(-5px);
    /* เลื่อนขึ้นเล็กน้อย */
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
    /* เพิ่มเงาให้ชัดขึ้น */
}

.col-2.d-flex.flex-column:hover .icon-text {
    color: #5a4b80;
    /* เปลี่ยนสีข้อความเป็นสีเดียวกับ icon-button เมื่อ hover */
    transform: translateY(-5px);
    /* เลื่อนขึ้นเล็กน้อย */
}
.purple{
   color: #5a4b80;

}

  /* General and Root Styles */
        :root {
            --main-heading: 28px;
            --subheading: 18px;
            --general-text: 14px;
            --margin-x: 148px;
            --purple-color: #DACDF6;
            --nav-color: #DACDF6;
            --navbar-height: 4rem;
        }

        body {
            font-family: 'Sarabun', sans-serif;
            background-color: #f0f0f0;
            color: black;
            padding-top: var(--navbar-height);
        }

        /* Product Card Styles */
        .new-product-card {
            background-color: white;
            border-radius: 10px;
            box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
            padding: 10px;
            width: 100%;
            max-width: 250px;
            display: flex;
            flex-direction: column;
            align-items: center;
            text-align: left;
            margin-bottom: 0px;
            position: relative;
            overflow: hidden;
            transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
            cursor: pointer;
        }

        .new-product-card:hover {
            transform: translateY(-3px);
            box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
        }

        .new-product-image-wrapper {
            width: 100%;
            height: 140px;
            display: flex;
            justify-content: center;
            align-items: center;
            margin-bottom: 5px;
            overflow: hidden;
        }

        .new-product-image-wrapper img {
            max-width: 100%;
            max-height: 100%;
            object-fit: contain;
            display: block;
        }

        .new-product-details {
            width: 100%;
            text-align: left;
            padding: 0 5px;
        }

        .new-product-name {
            font-size: 0.95em;
            font-weight: bold;
            color: #333;
            margin-bottom: 3px;
            line-height: 1.2;
            height: 3.5em;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: normal;
        }

        .new-product-promo,
        .new-product-shipping,
        .new-product-views {
            font-size: 0.8em;
            color: #666;
            margin-bottom: 0px;
            line-height: 1.2;
            padding-top: 2px;
        }

        .new-product-price-section {
            display: flex;
            align-items: baseline;
            margin-top: 8px;
            font-weight: bold;
            justify-content: flex-start;
            gap: 5px;
            flex-wrap: wrap;
        }

        .current-price {
            font-size: 1.5em;
            color: #DC3545;
        }
        
        .old-price {
            font-size: 0.9em;
            color: #999;
            text-decoration: line-through;
        }

        .section {
            min-height: 74vh;
            position: relative;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .section-title {
            font-size: var(--subheading);
            font-weight: bold;
            text-align: center;
            margin-bottom: 50px;
            color: black;
        }

        /* Custom Modal Styles */
        .product-modal .modal-dialog {
            max-width: 800px;
            margin: 1.75rem auto;
        }

        .product-modal .modal-content {
            border: 2px solid #e0e0e0;
            border-radius: 15px;
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
        }

        .product-modal .modal-header {
            border-bottom: 1px solid #e0e0e0;
            padding: 1.5rem;
            background-color: #f8f9fa;
            border-radius: 13px 13px 0 0;
        }

        .product-modal .modal-body {
            padding: 2rem;
        }

        .product-modal .modal-footer {
            border-top: 1px solid #e0e0e0;
            padding: 1.5rem;
            background-color: #f8f9fa;
            border-radius: 0 0 13px 13px;
        }

        .product-modal-image {
            width: 100%;
            max-width: 300px;
            height: 300px;
            object-fit: contain;
            border: 1px solid #e0e0e0;
            border-radius: 10px;
            padding: 10px;
            background-color: white;
        }

        .product-modal-title {
            font-size: 1.5rem;
            font-weight: bold;
            color: #333;
            margin-bottom: 1rem;
            line-height: 1.3;
        }

        .product-modal-code {
            color: #666;
            font-size: 0.9rem;
            margin-bottom: 0.5rem;
        }

        .product-modal-brand {
            margin-bottom: 1rem;
        }

        .brand-tag {
            background-color: #007bff;
            color: white;
            padding: 2px 8px;
            border-radius: 4px;
            font-size: 0.8rem;
            text-decoration: none;
        }

        .product-modal-promo,
        .product-modal-shipping,
        .product-modal-stock {
            font-size: 0.9rem;
            color: #666;
            margin-bottom: 0.5rem;
        }

        .product-modal-shipping {
            color: #28a745;
            font-weight: 500;
        }

        .product-modal-price {
            font-size: 2rem;
            font-weight: bold;
            color: #DC3545;
            margin: 1rem 0;
        }
        
        .old-price-modal {
            font-size: 1.2rem;
            color: #999;
            text-decoration: line-through;
            margin-left: 1rem;
        }

        .discount-badge {
            background-color: #DC3545;
            color: white;
            padding: 4px 8px;
            border-radius: 4px;
            font-size: 0.8rem;
            font-weight: bold;
            display: inline-block;
            margin-bottom: 1rem;
        }

        .btn-add-to-cart {
            background-color: #e91e63;
            color: white;
            border: none;
            padding: 10px 20px;
            border-radius: 6px;
            font-weight: bold;
            margin-right: 10px;
        }

        .btn-buy-now {
            background-color: #ff4081;
            color: white;
            border: none;
            padding: 10px 20px;
            border-radius: 6px;
            font-weight: bold;
        }

        .btn-add-to-cart:hover,
        .btn-buy-now:hover {
            opacity: 0.9;
            transform: translateY(-1px);
        }

        .product-description {
            margin-top: 1.5rem;
            padding-top: 1.5rem;
            border-top: 1px solid #e0e0e0;
        }

        .description-title {
            font-size: 1.1rem;
            font-weight: bold;
            margin-bottom: 1rem;
            color: #333;
        }

        .description-text {
            font-size: 0.9rem;
            line-height: 1.6;
            color: #555;
            text-align: justify;
        }

        .stars {
            color: #ffc107;
            margin-bottom: 0.5rem;
        }

          /* General and Root Styles */
        :root {
            --main-heading: 28px;
            --subheading: 18px;
            --general-text: 14px;
            --margin-x: 148px;
            --purple-color: #7b68a8;
            --navbar-height: 4rem;
        }

        body {
            font-family: 'Sarabun', sans-serif;
            background-color: #f0f0f0;
            color: black;
            padding-top: var(--navbar-height);
        }

        /* Type Section */
        .type {
            min-height: 6vh;
            position: relative;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        /* Icon Carousel Styles */
        .rounded-section {
            background-color: #f0f0f0;
            border-radius: 2rem;
            padding: 1.5rem 1rem;
            box-shadow: 0 4px 8px rgba(0,0,0,0.1);
            position: relative;
            overflow: hidden;
        }

        .icon-button {
            background-color: #7b68a8;
            width: 60px;
            height: 60px;
            border-radius: 1.2rem;
            box-shadow: 0 3px 6px rgba(0,0,0,0.15);
            transition: all 0.3s ease;
            display: flex;
            align-items: center;
            justify-content: center;
            text-decoration: none;
        }

        .icon-button i {
            font-size: 1.5rem;
            color: white;
        }

        .icon-text {
            color: #333;
            font-size: 0.85rem;
            margin-top: 0.5rem;
            transition: color 0.3s ease;
            text-decoration: none;
            text-align: center;
        }

        /* Category item styling */
        .category-item {
            text-decoration: none;
            transition: all 0.3s ease;
            display: flex;
            flex-direction: column;
            align-items: center;
            flex: 0 0 auto;
        }

        /* Hover effects */
        .category-item:hover .icon-button {
            background-color: #5a4b80;
            box-shadow: 0 6px 12px rgba(0,0,0,0.2);
        }

        .category-item:hover .icon-text {
            color: #5a4b80;
        }

        /* Carousel control styling */
        .carousel-control-prev,
        .carousel-control-next {
            width: 8%;
            height: 100%;
            display: flex;
            align-items: center;
            justify-content: center;
            color:      #705CA0;
        }


.carousel-control-prev-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%235a4b80'%3e%3cpath d='M11.354 1.646a.5.5 0 0 1 0 .708L5.707 8l5.647 5.646a.5.5 0 0 1-.708.708l-6-6a.5.5 0 0 1 0-.708l6-6a.5.5 0 0 1 .708 0z'/%3e%3c/svg%3e");

        color:      #705CA0;}

.carousel-control-next-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%235a4b80'%3e%3cpath d='M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
        color:      #705CA0;}
.carousel-control-prev-icon:hover,
.carousel-control-next-icon:hover {
    opacity: 1;
    transform: scale(1.1);
}

        /* Carousel item layout */
        .carousel-item .d-flex {
            gap: 2rem;
            padding: 0 3rem;
            justify-content: space-around; /* Corrected to space items evenly */
            flex-wrap: nowrap;
        }

        /* Section title */
        .section-title {
            font-family: 'Prompt', sans-serif;
            font-weight: 600;
            color: #333;
        }

        .view-all-link {
            color: #7b68a8;
            text-decoration: none;
            font-weight: 500;
            transition: color 0.3s ease;
        }

        .view-all-link:hover {
            color: #5a4b80;
            text-decoration: underline;
        }

        /* Responsive adjustments */
        @media (max-width: 768px) {
            :root {
                --margin-x: 20px;
            }
            
            .icon-button {
                width: 50px;
                height: 50px;
            }
            
            .icon-button i {
                font-size: 1.3rem;
            }
            
            .icon-text {
                font-size: 0.75rem;
            }

            .carousel-item .d-flex {
                gap: 1rem;
                padding: 0 2rem;
            }

            .carousel-control-prev,
            .carousel-control-next {
                width: 10%;
            }

            .carousel-control-prev-icon,
            .carousel-control-next-icon {
                width: 2rem;
                height: 2rem;
            }
        }

        @media (max-width: 576px) {
            .carousel-item .d-flex {
                gap: 0.5rem;
                padding: 0 1rem;
            }

            .icon-button {
                width: 45px;
                height: 45px;
            }

            .icon-button i {
                font-size: 1.2rem;
            }

            .icon-text {
                font-size: 0.7rem;
            }
        }
        .blue {
    color:blue
}