/* ── Box-sizing reset ── */

.wp-block-mini-shop-product *,
.wp-block-mini-shop-product *::before,
.wp-block-mini-shop-product *::after,
.mini-shop-modal-overlay *,
.mini-shop-modal-overlay *::before,
.mini-shop-modal-overlay *::after {
    box-sizing: border-box;
}

/* ── Product Card ── */

.wp-block-mini-shop-product {
    --ms-primary: #2563eb;
    --ms-primary-hover: #1d4ed8;
    --ms-bg: #ffffff;
    --ms-text: #1f2937;
    --ms-text-light: #6b7280;
    --ms-border: #e5e7eb;
    --ms-radius: 12px;
}

.mini-shop-product-card {
    max-width: 400px;
    border: 1px solid var(--ms-border);
    border-radius: var(--ms-radius);
    overflow: hidden;
    background: var(--ms-bg);
    box-shadow: 0 1px 3px rgba(0, 0, 0, .06);
    transition: box-shadow .2s;
}

.mini-shop-product-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, .08);
}

.mini-shop-product-image img {
    display: block;
    width: 100%;
    height: auto;
}

.mini-shop-product-info {
    padding: 24px;
}

.mini-shop-product-name {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 8px;
    color: var(--ms-text);
}

.mini-shop-product-description {
    color: var(--ms-text-light);
    font-size: 15px;
    line-height: 1.5;
    margin: 0 0 16px;
}

.mini-shop-product-price {
    font-size: 32px;
    font-weight: 800;
    color: var(--ms-text);
    margin-bottom: 20px;
}

.mini-shop-vat-note {
    font-size: 13px;
    font-weight: 400;
    color: var(--ms-text-light);
    margin-left: 4px;
}

.mini-shop-buy-btn {
    display: inline-block;
    background: var(--ms-primary);
    color: #fff;
    padding: 14px 32px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: background .15s;
    width: 100%;
    text-align: center;
}

.mini-shop-buy-btn:hover {
    background: var(--ms-primary-hover);
}

/* ── Modal ── */

.mini-shop-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 999999;
    background: rgba(0, 0, 0, .45);
    align-items: center;
    justify-content: center;
    padding: 16px;
    opacity: 0;
    transition: opacity .2s;
}

.mini-shop-modal-overlay--active {
    opacity: 1;
}

.mini-shop-modal {
    position: relative;
    background: #fff;
    border-radius: 16px;
    padding: 36px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .15);
    transform: translateY(12px);
    transition: transform .2s;
}

.mini-shop-modal-overlay--active .mini-shop-modal {
    transform: translateY(0);
}

.mini-shop-modal-close {
    position: absolute;
    top: 12px;
    right: 16px;
    background: none;
    border: none;
    font-size: 28px;
    color: #9ca3af;
    cursor: pointer;
    line-height: 1;
    padding: 4px;
}

.mini-shop-modal-close:hover {
    color: var(--ms-text, #1f2937);
}

.mini-shop-modal-title {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 20px;
    color: #1f2937;
}

.mini-shop-modal-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f9fafb;
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 24px;
    font-size: 15px;
}

.mini-shop-modal-summary strong {
    font-size: 18px;
    color: #1f2937;
}

.mini-shop-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 6px;
    border: none;
    padding: 0;
}

.mini-shop-input {
    display: block;
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 15px;
    margin-bottom: 20px;
    transition: border-color .15s;
    outline: none;
    font-family: inherit;
}

.mini-shop-input:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .12);
}

.mini-shop-methods {
    border: none;
    padding: 0;
    margin: 0 0 24px;
    display: flex;
    gap: 10px;
}

.mini-shop-method {
    flex: 1;
    display: flex;
    align-items: center;
    padding: 12px 14px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    cursor: pointer;
    transition: border-color .15s, background .15s;
}

.mini-shop-method input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.mini-shop-method--active {
    border-color: #2563eb;
    background: #eff6ff;
}

.mini-shop-method-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #374151;
}

.mini-shop-method-label svg {
    flex-shrink: 0;
}

.mini-shop-submit {
    display: block;
    width: 100%;
    padding: 14px;
    background: #2563eb;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s;
    font-family: inherit;
}

.mini-shop-submit:hover {
    background: #1d4ed8;
}

.mini-shop-submit:disabled {
    background: #93c5fd;
    cursor: wait;
}

.mini-shop-error {
    display: none;
    margin-top: 12px;
    padding: 10px 14px;
    background: #fef2f2;
    color: #dc2626;
    border-radius: 8px;
    font-size: 14px;
}

/* ── Responsive ── */

@media (max-width: 480px) {
    .mini-shop-methods {
        flex-direction: column;
    }

    .mini-shop-modal {
        padding: 24px;
    }
}
