body {
    background: #f5f7fb;
    color: #1f2937;
    overflow-x: hidden;
}

a {
    text-decoration: none;
}

.btn {
    border-radius: 10px;
    font-weight: 700;
}

.btn.rounded-pill,
.rounded-pill {
    border-radius: 999px !important;
}

.form-control,
.form-select {
    border-color: #dbe3ef;
    border-radius: 12px;
}

.form-control:focus,
.form-select:focus {
    border-color: rgba(var(--bs-primary-rgb), .55);
    box-shadow: 0 0 0 .2rem rgba(var(--bs-primary-rgb), .12);
}

.card,
.admin-header-box,
.form-card {
    border: 1px solid #e7edf5 !important;
    border-radius: 16px !important;
    box-shadow: 0 10px 30px rgba(15, 23, 42, .06) !important;
}

.table {
    --bs-table-hover-bg: #f6f9fd;
}

.table thead th {
    color: #64748b;
    font-size: .78rem;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.page-link {
    color: var(--bs-primary);
}

.page-item.active .page-link {
    background-color: var(--bs-primary);
    border-color: var(--bs-primary);
}

.app-sidebar {
    background: #ffffff;
    border-right: 1px solid #e6edf5;
    box-shadow: 8px 0 30px rgba(15, 23, 42, .04);
}

@media (min-width: 768px) {
    .app-sidebar {
        position: fixed;
        inset: 0 auto 0 0;
        z-index: 100;
        padding: 0;
        min-height: 100vh;
    }
}

.app-sidebar .offcanvas-body {
    overflow-y: auto;
}

.sidebar-brand {
    align-items: center;
    gap: 12px;
    padding: 22px 18px;
    border-bottom: 1px solid #eef2f7;
}

.shop-brand {
    flex-direction: column;
    justify-content: center;
    gap: 8px;
    min-height: 190px;
    padding: 22px 18px 20px;
    text-align: center;
}

.brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: rgba(var(--bs-primary-rgb), .1);
    color: var(--bs-primary);
    font-size: 1.35rem;
    flex-shrink: 0;
    overflow: hidden;
}

.brand-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 4px;
}

.shop-brand-logo {
    width: 120px;
    height: 120px;
    border-radius: 0;
    background: transparent;
    color: #000;
    font-size: 5rem;
}

.shop-brand-logo img {
    padding: 0;
}

.shop-brand-text {
    width: 100%;
}

.brand-title {
    color: #111827;
    font-weight: 800;
    line-height: 1.2;
}

.shop-brand .brand-title {
    color: #000;
    font-size: 1.8rem;
    font-weight: 500;
    letter-spacing: 0;
    text-transform: uppercase;
}

.brand-subtitle {
    color: #7b8794;
    font-size: .78rem;
    margin-top: 2px;
}

.shop-brand .brand-subtitle {
    color: #000;
    font-size: .95rem;
    font-weight: 500;
    letter-spacing: 0;
    margin-top: 4px;
}

.brand-thai {
    color: #000;
    font-size: 1.1rem;
    font-weight: 400;
    line-height: 1.25;
    margin-top: 4px;
}

.sidebar-section {
    color: #94a3b8;
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .08em;
    margin: 18px 18px 8px;
    text-transform: uppercase;
}

.sidebar-nav {
    gap: 4px;
    padding: 0 10px;
}

.sidebar-nav .nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 42px;
    border-radius: 12px;
    color: #334155;
    font-weight: 700;
    padding: 10px 12px;
    transition: background-color .18s ease, color .18s ease, transform .18s ease;
}

.sidebar-nav .nav-link i {
    color: #64748b;
    font-size: 1.05rem;
    width: 22px;
    text-align: center;
}

.sidebar-nav .nav-link:hover {
    background: #f1f5f9;
    color: var(--bs-primary);
    transform: translateX(2px);
}

.sidebar-nav .nav-link:hover i,
.sidebar-nav .nav-link.active i {
    color: inherit;
}

.sidebar-nav .nav-link.active {
    background: var(--bs-primary);
    color: #ffffff;
    box-shadow: 0 8px 20px rgba(var(--bs-primary-rgb), .22);
}

.sidebar-footer {
    margin-top: auto;
    padding: 16px;
    border-top: 1px solid #eef2f7;
}

.sidebar-contact {
    margin: 8px 12px 14px;
    padding: 12px;
    border: 1px solid #e7edf5;
    border-radius: 14px;
    background: #f8fafc;
}

.sidebar-contact-title {
    color: #0f172a;
    font-size: .82rem;
    font-weight: 800;
    margin-bottom: 8px;
}

.sidebar-contact-item {
    display: flex;
    gap: 8px;
    align-items: flex-start;
    color: #475569;
    font-size: .82rem;
    line-height: 1.35;
    margin-top: 6px;
    word-break: break-word;
}

.sidebar-contact-item i {
    flex-shrink: 0;
    margin-top: 2px;
}

.contact-facebook span {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.facebook-embed-wrap {
    width: 100%;
    max-width: 260px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #fff;
    margin-bottom: 10px;
}

.facebook-embed-wrap iframe {
    display: block;
    width: 100%;
    min-height: 360px;
}

.line-qr-box {
    text-align: center;
    padding: 10px;
    border: 1px dashed #cbd5e1;
    border-radius: 12px;
    background: #fff;
    margin: 10px 0;
}

.line-qr-box img {
    width: min(170px, 100%);
    height: auto;
    border-radius: 8px;
}

.site-footer {
    color: #475569;
    padding: 18px 24px 24px;
}

.site-footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 0 0;
    border-top: 1px solid #e2e8f0;
}

.footer-contact {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px 14px;
    font-size: .88rem;
}

.footer-contact a {
    color: #334155;
    text-decoration: none;
}

.footer-contact a:hover {
    color: var(--bs-primary);
    text-decoration: underline;
}

.login-shell + .site-footer {
    margin-left: 0;
    padding-top: 0;
}

@media (min-width: 768px) {
    .site-footer {
        margin-left: 25%;
    }
}

@media (min-width: 992px) {
    .site-footer {
        margin-left: 16.66666667%;
    }
}

.product-card,
.admin-product-card {
    border: 1px solid #e7edf5 !important;
    border-radius: 14px !important;
    overflow: hidden;
    background: #ffffff;
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.product-card:hover,
.admin-product-card:hover {
    transform: translateY(-4px);
    border-color: rgba(var(--bs-primary-rgb), .28) !important;
    box-shadow: 0 18px 38px rgba(15, 23, 42, .12) !important;
}

.product-img,
.product-card img.card-img-top {
    width: 100%;
    aspect-ratio: 1 / 1;
    height: auto !important;
    object-fit: cover;
    background: #eef2f7;
}

.img-wrapper {
    background: #eef2f7;
}

.product-name {
    color: #1f2937;
    font-weight: 800;
}

.badge-hot,
.highlight-badge {
    background: #e11d48 !important;
    border-radius: 999px !important;
}

.table-responsive {
    border-radius: 16px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

@media (max-width: 767.98px) {
    main {
        padding-top: 18px !important;
    }

    .app-sidebar {
        max-width: 310px;
    }

    .product-card:hover,
    .admin-product-card:hover,
    .sidebar-nav .nav-link:hover {
        transform: none;
    }

    .site-footer {
        padding: 16px;
    }

    .site-footer-inner {
        display: block;
    }

    .footer-contact {
        justify-content: flex-start;
        margin-top: 10px;
    }
}

.login-shell + .site-footer {
    margin-left: 0;
    padding-top: 0;
}
