* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;

    font-family: Arial, sans-serif;

    background: #f6f7f8;
    color: #222;

    padding-top: 72px;
}
.header {
    position: fixed;

    top: 0;
    left: 0;
    right: 0;

    width: 100%;
    height: 72px;

    z-index: 99999;

    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 0 7%;

    box-sizing: border-box;

    background: rgba(255, 255, 255, 0.97);

    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);

    border-bottom: 1px solid #eee;

    box-shadow:
        0 2px 10px rgba(0, 0, 0, 0.06);
}

.logo {
    font-size: 25px;
    font-weight: 800;
    color: #18a558;
}

.header nav {
    display: flex;
    gap: 25px;
}

.header nav a {
    text-decoration: none;
    color: #333;
}

.header-cart {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    color: #333;
}

.header-cart:hover { color: #18a558; }

.cart-count {
    position: absolute;
    top: -11px;
    right: -13px;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    border-radius: 50%;
    background: #e53935;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
}

.hero {
    background: white;
    padding: 70px 7%;
}

.hero-content {
    max-width: 900px;
    margin: auto;
    text-align: center;
}

.hero h1 {
    font-size: 48px;
    color: #18a558;
    margin-bottom: 10px;
}

.hero h2 {
    font-size: 30px;
}

.hero p {
    color: #666;
}

.search-box {
    margin-top: 30px;
    display: flex;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.search-box input {
    flex: 1;
    padding: 17px;
    border: 1px solid #ddd;
    border-radius: 10px 0 0 10px;
    font-size: 16px;
}

.search-box button {
    border: 0;
    padding: 0 30px;
    background: #18a558;
    color: white;
    border-radius: 0 10px 10px 0;
}

.categories,
.shops {
    max-width: 1600px;
    margin: auto;
    padding: 35px 20px;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 15px;
}

.category-grid div {
    background: white;
    padding: 20px 10px;
    border-radius: 12px;
    text-align: center;
    font-size: 30px;
}

.category-grid span {
    font-size: 14px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.section-header a {
    color: #18a558;
}

.shop-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.shop-card {
    background: white;
    padding: 12px;
    border-radius: 15px;
}

.shop-image {
    height: 150px;
    background: #eee;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

footer {
    text-align: center;
    padding: 30px;
    background: white;
    margin-top: 50px;
}
@media (max-width: 768px) {

    .header {
        height: 64px;
        padding: 0 15px;
    }

    body {
        padding-top: 64px;
    }

    .header nav {
        display: flex;
        align-items: center;
        gap: 12px;
    }

    .header nav a {
        font-size: 13px;
    }
}
@media (max-width: 768px) {

   
    .hero {
        padding: 40px 20px;
    }

    .hero h1 {
        font-size: 38px;
    }

    .category-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .shop-grid {
        grid-template-columns: repeat(2, 1fr);
    }

}


.auth-container {
    min-height: calc(100vh - 140px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px 20px;
}

.auth-card {
    width: 100%;
    max-width: 480px;
    background: white;
    padding: 35px;
    border-radius: 18px;
    box-shadow: 0 5px 25px rgba(0,0,0,.08);
}

.auth-card h1 {
    margin-top: 0;
}

.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    margin-bottom: 7px;
    font-weight: 600;
}

.form-group input {
    width: 100%;
    padding: 13px;
    border: 1px solid #ddd;
    border-radius: 9px;
}

.auth-card form p {
    margin-bottom: 15px;
}

.auth-card form input,
.auth-card form select {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
}

.btn-primary {
    width: 100%;
    padding: 14px;
    border: 0;
    border-radius: 10px;
    background: #18a558;
    color: white;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
}

.btn-danger {
    display: inline-block;
    padding: 11px 18px;
    background: #dc3545;
    color: white;
    text-decoration: none;
    border-radius: 8px;
}

.auth-link {
    text-align: center;
    margin-top: 20px;
}

.auth-link a {
    color: #18a558;
    font-weight: bold;
}

.error-box,
.message {
    padding: 12px;
    background: #fff3cd;
    border-radius: 8px;
    margin-bottom: 15px;
}

.profile-container {
    max-width: 900px;
    margin: auto;
    padding: 40px 20px;
}

.profile-card {
    background: white;
    padding: 30px;
    border-radius: 16px;
}
.avatar-preview {
    text-align: center;
    margin-bottom: 25px;
}

.avatar-preview img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 50%;
    border: 3px solid #18a558;
}

.profile-card .form-group {
    margin-bottom: 18px;
}

.profile-card .form-group label {
    display: block;
    margin-bottom: 7px;
    font-weight: 600;
}

.profile-card input[type="text"],
.profile-card input[type="email"],
.profile-card input[type="file"],
.profile-card textarea {
    width: 100%;
    box-sizing: border-box;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 9px;
    font-size: 15px;
}

.profile-card textarea {
    min-height: 90px;
    resize: vertical;
}

.account-role {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px;
    margin: 20px 0;
    background: #f5f7f6;
    border-radius: 10px;
}

.form-error {
    color: #dc3545;
    font-size: 13px;
    margin-top: 5px;
}

.profile-back {
    display: block;
    text-align: center;
    margin-top: 20px;
    color: #18a558;
    text-decoration: none;
}


/* css tao shop */
.shop-create-page {
    min-height: calc(100vh - 100px);
    padding: 20px;
    background: #f6f8f7;
}

.shop-create-card {
    width: 100%;
    margin: 0 auto;
    padding: 25px;
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, .06);
    box-sizing: border-box;
}

.shop-header {
    text-align: center;
    margin-bottom: 25px;
}

.shop-icon {
    font-size: 55px;
    margin-bottom: 10px;
}

.shop-header h1 {
    margin: 0;
    font-size: 25px;
}

.shop-header p {
    color: #777;
    margin-top: 8px;
}

.shop-create-card .form-group {
    margin-bottom: 18px;
}

.shop-create-card label {
    display: block;
    margin-bottom: 7px;
    font-weight: 600;
}

.shop-create-card input,
.shop-create-card textarea {
    width: 100%;
    box-sizing: border-box;
    padding: 13px;
    border: 1px solid #ddd;
    border-radius: 10px;
    font-size: 15px;
}

.shop-create-card textarea {
    min-height: 100px;
    resize: vertical;
}

.btn-create-shop {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 11px;
    background: #18a558;
    color: white;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
}

.btn-create-shop:hover {
    opacity: .9;
}

.back-home {
    display: block;
    margin-top: 18px;
    text-align: center;
    color: #18a558;
    text-decoration: none;
}

.message {
    padding: 12px;
    margin-bottom: 18px;
    background: #e9f8ef;
    color: #168347;
    border-radius: 9px;
}

/* shop datboare */
.seller-page {
    max-width: 700px;
    margin: auto;
    padding: 20px;
}

.seller-header {
    display: flex;
    gap: 15px;
    align-items: center;
    padding: 20px;
    background: white;
    border-radius: 16px;
    margin-bottom: 15px;
}

.seller-avatar {
    width: 75px;
    height: 75px;
    border-radius: 50%;
    background: #e9f8ef;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 35px;
    overflow: hidden;
    flex-shrink: 0;
}

.seller-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.seller-info h1 {
    margin: 0 0 5px;
    font-size: 22px;
}

.seller-info p {
    margin: 0 0 5px;
    color: #666;
}

.seller-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 15px;
}

.stat-card {
    background: white;
    border-radius: 14px;
    padding: 18px 10px;
    text-align: center;
}

.stat-card strong {
    display: block;
    font-size: 18px;
    color: #18a558;
}

.stat-card span {
    display: block;
    margin-top: 5px;
    font-size: 13px;
    color: #777;
}

.seller-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.seller-action {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 18px;
    background: white;
    border-radius: 14px;
    text-decoration: none;
    color: #222;
}

.seller-action > span {
    width: 45px;
    height: 45px;
    border-radius: 12px;
    background: #e9f8ef;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
}

.seller-action strong {
    display: block;
}

.seller-action small {
    display: block;
    margin-top: 4px;
    color: #777;
}

.back-home {
    display: block;
    text-align: center;
    margin-top: 20px;
    color: #18a558;
    text-decoration: none;
}


/* //create product */

.product-create-page {
    min-height: calc(100vh - 80px);
    padding: 20px;
    background: #f6f8f7;
}

.product-create-card {
    width: 100%;
    max-width: 600px;
    margin: auto;
    padding: 24px;
    box-sizing: border-box;
    background: white;
    border-radius: 18px;
}

.product-header {
    text-align: center;
    margin-bottom: 25px;
}

.product-icon {
    font-size: 50px;
}

.product-header h1 {
    margin: 8px 0;
}

.product-header p {
    color: #777;
}

.product-create-card .form-group {
    margin-bottom: 18px;
}

.product-create-card label {
    display: block;
    margin-bottom: 7px;
    font-weight: 600;
}

.product-create-card input,
.product-create-card select,
.product-create-card textarea {
    width: 100%;
    box-sizing: border-box;
    padding: 13px;
    border: 1px solid #ddd;
    border-radius: 10px;
    font-size: 15px;
    background: white;
}

.product-create-card textarea {
    min-height: 100px;
    resize: vertical;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.price-input {
    position: relative;
}

.price-input input {
    padding-right: 40px;
}

.price-input span {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #777;
}

.form-group small {
    display: block;
    margin-top: 5px;
    color: #888;
}

.profit-preview {
    margin: 20px 0;
    padding: 16px;
    border-radius: 12px;
    background: #eaf8ef;
}

.profit-preview span {
    display: block;
    color: #555;
    font-size: 14px;
}

.profit-preview strong {
    display: block;
    margin-top: 5px;
    color: #18a558;
    font-size: 22px;
}

.btn-save-product {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 11px;
    background: #18a558;
    color: white;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
}

.back-shop {
    display: block;
    text-align: center;
    margin-top: 18px;
    color: #18a558;
    text-decoration: none;
}

@media (max-width: 500px) {

    .product-create-page {
        padding: 10px;
    }

    .product-create-card {
        padding: 18px;
        border-radius: 14px;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }

}