/**
 * WooBuilder for Elementor – Frontend Styles
 * Version: 1.0.0
 */

/* ─── Base ─────────────────────────────────────────────────────────────── */
.wea-widget {
    line-height: 1.6;
}

/* ─── Editor Notice ─────────────────────────────────────────────────────── */
.wea-editor-notice {
    background: #f8f9fa;
    border: 2px dashed #dee2e6;
    border-radius: 6px;
    padding: 20px;
    text-align: center;
    color: #6c757d;
    font-style: italic;
}

/* ─── Product Title ─────────────────────────────────────────────────────── */
.wea-product-title {
    margin: 0 0 10px;
    font-weight: 700;
}

/* ─── Product Price ─────────────────────────────────────────────────────── */
.wea-product-price .price {
    font-size: 1.5em;
    font-weight: 700;
}
.wea-product-price .price del {
    opacity: 0.6;
    margin-right: 5px;
}

/* ─── Product Stock ─────────────────────────────────────────────────────── */
.wea-product-stock .in-stock {
    color: #46b450;
    font-weight: 600;
}
.wea-product-stock .out-of-stock {
    color: #dc3232;
    font-weight: 600;
}

/* ─── Star Rating ─────────────────────────────────────────────────────── */
.wea-product-rating {
    display: flex;
    align-items: center;
    gap: 8px;
}
.wea-review-count {
    color: #777;
    font-size: 0.875em;
}

/* ─── Product Meta ─────────────────────────────────────────────────────── */
.wea-product-meta {
    font-size: 0.9em;
}
.wea-product-meta span {
    display: block;
    margin-bottom: 4px;
    color: #555;
}
.wea-product-meta a {
    color: inherit;
    text-decoration: underline;
}
.wea-product-meta a:hover {
    opacity: 0.8;
}

/* ─── Add to Cart ───────────────────────────────────────────────────────── */
.wea-add-to-cart .quantity {
    display: inline-flex;
    align-items: center;
    margin-right: 10px;
}
.wea-add-to-cart form.cart {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

/* ─── Menu Cart ─────────────────────────────────────────────────────────── */
.wea-menu-cart__link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    color: inherit;
    position: relative;
}
.wea-menu-cart__icon {
    font-size: 22px;
    line-height: 1;
}
.wea-menu-cart__count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    border-radius: 50px;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
    background-color: #e74c3c;
    color: #ffffff;
}
.wea-menu-cart__subtotal {
    font-size: 0.875em;
    font-weight: 600;
}

/* ─── Products Grid ─────────────────────────────────────────────────────── */
.wea-products ul.products {
    display: grid;
    gap: 20px;
}

/* ─── Archive Widgets ───────────────────────────────────────────────────── */
.wea-archive-title {
    margin: 0 0 15px;
}
.wea-archive-description {
    margin-bottom: 20px;
}
.wea-archive-description p:last-child {
    margin-bottom: 0;
}

/* ─── Cart & Checkout ───────────────────────────────────────────────────── */
.wea-cart .shop_table {
    width: 100%;
    border-collapse: collapse;
}
.wea-cart .shop_table td,
.wea-cart .shop_table th {
    padding: 12px 15px;
    border: 1px solid #e0e0e0;
    vertical-align: middle;
}
.wea-checkout .woocommerce {
    max-width: 100%;
}

/* ─── Product Breadcrumbs ───────────────────────────────────────────────── */
.wea-product-breadcrumbs .woocommerce-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
    font-size: 0.875em;
    color: #777;
}
.wea-product-breadcrumbs a {
    color: inherit;
    text-decoration: none;
}
.wea-product-breadcrumbs a:hover {
    text-decoration: underline;
}
.wea-product-breadcrumbs .delimiter {
    opacity: 0.5;
}
.wea-product-breadcrumbs .breadcrumb_last {
    color: #333;
    font-weight: 500;
}

/* ─── Additional Information ────────────────────────────────────────────── */
.wea-additional-info table {
    width: 100%;
    border-collapse: collapse;
}
.wea-additional-info table th,
.wea-additional-info table td {
    padding: 10px 14px;
    border: 1px solid #e0e0e0;
    text-align: left;
    vertical-align: top;
}
.wea-additional-info table th {
    background-color: #f8f8f8;
    font-weight: 600;
    width: 35%;
}
.wea-additional-info table tr:nth-child(even) td {
    background-color: #fafafa;
}
.wea-additional-info__heading {
    margin: 0 0 16px;
}

/* ─── Product Categories ────────────────────────────────────────────────── */
.wea-product-categories__grid {
    display: grid;
    list-style: none;
    margin: 0;
    padding: 0;
}
.wea-category-card {
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.wea-category-card:hover {
    transform: translateY(-2px);
}
.wea-category-card__link {
    display: block;
    text-decoration: none;
    color: inherit;
}
.wea-category-card__image {
    overflow: hidden;
    aspect-ratio: 4/3;
}
.wea-category-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}
.wea-category-card:hover .wea-category-card__image img {
    transform: scale(1.04);
}
.wea-category-card__content {
    padding: 12px;
}
.wea-category-card__title {
    margin: 0 0 4px;
    font-size: 1em;
    font-weight: 600;
}
.wea-category-card__count {
    font-size: 0.8em;
    color: #777;
}

/* ─── WooCommerce Notices ───────────────────────────────────────────────── */
.wea-wc-notices .woocommerce-message,
.wea-wc-notices .woocommerce-error,
.wea-wc-notices .woocommerce-info {
    list-style: none;
    padding: 12px 16px 12px 48px;
    margin: 0 0 12px;
    border-left: 4px solid;
    border-radius: 4px;
    position: relative;
}
.wea-wc-notices .woocommerce-message {
    background-color: #f0fdf4;
    border-left-color: #22c55e;
    color: #166534;
}
.wea-wc-notices .woocommerce-error {
    background-color: #fef2f2;
    border-left-color: #ef4444;
    color: #991b1b;
}
.wea-wc-notices .woocommerce-info {
    background-color: #eff6ff;
    border-left-color: #3b82f6;
    color: #1e40af;
}

/* ─── PayPal Button ─────────────────────────────────────────────────────── */
.wea-paypal-button {
    display: flex;
    flex-direction: column;
}
.wea-paypal-button__container {
    width: 100%;
}

/* ─── Stripe Button ─────────────────────────────────────────────────────── */
.wea-stripe-button {
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.wea-stripe-button__card-icons {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-bottom: 4px;
}
.wea-stripe-icon {
    display: inline-block;
    width: 38px;
    height: 24px;
    border-radius: 4px;
    background-color: #f3f4f6;
    border: 1px solid #e5e7eb;
    font-size: 10px;
    line-height: 24px;
    text-align: center;
}
.wea-stripe-button__card-element {
    padding: 12px 14px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: #ffffff;
    min-height: 44px;
}
.wea-stripe-button__card-errors {
    color: #dc2626;
    font-size: 0.875em;
    min-height: 1.2em;
}
.wea-stripe-button__pay-btn {
    display: block;
    width: 100%;
    padding: 14px 24px;
    background-color: #635bff;
    color: #ffffff;
    font-size: 1em;
    font-weight: 600;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: opacity 0.15s ease;
}
.wea-stripe-button__pay-btn:hover {
    opacity: 0.92;
}
.wea-stripe-button__pay-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ─── Responsive ────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
    .wea-menu-cart__subtotal {
        display: none;
    }
    .wea-add-to-cart form.cart {
        flex-direction: column;
        align-items: flex-start;
    }
}
