:root{
    --background:#F7F2EA;
    --card:#FFFCF7;
    --text:#3F3833;

    --pink:#E8B7C5;
    --green:#BFD7BD;
    --blue:#B9CADC;

    --accent:#6F7F62;
    --shadow:0 14px 32px rgba(55,45,38,.10);
    --radius:24px;
}

* {
    box-sizing: border-box;
}

body{
    margin:0;
    font-family:'Quicksand',sans-serif;
    background:var(--background);
    color:var(--text);

    opacity:0;
    transform:translateY(8px);
    animation:pageLoad .45s ease forwards;
}

.hero{
    padding:80px 20px;
    text-align:center;
    background:linear-gradient(
        135deg,
        #F3E4E6,
        #EDF1E8,
        #E8EEF3
    );
}

.hero h1{

    font-family:"Cormorant Garamond",serif;

    font-size:64px;

    margin:0;

}

.hero p{

    font-size:20px;

    max-width:650px;

    margin:20px auto 0;

    line-height:1.7;

}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 28px;
    padding: 45px;
    max-width: 1100px;
    margin: auto;
}

.product-card,
.single-card {
    background: white;
    border-radius: 28px;
    padding: 28px;
    box-shadow: 0 12px 30px rgba(80, 55, 70, 0.12);
    text-align: center;
}

.product-card.pink{
    border:2px solid var(--pink);
}

.product-card.green{
    border:2px solid var(--green);
}

.product-card.blue{
    border:2px solid var(--blue);
}

.product-image {
    height: 160px;
    border-radius: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    font-weight: bold;
    margin-bottom: 22px;
}

.product-image.large {
    height: 240px;
}

.pink .product-image{
    background:#F3DCE4;
    color:#9C526C;
}

.green .product-image{
    background:#E2ECE0;
    color:#587657;
}

.blue .product-image{
    background:#E2E9F0;
    color:#566F8A;
}

.price {
    font-size: 28px;
    font-weight: bold;
    margin: 18px 0 8px;
}

.stock {
    color: #3d8f61;
    font-weight: bold;
}

.sold-out {
    color: #c0392b;
    font-weight: bold;
}

.btn {
    display: inline-block;
    margin-top: 15px;
    background: #3d2f35;
    color: white;
    border: none;
    border-radius: 999px;
    padding: 13px 24px;
    font-size: 15px;
    text-decoration: none;
    cursor: pointer;
}

.btn:hover {
    transform: translateY(-2px);
}

.single-product {
    min-height: 100vh;
    padding: 45px 20px;
}

.single-card {
    max-width: 600px;
    margin: 30px auto;
}

.back-link {
    display: block;
    max-width: 600px;
    margin: auto;
    color: #3d2f35;
    text-decoration: none;
    font-weight: bold;
}

.contents {
    text-align: left;
    display: inline-block;
    line-height: 1.9;
}

.footer{
    margin-top:90px;
    padding:40px;
    text-align:center;
    background:white;
    color:#8B807C;
    font-size:15px;
}

body.dark-mode{
    --background:#191715;
    --card:#24211E;
    --text:#F3EDE3;

    --pink:#A86A7D;
    --green:#6F8B6A;
    --blue:#657F9B;

    --accent:#B7A98B;
    --shadow:0 14px 32px rgba(0,0,0,.35);

    background:var(--background);
    color:var(--text);
}

body.dark-mode .navbar{
    background:rgba(31,28,25,.85);
}

body.dark-mode .hero{
    background:linear-gradient(
        135deg,
        #2A2024,
        #202820,
        #202631
    );
}

body.dark-mode .product-card,
body.dark-mode .single-card{
    background:var(--card);
}

body.dark-mode .footer{
    background:#211E1B;
    color:#C8BFB2;
}

body.dark-mode .btn{
    background:#E8DCC9;
    color:#2A2420;
}

body.dark-mode .pink .product-image{
    background:#3A252D;
    color:#F0B6C8;
}

body.dark-mode .green .product-image{
    background:#243225;
    color:#BFDDBB;
}

body.dark-mode .blue .product-image{
    background:#232D3A;
    color:#BFD5F0;
}

@keyframes pageLoad{

    to{

        opacity:1;
        transform:translateY(0);

    }

}

.login-page,
.admin-page{
    max-width:1000px;
    margin:70px auto;
    padding:0 20px;
}

.login-card{
    max-width:420px;
    margin:auto;
    background:var(--card);
    padding:35px;
    border-radius:var(--radius);
    box-shadow:var(--shadow);
}

.login-card h1,
.admin-page h1{
    font-family:"Cormorant Garamond",serif;
    font-size:48px;
    text-align:center;
}

.login-card form{
    display:flex;
    flex-direction:column;
    gap:14px;
}

.login-card input{
    padding:13px 15px;
    border-radius:14px;
    border:1px solid #D8CDBF;
    font-family:inherit;
}

.error-message{
    color:#A65F5F;
    font-weight:700;
}

.admin-grid{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(220px,1fr));
    gap:22px;
    margin-top:35px;
}

.admin-card{
    background:var(--card);
    padding:30px;
    border-radius:var(--radius);
    box-shadow:var(--shadow);
    text-align:center;
}

.admin-card h2{
    font-size:42px;
    margin:0;
}

.admin-card p{
    margin:8px 0 0;
    font-weight:700;
}

.admin-links{
    display:flex;
    justify-content:center;
    gap:15px;
    flex-wrap:wrap;
    margin-top:35px;
}
.admin-table-wrapper{
    margin-top:35px;
    background:var(--card);
    border-radius:var(--radius);
    box-shadow:var(--shadow);
    overflow-x:auto;
}

.admin-table{
    width:100%;
    border-collapse:collapse;
}

.admin-table th,
.admin-table td{
    padding:18px 20px;
    text-align:left;
    border-bottom:1px solid rgba(120,100,80,.15);
}

.admin-table th{
    font-weight:700;
    color:#7B6B5D;
}

.admin-table span{
    font-size:14px;
    color:#8B807C;
}

.status-pill{
    display:inline-block;
    padding:6px 12px;
    border-radius:999px;
    font-size:13px;
    font-weight:700;
}

.status-pill.active{
    background:#DDEBD8;
    color:#526F4A;
}

.status-pill.inactive{
    background:#EBD8D8;
    color:#8A4F4F;
}

.admin-thumb{
    width:60px;
    height:60px;
    object-fit:cover;
    border-radius:14px;
}

.muted{
    color:#9B918B;
}

body.dark-mode .admin-table th{
    color:#C8BFB2;
}

body.dark-mode .admin-table td{
    border-bottom:1px solid rgba(255,255,255,.08);
}

body.dark-mode .status-pill.active{
    background:#263824;
    color:#BFDDBB;
}

body.dark-mode .status-pill.inactive{
    background:#3A2525;
    color:#F0B6B6;
}

.small-btn{
    display:inline-block;
    padding:8px 14px;
    border-radius:999px;
    background:#E6D8C8;
    color:var(--text);
    text-decoration:none;
    font-weight:700;
    font-size:14px;
}

.small-btn:hover{
    transform:translateY(-2px);
}

.admin-form-card{
    max-width:720px;
    margin:35px auto 0;
    background:var(--card);
    padding:35px;
    border-radius:var(--radius);
    box-shadow:var(--shadow);
}

.admin-form{
    display:flex;
    flex-direction:column;
    gap:14px;
}

.admin-form label{
    font-weight:700;
}

.admin-form input,
.admin-form textarea{
    padding:13px 15px;
    border-radius:14px;
    border:1px solid #D8CDBF;
    background:white;
    color:#3F3833;
    font-family:inherit;
    resize:vertical;
}

.checkbox-label{
    display:flex;
    align-items:center;
    gap:10px;
}

.checkbox-label input{
    width:auto;
}

.form-actions{
    display:flex;
    gap:12px;
    flex-wrap:wrap;
    margin-top:15px;
}

.success-message{
    color:#526F4A;
    font-weight:700;
}

body.dark-mode .admin-form input,
body.dark-mode .admin-form textarea{
    background:#191715;
    border-color:#4A4038;
    color:#F3EDE3;
}

body.dark-mode .small-btn{
    background:#3A332C;
    color:#F3EDE3;
}

.admin-top-actions{
    display:flex;
    justify-content:flex-end;
    margin:25px 0;
}

.admin-form select{
    padding:13px 15px;
    border-radius:14px;
    border:1px solid #D8CDBF;
    background:white;
    color:#3F3833;
    font-family:inherit;
}

body.dark-mode .admin-form select{
    background:#191715;
    border-color:#4A4038;
    color:#F3EDE3;
}

.status-pill.low{
    background:#F1E0BD;
    color:#8A6A2F;
}

.status-pill.critical{
    background:#EBD8D8;
    color:#8A4F4F;
}

body.dark-mode .status-pill.low{
    background:#3A321F;
    color:#E8D39E;
}

body.dark-mode .status-pill.critical{
    background:#3A2525;
    color:#F0B6B6;
}

.danger-btn{
    background:#EBD8D8;
    color:#8A4F4F;
    border:none;
    cursor:pointer;
    margin-left:6px;
}

body.dark-mode .danger-btn{
    background:#3A2525;
    color:#F0B6B6;
}

.action-buttons{
    display:flex;
    align-items:center;
    gap:8px;
    flex-wrap:nowrap;
}

.action-buttons form{
    margin:0;
}

.action-buttons .small-btn{
    margin:0;
    white-space:nowrap;
}

.status-pill.pending{
    background:#F1E0BD;
    color:#8A6A2F;
}

.status-pill.paid{
    background:#DDEBD8;
    color:#526F4A;
}

.status-pill.processing{
    background:#DDE6EB;
    color:#4A6470;
}

.status-pill.shipped{
    background:#DCD8EB;
    color:#5E558A;
}

.status-pill.cancelled{
    background:#EBD8D8;
    color:#8A4F4F;
}

.modal-overlay{
    position:fixed;
    inset:0;
    background:rgba(0,0,0,.45);
    display:none;
    align-items:center;
    justify-content:center;
    padding:20px;
    z-index:9999;
}

.modal-overlay.show{
    display:flex;
}

.modal-card{
    width:100%;
    max-width:520px;
    background:var(--card);
    border-radius:var(--radius);
    padding:32px;
    box-shadow:var(--shadow);
}

.modal-card h2{
    font-family:"Cormorant Garamond",serif;
    font-size:38px;
    margin-top:0;
}

.toast-error {
    position: fixed;
    top: 110px;
    right: 30px;
    background: #fffaf4;
    color: #3d3034;
    border: 1px solid #e5d7c8;
    border-left: 6px solid #b56b6b;
    padding: 16px 20px;
    border-radius: 16px;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.15);
    z-index: 9999;
    max-width: 320px;
    animation: slideIn 0.3s ease, fadeOut 0.4s ease 3.5s forwards;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeOut {
    to {
        opacity: 0;
        transform: translateX(30px);
    }
}

/* =========================================
   ADMIN NAVBAR
========================================= */

.admin-navbar {
    background: #3F3833;
}

.admin-navbar .logo {
    color: white;
}

.admin-navbar .nav-links a {
    color: white;
}

.admin-badge {
    margin-left: 8px;
    padding: 3px 8px;
    border-radius: 999px;
    background: #BFA77A;
    color: white;
    font-size: 12px;
    font-weight: 600;
}

.logout-btn {
    background: #D9534F;
    color: white !important;
    padding: 8px 16px;
    border-radius: 999px;
    transition: .2s;
}

.logout-btn:hover {
    background: #C9302C;
}