.product-manager {
    --product-primary: #6d28d9;
    --product-primary-dark: #4c1d95;
    --product-border: #e4e8f0;
    --product-dark: #172033;
    --product-muted: #64748b;
}

.product-banner {
    display: flex;
    min-height: 215px;
    margin-bottom: 24px;
    padding: 38px 42px;
    overflow: hidden;
    align-items: center;
    justify-content: space-between;
    color: #fff;
    border-radius: 25px;
    background:
        radial-gradient(circle at 82% 20%, rgba(34,211,238,.4), transparent 30%),
        linear-gradient(135deg, #4c1d95, #7c3aed 55%, #2563eb);
    box-shadow: 0 22px 50px rgba(109,40,217,.2);
}

.product-banner-label {
    display: inline-flex;
    padding: 7px 13px;
    align-items: center;
    border: 1px solid rgba(255,255,255,.25);
    border-radius: 100px;
    background: rgba(255,255,255,.12);
    gap: 7px;
    font-size: 13px;
    font-weight: 700;
}

.product-banner h2 {
    margin: 17px 0 8px;
    color: #fff;
    font-size: 36px;
    font-weight: 700;
}

.product-banner p {
    margin: 0;
    color: rgba(255,255,255,.82);
    font-size: 16px;
}

.product-banner-icon {
    display: grid;
    width: 125px;
    height: 125px;
    flex: 0 0 125px;
    place-items: center;
    border: 1px solid rgba(255,255,255,.2);
    border-radius: 36px;
    background: rgba(255,255,255,.13);
    font-size: 58px;
    transform: rotate(-6deg);
    backdrop-filter: blur(12px);
}

.product-statistics {
    display: grid;
    margin-bottom: 24px;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

.product-stat-card {
    display: flex;
    padding: 20px;
    align-items: center;
    border: 1px solid var(--product-border);
    border-radius: 19px;
    background: #fff;
    box-shadow: 0 10px 30px rgba(15,23,42,.05);
    gap: 15px;
}

.product-stat-icon {
    display: grid;
    width: 53px;
    height: 53px;
    flex: 0 0 53px;
    place-items: center;
    border-radius: 15px;
    font-size: 23px;
}

.stat-purple {
    color: #6d28d9;
    background: #f3e8ff;
}

.stat-green {
    color: #15803d;
    background: #dcfce7;
}

.stat-orange {
    color: #c2410c;
    background: #ffedd5;
}

.product-stat-card div {
    display: flex;
    flex-direction: column;
}

.product-stat-card small {
    color: var(--product-muted);
}

.product-stat-card strong {
    color: var(--product-dark);
    font-size: 28px;
    line-height: 1.1;
}

.product-panel {
    margin-bottom: 24px;
    padding: 27px;
    border: 1px solid var(--product-border);
    border-radius: 23px;
    background: #fff;
    box-shadow: 0 12px 35px rgba(15,23,42,.06);
}

.product-panel-heading,
.product-list-heading {
    display: flex;
    margin-bottom: 25px;
    padding-bottom: 20px;
    align-items: center;
    border-bottom: 1px solid var(--product-border);
    gap: 13px;
}

.heading-icon,
.form-section-title > span {
    display: grid;
    width: 48px;
    height: 48px;
    flex: 0 0 48px;
    place-items: center;
    color: #fff;
    border-radius: 14px;
    background: linear-gradient(135deg, #6d28d9, #8b5cf6);
    font-size: 20px;
}

.product-panel-heading h3,
.product-list-heading h3 {
    margin: 0;
    color: var(--product-dark);
    font-size: 21px;
    font-weight: 700;
}

.product-panel-heading p,
.product-list-heading p {
    margin: 3px 0 0;
    color: var(--product-muted);
    font-size: 13px;
}

.cancel-edit-top {
    min-height: 42px;
    margin-left: auto;
    padding: 0 15px;
    color: #475569;
    border: 0;
    border-radius: 12px;
    background: #eef2f7;
    font-weight: 700;
}

.form-section {
    height: 100%;
    padding: 22px;
    border: 1px solid var(--product-border);
    border-radius: 19px;
    background: #fbfcfe;
}

.form-section-title {
    display: flex;
    margin-bottom: 22px;
    align-items: center;
    gap: 12px;
}

.form-section-title > span {
    width: 43px;
    height: 43px;
    flex-basis: 43px;
    border-radius: 13px;
    font-size: 18px;
}

.form-section-title h4 {
    margin: 0;
    color: var(--product-dark);
    font-size: 18px;
    font-weight: 700;
}

.form-section-title p {
    margin: 2px 0 0;
    color: var(--product-muted);
    font-size: 12px;
}

.product-label {
    display: block;
    margin-bottom: 7px;
    color: #334155;
    font-size: 13px;
    font-weight: 700;
}

.product-label span {
    color: #e11d48;
}

.product-input,
.product-textarea {
    width: 100%;
    outline: 0;
    border: 1px solid #dce1ea;
    border-radius: 12px;
    color: var(--product-dark);
    background: #fff;
    transition: .2s;
}

.product-input {
    height: 47px;
    padding: 0 13px;
}

.product-textarea {
    padding: 12px 13px;
    resize: vertical;
}

.product-input:focus,
.product-textarea:focus {
    border-color: #8b5cf6;
    box-shadow: 0 0 0 3px rgba(139,92,246,.12);
}

.sku-input-group,
.money-input,
.link-input-group {
    position: relative;
    display: flex;
    align-items: center;
}

.sku-input-group .product-input {
    padding-right: 48px;
}

.sku-input-group button {
    position: absolute;
    right: 5px;
    display: grid;
    width: 37px;
    height: 37px;
    padding: 0;
    place-items: center;
    color: #6d28d9;
    border: 0;
    border-radius: 9px;
    background: #f3e8ff;
}

.sku-spinner,
.save-spinner {
    animation: productSpin .8s linear infinite;
}

@keyframes productSpin {
    to {
        transform: rotate(360deg);
    }
}

.money-input > span {
    position: absolute;
    z-index: 2;
    left: 12px;
    color: #6d28d9;
    font-size: 13px;
    font-weight: 700;
}

.money-input .product-input {
    padding-left: 39px;
}

.product-image-preview {
    display: grid;
    height: 235px;
    overflow: hidden;
    place-items: center;
    border: 2px dashed #d6dbe6;
    border-radius: 18px;
    background: #f1f5f9;
}

.product-image-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

#productImagePlaceholder {
    display: flex;
    align-items: center;
    color: #94a3b8;
    flex-direction: column;
    gap: 5px;
}

#productImagePlaceholder i {
    font-size: 43px;
}

.select-product-image {
    display: flex;
    min-height: 45px;
    margin: 13px 0 0;
    align-items: center;
    justify-content: center;
    color: #6d28d9;
    border-radius: 12px;
    background: #f3e8ff;
    gap: 8px;
    font-weight: 700;
    cursor: pointer;
}

.image-help,
.field-help {
    display: block;
    margin-top: 8px;
    color: #94a3b8;
    text-align: center;
    font-size: 11px;
}

.delivery-section {
    height: auto;
    margin-top: 24px;
}

.delivery-options {
    display: grid;
    margin-bottom: 20px;
    grid-template-columns: repeat(2, 1fr);
    gap: 13px;
}

.delivery-option {
    position: relative;
    display: flex;
    margin: 0;
    padding: 17px;
    align-items: center;
    border: 2px solid var(--product-border);
    border-radius: 16px;
    background: #fff;
    gap: 13px;
    cursor: pointer;
    transition: .2s;
}

.delivery-option input {
    position: absolute;
    opacity: 0;
}

.delivery-option.is-selected {
    border-color: #8b5cf6;
    background: #faf5ff;
    box-shadow: 0 0 0 3px rgba(139,92,246,.1);
}

.delivery-option-icon {
    display: grid;
    width: 48px;
    height: 48px;
    flex: 0 0 48px;
    place-items: center;
    color: #6d28d9;
    border-radius: 13px;
    background: #f3e8ff;
    font-size: 22px;
}

.delivery-option > span:nth-of-type(2) {
    display: flex;
    flex-direction: column;
}

.delivery-option small {
    color: var(--product-muted);
    font-weight: 400;
}

.delivery-check {
    margin-left: auto;
    color: #6d28d9;
    opacity: 0;
    font-size: 20px;
}

.delivery-option.is-selected .delivery-check {
    opacity: 1;
}

.delivery-fields[hidden] {
    display: none !important;
}

.digital-file-selector {
    display: flex;
    min-height: 80px;
    margin: 0;
    padding: 13px;
    align-items: center;
    border: 1px dashed #cbd5e1;
    border-radius: 15px;
    background: #fff;
    gap: 13px;
    cursor: pointer;
}

.digital-file-selector > span:first-child {
    display: grid;
    width: 48px;
    height: 48px;
    flex: 0 0 48px;
    place-items: center;
    color: #0369a1;
    border-radius: 13px;
    background: #e0f2fe;
    font-size: 22px;
}

.digital-file-selector > div {
    display: flex;
    min-width: 0;
    flex: 1;
    flex-direction: column;
}

.digital-file-selector strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.digital-file-selector small {
    color: var(--product-muted);
}

.browse-file-button {
    padding: 8px 12px;
    color: #6d28d9;
    border-radius: 10px;
    background: #f3e8ff;
    font-weight: 700;
}

.current-file {
    display: flex;
    margin-top: 10px;
    padding: 10px 12px;
    align-items: center;
    color: #166534;
    border-radius: 11px;
    background: #dcfce7;
    gap: 8px;
}

.current-file[hidden] {
    display: none;
}

.link-input-group > i {
    position: absolute;
    left: 13px;
    color: #6d28d9;
    font-size: 19px;
}

.link-input-group .product-input {
    padding-left: 42px;
}

.product-settings-row {
    display: grid;
    margin-top: 24px;
    grid-template-columns: repeat(2, 1fr);
    gap: 13px;
}

.product-setting {
    display: flex;
    margin: 0;
    padding: 15px;
    align-items: center;
    justify-content: space-between;
    border: 1px solid var(--product-border);
    border-radius: 15px;
    background: #fff;
}

.product-setting > div {
    display: flex;
    align-items: center;
    gap: 11px;
}

.product-setting > div > span:last-child {
    display: flex;
    flex-direction: column;
}

.product-setting small {
    color: var(--product-muted);
    font-weight: 400;
}

.setting-icon {
    display: grid;
    width: 43px;
    height: 43px;
    place-items: center;
    border-radius: 12px;
    font-size: 18px;
}

.setting-green {
    color: #15803d;
    background: #dcfce7;
}

.setting-orange {
    color: #c2410c;
    background: #ffedd5;
}

.product-setting .form-check-input {
    width: 47px;
    height: 24px;
    cursor: pointer;
}

.product-setting .form-check-input:checked {
    border-color: #6d28d9;
    background-color: #6d28d9;
}

.product-form-actions {
    display: flex;
    margin-top: 24px;
    justify-content: flex-end;
    gap: 10px;
}

.save-product-button,
.reset-product-button {
    display: inline-flex;
    min-height: 48px;
    padding: 0 21px;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 13px;
    gap: 8px;
    font-weight: 700;
}

.save-product-button {
    color: #fff;
    background: linear-gradient(135deg, #6d28d9, #7c3aed);
    box-shadow: 0 12px 25px rgba(109,40,217,.2);
}

.reset-product-button {
    color: #475569;
    background: #eef2f7;
}

.product-list-heading {
    justify-content: space-between;
}

.product-filters {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 9px;
}

.product-search {
    display: flex;
    width: 245px;
    height: 43px;
    padding: 0 12px;
    align-items: center;
    border: 1px solid #dce1ea;
    border-radius: 12px;
    background: #f8fafc;
    gap: 8px;
}

.product-search input {
    width: 100%;
    outline: 0;
    border: 0;
    background: transparent;
}

.product-filter-select {
    height: 43px;
    padding: 0 11px;
    border: 1px solid #dce1ea;
    border-radius: 12px;
    color: #334155;
    background: #f8fafc;
}

.products-loading,
.products-empty {
    display: flex;
    min-height: 300px;
    align-items: center;
    justify-content: center;
    color: var(--product-muted);
    flex-direction: column;
    gap: 12px;
    text-align: center;
}

.product-loader {
    width: 45px;
    height: 45px;
    border: 4px solid #ede9fe;
    border-top-color: #6d28d9;
    border-radius: 50%;
    animation: productSpin .8s linear infinite;
}

.products-empty > span {
    display: grid;
    width: 76px;
    height: 76px;
    place-items: center;
    color: #6d28d9;
    border-radius: 22px;
    background: #f3e8ff;
    font-size: 35px;
}

.products-empty h4 {
    margin: 0;
    color: var(--product-dark);
    font-weight: 700;
}

.products-empty p {
    margin: 0;
}

.admin-products-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.admin-product-card {
    overflow: hidden;
    border: 1px solid var(--product-border);
    border-radius: 19px;
    background: #fff;
    transition: .25s;
}

.admin-product-card:hover {
    box-shadow: 0 18px 40px rgba(15,23,42,.11);
    transform: translateY(-5px);
}

.admin-product-card.is-inactive {
    opacity: .72;
}

.admin-product-image {
    position: relative;
    height: 190px;
    overflow: hidden;
    background: linear-gradient(135deg, #4c1d95, #2563eb);
}

.admin-product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.admin-product-placeholder {
    display: grid;
    width: 100%;
    height: 100%;
    place-items: center;
    color: rgba(255,255,255,.88);
    font-size: 67px;
}

.admin-product-position,
.admin-product-status,
.admin-product-featured {
    position: absolute;
    padding: 5px 9px;
    border-radius: 20px;
    background: rgba(255,255,255,.93);
    font-size: 10px;
    font-weight: 700;
}

.admin-product-position {
    top: 11px;
    left: 11px;
}

.admin-product-status {
    top: 11px;
    right: 11px;
    color: #15803d;
}

.is-inactive .admin-product-status {
    color: #c2410c;
}

.admin-product-featured {
    bottom: 11px;
    left: 11px;
    color: #c2410c;
}

.admin-product-body {
    padding: 17px;
}

.admin-product-category {
    color: #7c3aed;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}

.admin-product-body h4 {
    margin: 5px 0 6px;
    color: var(--product-dark);
    font-size: 19px;
    font-weight: 700;
}

.admin-product-sku {
    color: #94a3b8;
    font-size: 11px;
}

.admin-product-body > p {
    min-height: 42px;
    margin: 11px 0;
    color: var(--product-muted);
    font-size: 13px;
    line-height: 1.45;
}

.admin-product-details {
    display: flex;
    padding: 10px;
    border-radius: 10px;
    background: #f8fafc;
    flex-direction: column;
    gap: 5px;
    color: #64748b;
    font-size: 11px;
}

.admin-product-price {
    display: flex;
    margin-top: 13px;
    align-items: flex-end;
    justify-content: space-between;
}

.admin-product-price > div {
    display: flex;
    flex-direction: column;
}

.admin-product-price small {
    color: #94a3b8;
}

.admin-product-price strong {
    color: var(--product-dark);
    font-size: 21px;
}

.admin-product-price del {
    color: #94a3b8;
    font-size: 12px;
}

.admin-product-actions {
    display: grid;
    margin-top: 14px;
    padding-top: 13px;
    border-top: 1px solid var(--product-border);
    grid-template-columns: 1fr 41px 41px 41px;
    gap: 6px;
}

.product-action {
    height: 40px;
    border: 0;
    border-radius: 10px;
    font-weight: 700;
}

.edit-product {
    color: #6d28d9;
    background: #f3e8ff;
}

.feature-product {
    color: #c2410c;
    background: #ffedd5;
}

.status-product {
    color: #0369a1;
    background: #e0f2fe;
}

.delete-product {
    color: #be123c;
    background: #ffe4e6;
}

.product-alert {
    border-radius: 23px !important;
}

.product-alert-confirm,
.product-alert-cancel,
.product-alert-delete {
    margin: 5px;
    padding: 11px 20px;
    border: 0;
    border-radius: 11px;
    font-weight: 700;
}

.product-alert-confirm {
    color: #fff;
    background: #6d28d9;
}

.product-alert-delete {
    color: #fff;
    background: #e11d48;
}

.product-alert-cancel {
    color: #334155;
    background: #e9edf3;
}

.product-errors {
    text-align: left;
}

.product-errors > div {
    display: flex;
    margin-bottom: 7px;
    padding: 9px 11px;
    color: #991b1b;
    border-radius: 9px;
    background: #fef2f2;
    gap: 8px;
}

@media (max-width: 1200px) {
    .admin-products-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 992px) {
    .product-statistics {
        grid-template-columns: 1fr;
    }

    .product-list-heading {
        align-items: stretch;
        flex-direction: column;
    }

    .product-filters {
        justify-content: flex-start;
    }
}

@media (max-width: 700px) {
    .product-banner {
        padding: 28px 23px;
    }

    .product-banner h2 {
        font-size: 28px;
    }

    .product-banner-icon {
        display: none;
    }

    .product-panel {
        padding: 18px;
    }

    .delivery-options,
    .product-settings-row,
    .admin-products-grid {
        grid-template-columns: 1fr;
    }

    .product-filters,
    .product-form-actions {
        flex-direction: column;
    }

    .product-search,
    .product-filter-select,
    .save-product-button,
    .reset-product-button {
        width: 100%;
    }

    .digital-file-selector {
        align-items: flex-start;
        flex-wrap: wrap;
    }

    .browse-file-button {
        width: 100%;
        text-align: center;
    }

    .cancel-edit-top {
        margin-left: 0;
    }

    .product-panel-heading {
        align-items: flex-start;
        flex-wrap: wrap;
    }
}