/* ========================================
   TABLE OF CONTENTS
   ========================================
   1. General Styles
   2. Navbar Styles
   3. Hero Section
   4. Features Section
   5. Product Cards
   6. Cart Styles
   7. Stats Section
   8. Newsletter Section
   9. Profile & Card Styles
   10. Animations
   11. Responsive Design
   ======================================== */

/* ========================================
   1. GENERAL STYLES
   ======================================== */
* {
    font-family: 'Kanit', sans-serif;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: #E3FCF9 100%;
    min-height: 100vh;
    display: flex;
    padding: 0px 0;
}

/* ========================================
   2. NAVBAR STYLES
   ======================================== */
.navbar {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding: 15px 30px;
    background-color: #bba4d3 !important;
}

.navbar-brand {
    font-size: 1.5rem;
    color: #bba4d3 !important;
}

.navbar-nav {
    margin-left: auto;
    margin-right: 20px;
}

.navbar-nav .nav-item {
    margin: 0 5px;
}

.navbar-nav .nav-link {
    display: block;
    white-space: nowrap;
    color: #fff !important;
    font-size: 1.2rem;
    font-weight: 600;
    padding: 8px 16px;
    transition: all 0.3s ease;
    border-radius: 8px;

}


.navbar-nav .nav-link:hover {
    background-color: #dbcee4;
    color: #000000 !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px #e3a6bf;
}

.navbar-nav .nav-link.active {
    background-color: #dbcee4;
    color: #ffffff !important;
    font-weight: 700;
}

/* Navbar Button */
.btn-navbar {
    background-color: #db6a62;
    color: #fff !important;
    font-size: 1.1rem;
    font-weight: 600;
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.btn-navbar:hover {
    background-color: #d93b2f;
    color: #000000 !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(255, 215, 0, 0.3);
}

.btn-navbar:active,
.btn-navbar.active {
    background-color: #be99d9;
    color: #ffffff !important;
    font-weight: 700;
}

.btn-cart {
    background: #4A89AC;
    color: white !important;
    border: none;
    padding: 12px 30px;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-cart:hover {
    background: #ACE5F6;
    color: white !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px #ACE5F6;
}

.btn-cart .badge {
    font-size: 0.75rem;
    padding: 0.35em 0.5em;
    animation: pulse 2s infinite;
}

/* ========================================
   3. HERO SECTION
   ======================================== */
.hero-section {
    background-image: url("image/cover.jpg");
    background-size: cover;
    border-radius: 20px;
    background-repeat: no-repeat;
    padding: 80px 40px;
    margin-bottom: 50px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(42, 157, 143, 0.3);
}


.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 500px;
    height: 500px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
}

.hero-section::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -5%;
    width: 400px;
    height: 400px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 50%;
}

.hero-content {
    position: relative;
    z-index: 2;
    color: white;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
    animation: fadeInUp 0.8s ease;
}

.hero-subtitle {
    font-size: 1.5rem;
    font-weight: 300;
    opacity: 0.95;
    animation: fadeInUp 1s ease;
}

.hero-buttons {
    margin-top: 30px;
    animation: fadeInUp 1.2s ease;
}

.btn-hero {
    padding: 12px 35px;
    font-size: 1.1rem;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s;
    margin: 5px;
}

.btn-hero-primary {
    background: white;
    color: #2A9D8F;
    border: 2px solid white;
}

.btn-hero-primary:hover {
    background: transparent;
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.btn-hero-outline {
    background: transparent;
    color: white;
    border: 2px solid white;
}

.btn-hero-outline:hover {
    background: white;
    color: #2A9D8F;
    transform: translateY(-3px);
}

.page-header {
    background-image: url("image/cover.jpg");
    padding: 60px 0;
    margin-bottom: 50px;
    border-radius: 20px;
    color: white;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.page-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 400px;
    height: 400px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
}

.page-header h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 15px;
    position: relative;
    z-index: 2;
}

.page-header p {
    font-size: 1.2rem;
    opacity: 0.95;
    position: relative;
    z-index: 2;
}

/* ========================================
   4. FEATURES SECTION
   ======================================== */
.features-section {
    margin: 60px 0;
}

.feature-box {
    background: white;
    border-radius: 15px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s;
    height: 100%;
}

.feature-box:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

.feature-icon {
    font-size: 3.5rem;
    margin-bottom: 15px;
    display: block;
}

.feature-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: #1D6A96;
    margin-bottom: 10px;
}

.feature-text {
    color: #6B7280;
    font-size: 0.95rem;
}

/* ========================================
   5. PRODUCT CARDS
   ======================================== */
.section-header {
    text-align: center;
    margin-bottom: 50px;
}




.section-subtitle {
    color: #6B7280;
    font-size: 1.1rem;
    margin-top: 20px;
}

.product-card {
    border-radius: 15px;
    overflow: hidden;
    transition: all 0.3s;
    background: white;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.1);
    border: 2px solid transparent;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
    border-color: #4A89AC;
}

.product-image-wrapper {
    position: relative;
    overflow: hidden;
    background: #f8f9fa;
}

.product-img {
    height: 240px;
    width: 100%;
    object-fit: cover;
    transition: transform 0.5s;
    border-radius: 10px;
}

.product-card:hover .product-img {
    transform: scale(1.1);
}

.product-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
}

.badge-new {
    background: linear-gradient(135deg, #EF4444, #DC2626);
    color: white;
}

.badge-promo {
    background: linear-gradient(135deg, #EF4444, #DC2626);
    color: white;
    animation: pulse 2s infinite;
}

.product-content {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.product-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: #111827;
    margin-bottom: 10px;
    min-height: 50px;
    line-height: 1.4;
}

.product-price,
.price {
    font-size: 1.5rem;
    font-weight: 700;
    color: #4A89AC;
    margin: 15px 0;
}

.product-price-old {
    font-size: 1.1rem;
    color: #9CA3AF;
    text-decoration: line-through;
    margin-left: 10px;
}

.btn-view-product {
    background: #4A89AC;
    border: none;
    color: white;
    padding: 12px;
    border-radius: 10px;
    font-weight: 600;
    transition: all 0.3s;
    margin-top: auto;
}

.btn-view-product:hover {
    transform: translateY(-2px);
    background: #ACE5F6;
    box-shadow: 0 8px 20px #ACE5F6;
}

.btn-view-promo {
    background: linear-gradient(135deg, #EF4444, #DC2626);
}

.btn-view-promo:hover {
    box-shadow: 0 8px 20px rgba(239, 68, 68, 0.4);
}

/* ========================================
   6. CART STYLES
   ======================================== */
.cart-container {
    background: white;
    min-height: 100vh; 
    width: 100%; 
    padding: 30px; 
    border-radius: 15px; 
    /* box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15); */
}

.checkout-container {
            background: white;
            padding: 30px;
            border-radius: 15px;
            min-height: 100vh; 
            width: 100%; 
        }

.cart-item {
    border-bottom: 1px solid #eee;
    padding: 20px 0;
}

.cart-item:last-child {
    border-bottom: none;
}

.cart-img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 10px;
}

.qty-input {
    width: 80px;
    text-align: center;
}

.btn-update {
    background: #2A9D8F;
    border: none;
    color: white;
    padding: 5px 15px;
    border-radius: 6px;
    font-size: 14px;
    transition: 0.2s;
}

.btn-update:hover {
    background: #21867A;
}

.btn-remove {
    background: #E63946;
    border: none;
    color: white;
    padding: 5px 15px;
    border-radius: 6px;
    font-size: 14px;
    transition: 0.2s;
}

.btn-remove:hover {
    background: #d62828;
}

.summary-box {
    background: #F9FAFB;
    padding: 25px;
    border-radius: 12px;
    border: 2px solid #2A9D8F;
}

.total-price {
    font-size: 32px;
    font-weight: bold;
    color: #E63946;
}

.btn-checkout {
    background: #E63946;
    border: none;
    font-size: 20px;
    padding: 15px;
    border-radius: 12px;
    color: white;
    transition: 0.2s;
}

.btn-checkout:hover {
    background: #d62828;
    color: white;
}

.empty-cart {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.empty-cart-icon {
    font-size: 80px;
    margin-bottom: 20px;
}

/* ========================================
   7. STATS SECTION
   ======================================== */
.stats-section {
    background: #4A89AC;
    border-radius: 20px;
    padding: 60px 20px;
    margin: 80px 0;
    color: white;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.stat-label {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* ========================================
   8. NEWSLETTER SECTION
   ======================================== */
.newsletter-section {
    background: white;
    border-radius: 20px;
    padding: 50px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    margin: 60px 0;
}

.newsletter-input {
    padding: 15px 20px;
    border-radius: 50px;
    border: 2px solid #E5E7EB;
    font-size: 1rem;
}

.newsletter-input:focus {
    border-color: #2A9D8F;
    box-shadow: 0 0 0 3px rgba(42, 157, 143, 0.1);
    outline: none;
}

.btn-newsletter {
    padding: 15px 40px;
    border-radius: 50px;
    background: linear-gradient(135deg, #2A9D8F, #1D6A96);
    border: none;
    color: white;
    font-weight: 600;
    margin-left: 10px;
    transition: 0.3s;
}

.btn-newsletter:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(42, 157, 143, 0.4);
}

/* ========================================
   9. PROFILE & CARD STYLES
   ======================================== */
.card {
    border: 2px solid #ffffff;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.card-header {
    background-color: #fff;
    border-bottom: 2px solid #333;
    padding: 20px;
}

.card-header h5,
.card-header h6 {
    margin: 0;
    font-weight: 600;
}

.profile-circle {
    width: 120px;
    height: 120px;
    border: 3px solid #333;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    background-color: #fff;
}

.profile-circle span {
    font-size: 18px;
    font-weight: 600;
}

.content-box {
    border: 2px solid #333;
    border-radius: 15px;
    padding: 25px;
    background-color: #fff;
    min-height: 250px;
}

.content-box h6 {
    font-weight: 600;
    margin-bottom: 15px;
}

.detail-box {
    background: #fff;
    padding: 20px;
    border-radius: 12px;
}

.product-section,
.promotion-section {
    min-height: 150px;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 8px;
}

.btn-login {
    background: #4A89AC;
    color: #ffffff !important;  
    padding: 8px 20px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-login:hover {
    background: #ACE5F6;
    color: black !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px #4A89AC;
}

.btn-register {
    background: #4A89AC;
    border: none;
    color: white;
    padding: 14px 40px;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 12px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(42, 157, 143, 0.3);

    /* จัดให้อยู่กลาง */
    display: block;
    width: 100%;
    margin: 20px auto 0;
    text-align: center;
}

.btn-register:hover {
    background: #ACE5F6;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(42, 157, 143, 0.4);
    color: white;
}

.btn-register:active {
    transform: translateY(0);
}

.btn-buy-now{
    background: #FAEE5A;
    border: none;
    color: #575110;
    padding: 12px 30px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 10px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px #FAEE5A;
    text-decoration: none;
    display: inline-block;
}

.btn-buy-now:hover {
    background: #eddb1a;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px #FAEE5A;
    color: #575110;
}

a.btn-nav,
.btn.btn-nav {
    background: transparent;
    color: #ec072d !important;
    border: 2px solid #ec072d;
    padding: 8px 20px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

a.btn-nav:hover,
.btn.btn-nav:hover {
    background: #ec072d;
    color: white !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px #ec072d;
}


.toggle-password {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #6B7280;
    font-size: 1.2rem;
    user-select: none;
}

.toggle-password:hover {
    color: #bbaec9;
}

.login-link {
    text-align: center;
    margin-top: 20px;
    color: #6B7280;
}

.login-link a {
    color: #4A89AC;
    font-weight: 600;
    text-decoration: none;
}

.login-link a:hover {
    color: #4A89AC;
    text-decoration: underline;
}


.filter-btn {
    padding: 10px 25px;
    border: 2px solid #E5E7EB;
    background: white;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s;
    cursor: pointer;
    color: #6B7280;
}

.filter-btn:hover {
    border-color: #ACE5F6;
    color: #4A89AC;
    transform: translateY(-2px);
}

.filter-btn.active {
    background: #4A89AC;
    color: white;
    border-color: transparent;
}

.product-item {
    opacity: 0;
    animation: fadeInUp 0.6s ease forwards;
}

.product-item:nth-child(1) {
    animation-delay: 0.1s;
}

.product-item:nth-child(2) {
    animation-delay: 0.2s;
}

.product-item:nth-child(3) {
    animation-delay: 0.3s;
}

.product-item:nth-child(4) {
    animation-delay: 0.4s;
}

.product-item:nth-child(5) {
    animation-delay: 0.5s;
}

.product-item:nth-child(6) {
    animation-delay: 0.6s;
}

.product-item:nth-child(7) {
    animation-delay: 0.7s;
}

.product-item:nth-child(8) {
    animation-delay: 0.8s;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Pagination Styles */
.pagination-container {
    margin-top: 50px;
    margin-bottom: 30px;
}

.pagination {
    gap: 5px;
}

.pagination .page-item .page-link {
    border: 2px solid #E5E7EB;
    color: #6B7280;
    font-weight: 600;
    padding: 10px 18px;
    border-radius: 10px;
    transition: all 0.3s;
    margin: 0 3px;
}

.pagination .page-item .page-link:hover {
    background: #F0FDFA;
    border-color: #4A89AC;
    color: #4A89AC;
    transform: translateY(-2px);
}

.pagination .page-item.active .page-link {
    background: #4A89AC;
    border-color: transparent;
    color: white;
    box-shadow: 0 4px 15px #4A89AC;
}

.pagination .page-item.disabled .page-link {
    background: #F3F4F6;
    border-color: #E5E7EB;
    color: #9CA3AF;
    cursor: not-allowed;
}

.pagination-info {
    color: #6B7280;
    font-size: 0.95rem;
}

.pagination-info strong {
    color: #4A89AC;
}

/* First/Last page buttons */
.page-item.first-page .page-link,
.page-item.last-page .page-link {
    background: #F9FAFB;
}

.page-item.first-page .page-link:hover,
.page-item.last-page .page-link:hover {
    background: #F0FDFA;
}

.section-title {
    color: #2A9D8F;
    font-weight: 600;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: none; /* เปลี่ยนจาก 3px solid เป็น none */
}
/* ========================================
   10. ANIMATIONS
   ======================================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

/* ========================================
   11. RESPONSIVE DESIGN
   ======================================== */
@media (max-width: 991px) {
    .navbar-nav .nav-item {
        text-align: left;
        margin-bottom: 5px;
    }

    .navbar-nav .nav-link {
        padding: 10px 15px;
        font-size: 1.5rem;
    }
}

@media (max-width: 768px) {

    /* Hero */
    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.2rem;
    }

    .hero-section {
        padding: 50px 20px;
    }

    /* Section */
    .section-title {
        font-size: 2rem;
    }

    /* Cards */
    .card-header .row>div {
        margin-bottom: 10px;
        text-align: center !important;
    }

    .profile-circle {
        width: 100px;
        height: 100px;
        margin-bottom: 20px;
    }

    .content-box {
        margin-top: 20px;
    }

    /* Product */
    .product-img {
        height: 200px;
    }

    .product-name {
        min-height: auto;
    }

    /* Stats */
    .stat-number {
        font-size: 2rem;
    }

    .stat-label {
        font-size: 0.9rem;
    }

    /* Newsletter */
    .newsletter-section {
        padding: 30px 20px;
    }

    .btn-newsletter {
        margin-left: 0;
        margin-top: 10px;
        width: 100%;
    }

    /* Features */
    .feature-icon {
        font-size: 2.5rem;
    }

    .feature-title {
        font-size: 1.1rem;
    }
}

@media (max-width: 576px) {
    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .btn-hero {
        padding: 10px 25px;
        font-size: 1rem;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .navbar-nav .nav-link {
        font-size: 1.2rem;
    }
}