@import url('https://fonts.googleapis.com/css2?family=Sarabun:wght@300;400;500;600;700&display=swap');

body {
    font-family: 'Sarabun', sans-serif;
    background-color: #f5f5f7;
    color: #1d1d1f;
    -webkit-font-smoothing: antialiased;
}

/* Glassmorphism Navbar */
.navbar {
    background-color: rgba(255, 255, 255, 0.85) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(0,0,0,0.05);
    z-index: 1030;
}

/* Modern Card Style */
.card {
    border: none;
    border-radius: 18px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.04);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    background-color: #ffffff;
}

.product-card {
    cursor: pointer;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.1);
}

.product-card.best-seller {
    border: 2px solid #ffc107;
}

.product-img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-top-left-radius: 18px;
    border-top-right-radius: 18px;
    transition: transform 0.3s ease;
}

.badge-school {
    background-color: #f0f4ff;
    color: #007aff;
    font-weight: 600;
    font-size: 0.75rem;
    padding: 4px 10px;
    border-radius: 8px;
    display: inline-block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Buttons */
.btn {
    border-radius: 12px;
    font-weight: 600;
    padding: 0.5rem 1.25rem;
    transition: all 0.2s;
}

.btn-primary { background-color: #007aff; border-color: #007aff; }
.btn-primary:hover { background-color: #0062cc; }
.btn-warning { background-color: #ff9500; border-color: #ff9500; color: #fff !important; }
.btn-warning:hover { background-color: #e08300; }
.btn-sm { border-radius: 8px; padding: 0.35rem 0.75rem; }

/* Scrollable Tabs */
.nav-pills, .nav-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 5px;
}
.nav-pills::-webkit-scrollbar, .nav-tabs::-webkit-scrollbar { display: none; }
.nav-item { white-space: nowrap; }
.nav-pills .nav-link { border-radius: 12px; color: #555; font-weight: 500; }
.nav-pills .nav-link.active {
    background-color: #007aff;
    box-shadow: 0 4px 12px rgba(0, 122, 255, 0.3);
    color: white;
}

/* Table */
.table-responsive {
    border-radius: 12px;
    background: #fff;
    border: 1px solid #eee;
}
.table th {
    background-color: #f5f5f7;
    color: #86868b;
    font-weight: 600;
    font-size: 0.9rem;
    border-bottom: none;
}

/* Banner & Utilities */
.banner-wrapper {
    width: 100%;
    border-radius: 0 0 24px 24px;
    overflow: hidden;
    margin-bottom: 2rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    background-color: #fff;
}
.banner-img-full {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    max-height: 400px;
}
.page-title {
    background: rgba(255,255,255,0.9);
    padding: 12px 20px;
    border-radius: 12px;
    backdrop-filter: blur(10px);
    display: inline-block;
}
.grayscale { filter: grayscale(100%); opacity: 0.6; pointer-events: none; }

/* Mobile Optimizations */
@media (max-width: 768px) {
    .product-img { height: 140px; }
    .card-title { font-size: 0.95rem; }
    .btn { padding: 0.4rem 1rem; }
    h4.page-title { font-size: 1.1rem; }
    .container { padding-left: 10px; padding-right: 10px; }
    .banner-wrapper { border-radius: 0; margin-bottom: 1.5rem; }
}