:root {
    --ws-brand-red: #b34d3d;
    --ws-brand-dark: #1a1a1a;
    --ws-brand-muted: #888888;
    --ws-brand-light: #f5f5f5;
    --ws-order-green: #8fcfa8;
    --ws-order-green-hover: #79b891;
    --ws-transition: all 0.3s ease;
}

.ws-theme-harmoni {
    --ws-brand-red: #b34d3d;
    --ws-brand-dark: #1a1a1a;
    --ws-brand-muted: #888888;
    --ws-brand-light: #f5f5f5;
    --ws-order-green: #8fcfa8;
    --ws-order-green-hover: #79b891;
}

.ws-theme-solidarisk {
    --ws-brand-red: #cb1518;
    --ws-brand-dark: #1a1a1a;
    --ws-brand-muted: #888888;
    --ws-brand-light: #f5f5f5;
    --ws-order-green: #8fcfa8;
    --ws-order-green-hover: #79b891;
}

.ws-product-section {
    padding: 60px 6% 100px;
    background: transparent;
}

.ws-product-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 30px;
}

.ws-product-actions {
    margin-left: auto;
}

.ws-product-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    order: 2;
    flex-basis: 100%;
}


.ws-filter-select-wrap {
    display: none;
    width: 100%;
}

.ws-filter-select-label {
    display: block;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--ws-brand-muted);
    margin-bottom: 6px;
}

.ws-filter-select {
    width: 100%;
    border: 1px solid #ddd;
    padding: 10px 14px;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    background: #fff;
}

.ws-product-search {
    order: 1;
}

.ws-product-actions {
    order: 1;
}

.ws-filter-button {
    border: 1px solid #ddd;
    padding: 8px 16px;
    background: #fff;
    color: var(--ws-brand-dark);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.75rem;
    cursor: pointer;
    transition: var(--ws-transition);
    border-radius: 2px;
}

.ws-filter-button.is-active,
.ws-filter-button:hover {
    background: var(--ws-brand-dark);
    color: #fff;
    border-color: var(--ws-brand-dark);
}

.ws-product-search input {
    padding: 10px 14px;
    border: 1px solid #ddd;
    min-width: 220px;
    font-size: 0.9rem;
}

.ws-product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 40px;
}

.ws-pagination {
    margin-top: 30px;
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.ws-page-button {
    border: 1px solid #ddd;
    padding: 8px 12px;
    background: #fff;
    color: var(--ws-brand-dark);
    font-size: 0.85rem;
    letter-spacing: 0.04em;
    cursor: pointer;
    transition: var(--ws-transition);
}

.ws-page-button.is-active,
.ws-page-button:hover {
    background: var(--ws-brand-dark);
    color: #fff;
    border-color: var(--ws-brand-dark);
}

.ws-product-card {
    position: relative;
    color: var(--ws-brand-dark);
    transition: var(--ws-transition);
    display: flex;
    flex-direction: column;
    height: 100%;
    cursor: pointer;
    background: #fff;
    border-radius: 0;
    overflow: hidden;
    border: 1px solid #f0f0f0;
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.08);
}


.ws-theme-harmoni .ws-product-card {
    background: #fff;
}

.ws-card-highlight {
    animation: wsFadeIn 0.6s ease;
}

.ws-is-loading {
    opacity: 0.7;
    pointer-events: none;
}

.ws-is-autosaving {
    opacity: 0.85;
}

@keyframes wsFadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.ws-product-card:focus {
    outline: 2px solid var(--ws-brand-red);
    outline-offset: 4px;
}

.ws-product-card.is-hidden {
    display: none;
}

.ws-product-card.is-paged-hidden {
    display: none;
}

.ws-product-img-wrapper {
    position: relative;
    height: 420px;
    overflow: hidden;
    background: var(--ws-brand-light);
    margin-bottom: 20px;
}

.ws-product-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.6s ease;
}

.ws-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: var(--ws-brand-red);
    color: #fff;
    padding: 6px 14px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    z-index: 5;
}

.ws-badge-stock {
    background: #2d5a4c;
}

.ws-product-card:hover img {
    transform: scale(1.05);
}

.ws-product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 22px 38px rgba(0, 0, 0, 0.12);
}

.ws-product-info {
    padding: 10px 0 22px;
    margin: 0 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.ws-product-category {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--ws-brand-red);
    font-weight: 700;
    letter-spacing: 1px;
    margin-bottom: 5px;
    display: block;
}

.ws-product-name {
    font-family: "Playfair Display", Georgia, serif;
    font-size: 1.6rem;
    margin: 0 0 10px 0;
    font-weight: 700;
    transition: var(--ws-transition);
}

.ws-product-meta {
    font-size: 0.95rem;
    color: #555;
    margin-bottom: 15px;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    max-height: calc(1.5em * 3);
}

.ws-product-price {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--ws-brand-dark);
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: baseline;
}

.ws-price-original {
    font-size: 1rem;
    color: #999;
    text-decoration: line-through;
    font-weight: 600;
}

.ws-price-current {
    color: var(--ws-brand-dark);
    font-weight: 700;
}

.ws-product-info .ws-product-price {
    border-top: 1px solid #eee;
    padding-top: 15px;
    margin-top: 15px;
}

.ws-price-label {
    font-size: 0.85rem;
    color: #999;
    font-weight: 400;
    display: block;
    margin-top: 5px;
    text-transform: none;
}

.ws-product-order {
    margin-top: auto;
    padding-top: 14px;
}

.ws-product-admin {
    margin-top: 12px;
    display: flex;
    gap: 12px;
    align-items: center;
    font-size: 0.85rem;
}

.ws-inline-form {
    display: inline;
}

.ws-order-button {
    display: inline-block;
    background: var(--ws-brand-red);
    color: #fff;
    text-decoration: none;
    padding: 10px 20px;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 700;
    transition: var(--ws-transition);
    border: none;
    border-radius: 2px;
    cursor: pointer;
}

.ws-order-button:hover {
    background: #9a3e30;
}

.ws-product-order .ws-order-button {
    background: var(--ws-order-green);
    color: #fff;
}

.ws-product-order .ws-order-button:hover {
    background: var(--ws-order-green-hover);
}

.ws-product-card:hover .ws-product-name {
    color: var(--ws-brand-red);
}

.ws-product-modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 30px;
    z-index: 1000000;
}

.ws-product-modal.is-open {
    display: flex;
}

.ws-product-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
}

.ws-product-modal-dialog {
    position: relative;
    background: #fff;
    max-width: 1100px;
    width: 100%;
    max-height: 90vh;
    overflow: auto;
    z-index: 2;
    padding: 30px;
}

.ws-product-modal .ws-order-button {
    border-radius: 0;
}

.ws-product-modal-body {
    margin-top: 20px;
}

.ws-product-modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    border: none;
    background: #fff;
    font-size: 26px;
    cursor: pointer;
}

.ws-form-modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 30px;
    z-index: 1000000;
}

.ws-form-modal.is-open {
    display: flex;
}

.ws-form-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
}

.ws-form-modal-dialog {
    position: relative;
    background: #fff;
    max-width: 1200px;
    width: 92vw;
    max-height: 90vh;
    overflow: auto;
    z-index: 2;
    padding: 28px;
}

.ws-form-modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    border: none;
    background: #fff;
    font-size: 26px;
    cursor: pointer;
}

.ws-modal-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 30px;
    align-items: start;
}

.ws-modal-image img {
    width: 100%;
    height: auto;
    display: block;
}

.ws-modal-content {
    margin: 16px 0 20px;
    line-height: 1.6;
}

.ws-modal-gallery {
    border-top: 1px solid #eee;
    padding-top: 16px;
    margin-top: 20px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
}

.ws-modal-gallery img {
    width: 100%;
    height: 140px;
    object-fit: cover;
    display: block;
    cursor: zoom-in;
}

.ws-modal-image img {
    cursor: zoom-in;
}

.ws-lightbox {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 40px;
    z-index: 100200;
}

.ws-lightbox.is-open {
    display: flex;
}

.ws-lightbox-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
}

.ws-lightbox-dialog {
    position: relative;
    z-index: 2;
    max-width: 90vw;
    max-height: 90vh;
}

.ws-lightbox-img {
    max-width: 90vw;
    max-height: 90vh;
    display: block;
    object-fit: contain;
    background: #fff;
}

.ws-lightbox-close {
    position: absolute;
    top: 8px;
    right: 8px;
    border: none;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    font-size: 18px;
    line-height: 32px;
    text-align: center;
    cursor: pointer;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
    transition: var(--ws-transition);
}

.ws-lightbox-close:hover,
.ws-lightbox-close:focus {
    background: rgba(0, 0, 0, 0.8);
}

body.ws-lightbox-open {
    overflow: hidden;
}

.ws-manager {
    max-width: 900px;
    margin: 0 auto;
}

.ws-message {
    padding: 12px 16px;
    margin-bottom: 20px;
    border-radius: 4px;
}

.ws-message-success {
    background: #e7f6ec;
    color: #246b3d;
}

.ws-message-error {
    background: #fde8e7;
    color: #8b2f2a;
}

.ws-empty-message {
    font-size: 0.95rem;
    color: #666;
    margin-top: 20px;
}

.ws-toast-container {
    position: fixed;
    right: 24px;
    bottom: 24px;
    display: grid;
    gap: 10px;
    z-index: 10000;
}

.ws-toast {
    background: #1a1a1a;
    color: #fff;
    padding: 12px 16px;
    border-radius: 4px;
    font-size: 0.9rem;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.ws-toast.is-show {
    opacity: 1;
    transform: translateY(0);
}

.ws-toast-success {
    background: #2d5a4c;
}

.ws-toast-error {
    background: #8b2f2a;
}

.ws-product-form {
    border: 1px solid #eee;
    padding: 20px;
    margin-bottom: 30px;
    display: grid;
    gap: 16px;
    grid-template-columns: 1fr;
}

.ws-product-form label {
    display: grid;
    gap: 6px;
    font-weight: 600;
    font-size: 0.9rem;
}

.ws-category-select {
    width: 100%;
    min-height: 140px;
    height: 160px;
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid #ddd;
    padding: 8px;
    font-size: 0.95rem;
    line-height: 1.4;
    background: #fff;
    box-sizing: border-box;
}

.ws-form-steps {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.ws-step-button {
    border: 1px solid #ddd;
    background: #fff;
    padding: 8px 14px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.7rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--ws-transition);
}

.ws-step-button.is-active,
.ws-step-button:hover {
    background: var(--ws-brand-dark);
    color: #fff;
    border-color: var(--ws-brand-dark);
}

.ws-form-step {
    display: none;
    gap: 16px;
}

.ws-form-step.is-active {
    display: grid;
}

.ws-checkbox-field {
    display: flex;
    gap: 10px;
    align-items: center;
    font-weight: 600;
}

.ws-form-full {
    grid-column: 1 / -1;
}

.ws-col-left,
.ws-col-right {
    grid-column: 1;
}

.ws-form-hint {
    margin: -6px 0 6px;
    font-size: 0.85rem;
    color: #666;
}

.ws-product-form input[type="text"],
.ws-product-form input[type="url"],
.ws-product-form input[type="file"],
.ws-product-form textarea,
.ws-product-form select {
    padding: 10px 12px;
    border: 1px solid #ddd;
    font-size: 0.9rem;
    box-sizing: border-box;
    background: #fff;
    line-height: 1.2;
}

.ws-product-form select {
    height: 42px;
    border-radius: 0;
}

.ws-form-row {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    grid-column: 1 / -1;
}

.ws-category-list {
    display: grid;
    gap: 8px;
    margin-bottom: 12px;
}

.ws-category-picker {
    display: grid;
    gap: 12px;
}

.ws-category-entry {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: flex-end;
}

.ws-category-entry label {
    flex: 1;
    min-width: 220px;
}

.ws-button-secondary {
    background: #fff;
    border: 1px solid #ddd;
    color: var(--ws-brand-dark);
    padding: 10px 16px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 700;
    font-size: 0.75rem;
    cursor: pointer;
    transition: var(--ws-transition);
    border-radius: 2px;
}

.ws-button-secondary:hover {
    background: var(--ws-brand-dark);
    color: #fff;
    border-color: var(--ws-brand-dark);
}

.ws-category-selected {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.ws-category-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    background: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 2px;
    font-size: 0.8rem;
}

.ws-category-chip.is-new {
    background: #fff6f3;
    border-color: #e5c1bb;
}

.ws-chip-remove {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
    color: #666;
}

.ws-chip-remove:hover {
    color: var(--ws-brand-red);
}

.ws-category-empty {
    font-size: 0.85rem;
    color: #777;
}

.ws-image-preview {
    display: flex;
    gap: 16px;
    align-items: center;
}

.ws-gallery-preview {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}

.ws-gallery-item {
    display: grid;
    gap: 6px;
    font-size: 0.85rem;
}

.ws-gallery-item img {
    width: 100%;
    height: 110px;
    object-fit: cover;
    border: 1px solid #eee;
}

.ws-product-list ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 10px;
}

.ws-product-list li {
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    align-items: center;
}

.ws-status {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--ws-brand-muted);
}

.ws-link-button {
    background: none;
    border: none;
    color: var(--ws-brand-red);
    cursor: pointer;
    text-decoration: underline;
    padding: 0;
}

.ws-product-admin {
    margin-top: 18px;
    padding-top: 12px;
    border-top: 1px solid #eee;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.ws-product-admin .ws-link-button {
    background: #fff;
    border: 1px solid #ddd;
    color: var(--ws-brand-dark);
    cursor: pointer;
    text-decoration: none;
    padding: 8px 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.7rem;
    font-weight: 700;
    transition: var(--ws-transition);
    border-radius: 0;
}

.ws-product-admin .ws-link-button:hover {
    background: var(--ws-brand-dark);
    color: #fff;
    border-color: var(--ws-brand-dark);
}

.ws-product-admin .ws-link-button.ws-link-danger {
    background: #b34d3d;
    border-color: #b34d3d;
    color: #fff;
}

.ws-product-admin .ws-link-button.ws-link-danger:hover {
    background: #9a3e30;
    border-color: #9a3e30;
}


body.ws-modal-open {
    overflow: hidden;
}

@media (max-width: 600px) {
    .ws-product-img-wrapper { height: 350px; }
    .ws-product-name { font-size: 1.4rem; }
    .ws-product-toolbar { flex-direction: column; align-items: flex-start; }
    .ws-product-form { grid-template-columns: 1fr; }
}

.ws-product-admin form { margin: 0; }
.ws-product-admin .ws-inline-form { margin: 0; }
.ws-product-admin .ws-link-button { line-height: 1; }

@media (max-width: 900px) {
    .ws-filter-select-wrap {
        display: block !important;
        order: 2;
    }

    .ws-product-filters {
        display: none !important;
    }
}

.ws-mobile-filters .ws-filter-select-wrap {
    display: block !important;
}

.ws-mobile-filters .ws-product-filters {
    display: none !important;
}

.ws-filter-select-trigger {
    width: 100%;
    border: 1px solid #ddd;
    background: #fff;
    padding: 12px 16px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--ws-brand-dark);
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    cursor: pointer;
    border-radius: 4px;
}

.ws-filter-select-trigger::after {
    content: '\25BE';
    font-size: 0.9rem;
    color: var(--ws-brand-dark);
}

.ws-filter-select-wrap.is-open .ws-filter-select-trigger::after {
    content: '\25B4';
}

.ws-filter-select-menu {
    display: none;
    margin-top: 8px;
    border: 1px solid #ddd;
    background: #fff;
    box-shadow: 0 12px 30px rgba(0,0,0,0.12);
    border-radius: 4px;
    padding: 8px;
}

.ws-filter-select-wrap.is-open .ws-filter-select-menu {
    display: block;
}

.ws-filter-select-menu button {
    width: 100%;
    text-align: left;
    border: none;
    background: transparent;
    padding: 10px 12px;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    cursor: pointer;
}

.ws-filter-select-menu button.is-active {
    background: var(--ws-brand-dark);
    color: #fff;
}
