* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: Arial, sans-serif;
    background: #f7f7f5;
    color: #202020;
}

a {
    color: inherit;
    text-decoration: none;
}

.navbar {
    height: 80px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 0 7%;

    background: white;

    border-bottom: 1px solid #e5e5e5;
}

.logo {
    font-size: 24px;
    font-weight: 700;
}

.navbar nav {
    display: flex;
    gap: 32px;
}

.navbar nav a {
    font-size: 15px;
}

.navbar nav a:hover {
    opacity: 0.6;
}

.container {
    width: min(1400px, 90%);
    margin: 0 auto;
}

.page-header {
    padding: 70px 0 40px;
}

.page-header h1 {
    font-size: 42px;
    margin-bottom: 10px;
}

.page-header p {
    color: #666;
}

.product-grid {
    display: grid;

    grid-template-columns:
        repeat(4, minmax(0, 1fr));

    gap: 26px;

    padding-bottom: 80px;
}

.product-card {
    background: white;
    overflow: hidden;

    border-radius: 8px;

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.product-card:hover {
    transform: translateY(-4px);

    box-shadow:
        0 12px 30px rgba(0, 0, 0, 0.08);
}

.product-image-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 100%;
    aspect-ratio: 4 / 3;

    overflow: hidden;

    background: #f3f3f3;
}

.product-image {
    max-width: 100%;
    max-height: 100%;

    width: auto;
    height: auto;

    object-fit: contain;
}

.product-card:hover .product-image {
    transform: scale(1.03);
}

.product-info {
    padding: 20px;
}

.product-category {
    font-size: 13px;
    color: #777;
}

.product-name {
    font-size: 18px;

    margin-top: 8px;
    margin-bottom: 16px;
}

.product-price {
    font-size: 21px;
    font-weight: 700;

    margin-bottom: 18px;
}

.product-button {
    display: inline-block;

    padding: 11px 18px;

    background: #202020;
    color: white;

    border-radius: 5px;

    font-size: 14px;
}

.product-button:hover {
    opacity: 0.85;
}

@media (max-width: 1000px) {

    .product-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

}

@media (max-width: 600px) {

    .navbar {
        padding: 0 20px;
    }

    .navbar nav {
        display: none;
    }

    .product-grid {
        grid-template-columns: 1fr;
    }

    .page-header h1 {
        font-size: 32px;
    }

}

.product-detail {
    display: grid;

    grid-template-columns:
        minmax(0, 1.2fr)
        minmax(320px, 0.8fr);

    gap: 60px;

    padding: 60px 0 100px;
}


.main-image-wrapper {
    width: 100%;
    aspect-ratio: 4 / 3;

    display: flex;
    align-items: center;
    justify-content: center;

    overflow: hidden;

    border-radius: 10px;

    background: #f3f3f3;
}

.main-product-image {
    max-width: 100%;
    max-height: 100%;

    width: auto;
    height: auto;

    object-fit: contain;
}


.thumbnail-list {
    display: flex;

    gap: 12px;

    margin-top: 15px;

    overflow-x: auto;
}


.thumbnail-button {
    width: 100px;
    height: 75px;

    border: 1px solid #ddd;

    border-radius: 6px;

    padding: 0;

    overflow: hidden;

    background: white;

    cursor: pointer;
}


.thumbnail-button img {
    width: 100%;
    height: 100%;

    object-fit: cover;
}


.thumbnail-button:hover {
    border-color: #222;
}


.product-detail-info h1 {
    font-size: 38px;

    margin-top: 10px;
    margin-bottom: 20px;
}


.detail-price {
    font-size: 30px;
    font-weight: 700;

    margin-bottom: 5px;
}


.old-price {
    color: #888;

    text-decoration: line-through;

    font-size: 18px;

    margin-bottom: 30px;
}


.product-meta {
    border-top: 1px solid #ddd;
    border-bottom: 1px solid #ddd;

    padding: 25px 0;

    margin: 25px 0;
}


.product-meta p {
    margin-bottom: 10px;
}


.product-description h2 {
    font-size: 20px;

    margin-bottom: 10px;
}


.product-description p {
    line-height: 1.7;

    color: #555;
}


@media (max-width: 900px) {

    .product-detail {
        grid-template-columns: 1fr;
        gap: 35px;
    }

    .product-detail-info h1 {
        font-size: 30px;
    }

}

.shop-layout {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 40px;

    padding-bottom: 80px;
}

.filters {
    background: white;

    padding: 25px;

    border-radius: 8px;

    height: fit-content;
}

.filters h2 {
    font-size: 20px;
    margin-bottom: 25px;
}

.filter-group {
    margin-bottom: 22px;
}

.filter-group label {
    display: block;

    font-size: 14px;
    font-weight: 600;

    margin-bottom: 8px;
}

.filter-group select,
.filter-group input {
    width: 100%;

    padding: 10px;

    border: 1px solid #ddd;
    border-radius: 5px;

    background: white;
}

.price-inputs {
    display: grid;

    grid-template-columns: 1fr 1fr;

    gap: 8px;
}

.checkbox-label {
    display: flex !important;
    align-items: center;

    gap: 8px;

    font-weight: 400 !important;

    cursor: pointer;
}

.checkbox-label input {
    width: auto;
}

.filter-button {
    width: 100%;

    padding: 12px;

    border: none;
    border-radius: 5px;

    background: #202020;
    color: white;

    cursor: pointer;
}

.clear-filter-button {
    width: 100%;

    margin-top: 8px;
    padding: 10px;

    border: 1px solid #ddd;
    border-radius: 5px;

    background: white;

    cursor: pointer;
}

.products-toolbar {
    display: flex;

    align-items: center;
    justify-content: space-between;

    margin-bottom: 25px;
}

.products-toolbar select {
    padding: 10px;

    border: 1px solid #ddd;
    border-radius: 5px;

    background: white;
}

.condition-badge {
    display: inline-block;

    margin-bottom: 12px;

    padding: 5px 8px;

    background: #efefef;

    border-radius: 4px;

    font-size: 12px;
}

@media (max-width: 850px) {

    .shop-layout {
        grid-template-columns: 1fr;
    }

}


.admin-container {
    padding-bottom: 80px;
}

.admin-header {
    padding: 60px 0 30px;
}

.admin-header h1 {
    font-size: 40px;
    margin-bottom: 8px;
}

.admin-header p {
    color: #666;
}

.admin-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
}

.admin-card {
    background: white;
    padding: 30px;
    border-radius: 10px;
}

.admin-card h2 {
    margin-bottom: 25px;
}

.admin-card form {
    display: grid;
    gap: 18px;
}

.admin-card label {
    display: grid;
    gap: 7px;
    font-size: 14px;
    font-weight: 600;
}

.admin-card input,
.admin-card select,
.admin-card textarea {
    width: 100%;
    padding: 11px;

    border: 1px solid #ddd;
    border-radius: 5px;

    font: inherit;
}

.admin-card textarea {
    min-height: 120px;
    resize: vertical;
}

.field-hint {
    font-size: 12px;
    font-weight: 400;
    color: #666;
}

#product-message,
#category-message {
    margin-top: 15px;
}

@media (max-width: 850px) {

    .admin-grid {
        grid-template-columns: 1fr;
    }

}


.features-section {
    margin-top: 10px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.features-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    margin-bottom: 15px;
}

.features-header h3 {
    font-size: 17px;
}

.feature-row {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 10px;
    margin-bottom: 10px;
}

.remove-feature {
    border: 1px solid #ddd;
    background: white;
    border-radius: 5px;
    padding: 0 14px;
    cursor: pointer;
}

.remove-feature:hover {
    background: #f3f3f3;
}

@media (max-width: 600px) {

    .feature-row {
        grid-template-columns: 1fr;
    }

}

/* =========================================================
   ADMIN LOGIN
========================================================= */

.admin-login-page {
    min-height: 100vh;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 30px;

    background: #f4f4f2;
}


.admin-login-card {
    width: min(430px, 100%);

    background: white;

    padding: 40px;

    border-radius: 12px;

    box-shadow:
        0 15px 45px rgba(0, 0, 0, 0.08);
}


.admin-login-card h1 {
    font-size: 32px;
    margin-bottom: 10px;
}


.admin-login-description {
    color: #666;
    margin-bottom: 30px;
}


.admin-login-card form {
    display: grid;
    gap: 20px;
}


.admin-login-card label {
    display: grid;

    gap: 8px;

    font-size: 14px;
    font-weight: 600;
}


.admin-login-card input {
    width: 100%;

    padding: 13px;

    border: 1px solid #ddd;
    border-radius: 6px;

    font: inherit;
}


.admin-login-button {
    padding: 13px;

    border: none;
    border-radius: 6px;

    background: #202020;
    color: white;

    font-size: 15px;
    font-weight: 600;

    cursor: pointer;
}


.admin-login-button:hover {
    opacity: 0.88;
}


.admin-login-message {
    margin-top: 20px;
    min-height: 20px;
}


/* =========================================================
   ADMIN DASHBOARD
========================================================= */

.admin-dashboard {
    padding-top: 60px;
    padding-bottom: 100px;
}


.admin-dashboard-header {
    margin-bottom: 35px;
}


.admin-dashboard-label {
    color: #777;

    font-size: 14px;

    margin-bottom: 8px;
}


.admin-dashboard-header h1 {
    font-size: 40px;
}


.admin-stat-grid {
    display: grid;

    grid-template-columns:
        repeat(4, minmax(0, 1fr));

    gap: 20px;

    margin-bottom: 35px;
}


.admin-stat-card {
    background: white;

    border-radius: 10px;

    padding: 25px;

    display: grid;

    gap: 12px;
}


.admin-stat-card span {
    color: #666;

    font-size: 14px;
}


.admin-stat-card strong {
    font-size: 28px;
}


.admin-dashboard-grid {
    display: grid;

    grid-template-columns:
        repeat(3, minmax(0, 1fr));

    gap: 25px;
}


.admin-dashboard-card {
    background: white;

    padding: 30px;

    border-radius: 10px;
}


.admin-dashboard-card h2 {
    font-size: 21px;

    margin-bottom: 14px;
}


.admin-dashboard-card p {
    color: #666;

    line-height: 1.6;

    margin-bottom: 24px;
}


.admin-dashboard-link {
    display: inline-block;

    padding: 11px 16px;

    background: #202020;
    color: white;

    border-radius: 6px;

    font-size: 14px;
}


.admin-coming-soon {
    display: inline-block;

    padding: 7px 10px;

    border-radius: 5px;

    background: #f1f1f1;

    color: #666;

    font-size: 13px;
}


.admin-logout-button {
    border: none;

    background: transparent;

    font: inherit;

    cursor: pointer;
}


.admin-logout-button:hover {
    opacity: 0.6;
}


@media (max-width: 950px) {

    .admin-stat-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }


    .admin-dashboard-grid {
        grid-template-columns: 1fr;
    }

}


@media (max-width: 550px) {

    .admin-stat-grid {
        grid-template-columns: 1fr;
    }


    .admin-dashboard-header h1 {
        font-size: 30px;
    }

}



/* =========================================================
   ADMIN PRODUCT CONTROLS
========================================================= */

.admin-product-controls {
    display: flex;
    flex-wrap: wrap;

    gap: 10px;

    padding: 18px;

    margin: 25px 0;

    background: #f1f1ef;

    border: 1px solid #deded8;
    border-radius: 8px;
}


.admin-product-controls[hidden] {
    display: none;
}


.admin-control-button,
.admin-danger-button {
    padding: 10px 15px;

    border-radius: 6px;

    font: inherit;
    font-size: 14px;

    cursor: pointer;
}


.admin-control-button {
    border: 1px solid #202020;

    background: #202020;
    color: white;
}


.admin-control-button:hover {
    opacity: 0.85;
}


.admin-danger-button {
    border: 1px solid #b42318;

    background: white;
    color: #b42318;
}


.admin-danger-button:hover {
    background: #b42318;
    color: white;
}


/* =========================================================
   PRODUCT EDIT PAGE
========================================================= */

.product-edit-page {
    padding-top: 55px;
    padding-bottom: 100px;
}


.product-edit-header {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 20px;

    margin-bottom: 35px;
}


.product-edit-label {
    color: #777;

    font-size: 14px;

    margin-bottom: 7px;
}


.product-edit-header h1 {
    font-size: 38px;
}


.product-edit-back {
    padding: 11px 16px;

    border: 1px solid #ddd;
    border-radius: 6px;

    background: white;

    font-size: 14px;
}


.product-edit-form {
    display: grid;

    gap: 25px;
}


.product-edit-card {
    background: white;

    padding: 30px;

    border-radius: 10px;
}


.product-edit-card h2 {
    font-size: 21px;

    margin-bottom: 22px;
}


.edit-form-grid {
    display: grid;

    grid-template-columns:
        repeat(3, minmax(0, 1fr));

    gap: 20px;
}


.product-edit-card label {
    display: grid;

    gap: 8px;

    font-size: 14px;
    font-weight: 600;
}


.product-edit-card input,
.product-edit-card select,
.product-edit-card textarea {
    width: 100%;

    padding: 11px;

    border: 1px solid #ddd;
    border-radius: 6px;

    font: inherit;
}


.edit-description-label {
    margin-top: 22px;
}


.edit-checkbox {
    display: flex !important;

    align-items: center;

    gap: 10px;

    margin-top: 20px;

    cursor: pointer;
}


.edit-checkbox input {
    width: auto;
}


.edit-section-header {
    display: flex;

    align-items: center;
    justify-content: space-between;

    gap: 15px;

    margin-bottom: 20px;
}


.edit-section-header h2 {
    margin-bottom: 0;
}


.edit-feature-row {
    display: grid;

    grid-template-columns:
        1fr 1fr auto;

    gap: 10px;

    margin-bottom: 12px;
}


.edit-images-grid {
    display: grid;

    grid-template-columns:
        repeat(4, minmax(0, 1fr));

    gap: 20px;
}


.edit-image-card {
    border: 1px solid #e1e1e1;

    border-radius: 8px;

    overflow: hidden;

    background: #fafafa;
}


.edit-image-preview {
    aspect-ratio: 4 / 3;

    display: flex;
    align-items: center;
    justify-content: center;

    background: #eee;
}


.edit-image-preview img {
    width: 100%;
    height: 100%;

    object-fit: contain;
}


.edit-image-status {
    padding: 10px 12px 0;
}


.primary-image-badge {
    display: inline-block;

    padding: 5px 8px;

    border-radius: 5px;

    background: #202020;
    color: white;

    font-size: 12px;
}


.edit-image-actions {
    display: grid;

    gap: 8px;

    padding: 12px;
}


.make-primary-button,
.delete-image-button {
    padding: 9px 10px;

    border-radius: 5px;

    font: inherit;
    font-size: 13px;

    cursor: pointer;
}


.make-primary-button {
    border: 1px solid #ccc;

    background: white;
}


.delete-image-button {
    border: 1px solid #b42318;

    background: white;

    color: #b42318;
}


.delete-image-button:hover {
    background: #b42318;

    color: white;
}


.product-edit-actions {
    display: flex;

    justify-content: flex-end;
}


.product-save-button {
    padding: 14px 22px;

    border: none;
    border-radius: 6px;

    background: #202020;
    color: white;

    font-size: 15px;
    font-weight: 600;

    cursor: pointer;
}


.product-save-button:hover {
    opacity: 0.87;
}


.edit-message {
    margin-bottom: 20px;

    min-height: 20px;
}


@media (max-width: 1000px) {

    .edit-form-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }


    .edit-images-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

}


@media (max-width: 650px) {

    .product-edit-header {
        align-items: flex-start;
        flex-direction: column;
    }


    .edit-form-grid {
        grid-template-columns: 1fr;
    }


    .edit-feature-row {
        grid-template-columns: 1fr;
    }


    .edit-images-grid {
        grid-template-columns: 1fr;
    }

}


/* =========================================================
   INACTIVE PRODUCTS
========================================================= */

.inactive-products-section {
    margin-top: 45px;

    background: white;

    padding: 30px;

    border-radius: 10px;
}


.inactive-products-header {
    margin-bottom: 25px;
}


.inactive-products-header h2 {
    font-size: 24px;
}


.inactive-products-grid {
    display: grid;

    grid-template-columns:
        repeat(4, minmax(0, 1fr));

    gap: 20px;
}


.inactive-product-card {
    border: 1px solid #e2e2e2;

    border-radius: 8px;

    overflow: hidden;

    background: #fafafa;
}


.inactive-product-image {
    aspect-ratio: 4 / 3;

    display: flex;
    align-items: center;
    justify-content: center;

    background: #eee;
}


.inactive-product-image img {
    max-width: 100%;
    max-height: 100%;

    object-fit: contain;
}


.inactive-product-info {
    padding: 16px;
}


.inactive-product-id {
    font-size: 12px;

    color: #888;
}


.inactive-product-info h3 {
    margin-top: 6px;

    margin-bottom: 10px;

    font-size: 17px;
}


.inactive-product-info p {
    margin-bottom: 15px;

    font-weight: 700;
}


.restore-product-button {
    width: 100%;

    padding: 10px;

    border: none;
    border-radius: 5px;

    background: #202020;

    color: white;

    cursor: pointer;
}


.restore-product-button:hover {
    opacity: 0.85;
}


@media (max-width: 1000px) {

    .inactive-products-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

}


@media (max-width: 600px) {

    .inactive-products-grid {
        grid-template-columns: 1fr;
    }

}

/* =========================================================
   STOCK MANAGEMENT
========================================================= */

.stock-management-page {
    padding-top: 55px;
    padding-bottom: 100px;
}


.stock-page-header {
    margin-bottom: 35px;
}


.stock-page-header h1 {
    font-size: 38px;

    margin-bottom: 10px;
}


.stock-page-header > div > p:last-child {
    color: #666;
}


.stock-management-layout {
    display: grid;

    grid-template-columns:
        240px minmax(0, 1fr);

    gap: 35px;
}


.stock-content {
    min-width: 0;
}


.stock-table-wrapper {
    overflow-x: auto;

    background: white;

    border-radius: 10px;
}


.stock-table {
    width: 100%;

    border-collapse: collapse;
}


.stock-table th,
.stock-table td {
    padding: 17px 18px;

    text-align: left;

    border-bottom:
        1px solid #eeeeee;
}


.stock-table th {
    background: #fafafa;

    font-size: 13px;

    color: #666;
}


.stock-table td {
    font-size: 14px;
}


.stock-status {
    display: inline-block;

    padding: 6px 9px;

    border-radius: 5px;

    font-size: 12px;
    font-weight: 600;
}


.stock-good {
    background: #eaf5ed;
    color: #276738;
}


.stock-low {
    background: #fff2d8;
    color: #8a5a00;
}


.stock-empty {
    background: #fde9e7;
    color: #a52319;
}


.stock-edit-button {
    display: inline-block;

    padding: 8px 11px;

    border-radius: 5px;

    background: #202020;
    color: white;

    font-size: 13px;
}


.stock-edit-button:hover {
    opacity: 0.85;
}


@media (max-width: 850px) {

    .stock-management-layout {
        grid-template-columns: 1fr;
    }

}


/* =========================================================
   BARCODE / STOCK MOVEMENTS
========================================================= */

.barcode-stock-card {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 30px;

    padding: 25px;

    margin-bottom: 30px;

    background: white;

    border-radius: 10px;
}


.barcode-stock-card h2 {
    font-size: 20px;

    margin-bottom: 6px;
}


.barcode-stock-card p {
    color: #666;

    font-size: 14px;
}


.barcode-stock-card input {
    width: min(420px, 100%);

    padding: 14px;

    border: 2px solid #202020;
    border-radius: 7px;

    font: inherit;
}


.stock-barcode {
    font-family: monospace;

    font-size: 13px;
}


.inventory-mode-badge {
    display: inline-block;

    padding: 5px 8px;

    border-radius: 4px;

    background: #efefef;

    font-size: 12px;
}


.stock-row-actions {
    display: flex;

    flex-wrap: wrap;

    gap: 6px;
}


.stock-in-button,
.stock-out-button {
    padding: 8px 10px;

    border-radius: 5px;

    font: inherit;

    font-size: 12px;

    cursor: pointer;
}


.stock-in-button {
    border: 1px solid #276738;

    background: white;

    color: #276738;
}


.stock-in-button:hover {
    background: #276738;

    color: white;
}


.stock-out-button {
    border: 1px solid #9a4a00;

    background: white;

    color: #9a4a00;
}


.stock-out-button:hover {
    background: #9a4a00;

    color: white;
}


/* =========================================================
   STOCK MODAL
========================================================= */

.stock-modal-backdrop {
    position: fixed;

    inset: 0;

    z-index: 1000;

    display: flex;

    align-items: center;
    justify-content: center;

    padding: 20px;

    background:
        rgba(0, 0, 0, 0.45);
}


.stock-modal-backdrop[hidden] {
    display: none;
}


.stock-modal {
    width: min(500px, 100%);

    padding: 28px;

    background: white;

    border-radius: 12px;

    box-shadow:
        0 20px 60px
        rgba(0, 0, 0, 0.2);
}


.stock-modal-header {
    display: flex;

    align-items: flex-start;
    justify-content: space-between;

    gap: 20px;

    margin-bottom: 20px;
}


.stock-modal-header h2 {
    font-size: 24px;
}


.stock-modal-close {
    border: none;

    background: transparent;

    font-size: 30px;

    line-height: 1;

    cursor: pointer;
}


.stock-modal-product {
    display: flex;

    justify-content: space-between;

    gap: 15px;

    padding: 15px;

    margin-bottom: 20px;

    border-radius: 7px;

    background: #f3f3f1;
}


.stock-modal form {
    display: grid;

    gap: 18px;
}


.stock-modal form label {
    display: grid;

    gap: 7px;

    font-size: 14px;

    font-weight: 600;
}


.stock-modal input,
.stock-modal textarea {
    width: 100%;

    padding: 11px;

    border: 1px solid #ddd;

    border-radius: 6px;

    font: inherit;
}


.stock-modal textarea {
    resize: vertical;
}


.stock-modal-actions {
    display: flex;

    justify-content: flex-end;

    gap: 10px;
}


.stock-modal-actions
.clear-filter-button {
    width: auto;

    margin: 0;
}


@media (max-width: 700px) {

    .barcode-stock-card {
        flex-direction: column;

        align-items: stretch;
    }


    .barcode-stock-card input {
        width: 100%;
    }


    .stock-modal-product {
        flex-direction: column;
    }

}


/* =========================================================
   STOCK MOVEMENT HISTORY
========================================================= */

.movement-product-link {
    font-weight: 600;
}

.movement-product-link:hover {
    text-decoration: underline;
}


.movement-type-badge {
    display: inline-block;

    padding: 5px 8px;

    border-radius: 5px;

    background: #efefef;

    font-size: 12px;
}


.movement-positive {
    color: #26713b;
}


.movement-negative {
    color: #a23025;
}


/* =========================================================
   CART
========================================================= */

.product-cart-actions {
    display: flex;
    align-items: center;
    gap: 12px;

    margin-top: 20px;
}


.product-cart-actions input {
    width: 80px;

    padding: 10px;

    border: 1px solid #ccc;

    border-radius: 6px;
}


.cart-page {
    padding-top: 40px;
    padding-bottom: 60px;
}


.cart-layout {
    display: grid;

    grid-template-columns:
        minmax(0, 1fr)
        320px;

    gap: 30px;

    margin-top: 30px;
}


.cart-items {
    display: grid;

    gap: 15px;
}


.cart-item {
    display: grid;

    grid-template-columns:
        100px
        minmax(0, 1fr)
        auto
        auto
        auto;

    align-items: center;

    gap: 20px;

    padding: 18px;

    background: white;

    border-radius: 10px;
}


.cart-item-image {
    width: 100px;
    height: 90px;

    display: flex;

    align-items: center;
    justify-content: center;
}


.cart-item-image img {
    width: 100%;
    height: 100%;

    object-fit: contain;
}


.cart-item-info h2 {
    font-size: 17px;

    margin-bottom: 5px;
}


.cart-item-quantity {
    display: flex;

    align-items: center;

    gap: 10px;
}


.cart-item-quantity button {
    width: 32px;
    height: 32px;

    border: 1px solid #ddd;

    background: white;

    cursor: pointer;

    border-radius: 5px;
}


.cart-remove {
    border: none;

    background: transparent;

    cursor: pointer;

    text-decoration: underline;
}


.cart-summary {
    height: fit-content;

    padding: 24px;

    background: white;

    border-radius: 10px;
}


.cart-summary h2 {
    margin-bottom: 20px;
}


.cart-summary-row {
    display: flex;

    justify-content: space-between;

    margin-bottom: 25px;
}


.cart-summary
.product-save-button {
    width: 100%;
}


.cart-empty {
    padding: 40px;

    text-align: center;

    background: white;

    border-radius: 10px;
}


@media (max-width: 850px) {

    .cart-layout {
        grid-template-columns: 1fr;
    }


    .cart-item {
        grid-template-columns:
            80px
            minmax(0, 1fr);
    }


    .cart-item-quantity,
    .cart-item-total,
    .cart-remove {
        grid-column: 2;
    }

}


/* =========================================================
   CHECKOUT
========================================================= */

.checkout-page {
    padding-top: 40px;
    padding-bottom: 60px;
}


.checkout-header {
    margin-bottom: 30px;
}


.checkout-layout {
    display: grid;

    grid-template-columns:
        minmax(0, 1fr)
        360px;

    gap: 30px;
}


.checkout-card,
.checkout-summary {
    padding: 25px;

    background: white;

    border-radius: 10px;
}


.checkout-card h2,
.checkout-summary h2 {
    margin-bottom: 20px;
}


.checkout-card form {
    display: grid;

    gap: 18px;
}


.checkout-card label {
    display: grid;

    gap: 7px;

    font-weight: 600;
}


.checkout-card input,
.checkout-card textarea {
    width: 100%;

    padding: 11px;

    border: 1px solid #ddd;

    border-radius: 6px;

    font: inherit;
}


.checkout-card textarea {
    resize: vertical;
}


.checkout-items {
    display: grid;

    gap: 12px;

    margin-bottom: 25px;
}


.checkout-item {
    display: flex;

    justify-content: space-between;

    gap: 20px;

    padding-bottom: 12px;

    border-bottom: 1px solid #eee;
}


.checkout-item p {
    margin-top: 4px;

    font-size: 13px;

    color: #666;
}


.checkout-total {
    display: flex;

    justify-content: space-between;

    font-size: 18px;
}


.order-success-page {
    display: flex;

    justify-content: center;

    padding-top: 70px;
}


.order-success-card {
    width: min(600px, 100%);

    padding: 40px;

    text-align: center;

    background: white;

    border-radius: 12px;
}


.order-success-card h1 {
    margin-bottom: 20px;
}


.order-success-card p {
    margin-bottom: 15px;
}


.order-success-card
.admin-dashboard-link {
    display: inline-block;

    margin-top: 15px;
}


@media (max-width: 850px) {

    .checkout-layout {
        grid-template-columns: 1fr;
    }

}


/* =========================================================
   CART ICON
========================================================= */

.cart-link {
    position: relative;

    display: inline-flex;
    align-items: center;

    gap: 6px;

    text-decoration: none;
}


.cart-icon {
    font-size: 22px;

    line-height: 1;
}


.cart-count {
    position: absolute;

    top: -10px;
    right: -12px;

    min-width: 19px;
    height: 19px;

    padding: 0 5px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 999px;

    background: #d72626;

    color: white;

    font-size: 11px;
    font-weight: 700;

    line-height: 1;

    box-shadow:
        0 0 0 2px white;
}


.cart-count[hidden] {
    display: none;
}


.cart-count-pop {
    animation:
        cart-count-pop
        0.45s ease;
}


@keyframes cart-count-pop {

    0% {
        transform: scale(1);
    }

    40% {
        transform: scale(1.45);

        box-shadow:
            0 0 0 2px white,
            0 0 14px
            rgba(215, 38, 38, 0.8);
    }

    100% {
        transform: scale(1);
    }

}

/* =========================================================
   ADMIN ORDERS
========================================================= */

.admin-orders-grid {
    display: grid;
    gap: 22px;
}


.admin-order-card {
    background: white;

    border: 1px solid #e6e6e0;

    border-radius: 12px;

    padding: 26px;

    box-shadow:
        0 8px 30px
        rgba(0, 0, 0, 0.05);
}


.admin-order-header {
    display: flex;

    align-items: flex-start;
    justify-content: space-between;

    gap: 20px;

    margin-bottom: 22px;
}


.admin-order-number {
    display: block;

    margin-bottom: 6px;

    color: #777;

    font-size: 13px;
}


.admin-order-header h2 {
    font-size: 21px;
}


.order-status-badge {
    display: inline-block;

    padding: 7px 10px;

    border-radius: 999px;

    font-size: 12px;
    font-weight: 700;
}


.order-status-pending {
    background: #fff2d8;
    color: #805600;
}


.order-status-confirmed {
    background: #e4f1e7;
    color: #28653b;
}


.order-status-out_for_delivery {
    background: #e4edf8;
    color: #29598d;
}


.order-status-delivered {
    background: #dff0e3;
    color: #1e6534;
}


.order-status-cancelled {
    background: #fde7e5;
    color: #a3261c;
}


.admin-order-customer {
    display: grid;

    gap: 8px;

    padding: 18px;

    margin-bottom: 20px;

    background: #f7f7f4;

    border-radius: 8px;
}


.admin-order-items {
    display: grid;

    gap: 10px;

    margin-bottom: 20px;
}


.admin-order-item {
    display: flex;

    justify-content: space-between;

    gap: 20px;

    padding-bottom: 10px;

    border-bottom:
        1px solid #eeeeea;
}


.admin-order-footer {
    display: flex;

    align-items: center;
    justify-content: space-between;

    gap: 20px;

    padding-top: 5px;
}


.admin-order-footer span {
    color: #777;

    font-size: 13px;
}


.admin-order-footer strong {
    font-size: 20px;
}


.admin-order-actions {
    display: flex;

    gap: 10px;

    margin-top: 22px;

    padding-top: 20px;

    border-top:
        1px solid #eeeeea;
}


.order-confirm-button,
.order-cancel-button {
    padding: 11px 15px;

    border-radius: 6px;

    font: inherit;

    font-weight: 600;

    cursor: pointer;
}


.order-confirm-button {
    border: none;

    background: #28633b;

    color: white;
}


.order-confirm-button:hover {
    background: #1e4e2e;
}


.order-cancel-button {
    border: 1px solid #b42318;

    background: white;

    color: #b42318;
}


.order-cancel-button:hover {
    background: #b42318;

    color: white;
}


@media (max-width: 650px) {

    .admin-order-header,
    .admin-order-footer {
        flex-direction: column;
    }


    .admin-order-actions {
        flex-direction: column;
    }

}


/* =========================================================
   ADMIN ORDERS TABLE
========================================================= */

.admin-orders-page {
    padding-bottom: 60px;
}


.admin-order-toolbar {
    display: grid;
    grid-template-columns:
        minmax(240px, 2fr)
        repeat(3, minmax(150px, 1fr))
        auto;

    gap: 14px;
    align-items: end;

    margin: 24px 0 18px;
}


.admin-order-toolbar > div {
    display: flex;
    flex-direction: column;
    gap: 7px;
}


.admin-order-toolbar label {
    font-size: 13px;
    font-weight: 700;
}


.admin-order-toolbar input,
.admin-order-toolbar select {
    width: 100%;
    min-height: 42px;

    padding: 9px 12px;

    border: 1px solid #d8d8d2;
    border-radius: 8px;

    background: #ffffff;
}


.admin-order-summary {
    margin-bottom: 12px;
}


.admin-order-table-wrapper {
    width: 100%;
    overflow-x: auto;

    border: 1px solid #e0e0da;
    border-radius: 12px;

    background: #ffffff;
}


.admin-order-table {
    width: 100%;

    border-collapse: collapse;

    min-width: 850px;
}


.admin-order-table th {
    text-align: left;

    font-size: 13px;

    padding: 14px 16px;

    background: #f7f7f3;

    border-bottom: 1px solid #ddddda;

    white-space: nowrap;
}


.admin-order-table td {
    padding: 15px 16px;

    border-bottom: 1px solid #eeeeea;

    vertical-align: middle;
}


.admin-order-table tbody tr:last-child td {
    border-bottom: none;
}


.admin-order-row {
    cursor: pointer;

    transition:
        background-color 0.15s ease;
}


.admin-order-row:hover {
    background: #fafaf7;
}


.admin-order-row:focus {
    outline: 2px solid #4f6652;
    outline-offset: -2px;
}


/* =========================================================
   ORDER DETAIL DRAWER
========================================================= */

.order-detail-backdrop {
    position: fixed;

    inset: 0;

    background:
        rgba(0, 0, 0, 0.35);

    opacity: 0;

    transition:
        opacity 0.2s ease;

    z-index: 999;
}


.order-detail-backdrop.is-open {
    opacity: 1;
}


.order-detail-panel {
    position: fixed;

    top: 0;
    right: 0;

    height: 100vh;
    width: min(520px, 94vw);

    background: #ffffff;

    z-index: 1000;

    box-shadow:
        -12px 0 30px
        rgba(0, 0, 0, 0.14);

    transform:
        translateX(100%);

    transition:
        transform 0.22s ease;

    overflow-y: auto;
}


.order-detail-panel.is-open {
    transform:
        translateX(0);
}


.order-detail-panel-header {
    position: sticky;

    top: 0;

    display: flex;

    justify-content: space-between;
    align-items: center;

    gap: 20px;

    padding: 22px 24px;

    background: #ffffff;

    border-bottom:
        1px solid #e5e5df;

    z-index: 2;
}


.order-detail-panel-header h2 {
    margin:
        5px 0 0;
}


.order-detail-close {
    width: 40px;
    height: 40px;

    border: none;
    border-radius: 50%;

    background: #f0f0eb;

    cursor: pointer;

    font-size: 24px;
    line-height: 1;
}


.order-detail-content {
    padding:
        0 24px 40px;
}


.order-detail-section {
    padding:
        22px 0;

    border-bottom:
        1px solid #eeeeea;
}


.order-detail-section h3 {
    margin:
        0 0 14px;
}


.order-detail-status-row {
    display: flex;

    justify-content:
        space-between;

    align-items:
        center;

    gap: 15px;
}


.order-detail-grid {
    display: grid;

    grid-template-columns:
        1fr 1fr;

    gap: 16px;
}


.order-detail-grid > div {
    display: flex;

    flex-direction: column;

    gap: 5px;
}


.order-detail-grid span {
    font-size: 13px;
    opacity: 0.7;
}


.order-detail-items {
    display: flex;

    flex-direction: column;

    gap: 10px;
}


.order-detail-item {
    display: flex;

    justify-content:
        space-between;

    gap: 20px;

    padding:
        12px 0;
}


.order-detail-item > div {
    display: flex;

    flex-direction: column;

    gap: 5px;
}


.order-detail-item span {
    font-size: 13px;

    opacity: 0.75;
}


.order-detail-total {
    display: flex;

    justify-content:
        space-between;

    align-items:
        center;

    font-size: 18px;
}


.order-detail-total strong {
    font-size: 22px;
}


.order-detail-actions {
    display: flex;

    flex-wrap: wrap;

    gap: 12px;
}


.order-detail-danger {
    min-height: 42px;

    padding:
        10px 16px;

    border:
        1px solid #a23f3f;

    border-radius: 8px;

    background: transparent;

    color: #a23f3f;

    cursor: pointer;

    font-weight: 700;
}


.order-detail-danger:hover {
    background: #fff3f3;
}


/* =========================================================
   RESPONSIVE
========================================================= */

@media (
    max-width: 1000px
) {

    .admin-order-toolbar {
        grid-template-columns:
            1fr 1fr;
    }

}


@media (
    max-width: 650px
) {

    .admin-order-toolbar {
        grid-template-columns:
            1fr;
    }


    .order-detail-grid {
        grid-template-columns:
            1fr;
    }

}


/* Yeni ürün: "+ Yeni kategori ekle" */

.new-category {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 6px;
}

.new-category-toggle {
    align-self: flex-start;
    padding: 0;
    border: 0;
    background: none;
    color: #8a5a2b;
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.new-category-form:not([hidden]) {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.new-category-input {
    flex: 1 1 180px;
    min-width: 0;
}

.new-category-save,
.new-category-cancel {
    padding: 8px 14px;
    border: 1px solid #222;
    border-radius: 8px;
    background: #222;
    color: #fff;
    font: inherit;
    font-size: 14px;
    cursor: pointer;
}

.new-category-cancel {
    background: #fff;
    color: #222;
}
