/* WooCommerce Wholesale Prices Frontend Styles */

/* Información mayorista en producto */
.wc-wholesale-info {
    margin: 20px 0;
}

.wholesale-info-authenticated {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 1px solid #dee2e6;
    border-left: 4px solid #007cba;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.wholesale-info-title {
    margin: 0 0 15px 0;
    color: #007cba;
    font-size: 18px;
    font-weight: 600;
    display: flex;
    align-items: center;
}

.wholesale-icon {
    margin-right: 8px;
    font-size: 20px;
}

.wholesale-pricing-details {
    display: grid;
    gap: 12px;
}

.wholesale-price-row,
.wholesale-min-qty-row,
.wholesale-savings-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid rgba(0,0,0,0.1);
}

.wholesale-price-row:last-child,
.wholesale-min-qty-row:last-child,
.wholesale-savings-row:last-child {
    border-bottom: none;
}

.wholesale-price-row .label,
.wholesale-min-qty-row .label,
.wholesale-savings-row .label {
    font-weight: 500;
    color: #495057;
}

.wholesale-price-row .price {
    font-weight: bold;
    color: #007cba;
    font-size: 20px;
}

.wholesale-min-qty-row .quantity {
    font-weight: 600;
    color: #6c757d;
}

.wholesale-savings-row .savings {
    color: #28a745;
    font-weight: bold;
    font-size: 16px;
}

/* Precios escalonados */
.wholesale-tiered-pricing {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #dee2e6;
}

.wholesale-tiered-pricing h5 {
    margin: 0 0 10px 0;
    color: #495057;
    font-size: 14px;
    font-weight: 600;
}

.wholesale-price-table {
    width: 100%;
    border-collapse: collapse;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.wholesale-price-table th,
.wholesale-price-table td {
    padding: 10px 12px;
    text-align: center;
    border: 1px solid #dee2e6;
}

.wholesale-price-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #495057;
    font-size: 13px;
}

.wholesale-price-table td {
    background: #fff;
    font-size: 14px;
}

/* Información para invitados */
.wholesale-info-guest {
    text-align: center;
}

.wholesale-login-notice {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    border: 1px solid #ffeaa7;
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.wholesale-login-notice h4 {
    margin: 0 0 10px 0;
    color: #856404;
    font-size: 18px;
}

.wholesale-login-notice p {
    margin: 10px 0;
    color: #856404;
    font-size: 14px;
}

.wholesale-login-btn {
    background: #007cba !important;
    color: white !important;
    padding: 12px 24px !important;
    border-radius: 6px !important;
    text-decoration: none !important;
    font-weight: 600 !important;
    display: inline-block !important;
    margin: 15px 0 !important;
    transition: all 0.3s ease !important;
}

.wholesale-login-btn:hover {
    background: #005a87 !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.wholesale-register-link {
    font-size: 12px !important;
    margin-top: 10px !important;
}

.wholesale-register-link a {
    color: #007cba;
    text-decoration: underline;
}

/* Precios para invitados */
.wholesale-info-guest-prices {
    background: #e7f3ff;
    border: 1px solid #b8daff;
    border-radius: 6px;
    padding: 20px;
    text-align: center;
}

.wholesale-info-guest-prices h4 {
    margin: 0 0 10px 0;
    color: #004085;
    font-size: 16px;
}

.wholesale-guest-price {
    font-size: 24px;
    font-weight: bold;
    color: #007cba;
    margin: 10px 0;
}

.wholesale-guest-min-qty {
    font-size: 12px;
    color: #6c757d;
    margin: 5px 0 0 0;
}

/* Distintivo mayorista */
.wholesale-badge {
    background: linear-gradient(135deg, #007cba 0%, #0056b3 100%);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-block;
    margin: 8px 0;
    box-shadow: 0 2px 4px rgba(0,123,186,0.3);
    position: relative;
}

.wholesale-badge::before {
    content: '🏪';
    margin-right: 4px;
}

/* Aviso de usuario mayorista */
.wholesale-user-notice {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    border: 1px solid #c3e6cb;
    color: #155724;
    padding: 12px 20px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 14px;
    display: flex;
    align-items: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.wholesale-user-icon {
    margin-right: 8px;
    font-size: 16px;
}

/* Formulario de login mayorista (shortcode) */
.wholesale-login-form {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 30px;
    max-width: 400px;
    margin: 20px auto;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.wholesale-login-form h3 {
    text-align: center;
    margin: 0 0 20px 0;
    color: #495057;
    font-size: 20px;
}

.wholesale-login-form .login-form {
    margin: 0;
}

.wholesale-login-form label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #495057;
}

.wholesale-login-form input[type="text"],
.wholesale-login-form input[type="password"] {
    width: 100%;
    padding: 12px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    margin-bottom: 15px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.wholesale-login-form input[type="text"]:focus,
.wholesale-login-form input[type="password"]:focus {
    border-color: #007cba;
    outline: none;
    box-shadow: 0 0 0 3px rgba(0,123,186,0.1);
}

.wholesale-login-form input[type="submit"] {
    background: #007cba;
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    width: 100%;
    font-size: 16px;
    font-weight: 600;
    transition: background-color 0.3s ease;
}

.wholesale-login-form input[type="submit"]:hover {
    background: #005a87;
}

.wholesale-register-info {
    text-align: center;
    margin-top: 15px;
    font-size: 14px;
    color: #6c757d;
}

.wholesale-register-info a {
    color: #007cba;
    text-decoration: none;
}

.wholesale-register-info a:hover {
    text-decoration: underline;
}

/* Grid de productos mayoristas (shortcode) */
.wholesale-products-grid {
    display: grid;
    gap: 20px;
    margin: 20px 0;
}

.wholesale-products-grid.columns-1 { grid-template-columns: 1fr; }
.wholesale-products-grid.columns-2 { grid-template-columns: repeat(2, 1fr); }
.wholesale-products-grid.columns-3 { grid-template-columns: repeat(3, 1fr); }
.wholesale-products-grid.columns-4 { grid-template-columns: repeat(4, 1fr); }
.wholesale-products-grid.columns-5 { grid-template-columns: repeat(5, 1fr); }
.wholesale-products-grid.columns-6 { grid-template-columns: repeat(6, 1fr); }

.wholesale-product-item {
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.wholesale-product-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.15);
}

.wholesale-product-item .product-image {
    position: relative;
    overflow: hidden;
}

.wholesale-product-item .product-image img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.wholesale-product-item:hover .product-image img {
    transform: scale(1.05);
}

.wholesale-product-item .wholesale-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    margin: 0;
}

.wholesale-product-item .product-details {
    padding: 15px;
}

.wholesale-product-item .product-title {
    margin: 0 0 10px 0;
    font-size: 16px;
    line-height: 1.4;
}

.wholesale-product-item .product-title a {
    color: #495057;
    text-decoration: none;
    transition: color 0.3s ease;
}

.wholesale-product-item .product-title a:hover {
    color: #007cba;
}

.wholesale-product-item .product-price {
    margin-bottom: 10px;
    font-size: 18px;
    font-weight: bold;
}

.wholesale-info-mini {
    background: #f8f9fa;
    padding: 8px 12px;
    border-radius: 4px;
    border: 1px solid #e9ecef;
    font-size: 14px;
}

.wholesale-info-mini .wholesale-price {
    color: #007cba;
    font-weight: bold;
    margin-right: 8px;
}

.wholesale-info-mini .min-qty {
    color: #6c757d;
    font-size: 12px;
}

/* Sufijo de precio */
.wholesale-price-suffix {
    font-size: 12px;
    color: #6c757d;
    font-weight: normal;
    margin-left: 4px;
}

/* Información en carrito */
.wholesale-cart-savings {
    color: #28a745;
    font-size: 12px;
    font-weight: normal;
}

/* Responsive design */
@media (max-width: 768px) {
    .wholesale-products-grid.columns-4,
    .wholesale-products-grid.columns-5,
    .wholesale-products-grid.columns-6 {
        grid-template-columns: repeat(2, 1fr);
    }

    .wholesale-products-grid.columns-3 {
        grid-template-columns: repeat(2, 1fr);
    }

    .wholesale-info-authenticated {
        padding: 15px;
    }

    .wholesale-pricing-details {
        font-size: 14px;
    }

    .wholesale-price-row .price {
        font-size: 18px;
    }

    .wholesale-price-table {
        font-size: 12px;
    }

    .wholesale-price-table th,
    .wholesale-price-table td {
        padding: 6px 8px;
    }

    .wholesale-login-form {
        margin: 20px 10px;
        padding: 20px;
    }

    .wholesale-user-notice {
        font-size: 12px;
        padding: 10px 15px;
    }
}

@media (max-width: 480px) {
    .wholesale-products-grid.columns-2,
    .wholesale-products-grid.columns-3,
    .wholesale-products-grid.columns-4,
    .wholesale-products-grid.columns-5,
    .wholesale-products-grid.columns-6 {
        grid-template-columns: 1fr;
    }

    .wholesale-price-row,
    .wholesale-min-qty-row,
    .wholesale-savings-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }

    .wholesale-login-notice {
        padding: 20px 15px;
    }

    .wholesale-info-title {
        font-size: 16px;
    }

    .wholesale-product-item .product-image img {
        height: 180px;
    }
}

/* Animaciones */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.wholesale-info-authenticated,
.wholesale-info-guest {
    animation: fadeInUp 0.5s ease-out;
}

/* Estados de hover mejorados */
.wholesale-login-btn:hover,
.wholesale-product-item:hover {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Efectos de focus para accesibilidad */
.wholesale-login-form input:focus,
.wholesale-login-btn:focus {
    outline: 2px solid #007cba;
    outline-offset: 2px;
}

/* Mejoras tipográficas */
.wholesale-info-authenticated,
.wholesale-info-guest {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.5;
}

/* Colores de marca consistentes */
:root {
    --wholesale-primary: #007cba;
    --wholesale-primary-dark: #005a87;
    --wholesale-success: #28a745;
    --wholesale-warning: #ffc107;
    --wholesale-light: #f8f9fa;
    --wholesale-border: #dee2e6;
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .wholesale-info-authenticated {
        background: linear-gradient(135deg, #2d3748 0%, #4a5568 100%);
        border-color: #4a5568;
        color: #e2e8f0;
    }

    .wholesale-info-title {
        color: #63b3ed;
    }

    .wholesale-price-row .price {
        color: #63b3ed;
    }

    .wholesale-product-item {
        background: #2d3748;
        border-color: #4a5568;
        color: #e2e8f0;
    }

    .wholesale-product-item .product-title a {
        color: #e2e8f0;
    }

    .wholesale-product-item .product-title a:hover {
        color: #63b3ed;
    }
}

.wholesale-info-guest-subtle {
    margin: 10px 0;
}

.wholesale-login-message {
    background: #f8f9fa;
    border-left: 3px solid #007cba;
    padding: 8px 12px;
    margin: 0;
    font-size: 14px;
    color: #495057;
    border-radius: 0 4px 4px 0;
}

.wholesale-icon-small {
    font-size: 12px;
    margin-right: 6px;
    opacity: 0.8;
}

.wholesale-login-link {
    color: #007cba;
    text-decoration: none;
    font-weight: 500;
    margin-left: 8px;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s ease;
}

.wholesale-login-link:hover {
    border-bottom-color: #007cba;
    color: #005a87;
}

/* Versión aún más minimalista (opcional) */
.wholesale-info-guest-minimal {
    text-align: right;
    margin: 5px 0;
}

.wholesale-login-message-minimal {
    font-size: 12px;
    color: #6c757d;
    font-style: italic;
}

.wholesale-login-message-minimal a {
    color: #007cba;
    text-decoration: none;
    font-weight: normal;
}

.wholesale-login-message-minimal a:hover {
    text-decoration: underline;
}

.wholesale-login-link {
    color: #007cba;
    text-decoration: none;
    font-weight: 500;
    margin-left: 8px;
    border-bottom: none;
    transition: border-color 0.2s ease;
    border: none;
    background: transparent;
}