:root {
    --pmg-wpx-accent: currentColor;
    --pmg-wpx-primary: currentColor;
    --pmg-wpx-soft-bg: #fbf7ed;
    --pmg-wpx-border: #e5e5e5;
}

/* Product gallery */
.pmg-product-gallery { width: 100%; }
.pmg-gallery-main { position: relative; width: 100%; height: auto; overflow: hidden; background: #fff; }
.pmg-gallery-main-image { display: block; width: 100%; height: auto; }
.pmg-gallery-thumbs { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin-top: 10px; }
.pmg-gallery-thumb { appearance: none; border: 1px solid var(--pmg-wpx-border); background: #fff; padding: 0; margin: 0; aspect-ratio: 1 / 1; overflow: hidden; cursor: pointer; opacity: .65; }
.pmg-gallery-thumb:hover, .pmg-gallery-thumb.is-active { opacity: 1; border-color: var(--pmg-wpx-accent); }
.pmg-gallery-thumb:focus-visible, .pmg-review-toggle:focus-visible, .pmg-category-toggle:focus-visible { outline: 2px solid var(--pmg-wpx-primary); outline-offset: 2px; }
.pmg-gallery-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }

/* Stock message */
.pmg-stock-message { display: flex; align-items: center; gap: 7px; font-size: 16px; line-height: 1.4; }
.pmg-stock-check { color: var(--pmg-wpx-accent); font-weight: 700; }

/* Product category tree */
.pmg-product-categories,
.pmg-product-categories ul,
.pmg-product-categories li {
    list-style: none !important;
}

.pmg-product-categories {
    font-family: "Open Sans", sans-serif;
    font-size: 16px;
    line-height: 1.35;
}

.pmg-product-categories ul {
    margin: 0 !important;
    padding: 0 !important;
}

.pmg-product-categories li {
    margin: 0 !important;
    padding: 0 !important;
}

.pmg-product-categories li::before,
.pmg-product-categories li::marker {
    content: none !important;
    display: none !important;
}

.pmg-category-row {
    display: flex;
    align-items: center;
    min-height: 34px;
    padding: 3px 0;
}

.pmg-category-toggle,
.pmg-category-toggle-spacer {
    flex: 0 0 20px;
    width: 20px;
    min-width: 20px;
    height: 20px;
    margin: 0 8px 0 0 !important;
}

.pmg-category-toggle {
    appearance: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    color: var(--pmg-wpx-primary) !important;
    box-shadow: none !important;
    font: inherit;
    cursor: pointer;
}

.pmg-category-toggle:hover,
.pmg-category-toggle:focus {
    background: transparent !important;
    color: var(--pmg-wpx-primary) !important;
}

.pmg-category-toggle-icon {
    display: block;
    font-size: 24px;
    font-weight: 700;
    line-height: 18px;
    transform-origin: center;
    transition: transform .2s ease;
}

.pmg-category-item.is-open > .pmg-category-row .pmg-category-toggle-icon {
    transform: rotate(90deg);
}

.pmg-category-link {
    display: flex;
    align-items: baseline;
    gap: 8px;
    min-width: 0;
    color: inherit !important;
    text-decoration: none !important;
    font-family: "Open Sans", sans-serif;
    font-size: 16px;
    font-weight: 400;
    line-height: 1.35;
}

.pmg-category-name {
    min-width: 0;
}

.pmg-category-count {
    flex: 0 0 auto;
    color: var(--pmg-wpx-accent);
    font-size: 16px;
    font-weight: 400;
}

.pmg-category-item.is-current > .pmg-category-row .pmg-category-link,
.pmg-category-item.is-current > .pmg-category-row .pmg-category-link:hover {
    color: var(--pmg-wpx-primary) !important;
    font-weight: 700;
}

.pmg-category-children {
    margin-left: 28px !important;
}

.pmg-category-children[hidden] {
    display: none !important;
}

.pmg-category-link:hover {
    color: var(--pmg-wpx-primary) !important;
}

/* Product reviews */
.pmg-reviews { margin-top: 35px; }
.pmg-reviews-title { margin: 0 0 20px; }
.pmg-no-reviews { display: flex; align-items: center; gap: 18px; padding: 18px 22px; background: var(--pmg-wpx-soft-bg); border-radius: 4px; }
.pmg-review-stars { color: var(--pmg-wpx-accent); font-size: 22px; letter-spacing: 2px; white-space: nowrap; }
.pmg-review-toggle { appearance: none; background: transparent !important; color: var(--pmg-wpx-primary) !important; border: 0 !important; padding: 0 !important; margin: 0 !important; font-size: 16px !important; font-weight: 700 !important; line-height: 1.3 !important; cursor: pointer; }
.pmg-review-toggle:hover { color: var(--pmg-wpx-accent) !important; }
.pmg-review-form { margin-top: 24px; padding: 24px; background: var(--pmg-wpx-soft-bg); border-radius: 4px; }
.pmg-review-form[hidden] { display: none !important; }
.pmg-review-form label { display: block; margin-bottom: 5px; font-size: 15px; font-weight: 700; }
.pmg-review-form input[type="text"], .pmg-review-form input[type="email"], .pmg-review-form select, .pmg-review-form textarea { width: 100%; max-width: 600px; box-sizing: border-box; padding: 10px 12px; border: 1px solid #ccc; border-radius: 3px; font-size: 16px; line-height: 1.4; background: #fff; }
.pmg-review-form textarea { min-height: 120px; resize: vertical; }
.pmg-review-form p { margin: 0 0 16px; }
.pmg-review-form input[type="submit"], .pmg-review-form button[type="submit"] { min-height: 42px; padding: 10px 22px; border-radius: 4px; cursor: pointer; }
.pmg-existing-reviews { margin-bottom: 22px; }
.pmg-existing-reviews .commentlist, .pmg-existing-reviews ol { list-style: none; margin: 0; padding: 0; }
.pmg-existing-reviews li { margin-bottom: 22px; }

@media (max-width: 1024px) {
    .pmg-product-categories,
    .pmg-category-link,
    .pmg-category-count {
        font-size: 14px;
    }
}

@media (max-width: 768px) {
    .pmg-gallery-thumbs { grid-template-columns: repeat(4, 1fr); }
    .pmg-no-reviews { flex-direction: column; align-items: flex-start; gap: 10px; }
    .pmg-review-form { padding: 18px; }
    .pmg-review-stars { font-size: 20px; }
    .pmg-review-toggle { font-size: 15px !important; }
    .pmg-stock-message { font-size: 15px; }
}
