/**
 * Nextfusion Plugin - Frontend Styles
 * Modern, clean, responsive design
 */

:root {
    --nf-primary: #4361ee;
    --nf-primary-dark: #3a56d4;
    --nf-secondary: #6c757d;
    --nf-success: #2ecc71;
    --nf-danger: #e74c3c;
    --nf-warning: #f39c12;
    --nf-light: #f8f9fa;
    --nf-dark: #212529;
    --nf-border: #e9ecef;
    --nf-shadow: 0 2px 8px rgba(0,0,0,0.08);
    --nf-radius: 12px;
    --nf-radius-sm: 8px;
}

/* Container general */
.nextfusion-shop,
.nextfusion-cart-table,
.nextfusion-checkout-form,
.nextfusion-downloads-list {
    font-family: system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    max-width: 1200px;
    margin: 0 auto;
}

/* ========== MAGAZIN ========== */
.nextfusion-shop {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    padding: 1rem 0;
}

.product-item {
    background: #fff;
    border-radius: var(--nf-radius);
    box-shadow: var(--nf-shadow);
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: 1px solid var(--nf-border);
}

.product-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.1);
}

.product-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-bottom: 1px solid var(--nf-border);
}

.product-item h3 {
    font-size: 1.25rem;
    margin: 0.75rem 1rem 0.5rem;
    font-weight: 600;
    color: var(--nf-dark);
}

.product-item p {
    font-size: 0.9rem;
    color: var(--nf-secondary);
    margin: 0 1rem 0.75rem;
    line-height: 1.4;
}

.product-item .price {
    display: block;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--nf-primary);
    margin: 0 1rem 1rem;
}

.product-item form {
    padding: 0 1rem 1.25rem;
}

.product-item button {
    width: 100%;
    background: var(--nf-primary);
    color: white;
    border: none;
    padding: 10px 0;
    border-radius: var(--nf-radius-sm);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.product-item button:hover {
    background: var(--nf-primary-dark);
}

/* ========== COȘ ========== */
.nextfusion-cart-table {
    width: 100%;
    background: #fff;
    border-radius: var(--nf-radius);
    overflow: hidden;
    border-collapse: collapse;
    margin-bottom: 2rem;
    box-shadow: var(--nf-shadow);
}

.nextfusion-cart-table th {
    background: var(--nf-light);
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    border-bottom: 1px solid var(--nf-border);
}

.nextfusion-cart-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--nf-border);
    vertical-align: middle;
}

.nextfusion-cart-table td input[type="number"] {
    width: 70px;
    padding: 0.5rem;
    border: 1px solid var(--nf-border);
    border-radius: var(--nf-radius-sm);
    text-align: center;
}

.coupon-row td,
.total-row td {
    background: var(--nf-light);
    font-weight: 500;
}

.cart-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: space-between;
    align-items: center;
    margin-top: 1.5rem;
}

.coupon-form {
    display: flex;
    gap: 0.5rem;
}

.coupon-form input {
    padding: 0.6rem 1rem;
    border: 1px solid var(--nf-border);
    border-radius: var(--nf-radius-sm);
    min-width: 200px;
}

.coupon-form button,
.update-cart button,
.cart-buttons .button {
    background: var(--nf-secondary);
    color: white;
    border: none;
    padding: 0.6rem 1.2rem;
    border-radius: var(--nf-radius-sm);
    cursor: pointer;
    font-weight: 500;
    transition: background 0.2s;
    text-decoration: none;
    display: inline-block;
}

.coupon-form button:hover,
.update-cart button:hover {
    background: #5a6268;
}

.cart-buttons .button-primary {
    background: var(--nf-primary);
}

.cart-buttons .button-primary:hover {
    background: var(--nf-primary-dark);
}

.cart-buttons .button {
    background: #e9ecef;
    color: var(--nf-dark);
}

.cart-buttons .button:hover {
    background: #dee2e6;
}

.remove-item {
    color: var(--nf-danger);
    text-decoration: none;
    font-weight: 500;
}

.remove-item:hover {
    text-decoration: underline;
}

/* ========== CHECKOUT ========== */
.nextfusion-checkout-form {
    background: #fff;
    border-radius: var(--nf-radius);
    box-shadow: var(--nf-shadow);
    padding: 2rem;
    max-width: 600px;
}

.checkout-fields p {
    margin-bottom: 1.25rem;
}

.checkout-fields label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--nf-dark);
}

.checkout-fields input,
.checkout-fields select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--nf-border);
    border-radius: var(--nf-radius-sm);
    font-size: 1rem;
}

.order-summary {
    background: var(--nf-light);
    padding: 1.25rem;
    border-radius: var(--nf-radius-sm);
    margin: 1.5rem 0;
}

.order-summary h3 {
    margin-top: 0;
    margin-bottom: 1rem;
}

.order-summary p {
    margin: 0.5rem 0;
}

.nextfusion-checkout-form button[type="submit"] {
    background: var(--nf-primary);
    color: white;
    border: none;
    padding: 0.9rem 1.5rem;
    width: 100%;
    font-size: 1rem;
    font-weight: 600;
    border-radius: var(--nf-radius-sm);
    cursor: pointer;
    transition: background 0.2s;
}

.nextfusion-checkout-form button[type="submit"]:hover {
    background: var(--nf-primary-dark);
}

/* ========== NOTIFICĂRI ========== */
.nextfusion-notices {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    max-width: 400px;
    width: 100%;
}

.nextfusion-notices .notice {
    background: #fff;
    border-left: 4px solid;
    border-radius: var(--nf-radius-sm);
    padding: 1rem 1.25rem;
    margin-bottom: 1rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.notice-success {
    border-left-color: var(--nf-success);
}

.notice-error {
    border-left-color: var(--nf-danger);
}

.notice-dismiss {
    background: none;
    border: none;
    font-size: 1.25rem;
    cursor: pointer;
    color: #999;
    padding: 0 0 0 10px;
}

/* ========== DESCRĂRCĂRI ========== */
.nextfusion-downloads-list {
    list-style: none;
    padding: 0;
}

.nextfusion-downloads-list li {
    background: #fff;
    border-radius: var(--nf-radius-sm);
    box-shadow: var(--nf-shadow);
    margin-bottom: 1rem;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nextfusion-downloads-list li a {
    background: var(--nf-primary);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: var(--nf-radius-sm);
    text-decoration: none;
    font-weight: 500;
}

.nextfusion-downloads-list li a:hover {
    background: var(--nf-primary-dark);
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
    .nextfusion-shop {
        grid-template-columns: 1fr;
    }
    
    .nextfusion-cart-table,
    .nextfusion-cart-table tbody,
    .nextfusion-cart-table tr,
    .nextfusion-cart-table td {
        display: block;
        width: 100%;
    }
    
    .nextfusion-cart-table thead {
        display: none;
    }
    
    .nextfusion-cart-table tr {
        margin-bottom: 1rem;
        border: 1px solid var(--nf-border);
        border-radius: var(--nf-radius-sm);
        padding: 0.5rem;
    }
    
    .nextfusion-cart-table td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0.5rem;
        border: none;
        border-bottom: 1px solid #f0f0f0;
    }
    
    .nextfusion-cart-table td:before {
        content: attr(data-label);
        font-weight: 600;
        margin-right: 1rem;
    }
    
    .cart-actions {
        flex-direction: column;
        align-items: stretch;
    }
    
    .coupon-form {
        flex-direction: column;
    }
    
    .nextfusion-checkout-form {
        padding: 1.25rem;
    }
}
/* ========== PAGINA SINGUR PRODUS ========== */
.nextfusion-single-product {
    display: flex;
    flex-wrap: wrap;
    gap: 2.5rem;
    background: #fff;
    border-radius: var(--nf-radius);
    box-shadow: var(--nf-shadow);
    padding: 2rem;
}

.product-gallery {
    flex: 1;
    min-width: 250px;
}

.product-image-main {
    width: 100%;
    border-radius: var(--nf-radius-sm);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.product-info {
    flex: 1;
    min-width: 250px;
}

.product-title {
    font-size: 2rem;
    margin-top: 0;
    margin-bottom: 0.5rem;
    color: var(--nf-dark);
}

.product-price {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--nf-primary);
    margin: 1rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--nf-border);
}

.product-description,
.product-excerpt {
    color: var(--nf-secondary);
    line-height: 1.6;
    margin: 1rem 0;
}

.product-actions {
    margin-top: 2rem;
}

.product-actions button {
    background: var(--nf-primary);
    color: white;
    border: none;
    padding: 12px 28px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: var(--nf-radius-sm);
    cursor: pointer;
    transition: all 0.2s;
}

.product-actions button:hover {
    background: var(--nf-primary-dark);
    transform: scale(1.02);
}

@media (max-width: 768px) {
    .nextfusion-single-product {
        flex-direction: column;
        padding: 1rem;
    }
    .product-title {
        font-size: 1.5rem;
    }
    .product-price {
        font-size: 1.4rem;
    }
}
/* Buton vezi produsul în grid */
.view-product {
    display: inline-block;
    background: var(--nf-primary);
    color: white;
    text-align: center;
    padding: 10px 20px;
    border-radius: var(--nf-radius-sm);
    text-decoration: none;
    font-weight: 500;
    margin: 0 1rem 1rem;
    transition: background 0.2s;
}

.view-product:hover {
    background: var(--nf-primary-dark);
    color: white;
}

/* Buton demo pe pagina produsului */
.demo-button {
    display: inline-block;
    background: var(--nf-warning);
    color: white;
    padding: 12px 24px;
    border-radius: var(--nf-radius-sm);
    text-decoration: none;
    font-weight: 600;
    margin-right: 1rem;
    transition: background 0.2s;
}

.demo-button:hover {
    background: #e67e22;
    color: white;
}

/* Buton cumpără / adaugă în coș pe pagina produsului */
.product-actions form {
    display: inline-block;
}

.product-actions button {
    background: var(--nf-primary);
    color: white;
    border: none;
    padding: 12px 28px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: var(--nf-radius-sm);
    cursor: pointer;
    transition: all 0.2s;
}

.product-actions button:hover {
    background: var(--nf-primary-dark);
    transform: scale(1.02);
}

@media (max-width: 768px) {
    .product-actions {
        display: flex;
        flex-direction: column;
        gap: 1rem;
    }
    .demo-button, .product-actions form {
        width: 100%;
        text-align: center;
    }
}