* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    background: #f7f3ef;
    color: #2b2420;
}

a {
    text-decoration: none;
    color: inherit;
}

.header {
    width: 100%;
    padding: 22px 60px;
    background: #fff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 25px rgba(0,0,0,0.06);
    position: sticky;
    top: 0;
    z-index: 10;
}

.logo {
    font-size: 24px;
    font-weight: 700;
    color: #8b5e3c;
}

nav {
    display: flex;
    gap: 24px;
}

nav a {
    font-size: 15px;
    font-weight: 600;
    color: #3a302b;
    transition: 0.3s;
}

nav a:hover {
    color: #b8875f;
}

.hero {
    min-height: 520px;
    padding: 90px 60px;
    display: flex;
    align-items: center;
    background:
        linear-gradient(rgba(255,255,255,0.55), rgba(255,255,255,0.75)),
        url("https://images.unsplash.com/photo-1522335789203-aabd1fc54bc9");
    background-size: cover;
    background-position: center;
}

.hero h1 {
    max-width: 700px;
    font-size: 56px;
    line-height: 1.1;
    margin-bottom: 24px;
    color: #2b2420;
}

.hero p {
    max-width: 560px;
    font-size: 20px;
    line-height: 1.6;
    margin-bottom: 32px;
    color: #4f4540;
}

.btn {
    display: inline-block;
    padding: 14px 28px;
    background: #8b5e3c;
    color: #fff;
    border-radius: 999px;
    font-weight: 700;
    border: none;
    cursor: pointer;
    transition: 0.3s;
}

.btn:hover {
    background: #6f452a;
    transform: translateY(-2px);
}

.btn-light {
    background: #e8ddd3;
    color: #2b2420;
}

.btn-light:hover {
    background: #d6c5b5;
}

.catalog {
    padding: 80px 60px;
}

.catalog h2,
.ai-section h2,
.page-section h1 {
    font-size: 38px;
    margin-bottom: 28px;
    color: #2b2420;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 32px;
}

.product-card {
    background: #fff;
    border-radius: 28px;
    padding: 22px;
    box-shadow: 0 12px 35px rgba(0,0,0,0.08);
    transition: 0.3s;
}

.product-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 45px rgba(0,0,0,0.12);
}

.product-card img {
    width: 100%;
    height: 260px;
    object-fit: cover;
    border-radius: 22px;
    margin-bottom: 18px;
}

.no-image {
    width: 100%;
    height: 260px;
    border-radius: 22px;
    background: #eee1d7;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #8b5e3c;
    margin-bottom: 18px;
}

.product-card h3 {
    font-size: 22px;
    margin-bottom: 12px;
}

.product-card p {
    font-size: 15px;
    line-height: 1.5;
    color: #6b5d55;
    margin-bottom: 16px;
}

.price {
    font-size: 22px;
    font-weight: 700;
    color: #8b5e3c;
    margin-bottom: 18px;
}

.empty-text {
    padding: 30px;
    background: #fff;
    border-radius: 20px;
    color: #6b5d55;
}

.footer {
    padding: 30px 60px;
    background: #2b2420;
    color: #fff;
    text-align: center;
}

/* ===========================
   AI CHAT
=========================== */

.ai-section {
    padding: 80px 60px;
    background: #fff;
}

.chat-box {
    margin-top: 30px;
    height: 420px;
    overflow-y: auto;
    background: #f7f3ef;
    border-radius: 24px;
    padding: 20px;
    box-shadow: inset 0 0 12px rgba(0,0,0,.05);
}

.ai-message,
.user-message{
    max-width: 80%;
    padding: 16px 20px;
    border-radius: 18px;
    margin-bottom: 16px;
    line-height: 1.6;
    word-wrap: break-word;
}

.ai-message{
    background:#ffffff;
    border:1px solid #ece4dd;
}

.user-message{
    margin-left:auto;
    background:#8b5e3c;
    color:#fff;
}

.chat-form{
    display:flex;
    gap:16px;
    margin-top:25px;
}

.chat-form input{
    flex:1;
    padding:16px;
    border-radius:16px;
    border:1px solid #ddd;
    font-size:16px;
}

.chat-form button{
    min-width:170px;
}

/* ===========================
   CART
=========================== */

.page-section{
    padding:70px 60px;
}

.cart-list{
    display:flex;
    flex-direction:column;
    gap:25px;
}

.cart-item{
    display:flex;
    align-items:center;
    justify-content:space-between;
    background:#fff;
    padding:20px;
    border-radius:22px;
    box-shadow:0 8px 25px rgba(0,0,0,.07);
}

.cart-item img{
    width:120px;
    height:120px;
    object-fit:cover;
    border-radius:18px;
    margin-right:25px;
}

.cart-item h3{
    margin-bottom:8px;
}

.delete-link{
    color:#d84343;
    font-weight:bold;
}

.cart-buttons{
    display:flex;
    gap:20px;
    margin-top:40px;
}

/* ===========================
   CHECKOUT
=========================== */

.checkout-wrapper{
    display:grid;
    grid-template-columns:1fr 420px;
    gap:50px;
    margin-top:40px;
}

.checkout-left,
.checkout-right{
    background:#fff;
    border-radius:24px;
    padding:30px;
    box-shadow:0 10px 30px rgba(0,0,0,.08);
}

.checkout-item{
    display:flex;
    justify-content:space-between;
    margin-bottom:18px;
    padding-bottom:18px;
    border-bottom:1px solid #eee;
}

.checkout-right form{
    display:flex;
    flex-direction:column;
}

.checkout-right label{
    display:flex;
    flex-direction:column;
    margin-bottom:20px;
    font-weight:bold;
}

.checkout-right input,
.checkout-right textarea{
    margin-top:8px;
    padding:14px;
    border-radius:14px;
    border:1px solid #ddd;
    font-size:15px;
}

.success-box{
    background:#fff;
    max-width:700px;
    margin:auto;
    padding:60px;
    text-align:center;
    border-radius:26px;
    box-shadow:0 12px 40px rgba(0,0,0,.08);
}

.success-box h1{
    margin-bottom:20px;
    color:#3a7d32;
}

.success-box p{
    margin-bottom:18px;
    line-height:1.7;
}

/* ===========================
   ADMIN
=========================== */

.admin-body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #efe7df;
}

.login-box {
    width: 380px;
    background: #fff;
    padding: 40px;
    border-radius: 28px;
    box-shadow: 0 15px 45px rgba(0,0,0,.12);
    text-align: center;
}

.login-box h1 {
    margin-bottom: 10px;
}

.login-box p {
    color: #6b5d55;
    margin-bottom: 25px;
}

.login-box form,
.admin-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.login-box input,
.admin-form input,
.admin-form textarea {
    padding: 15px;
    border-radius: 14px;
    border: 1px solid #ddd;
    font-size: 15px;
}

.error-box {
    background: #ffe2e2;
    color: #9d2525;
    padding: 12px;
    border-radius: 12px;
    margin-bottom: 18px;
}

.back-link {
    display: inline-block;
    margin-top: 20px;
    color: #8b5e3c;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 28px;
}

.dashboard-card {
    background: #fff;
    padding: 30px;
    border-radius: 26px;
    box-shadow: 0 10px 30px rgba(0,0,0,.08);
}

.big-number {
    font-size: 48px;
    font-weight: 800;
    color: #8b5e3c;
    margin-top: 12px;
}

.admin-form {
    max-width: 600px;
    background: #fff;
    padding: 30px;
    border-radius: 26px;
    box-shadow: 0 10px 30px rgba(0,0,0,.08);
    margin-bottom: 50px;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: 22px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,.08);
}

.admin-table th,
.admin-table td {
    padding: 16px;
    text-align: left;
    border-bottom: 1px solid #eee;
    vertical-align: top;
}

.admin-table th {
    background: #8b5e3c;
    color: #fff;
}

.admin-table tr:hover {
    background: #f8f1eb;
}

/* ===========================
   MOBILE
=========================== */

@media (max-width: 768px) {
    .header {
        padding: 18px 22px;
        flex-direction: column;
        gap: 15px;
    }

    nav {
        flex-wrap: wrap;
        justify-content: center;
        gap: 14px;
    }

    .hero {
        padding: 70px 24px;
        min-height: 460px;
    }

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

    .hero p {
        font-size: 17px;
    }

    .catalog,
    .ai-section,
    .page-section {
        padding: 50px 22px;
    }

    .checkout-wrapper {
        grid-template-columns: 1fr;
    }

    .chat-form {
        flex-direction: column;
    }

    .cart-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .cart-item img {
        width: 100%;
        height: 220px;
        margin-right: 0;
    }

    .cart-buttons {
        flex-direction: column;
    }

    .admin-table {
        display: block;
        overflow-x: auto;
    }

    .login-box {
        width: 90%;
    }
}