/* ===== Custom Font ===== */
@font-face {
    font-family: 'CatFont';
    src: url('../fonts/Mitr-Medium.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

/* ===== Global ===== */
body {
    font-family: 'CatFont', Arial, sans-serif;
    margin: 0;
    background-color: #FFFFFF;
    text-align: center;
}

/* ===== Base ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: #f4f6f8;
    color: #2f2f2f;
    line-height: 1.7;
}
button,
input,
textarea,
select {
    font-family: 'CatFont', Arial, sans-serif;
}

/* ===== Header ===== */
.header {
    background:
        linear-gradient(rgba(0,0,0,0.4), rgba(0,0,0,0.4)),
        url("../images/ปก.png");
    background-size: cover;
    background-position: center;
    color: #fff;
    text-align: center;
    padding: 100px 20px;
}


.header h1 {
    font-size: 2.4rem;
    letter-spacing: 1px;
}

.header p {
    opacity: 0.95;
    margin-top: 6px;
}

/* ===== Navigation ===== */
.nav {
    background-color: #ffffff;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 16px;
    padding: 14px 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav a {
    text-decoration: none;
    color: #444;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 6px;
    transition: all 0.25s ease;
}

.nav a:hover {
    background-color: #ff9800;
    color: #fff;
}

/* ===== Hero ===== */
.hero {
    background-color: #ffffff;
    padding: 80px 20px;
    text-align: center;
}

.hero h2 {
    font-size: 2.1rem;
    margin-bottom: 10px;
}

.hero p {
    color: #666;
    margin-bottom: 25px;
}

.hero-btn,
.hero button {
    background-color: #ff9800;
    color: #fff;
    padding: 14px 34px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: bold;
    border: none;
    cursor: pointer;
    transition: background 0.3s ease;
}

.hero-btn:hover,
.hero button:hover {
    background-color: #e68900;
}

/* ===== Trust Bar ===== */
.trust-bar {
    background-color: #ffffff;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 30px;
    padding: 22px 15px;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}

/* ===== Features ===== */
.features {
    padding: 60px 20px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px,1fr));
    gap: 30px;
}

.feature-box {
    background-color: #ffffff;
    padding: 28px 22px;
    border-radius: 14px;
    text-align: center;
    box-shadow: 0 6px 18px rgba(0,0,0,0.08);
}

.feature-box h3 {
    margin-bottom: 8px;
}

/* ===== About ===== */
.about-short {
    background-color: #ffffff;
    padding: 55px 20px;
    text-align: center;
}

.about-short h2 {
    margin-bottom: 12px;
}

.about-short p {
    max-width: 720px;
    margin: auto;
    color: #555;
}

/* ===== Products ===== */
.featured-products {
    padding: 60px 20px;
}

.featured-products h2 {
    text-align: center;
    margin-bottom: 35px;
}

.product-list {
    max-width: 1150px;
    margin: auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px,1fr));
    gap: 30px;
}

.product-card {
    background-color: #ffffff;
    padding: 22px;
    border-radius: 16px;
    text-align: center;
    box-shadow: 0 6px 20px rgba(0,0,0,0.1);
    transition: transform 0.25s ease;
}

.product-card:hover {
    transform: translateY(-6px);
}

.product-card img {
    width: 100%;
    height: 170px;
    object-fit: contain;
    margin-bottom: 14px;
}

.product-card h3 {
    margin-bottom: 5px;
}

.product-card .price {
    color: #ff9800;
    font-weight: bold;
    margin-bottom: 12px;
}

.product-card button {
    background-color: #4caf50;
    color: #fff;
    border: none;
    padding: 10px 24px;
    border-radius: 20px;
    cursor: pointer;
}

.product-card button:hover {
    background-color: #43a047;
}

/* ===== Reviews ===== */
.reviews {
    background-color: #ffffff;
    padding: 55px 20px;
    text-align: center;
}

.review-box {
    margin-top: 18px;
    color: #555;
}

/* ===== CTA ===== */
.cta {
    background-color: #4caf50;
    color: #ffffff;
    text-align: center;
    padding: 55px 20px;
}

.cta-button {
    display: inline-block;
    margin-top: 18px;
    background-color: #ffffff;
    color: #4caf50;
    padding: 14px 32px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: bold;
}

.cta-button:hover {
    background-color: #f1f1f1;
}

/* ===== Footer ===== */
.footer {
    background-color: #1f1f1f;
    color: #cccccc;
    text-align: center;
    padding: 22px;
    font-size: 0.9rem;
}
/* ===== Blog ===== */
.blog {
    background-color: #f4f6f8;
    padding: 60px 20px;
}

.blog h2 {
    text-align: center;
    margin-bottom: 8px;
}

.blog-intro {
    text-align: center;
    color: #555;
    margin-bottom: 40px;
}

.blog-list {
    max-width: 900px;
    margin: auto;
    display: grid;
    gap: 26px;
}

.blog-card {
    background-color: #ffffff;
    padding: 26px 28px;
    border-radius: 16px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.08);
    transition: transform 0.25s ease;
}

.blog-card:hover {
    transform: translateY(-4px);
}

.blog-card h3 {
    margin-bottom: 10px;
    color: #333;
}

.blog-card p {
    color: #555;
    line-height: 1.7;
}

.blog-tag {
    display: inline-block;
    margin-top: 12px;
    font-size: 0.85rem;
    color: #ff9800;
    font-weight: 600;
}
/* ===== Cart ===== */
.cart {
    padding: 60px 20px;
    max-width: 1000px;
    margin: auto;
}

.cart h2 {
    text-align: center;
    margin-bottom: 30px;
}

.cart-table {
    width: 100%;
    border-collapse: collapse;
    background-color: #ffffff;
    box-shadow: 0 6px 16px rgba(0,0,0,0.08);
    border-radius: 12px;
    overflow: hidden;
}

.cart-table th,
.cart-table td {
    padding: 14px;
    text-align: center;
    border-bottom: 1px solid #eee;
}

.cart-table th {
    background-color: #f5f5f5;
}

.cart-table input {
    width: 60px;
    padding: 6px;
    text-align: center;
}

.remove-btn {
    background-color: #e53935;
    color: #fff;
    border: none;
    padding: 6px 14px;
    border-radius: 6px;
    cursor: pointer;
}

.remove-btn:hover {
    background-color: #c62828;
}

.cart-summary {
    margin-top: 30px;
    text-align: right;
}

.checkout-btn {
    margin-top: 15px;
    background-color: #4caf50;
    color: #fff;
    padding: 14px 36px;
    border: none;
    border-radius: 30px;
    font-weight: bold;
    cursor: pointer;
}

.checkout-btn:hover {
    background-color: #43a047;
}
/* ===== Dropdown Menu ===== */
.nav-dropdown {
    position: relative;
}

.nav-main {
    cursor: pointer;
}

/* กล่องเมนูย่อย */
.dropdown-menu {
    position: absolute;
    top: 42px;
    left: 0;
    background-color: #ffffff;
    min-width: 220px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.12);
    border-radius: 10px;
    display: none;
    flex-direction: column;
    z-index: 999;
}

/* ลิงก์ในเมนูย่อย */
.dropdown-menu a {
    padding: 12px 16px;
    color: #333;
    text-decoration: none;
    transition: background 0.2s ease;
    font-weight: normal;
}

.dropdown-menu a:hover {
    background-color: #ff9800;
    color: #ffffff;
}

/* ซ่อนเมนู */
.dropdown-menu {
    display: none;
}

/* คลิกแล้วค้าง */
.nav-dropdown:focus-within .dropdown-menu {
    display: flex;
}

.nav {
    align-items: center; /* ⭐ สำคัญมาก */
}
.nav-main {
    background: none;
    border: none;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    color: #444;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
}

.nav-main:hover {
    background-color: #ff9800;
    color: #fff;
}
