* {

    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
}

body {
    background: #f8fafc;
    color: #0f172a;
    line-height: 1.5;
}

a {
    text-decoration: none;
}

button {
    font: inherit;
}

.container {
    width: min(1200px, 92%);
    margin: 0 auto;
}

.topbar {
    background: #ffffff;
    border-bottom: 1px solid #e2e8f0;
    position: sticky;
    top: 0;
    z-index: 50;
}

.topbar-inner {
    min-height: 68px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.brand {
    font-size: 20px;
    font-weight: bold;
    color: #0f172a;
}

.topbar-links {
    display: flex;
    align-items: center;
    gap: 16px;
}

.topbar-links a {
    color: #334155;
    font-weight: 600;
}

.cart-pill {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: #111827;
    color: #fff !important;
    padding: 10px 14px;
    border-radius: 999px;
}

.cart-pill span {
    background: rgba(255,255,255,.18);
    color: #fff;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 12px;
}

.site-header {
    padding: 70px 0 60px;
    background: linear-gradient(135deg, #0f172a, #1e293b, #111827);
    color: #fff;
    text-align: center;
}

.small-header {
    padding: 40px 0;
    text-align: left;
}

.site-header h1 {
    font-size: 42px;
    margin-bottom: 10px;
}

.site-header p {
    color: rgba(255,255,255,0.82);
    max-width: 760px;
    margin: 0 auto;
}

.top-badge {
    display: inline-block;
    margin-bottom: 14px;
    background: rgba(255,255,255,0.12);
    color: #fff;
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 13px;
}

.back-link {
    display: inline-block;
    margin-bottom: 16px;
    color: #cbd5e1;
}

.back-link:hover {
    color: #fff;
}

.page-section {
    padding: 36px 0;
}

.section-head {
    margin-bottom: 20px;
}

.section-head h2 {
    font-size: 26px;
}

.category-chips {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.chip {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: #fff;
    color: #0f172a;
    border: 1px solid #e2e8f0;
    padding: 10px 14px;
    border-radius: 999px;
    box-shadow: 0 8px 20px rgba(0,0,0,.04);
}

.chip span {
    background: #e2e8f0;
    color: #334155;
    padding: 3px 8px;
    border-radius: 999px;
    font-size: 12px;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
}

.product-card {
    background: #fff;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,.08);
    transition: transform .18s ease, box-shadow .18s ease;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 40px rgba(0,0,0,.12);
}

.card-link {
    display: block;
    color: inherit;
    height: 100%;
}

.product-card img,
.card-no-image {
    width: 100%;
    height: 210px;
    object-fit: cover;
    background: #e2e8f0;
}

.product-card-body {
    padding: 18px;
}

.product-top-line {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 10px;
}

.mini-badge {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: bold;
}

.mini-badge-free {
    background: #dcfce7;
    color: #166534;
}

.mini-badge-paid {
    background: #fee2e2;
    color: #991b1b;
}

.category-mini {
    color: #64748b;
    font-size: 13px;
}

.product-card h3 {
    margin-bottom: 8px;
    font-size: 20px;
}

.product-card p {
    color: #475569;
    margin-bottom: 10px;
    min-height: 44px;
}

.product-card small {
    display: block;
    color: #64748b;
    margin-bottom: 14px;
}

.price-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.price-tag {
    font-weight: bold;
    font-size: 18px;
    color: #0f172a;
}

.see-more {
    color: #2563eb;
    font-weight: bold;
    font-size: 14px;
}

.empty-box {
    background: #fff;
    border: 1px dashed #cbd5e1;
    padding: 24px;
    border-radius: 16px;
}

.breadcrumbs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 24px;
    color: #64748b;
}

.breadcrumbs a {
    color: #2563eb;
}

.product-detail {
    display: grid;
    grid-template-columns: 1.6fr .9fr;
    gap: 28px;
}

.product-main-card,
.side-card,
.content-box,
.form-card,
.summary-card,
.success-box {
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,.06);
}

.product-main-card {
    padding: 20px;
}

.product-cover-lg {
    width: 100%;
    border-radius: 16px;
    max-height: 460px;
    object-fit: cover;
    margin-bottom: 20px;
}

.no-image {
    display: grid;
    place-items: center;
    color: #64748b;
}

.video-box {
    margin-bottom: 20px;
    border-radius: 16px;
    overflow: hidden;
    background: #000;
}

.video-box iframe {
    width: 100%;
    height: 420px;
}

.content-box {
    box-shadow: none;
    padding: 0;
}

.content-box h2 {
    margin-bottom: 14px;
}

.description {
    color: #334155;
}

.product-sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.side-card {
    padding: 22px;
    position: sticky;
    top: 90px;
}

.badge {
    display: inline-block;
    padding: 7px 12px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: bold;
    margin-bottom: 14px;
}

.badge-free {
    background: #dcfce7;
    color: #166534;
}

.badge-paid {
    background: #fee2e2;
    color: #991b1b;
}

.side-card h3 {
    margin-bottom: 16px;
    font-size: 24px;
}

.meta-list {
    list-style: none;
    margin-bottom: 20px;
}

.meta-list li {
    padding: 10px 0;
    border-bottom: 1px solid #e2e8f0;
    color: #334155;
}

.product-price {
    font-size: 30px;
    font-weight: bold;
    margin-bottom: 18px;
}

.btn-primary,
.btn-disabled,
.inline-btn {
    display: inline-block;
    text-align: center;
    padding: 14px 18px;
    border-radius: 14px;
    font-weight: bold;
}

.btn-primary {
    background: #111827;
    color: #fff;
    border: 0;
    cursor: pointer;
    width: 100%;
}

.btn-primary:hover {
    background: #0b1220;
}

.btn-disabled {
    background: #e2e8f0;
    color: #64748b;
    width: 100%;
}

.inline-btn {
    width: auto;
    padding: 10px 14px;
}

.public-alert {
    padding: 14px 16px;
    border-radius: 14px;
    margin-bottom: 20px;
}

.public-alert.success {
    background: #dcfce7;
    color: #166534;
}

.public-alert.warning {
    background: #fef3c7;
    color: #92400e;
}

.public-alert.error {
    background: #fee2e2;
    color: #991b1b;
}

.cart-layout,
.checkout-layout,
.order-layout {
    display: grid;
    grid-template-columns: 1.5fr .9fr;
    gap: 24px;
}

.cart-items {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.cart-item-card {
    display: grid;
    grid-template-columns: 160px 1fr;
    gap: 18px;
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 10px 30px rgba(0,0,0,.06);
    padding: 18px;
}

.cart-item-thumb img,
.cart-no-image {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 14px;
    background: #e2e8f0;
}

.cart-item-content h3 {
    margin-bottom: 8px;
}

.cart-item-content p {
    color: #475569;
    margin-bottom: 8px;
}

.cart-item-content small {
    display: block;
    color: #64748b;
    margin-bottom: 14px;
}

.cart-item-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.summary-card,
.form-card,
.success-box {
    padding: 22px;
}

.summary-card h3,
.form-card h2,
.success-box h2 {
    margin-bottom: 18px;
}

.summary-row,
.summary-product {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid #e2e8f0;
}

.total-row {
    margin-top: 8px;
    font-size: 18px;
}

.form-card form label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
}

.form-card form input,
.form-card form select,
.form-card form textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    margin-bottom: 16px;
    background: #fff;
}

.info-card {
    background: #eff6ff;
    color: #1e3a8a;
    border: 1px solid #bfdbfe;
    padding: 14px;
    border-radius: 14px;
    margin-bottom: 16px;
}

.status-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 20px;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    padding: 8px 12px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 13px;
}

.status-pending {
    background: #fef3c7;
    color: #92400e;
}

.status-paid,
.status-completed {
    background: #dcfce7;
    color: #166534;
}

.status-failed,
.status-cancelled {
    background: #fee2e2;
    color: #991b1b;
}

.order-data p {
    margin-bottom: 10px;
    color: #334155;
}

.order-product-line {
    align-items: flex-start;
}

.order-product-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
}

.success-box {
    margin-bottom: 24px;
    background: linear-gradient(135deg, #ecfdf5, #f0fdf4);
    border: 1px solid #bbf7d0;
}

.btn-danger-lite {
    background: #fee2e2;
    color: #991b1b;
    border: 0;
    padding: 10px 14px;
    border-radius: 12px;
    cursor: pointer;
}

@media (max-width: 900px) {
    .site-header h1 {
        font-size: 34px;
    }

    .product-detail,
    .cart-layout,
    .checkout-layout,
    .order-layout {
        grid-template-columns: 1fr;
    }

    .video-box iframe {
        height: 240px;
    }

    .side-card {
        position: static;
    }

    .cart-item-card {
        grid-template-columns: 1fr;
    }

    .topbar-inner {
        flex-direction: column;
        justify-content: center;
        padding: 12px 0;
    }
}

.search-form {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    max-width: 520px;
}

.search-form input {
    flex: 1;
    padding: 12px 14px;
    border: 1px solid #cbd5e1;
    border-radius: 999px;
    background: #fff;
}

.search-form button {
    border: 0;
    background: #111827;
    color: #fff;
    padding: 12px 16px;
    border-radius: 999px;
    cursor: pointer;
}

.hero-banners {
    display: grid;
    gap: 20px;
}

.hero-banner-card {
    display: grid;
    grid-template-columns: 1.1fr .9fr;
    gap: 20px;
    background: #fff;
    border-radius: 24px;
    padding: 24px;
    box-shadow: 0 12px 30px rgba(0,0,0,.06);
}

.hero-banner-content h2 {
    font-size: 34px;
    margin-bottom: 10px;
}

.hero-banner-content p {
    color: #475569;
    margin-bottom: 18px;
}

.hero-banner-image img {
    width: 100%;
    height: 260px;
    object-fit: cover;
    border-radius: 18px;
}

.product-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 14px;
    margin-top: 20px;
}

.gallery-card img {
    width: 100%;
    height: 140px;
    object-fit: cover;
    border-radius: 14px;
    display: block;
}

.upload-progress {
    display: none;
    margin: 12px 0 18px;
    background: #e5e7eb;
    border-radius: 999px;
    overflow: hidden;
    position: relative;
    height: 18px;
}

.upload-progress-bar {
    width: 0;
    height: 100%;
    background: linear-gradient(90deg, #2563eb, #111827);
    transition: width .2s ease;
}

.upload-progress-text {
    position: absolute;
    right: 10px;
    top: -1px;
    font-size: 12px;
    color: #fff;
    line-height: 18px;
}

.gallery-mini-admin {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
    margin-top: 14px;
}

.gallery-mini-item img {
    width: 100%;
    height: 100px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 8px;
}

@media (max-width: 900px) {
    .hero-banner-card {
        grid-template-columns: 1fr;
    }

    .search-form {
        width: 100%;
        max-width: none;
    }

    .search-form button {
        white-space: nowrap;
    }
}